diff --git a/docs/scripts/index.js b/docs/scripts/index.js index 7507b610..e5b8606a 100644 --- a/docs/scripts/index.js +++ b/docs/scripts/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -(function(){var __webpack_modules__={76793:function(e,t,i){"use strict";i.r(t),i.d(t,{render:function(){return E}});var n=window.document,s=window.Math,o=window.HTMLElement,r=window.XMLHttpRequest,a=function(e,t){for(var i=0,n=e.length;i'}}},download:{heights:{16:{width:16,path:''}}},eye:{heights:{16:{width:16,path:''}}},heart:{heights:{16:{width:16,path:''}}},"issue-opened":{heights:{16:{width:16,path:''}}},"mark-github":{heights:{16:{width:16,path:''}}},package:{heights:{16:{width:16,path:''}}},play:{heights:{16:{width:16,path:''}}},"repo-forked":{heights:{16:{width:16,path:''}}},"repo-template":{heights:{16:{width:16,path:''}}},star:{heights:{16:{width:16,path:''}}}},C=function(e,t){e=h(e).replace(/^octicon-/,""),d(w,e)||(e="mark-github");var i=t>=24&&24 in w[e].heights?24:16,n=w[e].heights[i];return'"},y={},S=function(e,t){var i=y[e]||(y[e]=[]);if(!(i.push(t)>1)){var n=function(e){var t;return function(){t||(t=1,e.apply(this,arguments))}}((function(){for(delete y[e];t=i.shift();)t.apply(null,arguments)}));if(p){var s=new r;m(s,"abort",n),m(s,"error",n),m(s,"load",(function(){var e;try{e=JSON.parse(this.responseText)}catch(e){return void n(e)}n(200!==this.status,e)})),s.open("GET",e),s.send()}else{var o=this||window;o._=function(e){o._=null,n(200!==e.meta.status,e.data)};var a=l(o.document)("script",{async:!0,src:e+(-1!==e.indexOf("?")?"&":"?")+"callback=_"}),c=function(){o._&&o._({meta:{}})};m(a,"load",c),m(a,"error",c),function(e,t,i){if(null!=e.readyState){var n="readystatechange",s=function(){if(t.test(e.readyState))return _(e,n,s),i.apply(this,arguments)};m(e,n,s)}}(a,/de|m/,c),o.document.getElementsByTagName("head")[0].appendChild(a)}}},k=function(e,t,i){var n=l(e.ownerDocument),s=e.appendChild(n("style",{type:"text/css"})),o="body{margin:0}a{text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:0;line-height:0;white-space:nowrap}.btn,.social-count{position:relative;display:inline-block;display:inline-flex;height:14px;padding:2px 5px;font-size:11px;font-weight:600;line-height:14px;vertical-align:bottom;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-repeat:repeat-x;background-position:-1px -1px;background-size:110% 110%;border:1px solid}.btn{border-radius:.25em}.btn:not(:last-child){border-radius:.25em 0 0 .25em}.social-count{border-left:0;border-radius:0 .25em .25em 0}.widget-lg .btn,.widget-lg .social-count{height:16px;padding:5px 10px;font-size:12px;line-height:16px}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor;overflow:visible}"+function(e){if(null==e)return v.light;if(d(v,e))return v[e];var t=function(e,t,i,n){null==t&&(t="&"),null==i&&(i="="),null==n&&(n=window.decodeURIComponent);var s={};return a(e.split(t),(function(e){if(""!==e){var t=e.split(i);s[n(t[0])]=null!=t[1]?n(t.slice(1).join(i)):void 0}})),s}(e,";",":",(function(e){return e.replace(/^[ \t\n\f\r]+|[ \t\n\f\r]+$/g,"")}));return v[d(v,t["no-preference"])?t["no-preference"]:"light"]+b("light",t.light)+b("dark",t.dark)}(t["data-color-scheme"]);s.styleSheet?s.styleSheet.cssText=o:s.appendChild(e.ownerDocument.createTextNode(o));var r="large"===h(t["data-size"]),c=n("a",{className:"btn",href:t.href,rel:"noopener",target:"_blank",title:t.title||void 0,"aria-label":t["aria-label"]||void 0,innerHTML:C(t["data-icon"],r?16:14)+" "},[n("span",{},[t["data-text"]||""])]),p=e.appendChild(n("div",{className:"widget"+(r?" widget-lg":"")},[c])),f=c.hostname.replace(/\.$/,"");if(("."+f).substring(f.length-10)!=="."+u)return c.removeAttribute("href"),void i(p);var m=(" /"+c.pathname).split(/\/+/);if(((f===u||f==="gist."+u)&&"archive"===m[3]||f===u&&"releases"===m[3]&&("download"===m[4]||"latest"===m[4]&&"download"===m[5])||f==="codeload."+u)&&(c.target="_top"),"true"===h(t["data-show-count"])&&f===u&&"marketplace"!==m[1]&&"sponsors"!==m[1]&&"orgs"!==m[1]&&"users"!==m[1]&&"-"!==m[1]){var _,w;if(!m[2]&&m[1])w="followers",_="?tab=followers";else if(!m[3]&&m[2])w="stargazers_count",_="/stargazers";else if(m[4]||"subscription"!==m[3])if(m[4]||"fork"!==m[3]){if("issues"!==m[3])return void i(p);w="open_issues_count",_="/issues"}else w="forks_count",_="/forks";else w="subscribers_count",_="/watchers";var y=m[2]?"/repos/"+m[1]+"/"+m[2]:"/users/"+m[1];S.call(this,g+y,(function(e,t){if(!e){var s=t[w];p.appendChild(n("a",{className:"social-count",href:t.html_url+_,rel:"noopener",target:"_blank","aria-label":s+" "+w.replace(/_count$/,"").replace("_"," ").slice(0,s<2?-1:void 0)+" on GitHub"},[(""+s).replace(/\B(?=(\d{3})+(?!\d))/g,",")]))}i(p)}))}else i(p)},x=window.devicePixelRatio||1,L=function(e){return(x>1?s.ceil(s.round(e*x)/x*2)/2:s.ceil(e))||0},D=function(e,t){e.style.width=t[0]+"px",e.style.height=t[1]+"px"},E=function(e,t){if(null!=e&&null!=t)if(e.getAttribute&&(e=function(e){var t={href:e.href,title:e.title,"aria-label":e.getAttribute("aria-label")};return a(["icon","color-scheme","text","size","show-count"],(function(i){var n="data-"+i;t[n]=e.getAttribute(n)})),null==t["data-text"]&&(t["data-text"]=e.textContent||e.innerText),t}(e)),f){var i=c("span");k(i.attachShadow({mode:"closed"}),e,(function(){t(i)}))}else{var o=c("iframe",{src:"javascript:0",title:e.title||void 0,allowtransparency:!0,scrolling:"no",frameBorder:0});D(o,[0,0]),o.style.border="none";var r=function(){var i,a=o.contentWindow;try{i=a.document.body}catch(e){return void n.body.appendChild(o.parentNode.removeChild(o))}_(o,"load",r),k.call(a,i,e,(function(i){var n=function(e){var t=e.offsetWidth,i=e.offsetHeight;if(e.getBoundingClientRect){var n=e.getBoundingClientRect();t=s.max(t,L(n.width)),i=s.max(i,L(n.height))}return[t,i]}(i);o.parentNode.removeChild(o),function(e,t,i){var n=function(){return _(e,t,n),i.apply(this,arguments)};m(e,t,n)}(o,"load",(function(){D(o,n)})),o.src="https://unpkg.com/github-buttons@2.27.0/dist/buttons.html#"+(o.name=function(e,t,i,n){null==t&&(t="&"),null==i&&(i="="),null==n&&(n=window.encodeURIComponent);var s=[];for(var o in e){var r=e[o];null!=r&&s.push(n(o)+i+n(r))}return s.join(t)}(e)),t(o)}))};m(o,"load",r),n.body.appendChild(o)}}},47091:function(e,t,i){"use strict";i.r(t),i.d(t,{CancellationTokenSource:function(){return Gr},Emitter:function(){return Qr},KeyCode:function(){return Yr},KeyMod:function(){return Zr},MarkerSeverity:function(){return ia},MarkerTag:function(){return na},Position:function(){return Xr},Range:function(){return Jr},Selection:function(){return ea},SelectionDirection:function(){return ta},Token:function(){return oa},Uri:function(){return sa},default:function(){return da},editor:function(){return ra},languages:function(){return aa}});var n={};i.r(n),i.d(n,{CancellationTokenSource:function(){return Gr},Emitter:function(){return Qr},KeyCode:function(){return Yr},KeyMod:function(){return Zr},MarkerSeverity:function(){return ia},MarkerTag:function(){return na},Position:function(){return Xr},Range:function(){return Jr},Selection:function(){return ea},SelectionDirection:function(){return ta},Token:function(){return oa},Uri:function(){return sa},editor:function(){return ra},languages:function(){return aa}}),i(97078),i(53732),i(34157),i(22550),i(88314),i(50568),i(62082);var s=i(16827),o=(i(21991),i(55999),i(90581),i(77334),i(1452),i(61856),i(71955),i(98068),i(52783),i(40756),i(3191),i(23623),i(23793),i(69904),i(16116),i(59587),i(28557),i(85210),i(35620),i(53720),i(31986),i(41158),i(10965),i(64043),i(62124),i(60224),i(95392),i(91720),i(57972),i(80540),i(37052),i(23982),i(4812),i(69143),i(84956),i(36988),i(22400),i(90098),i(76585),i(97273),i(71246),i(18615),i(76973),i(49204),i(57698),i(19933),i(58722),i(42452),i(83012),i(65450),i(6503),i(43370),i(67742),i(59396),i(99842),i(39923),i(8438),i(24035),i(81188),i(138),i(3520)),r=i(32919),a=i(95601),l=i(35114),c=i(43920),d=i(54244),h=i(57614),u=i(52694),g=i(72777),p=i(49134),f=i(90890),m=i(79757),_=i(38945),v=i(20187),b=i(84756),w=i(97358),C=i(14374);let y;y="object"==typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name&&void 0!==globalThis.workerttPolicy?globalThis.workerttPolicy:(0,_.H)("defaultWorkerFactory",{createScriptURL:e=>e});class S extends l.jG{constructor(e,t,i,n,s,o){super(),this.id=i,this.label=n;const r=function(e,t){const i=globalThis.MonacoEnvironment;if(i){if("function"==typeof i.getWorker)return i.getWorker("workerMain.js",t);if("function"==typeof i.getWorkerUrl){const e=i.getWorkerUrl("workerMain.js",t);return new Worker(y?y.createScriptURL(e):e,{name:t,type:"module"})}}if(e){const i=function(e,t){if(/^((http:)|(https:)|(file:)|(vscode-file:))/.test(t)&&t.substring(0,globalThis.origin.length)!==globalThis.origin);else{const i=t.lastIndexOf("?"),n=t.lastIndexOf("#",i),s=i>0?new URLSearchParams(t.substring(i+1,~n?n:void 0)):new URLSearchParams;b.SJ.addSearchParam(s,!0,!0),t=s.toString()?`${t}?${s.toString()}#${e}`:`${t}#${e}`}const i=new Blob([(0,w.Yc)([`/*${e}*/`,void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify((0,C.Ec)())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify((0,C.i8)())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",`await import(ttPolicy?.createScriptURL('${t}') ?? '${t}');`,"globalThis.postMessage({ type: 'vscode-worker-ready' });",`/*${e}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(i)}(t,e.toString(!0));return n=new Worker(y?y.createScriptURL(i):i,{name:t,type:"module"}),new Promise(((e,t)=>{n.onmessage=function(t){"vscode-worker-ready"===t.data.type&&(n.onmessage=null,e(n))},n.onerror=t}))}var n;throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(e,n);"function"==typeof r.then?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(t,[]),this.worker.then((e=>{e.onmessage=function(e){s(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)})),this._register((0,l.s)((()=>{this.worker?.then((e=>{e.onmessage=null,e.onmessageerror=null,e.removeEventListener("error",o),e.terminate()})),this.worker=null})))}getId(){return this.id}postMessage(e,t){this.worker?.then((i=>{try{i.postMessage(e,t)}catch(e){(0,v.dz)(e),(0,v.dz)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:e}))}}))}}class k{constructor(e,t){this.amdModuleId=e,this.label=t,this.esmModuleLocation=b.zl.asBrowserUri(`${e}.esm.js`)}}class x{static{this.LAST_WORKER_ID=0}constructor(){this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++x.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new S(e.esmModuleLocation,e.amdModuleId,n,e.label||"anonymous"+n,t,(e=>{(0,m.logOnceWebWorkerWarning)(e),this._webWorkerFailedBeforeError=e,i(e)}))}}var L=i(40393),D=i(8494),E=i(79075),N=i(59266),I=i(17492),M=i(76925),T=i(43857),R=i(69122),P=i(52049),A=i(17191),O=i(80487),F=i(84201),B=i(45148),W=i(8482),H=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},V=function(e,t){return function(i,n){t(i,n,e)}};function z(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let U=class extends l.jG{constructor(e,t,i,n,s,o){super(),this._languageConfigurationService=s,this._modelService=t,this._workerManager=this._register(new q(e,this._modelService)),this._logService=n,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:async(e,t)=>{if(!z(this._modelService,e.uri))return Promise.resolve({links:[]});const i=await this._workerWithResources([e.uri]),n=await i.$computeLinks(e.uri.toString());return n&&{links:n}}})),this._register(o.completionProvider.register("*",new j(this._workerManager,i,this._modelService,this._languageConfigurationService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return z(this._modelService,e)}async computedUnicodeHighlights(e,t,i){return(await this._workerWithResources([e])).$computeUnicodeHighlights(e.toString(),t,i)}async computeDiff(e,t,i,n){const s=await this._workerWithResources([e,t],!0),o=await s.$computeDiff(e.toString(),t.toString(),i,n);return o?{identical:o.identical,quitEarly:o.quitEarly,changes:r(o.changes),moves:o.moves.map((e=>new P.t(new A.WL(new O.M(e[0],e[1]),new O.M(e[2],e[3])),r(e[4]))))}:null;function r(e){return e.map((e=>new A.wm(new O.M(e[0],e[1]),new O.M(e[2],e[3]),e[4]?.map((e=>new A.q6(new L.Q(e[0],e[1],e[2],e[3]),new L.Q(e[4],e[5],e[6],e[7])))))))}}async computeMoreMinimalEdits(e,t,i=!1){if((0,w.EI)(t)){if(!z(this._modelService,e))return Promise.resolve(t);const n=T.W.create(),s=this._workerWithResources([e]).then((n=>n.$computeMoreMinimalEdits(e.toString(),t,i)));return s.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed()))),Promise.race([s,(0,f.wR)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return z(this._modelService,e)}async navigateValueSet(e,t,i){const n=this._modelService.getModel(e);if(!n)return null;const s=this._languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),o=s.source,r=s.flags;return(await this._workerWithResources([e])).$navigateValueSet(e.toString(),t,i,o,r)}canComputeWordRanges(e){return z(this._modelService,e)}async computeWordRanges(e,t){const i=this._modelService.getModel(e);if(!i)return Promise.resolve(null);const n=this._languageConfigurationService.getLanguageConfiguration(i.getLanguageId()).getWordDefinition(),s=n.source,o=n.flags;return(await this._workerWithResources([e])).$computeWordRanges(e.toString(),t,s,o)}async findSectionHeaders(e,t){return(await this._workerWithResources([e])).$findSectionHeaders(e.toString(),t)}async computeDefaultDocumentColors(e){return(await this._workerWithResources([e])).$computeDefaultDocumentColors(e.toString())}async _workerWithResources(e,t=!1){const i=await this._workerManager.withWorker();return await i.workerWithSyncedResources(e,t)}};U=H([V(1,N.IModelService),V(2,I.ITextResourceConfigurationService),V(3,M.rr),V(4,D.JZ),V(5,R.ILanguageFeaturesService)],U);class j{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}async provideCompletionItems(e,t){const i=this._configurationService.getValue(e.uri,t,"editor");if("off"===i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestions)z(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())z(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestions&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const s=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),o=e.getWordAtPosition(t),r=o?new L.Q(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):L.Q.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=await this._workerManager.withWorker(),c=await l.textualSuggest(n,o?.word,s);return c?{duration:c.duration,suggestions:c.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}}let q=class extends l.jG{constructor(e,t){super(),this._workerDescriptor=e,this._modelService=t,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new F.Be).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4),a.G),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new $(this._workerDescriptor,!1,this._modelService)),Promise.resolve(this._editorWorkerClient)}};q=H([V(1,N.IModelService)],q);class K{constructor(e){this._instance=e,this.proxy=this._instance}dispose(){this._instance.dispose()}setChannel(e,t){throw new Error("Not supported")}}let $=class extends l.jG{constructor(e,t,i){super(),this._workerDescriptor=e,this._disposed=!1,this._modelService=i,this._keepIdleModels=t,this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(function(e){const t="string"==typeof e?new k(e,void 0):e;return new m.SimpleWorkerClient(new x,t)}(this._workerDescriptor)),W.EditorWorkerHost.setChannel(this._worker,this._createEditorWorkerHost())}catch(e){(0,m.logOnceWebWorkerWarning)(e),this._worker=this._createFallbackLocalWorker()}return this._worker}async _getProxy(){try{const e=this._getOrCreateWorker().proxy;return await e.$ping(),e}catch(e){return(0,m.logOnceWebWorkerWarning)(e),this._worker=this._createFallbackLocalWorker(),this._worker.proxy}}_createFallbackLocalWorker(){return new K(new E.EditorSimpleWorker(this._createEditorWorkerHost(),null))}_createEditorWorkerHost(){return{$fhr:(e,t)=>this.fhr(e,t)}}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new B.WorkerTextModelSyncClient(e,this._modelService,this._keepIdleModels))),this._modelManager}async workerWithSyncedResources(e,t=!1){if(this._disposed)return Promise.reject((0,v.aD)());const i=await this._getProxy();return this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i}async textualSuggest(e,t,i){const n=await this.workerWithSyncedResources(e),s=i.source,o=i.flags;return n.$textualSuggest(e.map((e=>e.toString())),t,s,o)}dispose(){super.dispose(),this._disposed=!0}};$=H([V(2,N.IModelService)],$);var G=i(80670),Q=i(54409),Y=i(40616);let Z=class extends l.jG{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new G.vl),this._onCodeEditorAdd=this._register(new G.vl),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new G.vl),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new G.vl),this._onDiffEditorAdd=this._register(new G.vl),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new G.vl),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Q.w,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}async openCodeEditor(e,t,i){for(const n of this._codeEditorOpenHandlers){const s=await n(e,t,i);if(null!==s)return s}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return(0,l.s)(t)}};var X,J;Z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(X=0,J=Y.Gy,function(e,t){J(e,t,X)})],Z);var ee=i(97848),te=i(48682),ie=function(e,t){return function(i,n){t(i,n,e)}};let ne=class extends Z{constructor(e,t){super(t),this._register(this.onCodeEditorAdd((()=>this._checkContextKey()))),this._register(this.onCodeEditorRemove((()=>this._checkContextKey()))),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler((async(e,t,i)=>t?this.doOpenEditor(t,e):null)))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===b.ny.http||i===b.ny.https)return(0,F.CE)(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};ne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ie(0,ee.fN),ie(1,Y.Gy)],ne),(0,te.v)(g.T,ne,0);var se=i(63619);const oe=(0,se.u1)("layoutService");var re=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};let le=class{get mainContainer(){return(0,w.Fy)(this._codeEditorService.listCodeEditors())?.getContainerDomNode()??a.G.document.body}get activeContainer(){const e=this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor();return e?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return F.tG(this.mainContainer)}get activeContainerDimension(){return F.tG(this.activeContainer)}get containers(){return(0,w.Yc)(this._codeEditorService.listCodeEditors().map((e=>e.getContainerDomNode())))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=G.Jh.None,this.onDidLayoutActiveContainer=G.Jh.None,this.onDidLayoutContainer=G.Jh.None,this.onDidChangeActiveContainer=G.Jh.None,this.onDidAddContainer=G.Jh.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};le=re([ae(0,g.T)],le);let ce=class extends le{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};ce=re([ae(1,g.T)],ce),(0,te.v)(oe,le,1);var de=i(64159),he=i(13675),ue=i(31835),ge=i(79911),pe=function(e,t){return function(i,n){t(i,n,e)}};function fe(e){return e.scheme===b.ny.file?e.fsPath:e.path}let me=0;class _e{constructor(e,t,i,n,s,o,r){this.id=++me,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class ve{constructor(e,t){this.resourceLabel=e,this.reason=t}}class be{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);const i=[];return e.length>0&&i.push(C.kg({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(C.kg({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class we{constructor(e,t,i,n,s,o,r){this.id=++me,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new be),this.removedResources.has(t)||this.removedResources.set(t,new ve(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new be),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new ve(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Ce{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new ge.To(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let o=0,r=this._past.length;o=t||r.id!==e.elements[n])&&(i=!1,s=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let s=this._future.length-1;s>=0;s--,n++){const r=this._future[s];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,o=s),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==s&&(this._past=this._past.slice(0,s)),-1!==o&&(this._future=this._future.slice(o+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class ye{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=o,i=n)}return[t,i]}canUndo(e){if(e instanceof ge.Ym){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,v.dz)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const o=this._acquireLocks(i);let r;try{r=t()}catch(t){return o(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(o(),n.dispose(),s())),(t=>(o(),n.dispose(),this._onError(t,e)))):(o(),n.dispose(),s())}async _invokeWorkspacePrepare(e){if(void 0===e.actual.prepareUndoRedo)return l.jG.None;const t=e.actual.prepareUndoRedo();return void 0===t?l.jG.None:t}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(l.jG.None);const i=e.actual.prepareUndoRedo();return i?(0,l.Xm)(i)?t(i):i.then((e=>t(e))):t(l.jG.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Se);return new ye(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new xe(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new xe}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,C.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,C.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&s.push(e.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,C.kg({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const e of i.editStacks)e.locked&&o.push(e.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,C.kg({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,C.kg({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let s;!function(e){e[e.All=0]="All",e[e.This=1]="This",e[e.Cancel=2]="Cancel"}(s||(s={}));const{result:o}=await this._dialogService.prompt({type:de.A.Info,message:C.kg("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:C.kg({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",i.editStacks.length),run:()=>s.All},{label:C.kg({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>s.This}],cancelButton:{run:()=>s.Cancel}});if(o===s.Cancel)return;if(o===s.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let s;try{s=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceUndo(e,t,i,!0);if(o)return s.dispose(),o.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,s,(()=>this._continueUndoInGroup(t.groupId,n)))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new ye([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=C.kg({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestPastElement();o&&o.groupId===e&&(!t||o.groupOrder>t.groupOrder)&&(t=o,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof ge.Ym){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(s){if(s.groupId){const[e,n]=this._findClosestUndoElementInGroup(s.groupId);if(s!==e&&n)return this._undo(n,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return 1===s.type?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{}}}async _confirmAndContinueUndo(e,t,i){if((await this._dialogService.confirm({message:C.kg("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:C.kg({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:C.kg("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&o.sourceId===e&&(!t||o.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,C.kg({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const e of i.editStacks)e.locked&&o.push(e.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,C.kg({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,C.kg({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new ye([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=C.kg({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&o.groupId===e&&(!t||o.groupOrder=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([pe(0,he.X),pe(1,ue.Ot)],ke);class xe{constructor(e){this.returnValue=e}}(0,te.v)(ge.$D,ke,1),i(82688),i(54560),i(18289);var Le=i(4195),De=i(74856),Ee=i(14280),Ne=i(87163),Ie=i(47901),Me=i(49943),Te=i(6770),Re=i(95607),Pe=i(69498),Ae=i(85584),Oe=i(79783),Fe=i(68745),Be=i(15075),We=function(e,t){return function(i,n){t(i,n,e)}};const He=F.$;let Ve=class extends Te.x{get _targetWindow(){return F.zk(this._target.targetElements[0])}get _targetDocumentElement(){return F.zk(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return 2===this._hoverPosition?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,i,n,s,r){super(),this._keybindingService=t,this._configurationService=i,this._openerService=n,this._instantiationService=s,this._accessibilityService=r,this._messageListeners=new l.Cm,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new G.vl),this._onRequestLayout=this._register(new G.vl),this._linkHandler=e.linkHandler||(t=>(0,Pe.i)(this._openerService,t,(0,Ae.VS)(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new Ue(e.target),this._hoverPointer=e.appearance?.showPointer?He("div.workbench-hover-pointer"):void 0,this._hover=this._register(new Me.N4),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),e.appearance?.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=e.position?.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,(e=>e.stopPropagation())),this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.dispose()})),this._register(F.ko(this._targetWindow,"blur",(()=>this.dispose())));const a=He("div.hover-row.markdown-hover"),c=He("div.hover-contents");if("string"==typeof e.content)c.textContent=e.content,c.style.whiteSpace="pre-wrap";else if(F.sb(e.content))c.appendChild(e.content),c.classList.add("html-hover-contents");else{const t=e.content,i=this._instantiationService.createInstance(Pe.T,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||o.jU.fontFamily}),{element:n}=i.render(t,{actionHandler:{callback:e=>this._linkHandler(e),disposables:this._messageListeners},asyncRenderCallback:()=>{c.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});c.appendChild(n)}if(a.appendChild(c),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){const t=He("div.hover-row.status-bar"),i=He("div.actions");e.actions.forEach((e=>{const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;Me.jQ.render(i,{label:e.label,commandId:e.commandId,run:t=>{e.run(t),this.dispose()},iconClass:e.iconClass},n)})),t.appendChild(i),this._hover.containerDomNode.appendChild(t)}let d;if(this._hoverContainer=He("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode),d=!(e.actions&&e.actions.length>0)&&(void 0===e.persistence?.hideOnHover?"string"==typeof e.content||(0,Ae.VS)(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):e.persistence.hideOnHover),e.appearance?.showHoverHint){const e=He("div.hover-row.status-bar"),t=He("div.info");t.textContent=(0,C.kg)("hoverhint","Hold {0} key to mouse over",Oe.zx?"Option":"Alt"),e.appendChild(t),this._hover.containerDomNode.appendChild(e)}const h=[...this._target.targetElements];d||h.push(this._hoverContainer);const u=this._register(new ze(h));if(this._register(u.onMouseOut((()=>{this._isLocked||this.dispose()}))),d){const e=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new ze(e)),this._register(this._lockMouseTracker.onMouseOut((()=>{this._isLocked||this.dispose()})))}else this._lockMouseTracker=u}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){const i=F.Hs(this._hoverContainer,He("div")),n=F.BC(this._hoverContainer,He("div"));i.tabIndex=0,n.tabIndex=0,this._register(F.ko(n,"focus",(t=>{e.focus(),t.preventDefault()}))),this._register(F.ko(i,"focus",(e=>{t.focus(),e.preventDefault()})))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return e}const n=this.findLastFocusableChild(i);if(n)return n}}render(e){e.appendChild(this._hoverContainer);const t=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&(0,Me.vr)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());t&&(0,Be.h5)(t),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=this._target.targetElements.map((e=>(e=>{const t=F.mU(e),i=e.getBoundingClientRect();return{top:i.top*t,bottom:i.bottom*t,right:i.right*t,left:i.left*t}})(e))),{top:t,right:i,bottom:n,left:s}=e[0],o=i-s,r=n-t,a={top:t,right:i,bottom:n,left:s,width:o,height:r,center:{x:s+o/2,y:t+r/2}};if(this.adjustHorizontalHoverPosition(a),this.adjustVerticalHoverPosition(a),this.adjustHoverMaxHeight(a),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:a.left+=3,a.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:a.left-=3,a.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:a.top+=3,a.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:a.top-=3,a.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px"}a.center.x=a.left+o/2,a.center.y=a.top+r/2}this.computeXCordinate(a),this.computeYCordinate(a),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(a)),this._hover.onContentsChanged()}computeXCordinate(e){const t=this._hover.containerDomNode.clientWidth+2;void 0!==this._target.x?this._x=this._target.x:1===this._hoverPosition?this._x=e.right:0===this._hoverPosition?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(void 0!==this._target.x)return;const t=this._hoverPointer?3:0;if(this._forcePosition){const i=t+2;1===this._hoverPosition?this._hover.containerDomNode.style.maxWidth=this._targetDocumentElement.clientWidth-e.right-i+"px":0===this._hoverPosition&&(this._hover.containerDomNode.style.maxWidth=e.left-i+"px")}else 1===this._hoverPosition?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2):0===this._hoverPosition&&(e.left=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(void 0!==this._target.y||this._forcePosition)return;const t=this._hoverPointer?3:0;3===this._hoverPosition?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):2===this._hoverPosition&&e.bottom+this._hover.containerDomNode.clientHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){const i=2+(this._hoverPointer?3:0);3===this._hoverPosition?t=Math.min(t,e.top-i):2===this._hoverPosition&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-i))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=e.center.y-(this._y-t)-3+"px":this._hoverPointer.style.top=Math.round(t/2)-3+"px";break}case 3:case 2:{this._hoverPointer.classList.add(3===this._hoverPosition?"bottom":"top");const t=this._hover.containerDomNode.clientWidth;let i=Math.round(t/2)-3;const n=this._x+i;(ne.right)&&(i=e.center.x-this._x-3),this._hoverPointer.style.left=`${i}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};Ve=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([We(1,Ne.b),We(2,Ie.pG),We(3,Re.C),We(4,se._Y),We(5,Fe.j)],Ve);class ze extends Te.x{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new G.vl),this._elements.forEach((e=>this.onmouseover(e,(()=>this._onTargetMouseOver(e))))),this._elements.forEach((e=>this.onmouseleave(e,(()=>this._onTargetMouseLeave(e)))))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=F.zk(e).setTimeout((()=>this._fireIfMouseOutside()),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(F.zk(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class Ue{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var je,qe=i(40478),Ke=i(19621),$e=i(69627);function Ge(e,t,i){const n=i.mode===je.ALIGN?i.offset:i.offset+i.size,s=i.mode===je.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=s?s-t:Math.max(e-t,0):t<=s?s-t:t<=e-n?n:0}!function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(je||(je={}));class Qe extends l.jG{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=l.jG.None,this.toDisposeOnSetContainer=l.jG.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=F.$(".context-view"),F.jD(this.view),this.setContainer(e,t),this._register((0,l.s)((()=>this.setContainer(null,1))))}setContainer(e,t){this.useFixedPosition=1!==t;const i=this.useShadowDOM;if(this.useShadowDOM=3===t,(e!==this.container||i!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=F.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Ye,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(F.$("slot"))}else this.container.appendChild(this.view);const t=new l.Cm;Qe.BUBBLE_UP_EVENTS.forEach((e=>{t.add(F.b2(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),Qe.BUBBLE_DOWN_EVENTS.forEach((e=>{t.add(F.b2(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=t}}show(e){this.isVisible()&&this.hide(),F.w_(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",F.WU(this.view),this.toDisposeOnClean=e.render(this.view)||l.jG.None,this.delegate=e,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||Oe.un&&Ke.e.pointerEvents?(this.delegate?.layout?.(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(F.sb(e)){const i=F.BK(e),n=F.mU(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=function(e){const t=e;return!!t&&"number"==typeof t.x&&"number"==typeof t.y}(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=F.Tr(this.view),n=F.OK(this.view),s=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,r=this.delegate.anchorAxisAlignment||0;let a,l;const c=F.fz();if(0===r){const e={offset:t.top-c.pageYOffset,size:t.height,position:0===s?0:1},r={offset:t.left,size:t.width,position:0===o?0:1,mode:je.ALIGN};a=Ge(c.innerHeight,n,e)+c.pageYOffset,$e.Q.intersects({start:a,end:a+n},{start:e.offset,end:e.offset+e.size})&&(r.mode=je.AVOID),l=Ge(c.innerWidth,i,r)}else{const e={offset:t.left,size:t.width,position:0===o?0:1},r={offset:t.top,size:t.height,position:0===s?0:1,mode:je.ALIGN};l=Ge(c.innerWidth,i,e),$e.Q.intersects({start:l,end:l+i},{start:e.offset,end:e.offset+e.size})&&(r.mode=je.AVOID),a=Ge(c.innerHeight,n,r)+c.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===s?"bottom":"top"),this.view.classList.add(0===o?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=F.BK(this.container);this.view.style.top=a-(this.useFixedPosition?F.BK(this.view).top:d.top)+"px",this.view.style.left=l-(this.useFixedPosition?F.BK(this.view).left:d.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),F.jD(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,F.zk(e).document.activeElement):t&&!F.QX(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}const Ye='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';let Ze=class extends l.jG{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new Qe(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer((()=>this.layout())))}showContextView(e,t,i){let n;n=t?t===this.layoutService.getContainer((0,F.zk)(t))?1:i?3:2:1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);const s={close:()=>{this.openContextView===s&&this.hideContextView()}};return this.openContextView=s,s}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};Ze=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,oe)],Ze);class Xe extends Ze{getContextViewElement(){return this.contextView.getViewElement()}}var Je=i(76611),et=i(24219);class tt{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(void 0===e||(0,et.Kg)(e)||(0,F.sb)(e))n=e;else if((0,et.Tn)(e.markdown)){this._hoverWidget||this.show((0,C.kg)("iconLabel.loading","Loading..."),t,i),this._cancellationTokenSource=new Je.Qi;const s=this._cancellationTokenSource.token;if(n=await e.markdown(s),void 0===n&&(n=e.markdownNotSupportedFallback),this.isDisposed||s.isCancellationRequested)return}else n=e.markdown??e.markdownNotSupportedFallback;this.show(n,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s={content:e,target:this.target,actions:i?.actions,linkHandler:i?.linkHandler,trapFocus:i?.trapFocus,appearance:{showPointer:"element"===this.hoverDelegate.placement,skipFadeInAnimation:!this.fadeInAnimation||!!n,showHoverHint:i?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(s,t)}n?.dispose()}hasContent(e){return!(!e||(0,Ae.VS)(e)&&!e.value)}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}var it=function(e,t){return function(i,n){t(i,n,e)}};let nt=class extends l.jG{constructor(e,t,i,n,s){super(),this._instantiationService=e,this._keybindingService=i,this._layoutService=n,this._accessibilityService=s,this._managedHovers=new Map,t.onDidShowContextMenu((()=>this.hideHover())),this._contextViewHandler=this._register(new Ze(this._layoutService))}showHover(e,t,i){if(st(this._currentHoverOptions)===st(e))return;if(this._currentHover&&this._currentHoverOptions?.persistence?.sticky)return;this._currentHoverOptions=e,this._lastHoverOptions=e;const n=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),s=(0,F.bq)();i||(n&&s?s.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=s):this._lastFocusedElementBeforeOpen=void 0);const o=new l.Cm,r=this._instantiationService.createInstance(Ve,e);if(e.persistence?.sticky&&(r.isLocked=!0),r.onDispose((()=>{this._currentHover?.domNode&&(0,F.nR)(this._currentHover.domNode)&&this._lastFocusedElementBeforeOpen?.focus(),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),o.dispose()}),void 0,o),!e.container){const t=(0,F.sb)(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer((0,F.zk)(t))}if(this._contextViewHandler.showContextView(new ot(r,t),e.container),r.onRequestLayout((()=>this._contextViewHandler.layout()),void 0,o),e.persistence?.sticky)o.add((0,F.ko)((0,F.zk)(e.container).document,F.Bx.MOUSE_DOWN,(e=>{(0,F.QX)(e.target,r.domNode)||this.doHideHover()})));else{if("targetElements"in e.target)for(const t of e.target.targetElements)o.add((0,F.ko)(t,F.Bx.CLICK,(()=>this.hideHover())));else o.add((0,F.ko)(e.target,F.Bx.CLICK,(()=>this.hideHover())));const t=(0,F.bq)();if(t){const i=(0,F.zk)(t).document;o.add((0,F.ko)(t,F.Bx.KEY_DOWN,(t=>this._keyDown(t,r,!!e.persistence?.hideOnKeyDown)))),o.add((0,F.ko)(i,F.Bx.KEY_DOWN,(t=>this._keyDown(t,r,!!e.persistence?.hideOnKeyDown)))),o.add((0,F.ko)(t,F.Bx.KEY_UP,(e=>this._keyUp(e,r)))),o.add((0,F.ko)(i,F.Bx.KEY_UP,(e=>this._keyUp(e,r))))}}if("IntersectionObserver"in a.G){const t=new IntersectionObserver((e=>this._intersectionChange(e,r)),{threshold:0}),i="targetElements"in e.target?e.target.targetElements[0]:e.target;t.observe(i),o.add((0,l.s)((()=>t.disconnect())))}return this._currentHover=r,r}hideHover(){!this._currentHover?.isLocked&&this._currentHoverOptions&&this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,t,i){if("Alt"===e.key)return void(t.isLocked=!0);const n=new qe.Z(e);this._keybindingService.resolveKeyboardEvent(n).getSingleModifierDispatchChords().some((e=>!!e))||0!==this._keybindingService.softDispatch(n,n.target).kind||!i||this._currentHoverOptions?.trapFocus&&"Tab"===e.key||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus())}_keyUp(e,t){"Alt"===e.key&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus()))}setupManagedHover(e,t,i,n){let s,o;t.setAttribute("custom-hover","true"),""!==t.title&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",t.title),t.title="");const r=(t,i)=>{const n=void 0!==o;t&&(o?.dispose(),o=void 0),i&&(s?.dispose(),s=void 0),n&&(e.onDidHideHover?.(),o=void 0)},a=(s,r,a,l)=>new f.pc((async()=>{o&&!o.isDisposed||(o=new tt(e,a||t,s>0),await o.update("function"==typeof i?i():i,r,{...n,trapFocus:l}))}),s);let c=!1;const d=(0,F.ko)(t,F.Bx.MOUSE_DOWN,(()=>{c=!0,r(!0,!0)}),!0),h=(0,F.ko)(t,F.Bx.MOUSE_UP,(()=>{c=!1}),!0),u=(0,F.ko)(t,F.Bx.MOUSE_LEAVE,(e=>{c=!1,r(!1,e.fromElement===t)}),!0),g=(0,F.ko)(t,F.Bx.MOUSE_OVER,(i=>{if(s)return;const n=new l.Cm,o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{o.x=e.x+10,(0,F.sb)(e.target)&&rt(e.target,t)!==t&&r(!0,!0)};n.add((0,F.ko)(t,F.Bx.MOUSE_MOVE,e,!0))}s=n,(0,F.sb)(i.target)&&rt(i.target,t)!==t||n.add(a(e.delay,!1,o))}),!0);let p;const m=t.tagName.toLowerCase();"input"!==m&&"textarea"!==m&&(p=(0,F.ko)(t,F.Bx.FOCUS,(()=>{if(c||s)return;const i={targetElements:[t],dispose:()=>{}},n=new l.Cm;n.add((0,F.ko)(t,F.Bx.BLUR,(()=>r(!0,!0)),!0)),n.add(a(e.delay,!1,i)),s=n}),!0));const _={show:e=>{r(!1,!0),a(0,e,void 0,e)},hide:()=>{r(!0,!0)},update:async(e,t)=>{i=e,await(o?.update(i,void 0,t))},dispose:()=>{this._managedHovers.delete(t),g.dispose(),u.dispose(),d.dispose(),h.dispose(),p?.dispose(),r(!0,!0)}};return this._managedHovers.set(t,_),_}showManagedHover(e){const t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach((e=>e.dispose())),super.dispose()}};function st(e){if(void 0!==e)return e?.id??e}nt=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([it(0,se._Y),it(1,Ee.Z),it(2,Ne.b),it(3,oe),it(4,Fe.j)],nt);class ot{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function rt(e,t){for(t=t??(0,F.zk)(e).document.body;!e.hasAttribute("custom-hover")&&e!==t;)e=e.parentElement;return e}(0,te.v)(De.TN,nt,1),(0,Y.zy)(((e,t)=>{const i=e.getColor(Le.oZ8);i&&(t.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`))}));var at=i(99559),lt=i(98325),ct=i(38047),dt=i(48905),ht=i(62993),ut=i(20878),gt=i(21335),pt=i(52732),ft=i(16434),mt=i(56419);function _t(e){return Object.isFrozen(e)?e:p.ol(e)}class vt{static createEmptyModel(e){return new vt({},[],[],void 0,e)}constructor(e,t,i,n,s){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.logService=s,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const e=this.raw.map((e=>{if(e instanceof vt)return e;const t=new bt("",this.logService);return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,Ie.gD)(this.contents,e):this.contents}inspect(e,t){const i=this;return{get value(){return _t(i.rawConfiguration.getValue(e))},get override(){return t?_t(i.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return _t(t?i.rawConfiguration.override(t).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){const t=[];for(const{contents:n,identifiers:s,keys:o}of i.rawConfiguration.overrides){const r=new vt(n,o,[],void 0,i.logService).getValue(e);void 0!==r&&t.push({identifiers:s,value:r})}return t.length?_t(t):void 0}}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?(0,Ie.gD)(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=p.Go(this.contents),i=p.Go(this.overrides),n=[...this.keys],s=this.raw?.length?[...this.raw]:[this];for(const o of e)if(s.push(...o.raw?.length?o.raw:[o]),!o.isEmpty()){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=i.filter((t=>w.aI(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=w.dM(t.keys)):i.push(p.Go(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new vt(t,n,i,s.every((e=>e instanceof vt))?void 0:s,this.logService)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;const i={};for(const e of w.dM([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e];const s=t[e];s&&("object"==typeof n&&"object"==typeof s?(n=p.Go(n),this.mergeContents(n,s)):n=s),i[e]=n}return new vt(i,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&et.Gv(e[i])&&et.Gv(t[i])?this.mergeContents(e[i],t[i]):e[i]=p.Go(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=p.Go(e))};for(const i of this.overrides)1===i.identifiers.length&&i.identifiers[0]===e?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),(0,Ie.iB)(this.contents,e),ft.rC.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>w.aI(t.identifiers,(0,ft.Gv)(e)))),1))}updateValue(e,t,i){if((0,Ie.kW)(this.contents,e,t,(e=>this.logService.error(e))),(i=i||-1===this.keys.indexOf(e))&&this.keys.push(e),ft.rC.test(e)){const t=(0,ft.Gv)(e),i={identifiers:t,keys:Object.keys(this.contents[e]),contents:(0,Ie.ad)(this.contents[e],(e=>this.logService.error(e)))},n=this.overrides.findIndex((e=>w.aI(e.identifiers,t)));-1!==n?this.overrides[n]=i:this.overrides.push(i)}}}class bt{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||vt.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:s,restricted:o,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new vt(i,n,s,r?[e]:void 0,this.logService),this._restrictedConfigurations=o||[]}doParseRaw(e,t){const i=mt.O.as(ft.Fd.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);return e=n.raw,{contents:(0,Ie.ad)(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`))),keys:Object.keys(e),overrides:this.toOverrides(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`))),restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){let s=!1;if(!n?.scopes&&!n?.skipRestricted&&!n?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:s};const o={},r=[];for(const a in e)if(ft.rC.test(a)&&i){const i=this.filter(e[a],t,!1,n);o[a]=i.raw,s=s||i.hasExcludedProperties,r.push(...i.restricted)}else{const i=t[a],l=i?void 0!==i.scope?i.scope:3:void 0;i?.restricted&&r.push(a),n.exclude?.includes(a)||!n.include?.includes(a)&&(void 0!==l&&void 0!==n.scopes&&!n.scopes.includes(l)||n.skipRestricted&&i?.restricted)?s=!0:o[a]=e[a]}return{raw:o,restricted:r,hasExcludedProperties:s}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(ft.rC.test(n)){const s={};for(const t in e[n])s[t]=e[n][t];i.push({identifiers:(0,ft.Gv)(n),keys:Object.keys(s),contents:(0,Ie.ad)(s,t)})}return i}}class wt{constructor(e,t,i,n,s,o,r,a,l,c,d,h,u){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=s,this.policyConfiguration=o,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=c,this.workspaceConfiguration=d,this.folderConfigurationModel=h,this.memoryConfigurationModel=u}toInspectValue(e){return void 0!==e?.value||void 0!==e?.override||void 0!==e?.overrides?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class Ct{constructor(e,t,i,n,s,o,r,a,l,c){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=s,this._workspaceConfiguration=o,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this.logService=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new pt.fT,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=vt.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),o=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const t of n.overrides)for(const i of t.identifiers)void 0!==n.getOverrideValue(e,i)&&r.add(i);return new wt(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,s||void 0,o)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e}),[])}}static parse(e,t){const i=this.parseConfigurationModel(e.defaults,t),n=this.parseConfigurationModel(e.policy,t),s=this.parseConfigurationModel(e.application,t),o=this.parseConfigurationModel(e.user,t),r=this.parseConfigurationModel(e.workspace,t),a=e.folders.reduce(((e,i)=>(e.set(d.r.revive(i[0]),this.parseConfigurationModel(i[1],t)),e)),new pt.fT);return new Ct(i,n,s,o,vt.createEmptyModel(t),r,a,vt.createEmptyModel(t),new pt.fT,t)}static parseConfigurationModel(e,t){return new vt(e.contents,e.keys,e.overrides,void 0,t)}}class yt{constructor(e,t,i,n,s){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this.logService=s,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const t of e.keys)this.affectedKeys.add(t);for(const[,t]of e.overrides)for(const e of t)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const e of this.affectedKeys)this._affectsConfigStr+=e+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Ct.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){const i=this._marker+e,n=this._affectsConfigStr.indexOf(i);if(n<0)return!1;const s=n+i.length;if(s>=this._affectsConfigStr.length)return!1;const o=this._affectsConfigStr.charCodeAt(s);if(o!==this._markerCode1&&o!==this._markerCode2)return!1;if(t){const i=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,n=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!p.aI(i,n)}return!0}}var St=i(80175);const kt={kind:0},xt={kind:1};class Lt{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Lt.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e=0;e--){const n=i[e];if(n.command===t.command)continue;let s=!0;for(let e=1;e=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(void 0===s)return this._log("\\ No keybinding entries."),kt;let o=null;if(n.length<2)o=s;else{o=[];for(let e=0,t=s.length;et.chords.length)continue;let i=!0;for(let e=1;e=0;i--){const n=t[i];if(Lt._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function Dt(e){return e?`${e.serialize()}`:"no when condition"}function Et(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const Nt=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class It extends l.jG{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:G.Jh.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new G.vl),this._currentChords=[],this._currentChordChecker=new f.vb,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Mt.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new f.pc,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),kt;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),kt;const s=this._contextKeyService.getContext(t),o=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(s,o,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw(0,v.iH)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(C.kg("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(C.kg("next.chord","({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),St.M.enabled&&St.M.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],St.M.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Mt.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Mt.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getChords();return this._ignoreSingleModifiers=new Mt(s),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,o=null;if(i){const[t]=e.getSingleModifierDispatchChords();s=t,o=t?[t]:[]}else[s]=e.getDispatchChords(),o=this._currentChords.map((({keypress:e})=>e));if(null===s)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(r,o,s);switch(l.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",a,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${a}".`),this._notificationService.status(C.kg("missing.chord","The key combination ({0}, {1}) is not a command.",e,a),{hideAfter:1e4}),this._leaveChordMode(),n=!0}return n;case 1:return this._logService.trace("KeybindingService#dispatch",a,"[ Several keybindings match - more chords needed ]"),n=!0,this._expectAnotherChord(s,a),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),n;case 2:if(this._logService.trace("KeybindingService#dispatch",a,`[ Will dispatch command ${l.commandId} ]`),null===l.commandId||""===l.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${a}".`),this._notificationService.status(C.kg("missing.chord","The key combination ({0}, {1}) is not a command.",e,a),{hideAfter:1e4}),this._leaveChordMode(),n=!0}}else{this.inChordMode&&this._leaveChordMode(),l.isBubble||(n=!0),this._log(`+ Invoking command ${l.commandId}.`),this._currentlyDispatchingCommandId=l.commandId;try{void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e)))}finally{this._currentlyDispatchingCommandId=null}Nt.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return n}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class Mt{static{this.EMPTY=new Mt(null)}constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}var Tt=i(19561);class Rt{constructor(e,t,i,n,s,o,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Pt(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=Pt(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=o,this.isBuiltinExtension=r}}function Pt(e){const t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return Ot.r0.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Ot.rr.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return Ot.G$.toLabel(this._os,this._chords,(e=>this._getUserSettingsLabel(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new at.FW(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class Bt extends Ft{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return At.YM.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":At.YM.toString(e.keyCode)}_getElectronAccelerator(e){return At.YM.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=At.YM.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return Bt.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=At.YM.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=At.Fo[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof at.dG)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new at.dG(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=Pt(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new Bt(i,t)]:[]}}var Wt=i(41517),Ht=i(86171),Vt=i(2727),zt=i(1255),Ut=i(47025),jt=i(59951),qt=i(35477),Kt=i(31806),$t=i(30981),Gt=i(42574),Qt=i(93223),Yt=i(34287),Zt=i(75969),Xt=i(53510),Jt=i(98099),ei=i(9306),ti=i(5390),ii=i(93231),ni=i(81040),si=i(56613),oi=i(4590);const ri=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,ai=/(&)?(&)([^\s&])/g;var li,ci;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(li||(li={})),function(e){e[e.Above=0]="Above",e[e.Below=1]="Below"}(ci||(ci={}));class di extends Jt.E{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Oe.zx||Oe.j9?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=s,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(Xt.q.addTarget(s)),this._register((0,F.ko)(s,F.Bx.KEY_DOWN,(e=>{new qe.Z(e).equals(2)&&e.preventDefault()}))),i.enableMnemonics&&this._register((0,F.ko)(s,F.Bx.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){F.fs.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof ui&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),Oe.j9&&this._register((0,F.ko)(s,F.Bx.KEY_DOWN,(e=>{const t=new qe.Z(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),F.fs.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),F.fs.stop(e,!0))}))),this._register((0,F.ko)(this.domNode,F.Bx.MOUSE_OUT,(e=>{const t=e.relatedTarget;(0,F.QX)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,F.ko)(this.actionsList,F.Bx.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,F.QX)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(Xt.q.addTarget(this.actionsList)),this._register((0,F.ko)(this.actionsList,Xt.B.Tap,(e=>{let t=e.initialTarget;if(t&&(0,F.QX)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new ti.MU(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register((0,F.ko)(s,Xt.B.Change,(e=>{F.fs.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register((0,F.ko)(r,F.Bx.MOUSE_UP,(e=>{e.preventDefault()})));const a=(0,F.zk)(e);s.style.maxHeight=`${Math.max(10,a.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(((e,n)=>{if(i.submenuIds?.has(e.id))return console.warn(`Found submenu cycle: ${e.id}`),!1;if(e instanceof $t.wv){if(n===t.length-1||0===n)return!1;if(t[n-1]instanceof $t.wv)return!1}return!0})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof gi))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||((0,F.Cl)(e)?this.styleSheet=(0,F.li)(e):(di.globalStyleSheet||(di.globalStyleSheet=(0,F.li)()),this.styleSheet=di.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${pi(ii.W.menuSelection)}\n${pi(ii.W.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n\tmax-height: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderHoverBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderActiveBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`)}return i}(t,(0,F.Cl)(e))}styleScrollElement(e,t){const i=t.foregroundColor??"",n=t.backgroundColor??"",s=t.borderColor?`1px solid ${t.borderColor}`:"",o=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=s,e.style.borderRadius="5px",e.style.color=i,e.style.backgroundColor=n,e.style.boxShadow=o}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register((0,F.ko)(this.element,F.Bx.MOUSE_UP,(e=>{if(F.fs.stop(e,!0),Zt.gm){if(new Yt.P((0,F.zk)(this.element),e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,F.ko)(this.element,F.Bx.CONTEXT_MENU,(e=>{F.fs.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,F.BC)(this.element,(0,F.$)("a.action-menu-item")),this._action.id===$t.wv.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,F.BC)(this.item,(0,F.$)("span.menu-item-check"+si.L.asCSSSelector(ii.W.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,F.BC)(this.item,(0,F.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,F.BC)(this.item,(0,F.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){(0,F.w_)(this.label);let e=(0,oi.pS)(this.action.label);if(e){const t=function(e){const t=ri,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=ri.exec(e);if(i){e=c.ih(e),ai.lastIndex=0;let t=ai.exec(e);for(;t&&t[1];)t=ai.exec(e);const n=e=>e.replace(/&&/g,"&");t?this.label.append(c.NB(n(e.substr(0,t.index))," "),(0,F.$)("u",{"aria-hidden":"true"},t[3]),c.BO(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item?.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=i??"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=t??"")}}class ui extends hi{constructor(e,t,i,n,s){super(e,e,n,s),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new l.Cm),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:{horizontal:li.Right,vertical:ci.Below},this.showScheduler=new f.uC((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new f.uC((()=>{this.element&&!(0,F.QX)((0,F.bq)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,F.BC)(this.item,(0,F.$)("span.submenu-indicator"+si.L.asCSSSelector(ii.W.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,F.ko)(this.element,F.Bx.KEY_UP,(e=>{const t=new qe.Z(e);(t.equals(17)||t.equals(3))&&(F.fs.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,F.ko)(this.element,F.Bx.KEY_DOWN,(e=>{const t=new qe.Z(e);(0,F.bq)()===this.item&&(t.equals(17)||t.equals(3))&&F.fs.stop(e,!0)}))),this._register((0,F.ko)(this.element,F.Bx.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,F.ko)(this.element,F.Bx.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,F.ko)(this.element,F.Bx.FOCUS_OUT,(e=>{this.element&&!(0,F.QX)((0,F.bq)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){F.fs.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=Ge(e.width,t.width,{position:n.horizontal===li.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left{new qe.Z(e).equals(15)&&(F.fs.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,F.ko)(this.submenuContainer,F.Bx.KEY_DOWN,(e=>{new qe.Z(e).equals(15)&&F.fs.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){this.item&&this.item?.setAttribute("aria-expanded",e)}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class gi extends ei.Z4{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function pi(e){const t=(0,ni.J)()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}var fi=i(52010);class mi{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=(0,F.bq)();const n=(0,F.sb)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{this.lastContainer=n;const s=e.getMenuClassName?e.getMenuClassName():"";s&&(n.className+=" "+s),this.options.blockMouse&&(this.block=n.appendChild((0,F.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=(0,F.ko)(this.block,F.Bx.MOUSE_DOWN,(e=>e.stopPropagation())));const o=new l.Cm,r=e.actionRunner||new $t.LN;r.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,o),r.onDidRun(this.onDidActionRun,this,o),i=new di(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:r,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},fi.XS),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,o),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,o);const a=(0,F.zk)(n);return o.add((0,F.ko)(a,F.Bx.BLUR,(()=>this.contextViewService.hideContextView(!0)))),o.add((0,F.ko)(a,F.Bx.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new Yt.P(a,e);let i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,l.qE)(o,i)},focus:()=>{i?.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide?.(!!t),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&((0,F.bq)()===this.lastContainer||(0,F.QX)((0,F.bq)(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!(0,v.MB)(e.error)&&this.notificationService.error(e.error)}}var _i=function(e,t){return function(i,n){t(i,n,e)}};let vi=class extends l.jG{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new mi(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,o){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=o,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new G.vl),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new G.vl)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=bi.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),F.Di.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var bi;vi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_i(0,Vt.k),_i(1,ue.Ot),_i(2,Ee.l),_i(3,Ne.b),_i(4,Qt.ez),_i(5,ee.fN)],vi),function(e){e.transform=function(e,t,i){if(!((n=e)&&n.menuId instanceof Qt.D8))return e;var n;const{menuId:s,menuActionOptions:o,contextKeyService:r}=e;return{...e,getActions:()=>{const n=[];if(s){const e=t.getMenuActions(s,r??i,o);(0,Gt.$u)(e,n)}return e.getActions?$t.wv.join(e.getActions(),n):n}}}}(bi||(bi={}));var wi,Ci=i(23560);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(wi||(wi={}));var yi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Si=function(e,t){return function(i,n){t(i,n,e)}};let ki=class{constructor(e){this._commandService=e}async open(e,t){if(!(0,b.v$)(e,b.ny.command))return!1;if(!t?.allowCommands)return!0;if("string"==typeof e&&(e=d.r.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=(0,Ci.qg)(decodeURIComponent(e.query))}catch{try{i=(0,Ci.qg)(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};ki=yi([Si(0,gt.d)],ki);let xi=class{constructor(e){this._editorService=e}async open(e,t){"string"==typeof e&&(e=d.r.parse(e));const{selection:i,uri:n}=(0,Re.e)(e);return(e=n).scheme===b.ny.file&&(e=(0,jt.Fd)(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:t?.fromUserGesture?wi.USER:wi.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};xi=yi([Si(0,g.T)],xi);let Li=class{constructor(e,t){this._openers=new Q.w,this._validators=new Q.w,this._resolvers=new Q.w,this._resolvedUriTargets=new pt.fT((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new Q.w,this._defaultExternalOpener={openExternal:async e=>((0,b.fV)(e,b.ny.http,b.ny.https)?F.CE(e):a.G.location.href=e,!0)},this._openers.push({open:async(e,t)=>!(!t?.openExternal&&!(0,b.fV)(e,b.ny.mailto,b.ny.http,b.ny.https,b.ny.vsls)||(await this._doOpenExternal(e,t),0))}),this._openers.push(new ki(t)),this._openers.push(new xi(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){const i="string"==typeof e?d.r.parse(e):e,n=this._resolvedUriTargets.get(i)??e;for(const e of this._validators)if(!await e.shouldOpen(n,t))return!1;for(const i of this._openers)if(await i.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(const i of this._resolvers)try{const n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i="string"==typeof e?d.r.parse(e):e;let n,s;try{n=(await this.resolveExternalUri(i,t)).resolved}catch{n=i}if(s="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),t?.allowContributedOpeners){const e="string"==typeof t?.allowContributedOpeners?t?.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(await t.openExternal(s,{sourceUri:i,preferredOpenerId:e},Je.XO.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},Je.XO.None)}dispose(){this._validators.clear()}};Li=yi([Si(0,g.T),Si(1,gt.d)],Li);var Di=i(56812),Ei=i(41750),Ni=i(92903),Ii=i(12098),Mi=i(76583),Ti=i(6209),Ri=i(43575),Pi=function(e,t){return function(i,n){t(i,n,e)}};let Ai=class extends l.jG{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=mt.O.as(Ti.Fd.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){const[n,s]=this.getOrInstantiateProvider(e,i?.enabledProviderPrefixes),o=this.visibleQuickAccess,r=o?.descriptor;if(o&&s&&r===s)return e===s.prefix||i?.preserveValue||(o.picker.value=e),void this.adjustValueSelection(o.picker,s,i);if(s&&!i?.preserveValue){let t;if(o&&r&&r!==s){const e=o.value.substr(r.prefix.length);e&&(t=`${s.prefix}${e}`)}if(!t){const e=n?.defaultFilterValue;e===Ti.aJ.LAST?t=this.lastAcceptedPickerValues.get(s):"string"==typeof e&&(t=`${s.prefix}${e}`)}"string"==typeof t&&(e=t)}const a=o?.picker?.valueSelection,c=o?.picker?.value,d=new l.Cm,h=d.add(this.quickInputService.createQuickPick({useSeparators:!0}));let u;h.value=e,this.adjustValueSelection(h,s,i),h.placeholder=i?.placeholder??s?.placeholder,h.quickNavigate=i?.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!o,("number"==typeof i?.itemActivation||i?.quickNavigateConfiguration)&&(h.itemActivation=i?.itemActivation??Ri.C1.SECOND),h.contextKey=s?.contextKey,h.filterValue=e=>e.substring(s?s.prefix.length:0),t&&(u=new f.Zv,d.add(G.Jh.once(h.onWillAccept)((e=>{e.veto(),h.hide()})))),d.add(this.registerPickerListeners(h,n,s,e,i));const g=d.add(new Je.Qi);return n&&d.add(n.provide(h,g.token,i?.providerOptions)),G.Jh.once(h.onDidHide)((()=>{0===h.selectedItems.length&&g.cancel(),d.dispose(),u?.complete(h.selectedItems.slice(0))})),h.show(),a&&c===e&&(h.valueSelection=a),t?u?.p:void 0}adjustValueSelection(e,t,i){let n;n=i?.preserveValue?[e.value.length,e.value.length]:[t?.prefix.length??0,e.value.length],e.valueSelection=n}registerPickerListeners(e,t,i,n,s){const o=new l.Cm,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add((0,l.s)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e,s?.enabledProviderPrefixes);i!==t?this.show(e,{enabledProviderPrefixes:s?.enabledProviderPrefixes,preserveValue:!0,providerOptions:s?.providerOptions}):r.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e,t){const i=this.registry.getQuickAccessProvider(e);if(!i||t&&!t?.includes(i.prefix))return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};Ai=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Pi(0,Ri.GK),Pi(1,se._Y)],Ai);var Oi=i(44925),Fi=i(26745),Bi=i(43014),Wi=i(68860),Hi=i(95578);class Vi{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"==typeof e?e:e.label)).join("")}}!function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)}([Hi.B],Vi.prototype,"toString",null);const zi=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi,Ui={},ji=new Wi.n("quick-input-button-icon-");function qi(e,t,i){let n=e.iconClass||function(e){if(!e)return;let t;const i=e.dark.toString();return Ui[i]?t=Ui[i]:(t=ji.nextId(),F.Wt(`.${t}, .hc-light .${t}`,`background-image: ${F.Tf(e.light||e.dark)}`),F.Wt(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${F.Tf(e.dark)}`),Ui[i]=t),t}(e.iconPath);return e.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:t,label:"",tooltip:e.tooltip||"",class:n,enabled:!0,run:i}}var Ki=function(e,t){return function(i,n){t(i,n,e)}};const $i="inQuickInput",Gi=new ee.N1($i,!1,(0,C.kg)("inQuickInput","Whether keyboard focus is inside the quick input control")),Qi=ee.M$.has($i),Yi="quickInputType",Zi=new ee.N1(Yi,void 0,(0,C.kg)("quickInputType","The type of the currently visible quick input")),Xi="cursorAtEndOfQuickInputBox",Ji=new ee.N1(Xi,!1,(0,C.kg)("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),en=ee.M$.has(Xi),tn={iconClass:si.L.asClassName(ii.W.quickInputBack),tooltip:(0,C.kg)("quickInput.back","Back"),handle:-1};class nn extends l.jG{static{this.noPromptMessage=(0,C.kg)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel")}constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=nn.noPromptMessage,this._severity=de.A.Ignore,this.onDidTriggerButtonEmitter=this._register(new G.vl),this.onDidHideEmitter=this._register(new G.vl),this.onWillHideEmitter=this._register(new G.vl),this.onDisposeEmitter=this._register(new G.vl),this.visibleDisposables=this._register(new l.Cm),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Oe.un;this._ignoreFocusOut=e&&!Oe.un,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter((e=>e===tn)),this._rightButtons=e.filter((e=>e!==tn&&e.location!==Ri.dH.Inline)),this._inlineButtons=e.filter((e=>e.location===Ri.dH.Inline)),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Ri.kF.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=Ri.kF.Other){this.onWillHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?F.Ln(this.ui.widget,this._widget):F.Ln(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new f.pc,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this._leftButtons.map(((e,t)=>qi(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.leftActionBar.push(e,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this._rightButtons.map(((e,t)=>qi(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.rightActionBar.push(t,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();const i=this._inlineButtons.map(((e,t)=>qi(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.inlineActionBar.push(i,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const e=this.toggles?.filter((e=>e instanceof Oi.l))??[];this.ui.inputBox.toggles=e}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,F.Ln(this.ui.message),function(e,t,i){F.Ln(t);const n=function(e){const t=[];let i,n=0;for(;i=zi.exec(e);){i.index-n>0&&t.push(e.substring(n,i.index));const[,s,o,,r]=i;r?t.push({label:s,href:o,title:r}):t.push({label:s,href:o}),n=i.index+i[0].length}return n{F.sd(t)&&F.fs.stop(t,!0),i.callback(e.href)},a=i.disposables.add(new Fi.f(o,F.Bx.CLICK)).event,l=i.disposables.add(new Fi.f(o,F.Bx.KEY_DOWN)).event,c=G.Jh.chain(l,(e=>e.filter((e=>{const t=new qe.Z(e);return t.equals(10)||t.equals(3)}))));i.disposables.add(Xt.q.addTarget(o));const d=i.disposables.add(new Fi.f(o,Xt.B.Tap)).event;G.Jh.any(a,d,c)(r,null,i.disposables),t.appendChild(o)}}(i,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,C.kg)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==de.A.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class sn extends nn{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new G.vl),this.onWillAcceptEmitter=this._register(new G.vl),this.onDidAcceptEmitter=this._register(new G.vl),this.onDidCustomEmitter=this._register(new G.vl),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=Ri.C1.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new G.vl),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new G.vl),this.onDidTriggerItemButtonEmitter=this._register(new G.vl),this.onDidTriggerSeparatorButtonEmitter=this._register(new G.vl),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new G.at,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}static{this.DEFAULT_ARIA_LABEL=(0,C.kg)("quickInputBox.ariaLabel","Type to narrow down results.")}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Ri.Ym:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(Ri.Fp.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,((e,t)=>t))((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,w.aI)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,w.aI)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(F.Er(t)&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&this.visible&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,w.aI)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return F.ko(this.ui.container,F.Bx.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new qe.Z(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const n=e.getChords();return!(n.length>1||(n[0].shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n[0].altKey&&6===i||n[0].ctrlKey&&5===i||n[0].metaKey&&57===i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;!n&&i.inputBox&&(n=this.placeholder||sn.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=n??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents((()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case Ri.C1.NONE:this._itemActivation=Ri.C1.FIRST;break;case Ri.C1.SECOND:this.ui.list.focus(Ri.Fp.Second),this._itemActivation=Ri.C1.FIRST;break;case Ri.C1.LAST:this.ui.list.focus(Ri.Fp.Last),this._itemActivation=Ri.C1.FIRST;break;default:this.trySelectFirst()}}))),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Ri.Fp.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}}class on extends nn{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new G.vl),this.onDidAcceptEmitter=this._register(new G.vl),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}let rn=class extends De.fO{constructor(e,t){super("element",!1,(e=>this.getOverrideOptions(e)),e,t)}getOverrideOptions(e){return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:(F.sb(e.content)?e.content.textContent??"":"string"==typeof e.content?e.content:e.content.value).includes("\n"),skipFadeInAnimation:!0}}}};rn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Ki(0,Ie.pG),Ki(1,De.TN)],rn);var an=i(96337),ln=i(229);const cn="done",dn="active",hn="infinite",un="infinite-long-running",gn="discrete";class pn extends l.jG{static{this.LONG_RUNNING_INFINITE_THRESHOLD=1e4}constructor(e,t){super(),this.progressSignal=this._register(new l.HE),this.workedVal=0,this.showDelayedScheduler=this._register(new f.uC((()=>(0,F.WU)(this.element)),0)),this.longRunningScheduler=this._register(new f.uC((()=>this.infiniteLongRunning()),pn.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(dn,hn,un,gn),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(cn),this.element.classList.contains(hn)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(gn,cn,un),this.element.classList.add(dn,hn),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(un)}getContainer(){return this.element}}var fn=i(72711);const mn=F.$;class _n extends l.jG{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>F.b2(this.findInput.inputBox.inputElement,F.Bx.KEY_DOWN,e),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=F.BC(this.parent,mn(".quick-input-box")),this.findInput=this._register(new fn.c(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===de.A.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===de.A.Info?1:e===de.A.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===de.A.Info?1:e===de.A.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}var vn=i(76432),bn=i(38403),wn=i(15339),Cn=i(39679),yn=i(72582);const Sn=new yn.d((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new yn.d((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new yn.d((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var kn,xn=i(41703),Ln=i(73755),Dn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},En=function(e,t){return function(i,n){t(i,n,e)}};const Nn=F.$;class In{constructor(e,t,i){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new yn.d((()=>{const e=i.label??"",t=(0,oi._k)(e).text.trim(),n=i.ariaLabel||[e,this.saneDescription,this.saneDetail].map((e=>(0,oi.R$)(e))).filter((e=>!!e)).join(", ");return{saneLabel:e,saneSortLabel:t,saneAriaLabel:n}})),this._saneDescription=i.description,this._saneTooltip=i.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class Mn extends In{constructor(e,t,i,n,s,o){super(e,t,s),this.fireButtonTriggered=i,this._onChecked=n,this.item=s,this._separator=o,this._checked=!1,this.onChecked=t?G.Jh.map(G.Jh.filter(this._onChecked.event,(e=>e.element===this)),(e=>e.checked)):G.Jh.None,this._saneDetail=s.detail,this._labelHighlights=s.highlights?.label,this._descriptionHighlights=s.highlights?.description,this._detailHighlights=s.highlights?.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var Tn;!function(e){e[e.NONE=0]="NONE",e[e.MOUSE_HOVER=1]="MOUSE_HOVER",e[e.ACTIVE_ITEM=2]="ACTIVE_ITEM"}(Tn||(Tn={}));class Rn extends In{constructor(e,t,i){super(e,!1,i),this.fireSeparatorButtonTriggered=t,this.separator=i,this.children=new Array,this.focusInsideSeparator=Tn.NONE}}class Pn{getHeight(e){return e instanceof Rn?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof Mn?Fn.ID:Bn.ID}}class An{getWidgetAriaLabel(){return(0,C.kg)("quickInput","Quick Input")}getAriaLabel(e){return e.separator?.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox&&e instanceof Mn)return{get value(){return e.checked},onDidChange:t=>e.onChecked((()=>t()))}}}class On{constructor(e){this.hoverDelegate=e}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=new l.Cm,t.toDisposeTemplate=new l.Cm,t.entry=F.BC(e,Nn(".quick-input-list-entry"));const i=F.BC(t.entry,Nn("label.quick-input-list-label"));t.toDisposeTemplate.add(F.b2(i,F.Bx.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=F.BC(i,Nn("input.quick-input-list-checkbox")),t.checkbox.type="checkbox";const n=F.BC(i,Nn(".quick-input-list-rows")),s=F.BC(n,Nn(".quick-input-list-row")),o=F.BC(n,Nn(".quick-input-list-row"));t.label=new bn.s(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=F.Hs(t.label.element,Nn(".quick-input-list-icon"));const r=F.BC(s,Nn(".quick-input-list-entry-keybinding"));t.keybinding=new wn.x(r,Oe.OS),t.toDisposeTemplate.add(t.keybinding);const a=F.BC(o,Nn(".quick-input-list-label-meta"));return t.detail=new bn.s(a,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=F.BC(t.entry,Nn(".quick-input-list-separator")),t.actionBar=new Jt.E(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.actionBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,i){i.toDisposeElement.clear(),i.actionBar.clear()}}let Fn=class extends On{static{kn=this}static{this.ID="quickpickitem"}constructor(e,t){super(e),this.themeService=t,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return kn.ID}renderTemplate(e){const t=super.renderTemplate(e);return t.toDisposeTemplate.add(F.b2(t.checkbox,F.Bx.CHANGE,(e=>{t.element.checked=t.checkbox.checked}))),t}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0;const s=n.item;i.checkbox.checked=n.checked,i.toDisposeElement.add(n.onChecked((e=>i.checkbox.checked=e))),i.checkbox.disabled=n.checkboxDisabled;const{labelHighlights:o,descriptionHighlights:r,detailHighlights:a}=n;if(s.iconPath){const e=(0,Cn.HD)(this.themeService.getColorTheme().type)?s.iconPath.dark:s.iconPath.light??s.iconPath.dark,t=d.r.revive(e);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=F.Tf(t)}else i.icon.style.backgroundImage="",i.icon.className=s.iconClass?`quick-input-list-icon ${s.iconClass}`:"";let l;!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:n.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const c={matches:o||[],descriptionTitle:l,descriptionMatches:r||[],labelEscapeNewLines:!0};if(c.extraClasses=s.iconClasses,c.italic=s.italic,c.strikethrough=s.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),i.keybinding.set(s.keybinding),n.saneDetail){let e;n.saneTooltip||(e={markdown:{value:n.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:a,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";n.separator?.label?(i.separator.textContent=n.separator.label,i.separator.style.display="",this.addItemWithSeparator(n)):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!n.separator);const h=s.buttons;h&&h.length?(i.actionBar.push(h.map(((e,t)=>qi(e,`id-${t}`,(()=>n.fireButtonTriggered({button:e,item:n.item}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,i)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}};Fn=kn=Dn([En(1,Y.Gy)],Fn);class Bn extends On{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}static{this.ID="quickpickseparator"}get templateId(){return Bn.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderTemplate(e){const t=super.renderTemplate(e);return t.checkbox.style.display="none",t}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0,n.element.classList.toggle("focus-inside",!!n.focusInsideSeparator);const s=n.separator,{labelHighlights:o,descriptionHighlights:r,detailHighlights:a}=n;let l;i.icon.style.backgroundImage="",i.icon.className="",!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:n.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const c={matches:o||[],descriptionTitle:l,descriptionMatches:r||[],labelEscapeNewLines:!0};if(i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),n.saneDetail){let e;n.saneTooltip||(e={markdown:{value:n.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:a,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";i.separator.style.display="none",i.entry.classList.add("quick-input-list-separator-border");const d=s.buttons;d&&d.length?(i.actionBar.push(d.map(((e,t)=>qi(e,`id-${t}`,(()=>n.fireSeparatorButtonTriggered({button:e,separator:n.separator}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions"),this.addSeparator(n)}disposeElement(e,t,i){this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||e.element.element?.classList.remove("focus-inside"),super.disposeElement(e,t,i)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}}let Wn=class extends l.jG{constructor(e,t,i,n,s,o){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=i,this.accessibilityService=o,this._onKeyDown=new G.vl,this._onLeave=new G.vl,this.onLeave=this._onLeave.event,this._visibleCountObservable=(0,Ln.FY)("VisibleCount",0),this.onChangedVisibleCount=G.Jh.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=(0,Ln.FY)("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=G.Jh.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=(0,Ln.FY)("CheckedCount",0),this.onChangedCheckedCount=G.Jh.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=(0,Ln.Zh)({equalsFn:w.aI},new Array),this.onChangedCheckedElements=G.Jh.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new G.vl,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new G.vl,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new G.vl,this._elementCheckedEventBufferer=new G.at,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new l.Cm),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=F.BC(this.parent,Nn(".quick-input-list")),this._separatorRenderer=new Bn(t),this._itemRenderer=s.createInstance(Fn,t),this._tree=this._register(s.createInstance(vn.zL,"QuickInput",this._container,new Pn,[this._itemRenderer,this._separatorRenderer],{filter:{filter(e){return e.hidden?0:e instanceof Rn?2:1}},sorter:{compare:(e,t)=>this.sortByLabel&&this._lastQueryString?function(e,t,i){const n=e.labelHighlights||[],s=t.labelHighlights||[];return n.length&&!s.length?-1:!n.length&&s.length?1:0===n.length&&0===s.length?0:function(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=function(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=n.startsWith(i),r=s.startsWith(i);if(o!==r)return o?-1:1;if(o&&r){if(n.lengths.length)return 1}return 0}(e,t,i);if(o)return o;const r=n.endsWith(i);if(r!==s.endsWith(i))return r?-1:1;const a=function(e,t){const i=e||"",n=t||"",s=Sn.value.collator.compare(i,n);return Sn.value.collatorIsNumeric&&0===s&&i!==n?ie.elements.filter((e=>e instanceof Mn)).map((e=>e.item))),this._store)}get onDidChangeSelection(){return G.Jh.map(this._tree.onDidChangeSelection,(e=>({items:e.elements.filter((e=>e instanceof Mn)).map((e=>e.item)),event:e.browserEvent})),this._store)}get displayed(){return"none"!==this._container.style.display}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown((e=>{const t=new qe.Z(e);10===t.keyCode&&this.toggleCheckbox(),this._onKeyDown.fire(t)})))}_registerOnContainerClick(){this._register(F.ko(this._container,F.Bx.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()})))}_registerOnMouseMiddleClick(){this._register(F.ko(this._container,F.Bx.AUXCLICK,(e=>{1===e.button&&this._onLeave.fire()})))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel((()=>{const e=this._itemElements.filter((e=>!e.hidden)).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()})))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,((e,t)=>t))((e=>this._updateCheckedObservables())))}_registerOnContextMenu(){this._register(this._tree.onContextMenu((e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))})))}_registerHoverListeners(){const e=this._register(new f.Th(this.hoverDelegate.delay));this._register(this._tree.onMouseOver((async t=>{if(F.nY(t.browserEvent.target))e.cancel();else if(F.nY(t.browserEvent.relatedTarget)||!F.QX(t.browserEvent.relatedTarget,t.element?.element))try{await e.trigger((async()=>{t.element instanceof Mn&&this.showHover(t.element)}))}catch(t){if(!(0,v.MB)(t))throw t}}))),this._register(this._tree.onMouseOut((t=>{F.QX(t.browserEvent.relatedTarget,t.element?.element)||e.cancel()})))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus((e=>{const t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const e of this._separatorRenderer.visibleSeparators){const i=e===t;!!(e.focusInsideSeparator&Tn.ACTIVE_ITEM)!==i&&(i?e.focusInsideSeparator|=Tn.ACTIVE_ITEM:e.focusInsideSeparator&=~Tn.ACTIVE_ITEM,this._tree.rerender(e))}}))),this._register(this._tree.onMouseOver((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const e of this._separatorRenderer.visibleSeparators)e===t&&(e.focusInsideSeparator&Tn.MOUSE_HOVER||(e.focusInsideSeparator|=Tn.MOUSE_HOVER,this._tree.rerender(e)))}))),this._register(this._tree.onMouseOut((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const e of this._separatorRenderer.visibleSeparators)e===t&&e.focusInsideSeparator&Tn.MOUSE_HOVER&&(e.focusInsideSeparator&=~Tn.MOUSE_HOVER,this._tree.rerender(e))})))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection((e=>{const t=e.elements.filter((e=>e instanceof Mn));t.length!==e.elements.length&&(1===e.elements.length&&e.elements[0]instanceof Rn&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))})))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents((()=>{this._itemElements.forEach((t=>{t.hidden||t.checkboxDisabled||(t.checked=e)}))}))}setElements(e){let t;this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes"),this._itemElements=new Array,this._elementTree=e.reduce(((i,n,s)=>{let o;if("separator"===n.type){if(!n.buttons)return i;t=new Rn(s,(e=>this._onSeparatorButtonTriggered.fire(e)),n),o=t}else{const r=s>0?e[s-1]:void 0;let a;r&&"separator"===r.type&&!r.buttons&&(t=void 0,a=r);const l=new Mn(s,this._hasCheckboxes,(e=>this._onButtonTriggered.fire(e)),this._elementChecked,n,a);if(this._itemElements.push(l),t)return t.children.push(l),i;o=l}return i.push(o),i}),new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout((()=>{const e=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),t=e?.parentNode;if(e&&t){const i=e.nextSibling;e.remove(),t.insertBefore(e,i)}}),0)}setFocusedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e)).filter((e=>!e.hidden));if(this._tree.setFocus(t),e.length>0){const e=this._tree.getFocus()[0];e&&this._tree.reveal(e)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e));this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents((()=>{const t=new Set;for(const i of e)t.add(i);for(const e of this._itemElements)e.checked=t.has(e.item)}))}focus(e){if(this._itemElements.length)switch(e===Ri.Fp.Second&&this._itemElements.length<2&&(e=Ri.Fp.First),e){case Ri.Fp.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,(e=>e.element instanceof Mn));break;case Ri.Fp.Second:{this._tree.scrollTop=0;let e=!1;this._tree.focusFirst(void 0,(t=>t.element instanceof Mn&&(!!e||(e=!e,!1))));break}case Ri.Fp.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,(e=>e.element instanceof Mn));break;case Ri.Fp.Next:{const e=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,(e=>e.element instanceof Mn&&(this._tree.reveal(e.element),!0)));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case Ri.Fp.Previous:{const e=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,(e=>{if(!(e.element instanceof Mn))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[0]&&this._onLeave.fire();break}case Ri.Fp.NextPage:this._tree.focusNextPage(void 0,(e=>e.element instanceof Mn&&(this._tree.reveal(e.element),!0)));break;case Ri.Fp.PreviousPage:this._tree.focusPreviousPage(void 0,(e=>{if(!(e.element instanceof Mn))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));break;case Ri.Fp.NextSeparator:{let e=!1;const t=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,(t=>{if(e)return!0;if(t.element instanceof Rn)e=!0,this._separatorRenderer.isSeparatorVisible(t.element)?this._tree.reveal(t.element.children[0]):this._tree.reveal(t.element,0);else if(t.element instanceof Mn){if(t.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(t.element)?this._tree.reveal(t.element):this._tree.reveal(t.element,0),!0;if(t.element===this._elementTree[0])return this._tree.reveal(t.element,0),!0}return!1})),t===this._tree.getFocus()[0]&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,(e=>e.element instanceof Mn)));break}case Ri.Fp.PreviousSeparator:{let e,t=!!this._tree.getFocus()[0]?.separator;this._tree.focusPrevious(void 0,!0,void 0,(i=>{if(i.element instanceof Rn)t?e||(this._separatorRenderer.isSeparatorVisible(i.element)?this._tree.reveal(i.element):this._tree.reveal(i.element,0),e=i.element.children[0]):t=!0;else if(i.element instanceof Mn&&!e)if(i.element.separator)this._itemRenderer.isItemWithSeparatorVisible(i.element)?this._tree.reveal(i.element):this._tree.reveal(i.element,0),e=i.element;else if(i.element===this._elementTree[0])return this._tree.reveal(i.element,0),!0;return!1})),e&&this._tree.setFocus([e]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const t=e;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this._itemElements.forEach((n=>{let s;s="fuzzy"===this.matchOnLabelMode?this.matchOnLabel?(0,oi.pz)(e,(0,oi._k)(n.saneLabel))??void 0:void 0:this.matchOnLabel?function(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return Hn(e,i);const s=(0,c.NB)(i," "),o=i.length-s.length,r=Hn(e,s);if(r)for(const e of r){const t=n[e.start+o]+o;e.start+=t,e.end+=t}return r}(t,(0,oi._k)(n.saneLabel))??void 0:void 0;const o=this.matchOnDescription?(0,oi.pz)(e,(0,oi._k)(n.saneDescription||""))??void 0:void 0,r=this.matchOnDetail?(0,oi.pz)(e,(0,oi._k)(n.saneDetail||""))??void 0:void 0;if(s||o||r?(n.labelHighlights=s,n.descriptionHighlights=o,n.detailHighlights=r,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this._inputElements[n.index-1]||void 0;"separator"!==e?.type||e.buttons||(i=e),i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this._itemElements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this._inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents((()=>{const e=this._tree.getFocus().filter((e=>e instanceof Mn)),t=this._allVisibleChecked(e);for(const i of e)i.checkboxDisabled||(i.checked=!t)}))}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!(e?.saneTooltip&&e instanceof Mn))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();this.showHover(e);const t=new l.Cm;t.add(this._tree.onDidChangeFocus((e=>{e.elements[0]instanceof Mn&&this.showHover(e.elements[0])}))),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){const t=new Array;for(const i of e)i instanceof Rn?t.push({element:i,collapsible:!1,collapsed:!1,children:i.children.map((e=>({element:e,collapsible:!1,collapsed:!1})))}):t.push({element:i,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);const t=this._itemElements.filter((e=>e.checked)).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)}))}showHover(e){this._lastHover&&!this._lastHover.isDisposed&&(this.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),e.element&&e.saneTooltip&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:e=>{this.linkOpenerDelegate(e)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};function Hn(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}Dn([Hi.B],Wn.prototype,"onDidChangeFocus",null),Dn([Hi.B],Wn.prototype,"onDidChangeSelection",null),Wn=Dn([En(4,se._Y),En(5,Fe.j)],Wn);var Vn=i(56614);const zn={weight:200,when:ee.M$.and(ee.M$.equals(Yi,"quickPick"),Qi),metadata:{description:(0,C.kg)("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function Un(e,t={}){Tt.f.registerCommandAndKeybindingRule({...zn,...e,secondary:qn(e.primary,e.secondary??[],t)})}const jn=Oe.zx?256:2048;function qn(e,t,i={}){return i.withAltMod&&t.push(512+e),i.withCtrlMod&&(t.push(jn+e),i.withAltMod&&t.push(512+jn+e)),i.withCmdMod&&Oe.zx&&(t.push(2048+e),i.withCtrlMod&&t.push(2304+e),i.withAltMod&&(t.push(2560+e),i.withCtrlMod&&t.push(2816+e))),t}function Kn(e,t){return i=>{const n=i.get(Ri.GK).currentQuickInput;if(n)return t&&n.quickNavigate?n.focus(t):n.focus(e)}}Un({id:"quickInput.pageNext",primary:12,handler:Kn(Ri.Fp.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),Un({id:"quickInput.pagePrevious",primary:11,handler:Kn(Ri.Fp.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),Un({id:"quickInput.first",primary:jn+14,handler:Kn(Ri.Fp.First)},{withAltMod:!0,withCmdMod:!0}),Un({id:"quickInput.last",primary:jn+13,handler:Kn(Ri.Fp.Last)},{withAltMod:!0,withCmdMod:!0}),Un({id:"quickInput.next",primary:18,handler:Kn(Ri.Fp.Next)},{withCtrlMod:!0}),Un({id:"quickInput.previous",primary:16,handler:Kn(Ri.Fp.Previous)},{withCtrlMod:!0});const $n=(0,C.kg)("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),Gn=(0,C.kg)("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");Oe.zx?(Un({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:Kn(Ri.Fp.NextSeparator,Ri.Fp.Next),metadata:{description:$n}}),Un({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:Kn(Ri.Fp.NextSeparator)},{withCtrlMod:!0}),Un({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:Kn(Ri.Fp.PreviousSeparator,Ri.Fp.Previous),metadata:{description:Gn}}),Un({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:Kn(Ri.Fp.PreviousSeparator)},{withCtrlMod:!0})):(Un({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:Kn(Ri.Fp.NextSeparator,Ri.Fp.Next),metadata:{description:$n}}),Un({id:"quickInput.nextSeparator",primary:2578,handler:Kn(Ri.Fp.NextSeparator)}),Un({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:Kn(Ri.Fp.PreviousSeparator,Ri.Fp.Previous),metadata:{description:Gn}}),Un({id:"quickInput.previousSeparator",primary:2576,handler:Kn(Ri.Fp.PreviousSeparator)})),Un({id:"quickInput.acceptInBackground",when:ee.M$.and(zn.when,ee.M$.or(Vn.J7.negate(),en)),primary:17,weight:250,handler:e=>{const t=e.get(Ri.GK).currentQuickInput;t?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});var Qn,Yn=function(e,t){return function(i,n){t(i,n,e)}};const Zn=F.$;let Xn=class extends l.jG{static{Qn=this}static{this.MAX_WIDTH=600}get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,i,n){super(),this.options=e,this.layoutService=t,this.instantiationService=i,this.contextKeyService=n,this.enabled=!0,this.onDidAcceptEmitter=this._register(new G.vl),this.onDidCustomEmitter=this._register(new G.vl),this.onDidTriggerButtonEmitter=this._register(new G.vl),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new G.vl),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new G.vl),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=Gi.bindTo(this.contextKeyService),this.quickInputTypeContext=Zi.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=Ji.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(G.Jh.runAndSubscribe(F.Iv,(({window:e,disposables:t})=>this.registerKeyModsListeners(e,t)),{window:a.G,disposables:this._store})),this._register(F.q3((e=>{this.ui&&F.zk(this.ui.container)===e&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})))}registerKeyModsListeners(e,t){const i=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};for(const n of[F.Bx.KEY_DOWN,F.Bx.KEY_UP,F.Bx.MOUSE_DOWN])t.add(F.ko(e,n,i,!0))}getUI(e){if(this.ui)return e&&F.zk(this._container)!==F.zk(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const t=F.BC(this._container,Zn(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=F.li(t),n=F.BC(t,Zn(".quick-input-titlebar")),s=this._register(new Jt.E(n,{hoverDelegate:this.options.hoverDelegate}));s.domNode.classList.add("quick-input-left-action-bar");const o=F.BC(n,Zn(".quick-input-title")),r=this._register(new Jt.E(n,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-right-action-bar");const a=F.BC(t,Zn(".quick-input-header")),l=F.BC(a,Zn("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",(0,C.kg)("quickInput.checkAll","Toggle all checkboxes")),this._register(F.b2(l,F.Bx.CHANGE,(e=>{const t=l.checked;E.setAllVisibleChecked(t)}))),this._register(F.ko(l,F.Bx.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const c=F.BC(a,Zn(".quick-input-description")),d=F.BC(a,Zn(".quick-input-and-message")),h=F.BC(d,Zn(".quick-input-filter")),u=this._register(new _n(h,this.styles.inputBox,this.styles.toggle));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=F.BC(h,Zn(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new ln.x(g,{countFormat:(0,C.kg)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),f=F.BC(h,Zn(".quick-input-count"));f.setAttribute("aria-live","polite");const m=new ln.x(f,{countFormat:(0,C.kg)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),_=this._register(new Jt.E(a,{hoverDelegate:this.options.hoverDelegate}));_.domNode.classList.add("quick-input-inline-action-bar");const v=F.BC(a,Zn(".quick-input-action")),b=this._register(new an.$(v,this.styles.button));b.label=(0,C.kg)("ok","OK"),this._register(b.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const w=F.BC(a,Zn(".quick-input-action")),y=this._register(new an.$(w,{...this.styles.button,supportIcons:!0}));y.label=(0,C.kg)("custom","Custom"),this._register(y.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const S=F.BC(d,Zn(`#${this.idPrefix}message.quick-input-message`)),k=this._register(new pn(t,this.styles.progressBar));k.getContainer().classList.add("quick-input-progress");const x=F.BC(t,Zn(".quick-input-html-widget"));x.tabIndex=-1;const L=F.BC(t,Zn(".quick-input-description")),D=this.idPrefix+"list",E=this._register(this.instantiationService.createInstance(Wn,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,D));u.setAttribute("aria-controls",D),this._register(E.onDidChangeFocus((()=>{u.setAttribute("aria-activedescendant",E.getActiveDescendant()??"")}))),this._register(E.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(E.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(E.onChangedCheckedCount((e=>{m.setCount(e)}))),this._register(E.onLeave((()=>{setTimeout((()=>{this.controller&&(u.setFocus(),this.controller instanceof sn&&this.controller.canSelectMany&&E.clearFocus())}),0)})));const N=F.w5(t);return this._register(N),this._register(F.ko(t,F.Bx.FOCUS,(e=>{const t=this.getUI();if(F.QX(e.relatedTarget,t.inputContainer)){const e=t.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==e&&this.endOfQuickInputBoxContext.set(e)}F.QX(e.relatedTarget,t.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=F.sb(e.relatedTarget)?e.relatedTarget:void 0)}),!0)),this._register(N.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Ri.kF.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0}))),this._register(u.onKeyDown((e=>{const t=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==t&&this.endOfQuickInputBoxContext.set(t)}))),this._register(F.ko(t,F.Bx.FOCUS,(e=>{u.setFocus()}))),this._register(F.b2(t,F.Bx.KEY_DOWN,(e=>{if(!F.QX(e.target,x))switch(e.keyCode){case 3:F.fs.stop(e,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:F.fs.stop(e,!0),this.hide(Ri.kF.Gesture);break;case 2:if(!e.altKey&&!e.ctrlKey&&!e.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.displayed&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(F.QX(e.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=t.querySelectorAll(i.join(", "));e.shiftKey&&e.target===n[0]?(F.fs.stop(e,!0),E.clearFocus()):!e.shiftKey&&F.QX(e.target,n[n.length-1])&&(F.fs.stop(e,!0),n[0].focus())}break;case 10:e.ctrlKey&&(F.fs.stop(e,!0),this.getUI().list.toggleHover())}}))),this.ui={container:t,styleSheet:i,leftActionBar:s,titleBar:n,title:o,description1:L,description2:c,widget:x,rightActionBar:r,inlineActionBar:_,checkAll:l,inputContainer:d,filterContainer:h,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:f,count:m,okContainer:v,ok:b,message:S,customButtonContainer:w,customButton:y,list:E,progressBar:k,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,F.BC(this._container,this.ui.container))}pick(e,t={},i=Je.XO.None){return new Promise(((n,s)=>{let o=e=>{o=n,t.onKeyMods?.(r.keyMods),n(e)};if(i.isCancellationRequested)return void o(void 0);const r=this.createQuickPick({useSeparators:!0});let a;const c=[r,r.onDidAccept((()=>{if(r.canSelectMany)o(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(o(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(o(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...e,removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),s=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=s}}}))),r.onDidTriggerSeparatorButton((e=>t.onDidTriggerSeparatorButton?.(e))),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{(0,l.AS)(c),o(void 0)}))];r.title=t.title,t.value&&(r.value=t.value),r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{s(e),r.hide()}))}))}createQuickPick(e={useSeparators:!1}){const t=this.getUI(!0);return new sn(t)}createInputBox(){const e=this.getUI(!0);return new on(e)}show(e){const t=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,i?.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",F.Ln(t.widget),t.rightActionBar.clear(),t.inlineActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(de.A.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),F.Ln(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();tn.tooltip=n?(0,C.kg)("quickInput.backWithKeybinding","Back ({0})",n):(0,C.kg)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&"none"!==this.ui.container.style.display}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){const t=this.controller;if(!t)return;t.willHide(e);const i=this.ui?.container,n=i&&!F.nR(i);if(this.controller=null,this.onHideEmitter.fire(),i&&(i.style.display="none"),!n){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=e.parentElement??void 0;e?.offsetParent?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}t.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,Qn.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=i??"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.list.style(this.styles.list);const o=[];this.styles.pickerGroup.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(o.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&o.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&o.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&o.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&o.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&o.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),o.push("}"));const r=o.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}};Xn=Qn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Yn(1,oe),Yn(2,se._Y),Yn(3,ee.fN)],Xn);var Jn=function(e,t){return function(i,n){t(i,n,e)}};let es=class extends Y.lR{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Ai))),this._quickAccess}constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=s,this._onShow=this._register(new G.vl),this._onHide=this._register(new G.vl),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{t.get(Re.C).open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(rn))},n=this._register(this.instantiationService.createInstance(Xn,{...i,...t}));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer((t=>{(0,F.zk)(e.activeContainer)===(0,F.zk)(n.container)&&n.layout(t,e.activeContainerOffset.quickPickTop)}))),this._register(e.onDidChangeActiveContainer((()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)}))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new ee.N1(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t,i=Je.XO.None){return this.controller.pick(e,t,i)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,Le.GuP)(Le.ELA),quickInputForeground:(0,Le.GuP)(Le.HJZ),quickInputTitleBackground:(0,Le.GuP)(Le.er1),widgetBorder:(0,Le.GuP)(Le.DSL),widgetShadow:(0,Le.GuP)(Le.f9l)},inputBox:fi.ho,toggle:fi.mk,countBadge:fi.m$,button:fi.cv,progressBar:fi.oJ,keybindingLabel:fi.ir,list:(0,fi.t8)({listBackground:Le.ELA,listFocusBackground:Le.AlL,listFocusForeground:Le.nH,listInactiveFocusForeground:Le.nH,listInactiveSelectionIconForeground:Le.c7i,listInactiveFocusBackground:Le.AlL,listFocusOutline:Le.buw,listInactiveFocusOutline:Le.buw}),pickerGroup:{pickerGroupBorder:(0,Le.GuP)(Le.iwL),pickerGroupForeground:(0,Le.GuP)(Le.NBf)}}}};es=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Jn(0,se._Y),Jn(1,ee.fN),Jn(2,Y.Gy),Jn(3,oe),Jn(4,Ie.pG)],es);var ts=i(96845),is=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ns=function(e,t){return function(i,n){t(i,n,e)}};let ss=class extends es{constructor(e,t,i,n,s,o){super(t,i,n,new ce(e.getContainerDomNode(),s),o),this.host=void 0;const r=rs.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get mainContainer(){return t.getDomNode()},getContainer(){return t.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[t.getDomNode()]},get activeContainer(){return t.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return G.Jh.map(e.onDidLayoutChange,(e=>({container:t.getDomNode(),dimension:e})))},get onDidChangeActiveContainer(){return G.Jh.None},get onDidAddContainer(){return G.Jh.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};ss=is([ns(1,se._Y),ns(2,ee.fN),ns(3,Y.Gy),ns(4,g.T),ns(5,Ie.pG)],ss);let os=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(ss,e);this.mapEditorToService.set(e,t),(0,ts.P)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,i=Je.XO.None){return this.activeService.pick(e,t,i)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}};os=is([ns(0,se._Y),ns(1,g.T)],os);class rs{static{this.ID="editor.controller.quickInput"}static get(e){return e.getContribution(rs.ID)}constructor(e){this.editor=e,this.widget=new as(this.editor)}dispose(){this.widget.dispose()}}class as{static{this.ID="editor.contrib.quickInputWidget"}constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return as.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}(0,u.HW)(rs.ID,rs,4);var ls=i(28954),cs=i(86100),ds=function(e,t){return function(i,n){t(i,n,e)}};let hs=class extends l.jG{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new G.vl,this._onDidChangeReducedMotion=new G.vl,this._onDidChangeLinkUnderline=new G.vl,this._accessibilityModeEnabledContext=Fe.f.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const s=a.G.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(s),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register((0,F.ko)(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",e),this._layoutService.mainContainer.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration("accessibility.underlineLinks")){const e=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=e,this._onDidChangeLinkUnderline.fire()}})));const e=()=>{const e=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",e)};e(),this._register(this.onDidChangeLinkUnderlines((()=>e())))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};hs=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ds(0,ee.fN),ds(1,oe),ds(2,Ie.pG)],hs);var us,gs=i(79126),ps=i(65260),fs=function(e,t){return function(i,n){t(i,n,e)}};const ms="application/vnd.code.resources";let _s=class extends l.jG{static{us=this}constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(Zt.nr||Zt.c8)&&this.installWebKitWriteTextWorkaround(),this._register(G.Jh.runAndSubscribe(F.Iv,(({window:e,disposables:t})=>{t.add((0,F.ko)(e.document,"copy",(()=>this.clearResourcesState())))}),{window:a.G,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const e=new f.Zv;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,(0,F.fz)().navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((async t=>{t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))};this._register(G.Jh.runAndSubscribe(this.layoutService.onDidAddContainer,(({container:t,disposables:i})=>{i.add((0,F.ko)(t,"click",e)),i.add((0,F.ko)(t,"keydown",e))}),{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.clearResourcesState(),t)this.mapTextToType.set(t,e);else{if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await(0,F.fz)().navigator.clipboard.writeText(e)}catch(e){console.error(e)}this.fallbackWriteText(e)}}fallbackWriteText(e){const t=(0,F.a)(),i=t.activeElement,n=t.body.appendChild((0,F.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),t.execCommand("copy"),(0,F.sb)(i)&&i.focus(),n.remove()}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await(0,F.fz)().navigator.clipboard.readText()}catch(e){console.error(e)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}static{this.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3}async readResources(){try{const e=await(0,F.fz)().navigator.clipboard.read();for(const t of e)if(t.types.includes(`web ${ms}`)){const e=await t.getType(`web ${ms}`);return JSON.parse(await e.text()).map((e=>d.r.from(e)))}}catch(e){}const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(0===this.resources.length)return;const e=await this.readText();return(0,ps.tW)(e.substring(0,us.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}};_s=us=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fs(0,oe),fs(1,M.rr)],_s);var vs=i(42558),bs=i(26182),ws=i(80945);const Cs="data-keybinding-context";class ys{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class Ss extends ys{static{this.INSTANCE=new Ss}constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}class ks extends ys{static{this._keyPrefix="config."}constructor(e,t,i){super(e,null),this._configurationService=t,this._values=ws.cB.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new Ds(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...bs.f.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new Ds(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(ks._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(ks._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}class xs{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Ls{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Ds{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class Es{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}class Ns extends l.jG{constructor(e){super(),this._onDidChangeContext=this._register(new G.fV({merge:e=>new Es(e)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new xs(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Ms(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new Ls(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Ls(e))}getContext(e){return this._isDisposed?Ss.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(Cs)){const t=e.getAttribute(Cs);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}dispose(){super.dispose(),this._isDisposed=!0}}let Is=class extends Ns{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new ks(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?Ss.INSTANCE:this._contexts.get(e)||Ss.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new ys(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};Is=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Ie.pG)],Is);class Ms extends Ns{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new l.HE),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Cs)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(Cs,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{var t;t=this._parent.getContextValuesContainer(this._myContextId).value,e.allKeysContainedIn(new Set(Object.keys(t)))||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(Cs),super.dispose())}getContextValuesContainer(e){return this._isDisposed?Ss.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}gt.w.registerCommand("_setContext",(function(e,t,i){e.get(ee.fN).createKey(String(t),function(e){return(0,p.PI)(e,(e=>"object"==typeof e&&1===e.$mid?d.r.revive(e).toString():e instanceof d.r?e.toString():void 0))}(i))})),gt.w.registerCommand({id:"getContextKeyInfo",handler(){return[...ee.N1.all()].sort(((e,t)=>e.key.localeCompare(t.key)))},metadata:{description:(0,C.kg)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),gt.w.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of ee.N1.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var Ts=i(44204);class Rs{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class Ps{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Rs(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}var As=i(24813);class Os extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class Fs{constructor(e=new As.a,t=!1,i,n=!1){this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(se._Y,this),this._globalGraph=n?i?._globalGraph??new Ps((e=>e)):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,(0,l.AS)(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)(0,l.Xm)(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const i=this,n=new class extends Fs{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),t?.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();const i=Bs.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:e=>{if(n)throw(0,v.iH)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return this._throwIfDisposed(),e instanceof Ts.d?(i=Bs.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Bs.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=se._$.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),s=[];for(const t of n){const n=this._getOrCreateServiceInstance(t.id,i);n||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`,!1),s.push(n)}const o=n.length>0?n[0].index:t.length;if(t.length!==o){console.trace(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);const i=o-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,o)}return Reflect.construct(e,t.concat(s))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof Ts.d)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setCreatedServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof Ts.d?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new Ps((e=>e.id.toString()));let s=0;const o=[{id:e,desc:t,_trace:i}],r=new Set;for(;o.length;){const t=o.pop();if(!r.has(String(t.id))){if(r.add(String(t.id)),n.lookupOrInsertNode(t),s++>1e3)throw new Os(n);for(const i of se._$.getServiceDependencies(t.desc.ctor)){const s=this._getServiceInstanceOrDescriptor(i.id);if(s||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(t.id),String(i.id)),s instanceof Ts.d){const e={id:i.id,desc:s,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),o.push(e)}}}}for(;;){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new Os(n);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Ts.d){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setCreatedServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof Ts.d)return this._createServiceInstance(e,t,i,n,s,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s,o){if(n){const n=new Fs(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const r=new Map,a=new f.F6((()=>{const e=n._createInstance(t,i,s);for(const[t,i]of r){const n=e[t];if("function"==typeof n)for(const t of i)t.disposable=n.apply(e,t.listener)}return r.clear(),o.add(e),e}));return new Proxy(Object.create(null),{get(e,t){if(!a.isInitialized&&"string"==typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=r.get(t);return e||(e=new Q.w,r.set(t,e)),(i,n,s)=>{if(a.isInitialized)return a.value[t](i,n,s);{const t={listener:[i,n,s],disposable:void 0},o=e.push(t);return(0,l.s)((()=>{o(),t.disposable?.dispose()}))}}}if(t in e)return e[t];const i=a.value;let n=i[t];return"function"!=typeof n||(n=n.bind(i),e[t]=n),n},set(e,t,i){return a.value[t]=i,!0},getPrototypeOf(e){return t.prototype}})}{const e=this._createInstance(t,i,s);return o.add(e),e}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Bs{static{this.all=new Set}static{this._None=new class extends Bs{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,t){return e?new Bs(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Bs._None}static traceCreation(e,t){return e?new Bs(1,t.name):Bs._None}static{this._totals=0}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Bs(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Bs._totals+=e;let t=!1;const i=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){const s=[],o=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,s.push(`${o}CREATES -> ${r}`);const n=e(i+1,l);n&&s.push(n)}else s.push(`${o}uses -> ${r}`);return s.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Bs._totals.toFixed(2)}ms)`];(e>2||t)&&Bs.all.add(i.join("\n"))}}var Ws=i(84119);const Hs=new Set([b.ny.inMemory,b.ny.vscodeSourceControl,b.ny.walkThrough,b.ny.walkThroughSnippet,b.ny.vscodeChatCodeBlock]);class Vs{constructor(){this._byResource=new pt.fT,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new pt.fT,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){const i=this._byResource.get(e);return i?.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const o=this._byOwner.get(t);if(o&&(n=o.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){return"string"==typeof e?this._byOwner.get(e)?.values()??bs.f.empty():d.r.isUri(e)?this._byResource.get(e)?.values()??bs.f.empty():bs.f.map(bs.f.concat(...this._byOwner.values()),(e=>e[1]))}}class zs{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new pt.fT,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Hs.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Ws.cj.Error?t.errors+=1:i===Ws.cj.Warning?t.warnings+=1:i===Ws.cj.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class Us{constructor(){this._onMarkerChanged=new G.uI({delay:0,merge:Us._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Vs,this._stats=new zs(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,w.Ct)(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const i=Us._toMarker(e,t,s);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:u}=i;if(o)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,d=d>0?d:l,{resource:t,owner:e,code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:u}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const t of n){const n=bs.f.first(t);n&&(i.push(n.resource),this._data.delete(n.resource,e))}if((0,w.EI)(t)){const n=new pt.fT;for(const{resource:s,marker:o}of t){const t=Us._toMarker(e,s,o);if(!t)continue;const r=n.get(s);r?r.push(t):(n.set(s,[t]),i.push(s))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(Us._accept(i,n)){const e=t.push(i);if(s>0&&e===s)break}return t}return[]}if(t||i){const e=this._data.values(i??t),o=[];for(const t of e)for(const e of t)if(Us._accept(e,n)){const t=o.push(e);if(s>0&&t===s)return o}return o}{const e=[];for(const t of this._data.values())for(const i of t)if(Us._accept(i,n)){const t=e.push(i);if(s>0&&t===s)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new pt.fT;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}var js=i(87332);class qs extends l.jG{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=vt.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=vt.createEmptyModel(this.logService);const e=mt.O.as(ft.Fd.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],s=t[n];void 0!==e?this._configurationModel.setValue(n,e):s?this._configurationModel.setValue(n,s.default):this._configurationModel.removeValue(n)}}}var Ks=i(54673);class $s extends l.jG{constructor(e,t=[]){super(),this.logger=new M.Dk([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}var Gs=i(23534),Qs=i(37351),Ys=i(10948),Zs=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Xs=function(e,t){return function(i,n){t(i,n,e)}};class Js{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new G.vl}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let eo=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new l.BO(new Js(t))):Promise.reject(new Error("Model not found"))}};eo=Zs([Xs(0,N.IModelService)],eo);class to{static{this.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}}}show(){return to.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}}class io{static{this.NO_OP=new ue.Kz}info(e){return this.notify({severity:de.A.Info,message:e})}warn(e){return this.notify({severity:de.A.Warning,message:e})}error(e){return this.notify({severity:de.A.Error,message:e})}notify(e){switch(e.severity){case de.A.Error:console.error(e.message);break;case de.A.Warning:console.warn(e.message);break;default:console.log(e.message)}return io.NO_OP}prompt(e,t,i,n){return io.NO_OP}status(e,t){return l.jG.None}}let no=class{constructor(e){this._onWillExecuteCommand=new G.vl,this._onDidExecuteCommand=new G.vl,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=gt.w.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}};no=Zs([Xs(0,se._Y)],no);let so=class extends It{constructor(e,t,i,n,s,o){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new l.Cm;t.add(F.ko(e,F.Bx.KEY_DOWN,(e=>{const t=new qe.Z(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(F.ko(e,F.Bx.KEY_UP,(e=>{const t=new qe.Z(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new oo(e,t))},a=e=>{for(let t=0;t{e.getOption(61)||r(e.getContainerDomNode())};this._register(o.onCodeEditorAdd(c)),this._register(o.onCodeEditorRemove((e=>{e.getOption(61)||a(e.getContainerDomNode())}))),o.listCodeEditors().forEach(c);const d=e=>{r(e.getContainerDomNode())};this._register(o.onDiffEditorAdd(d)),this._register(o.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),o.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,i,n){return(0,l.qE)(gt.w.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>({keybinding:(0,at.Zv)(e.keybinding,Oe.OS),command:e.command??null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1})));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),(0,l.s)((()=>{for(let e=0;ethis._log(e)))}return this._cachedResolver}_documentHasFocus(){return a.G.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const e=s.when||void 0,o=s.keybinding;if(o){const r=Bt.resolveKeybinding(o,Oe.OS);for(const o of r)i[n++]=new Rt(o,s.command,s.commandArgs,e,t,null,!1)}else i[n++]=new Rt(void 0,s.command,s.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new at.dG(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new Bt([t],Oe.OS)}};so=Zs([Xs(0,ee.fN),Xs(1,gt.d),Xs(2,Vt.k),Xs(3,ue.Ot),Xs(4,M.rr),Xs(5,g.T)],so);class oo extends l.jG{constructor(e,t){super(),this.domNode=e,this._register(t)}}function ro(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof d.r)}let ao=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new G.vl,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new qs(e);this._configuration=new Ct(t.reload(),vt.createEmptyModel(e),vt.createEmptyModel(e),vt.createEmptyModel(e),vt.createEmptyModel(e),vt.createEmptyModel(e),new pt.fT,vt.createEmptyModel(e),new pt.fT,e),t.dispose()}getValue(e,t){const i="string"==typeof e?e:void 0,n=ro(e)?e:ro(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new yt({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);e.source=8,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};ao=Zs([Xs(0,M.rr)],ao);let lo=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new G.vl,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=ht.y.isIPosition(t)?t:null,s=n?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0,o=e?this.getLanguage(e,n):void 0;return void 0===s?this.configurationService.getValue({resource:e,overrideIdentifier:o}):this.configurationService.getValue(s,{resource:e,overrideIdentifier:o})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};lo=Zs([Xs(0,Ie.pG),Xs(1,N.IModelService),Xs(2,Ei.L)],lo);let co=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:Oe.j9||Oe.zx?"\n":"\r\n"}};co=Zs([Xs(0,Ie.pG)],co);class ho{static{this.SCHEME="inmemory"}constructor(){const e=d.r.from({scheme:ho.SCHEME,authority:"model",path:"/"});this.workspace={id:zt.cn,folders:[new zt.mX({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===ho.SCHEME?this.workspace.folders[0]:null}}function uo(e,t,i){if(!t)return;if(!(e instanceof ao))return;const n=[];Object.keys(t).forEach((e=>{(0,ct.vf)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,ct.Gn)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}let go=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:lt.jN.convert(e),n=new Map;for(const e of i){if(!(e instanceof lt.cw))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"==typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let i=n.get(t);i||(i=[],n.set(t,i)),i.push(dt.k.replaceMove(L.Q.lift(e.textEdit.range),e.textEdit.text))}let s=0,o=0;for(const[e,t]of n)e.pushStackElement(),e.pushEditOperations([],t,(()=>[])),e.pushStackElement(),o+=1,s+=t.length;return{ariaSummary:c.GP(Ut.tu.bulkEditServiceSummary,s,o),isApplied:s>0}}};go=Zs([Xs(0,N.IModelService)],go);let po=class extends Xe{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};po=Zs([Xs(0,oe),Xs(1,g.T)],po);class fo extends Kt.LanguageService{constructor(){super()}}let mo=class extends vi{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o),this.configure({blockMouse:!1})}};mo=Zs([Xs(0,Vt.k),Xs(1,ue.Ot),Xs(2,Ee.l),Xs(3,Ne.b),Xs(4,Qt.ez),Xs(5,ee.fN)],mo);const _o={amdModuleId:"vs/editor/common/services/editorSimpleWorker",esmModuleLocation:void 0,label:"editorWorkerService"};let vo=class extends U{constructor(e,t,i,n,s){super(_o,e,t,i,n,s)}};var bo;vo=Zs([Xs(0,N.IModelService),Xs(1,I.ITextResourceConfigurationService),Xs(2,M.rr),Xs(3,D.JZ),Xs(4,R.ILanguageFeaturesService)],vo),(0,te.v)(M.rr,class extends $s{constructor(){super(new M.Cr)}},0),(0,te.v)(Ie.pG,ao,0),(0,te.v)(I.ITextResourceConfigurationService,lo,0),(0,te.v)(I.ITextResourcePropertiesService,co,0),(0,te.v)(zt.VR,ho,0),(0,te.v)(Wt.L,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return(0,jt.P8)(e)}},0),(0,te.v)(Vt.k,class{publicLog2(){}},0),(0,te.v)(he.X,class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),a.G.confirm(i)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){const i=[...e.buttons??[]];e.cancelButton&&"string"!=typeof e.cancelButton&&"boolean"!=typeof e.cancelButton&&i.push(e.cancelButton),t=await(i[0]?.run({checkboxChecked:!1}))}return{result:t}}async error(e,t){await this.prompt({type:de.A.Error,message:e,detail:t})}},0),(0,te.v)(Qs.k,class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},0),(0,te.v)(ue.Ot,io,0),(0,te.v)(Ws.DR,Us,0),(0,te.v)(Ei.L,fo,0),(0,te.v)(cs.L,ls.Sx,0),(0,te.v)(N.IModelService,Mi.ModelService,0),(0,te.v)(Ii.IMarkerDecorationsService,Ni.MarkerDecorationsService,0),(0,te.v)(ee.fN,Is,0),(0,te.v)(Ht.G5,class{withProgress(e,t,i){return t({report:()=>{}})}},0),(0,te.v)(Ht.N8,to,0),(0,te.v)(js.CS,js.pc,0),(0,te.v)(Di.IEditorWorkerService,vo,0),(0,te.v)(lt.nu,go,0),(0,te.v)(qt.L,class{constructor(){this._neverEmitter=new G.vl,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},0),(0,te.v)(ut.ITextModelService,eo,0),(0,te.v)(Fe.j,hs,0),(0,te.v)(vn.PE,vn.aG,0),(0,te.v)(gt.d,no,0),(0,te.v)(Ne.b,so,0),(0,te.v)(Ri.GK,os,0),(0,te.v)(Ee.l,po,0),(0,te.v)(Re.C,Li,0),(0,te.v)(vs.h,_s,0),(0,te.v)(Ee.Z,mo,0),(0,te.v)(Qt.ez,gs.$,0),(0,te.v)(Ks.Nt,class{async playSignal(e,t){}},0),(0,te.v)(Ys.ITreeSitterParserService,class{getParseResult(e){}},0),function(e){const t=new As.a;for(const[e,i]of(0,te.N)())t.set(e,i);const i=new Fs(t,!0);t.set(se._Y,i),e.get=function(e){n||o({});const s=t.get(e);if(!s)throw new Error("Missing service "+e);return s instanceof Ts.d?i.invokeFunction((t=>t.get(e))):s};let n=!1;const s=new G.vl;function o(e){if(n)return i;n=!0;for(const[e,i]of(0,te.N)())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=(0,se.u1)(i);t.get(n)instanceof Ts.d&&t.set(n,e[i])}const o=(0,Gs.T)();for(const e of o)try{i.createInstance(e)}catch(e){(0,v.dz)(e)}return s.fire(),i}e.initialize=o,e.withServices=function(e){if(n)return e();const t=new l.Cm,i=t.add(s.event((()=>{i.dispose(),t.add(e())})));return t}}(bo||(bo={}));class wo extends ${constructor(e,t){super({amdModuleId:_o.amdModuleId,esmModuleLocation:_o.esmModuleLocation,label:t.label},t.keepIdleModels||!1,e),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?(0,p.V0)(this._foreignModuleHost):[];return e.$loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.$fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},s={};for(const e of t)s[e]=n(e,i);return s}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this.workerWithSyncedResources(e).then((e=>this.getProxy()))}}var Co=i(76543),yo=i(78336),So=i(48872),ko=i(35720),xo=i(11521),Lo=i(5032),Do=i(62067),Eo=i(36035),No=i(44425),Io=i(73055),Mo=i(68316);function To(e){return"string"==typeof e}function Ro(e){return!To(e)}function Po(e){return!e}function Ao(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Oo(e){return e.replace(/[&<>'"_]/g,"-")}function Fo(e,t){return new Error(`${e.languageId}: ${t}`)}function Bo(e,t,i,n,s){let o=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,c,d,h,u,g){return Po(a)?Po(l)?!Po(c)&&c0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}var Ho;class Vo{static{this._INSTANCE=new Vo(5)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new zo(e,t);let i=zo.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new zo(e,t),this._entries[i]=n,n)}}class zo{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return zo._equals(this,e)}push(e){return Vo.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Vo.create(this.parent,e)}}class Uo{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Uo(this.languageId,this.state)}}class jo{static{this._INSTANCE=new jo(5)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new qo(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new qo(e,t);const i=zo.getStackElementId(e);let n=this._entries[i];return n||(n=new qo(e,null),this._entries[i]=n,n)}}class qo{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:jo.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof qo&&!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData))}}class Ko{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new ko.ou(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const s=i.languageId,o=i.state,r=ko.dG.get(s);if(!r)return this.enterLanguage(s),this.emit(n,""),o;const a=r.tokenize(e,t,o);if(0!==n)for(const e of a.tokens)this._tokens.push(new ko.ou(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new ko.$M(this._tokens,e)}}class $o{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,s=t.length,o=null!==i?i.length:0;if(0===n&&0===s&&0===o)return new Uint32Array(0);if(0===n&&0===s)return i;if(0===s&&0===o)return e;const r=new Uint32Array(n+s+o);null!==e&&r.set(e);for(let e=0;e{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=ko.dG.get(t);if(i){if(i instanceof Ho){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else ko.dG.isResolved(t)||e.push(ko.dG.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=Vo.create(null,this._lexer.start);return jo.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,Lo.$H)(this._languageId,i);const n=new Ko,s=this._tokenize(e,t,i,n);return n.finalize(s)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,Lo.Lh)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new $o(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,i,n);return n.finalize(s)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Wo(this._lexer,t.stack.state),!i))throw Fo(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const o of i){if(!Ro(o.action)||"@pop"!==o.action.nextEmbedded)continue;s=!0;let i=o.resolveRegex(t.stack.state);const r=i.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(r.substr(4,r.length-5),e)}const a=e.search(i);-1===a||0!==a&&o.matchOnlyAtLineStart||(-1===n||a0&&s.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(o);return this._myTokenize(a,t,i,n+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterLanguage(this._languageId);const o=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,c=i.stack,d=0,h=null,u=!0;for(;u||d=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=Wo(this._lexer,_),!e))throw Fo(this._lexer,"tokenizer state is not defined: "+_);const t=r.substr(d);for(const i of e)if((0===d||!i.matchOnlyAtLineStart)&&(v=t.match(i.resolveRegex(_)),v)){b=v[0],w=i.action;break}}if(v||(v=[""],b=""),w||(d=this._lexer.maxStack)throw Fo(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if("@pop"===w.next){if(c.depth<=1)throw Fo(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(C));c=c.pop()}else if("@popall"===w.next)c=c.popall();else{let e=Bo(this._lexer,w.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!Wo(this._lexer,e))throw Fo(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(C));c=c.push(e)}}w.log&&"string"==typeof w.log&&(g=this._lexer,p=this._lexer.languageId+": "+Bo(this._lexer,w.log,b,v,_),console.log(`${g.languageId}: ${p}`))}if(null===S)throw Fo(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(C));const k=i=>{const o=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(o);if(d0)throw Fo(this._lexer,"groups cannot be nested: "+this._safeRuleName(C));if(v.length!==S.length+1)throw Fo(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(C));let e=0;for(let t=1;t=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(4,Ie.pG)],Go);const Yo=(0,_.H)("standaloneColorizer",{createHTML:e=>e});class Zo{static colorizeElement(e,t,i,n){const s=(n=n||{}).theme||"vs",o=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(o)||o;e.setTheme(s);const a=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+s,this.colorize(t,a||"",r,n).then((e=>{const t=Yo?.createHTML(e)??e;i.innerHTML=t}),(e=>console.error(e)))}static async colorize(e,t,i,n){const s=e.languageIdCodec;let o=4;n&&"number"==typeof n.tabSize&&(o=n.tabSize),c.LU(t)&&(t=t.substr(1));const r=c.uz(t);if(!e.isRegisteredLanguageId(i))return Xo(r,o,s);const a=await ko.dG.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((s,o)=>{const r=()=>{const a=function(e,t,i,n){let s=[],o=i.getInitialState();for(let r=0,a=e.length;r"),o=l.endState}return s.join("")}(e,t,i,n);if(i instanceof Go){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}s(a)};r()}))}(r,o,a,s):Xo(r,o,s)}static colorizeLine(e,t,i,n,s=4){const o=Mo.qL.isBasicASCII(e,t),r=Mo.qL.containsRTL(e,o,i);return(0,Io.Md)(new Io.zL(!1,!0,e,!1,o,r,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const s=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,i)}}function Xo(e,t,i){let n=[];const s=new Uint32Array(2);s[0]=0,s[1]=33587200;for(let o=0,r=e.length;o")}return n.join("")}var Jo=i(19527),er=i(68831),tr=i(24764),ir=i(12048),nr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},sr=function(e,t){return function(i,n){t(i,n,e)}};let or=0,rr=!1,ar=class extends s.x{constructor(e,t,i,n,s,o,r,l,c,d,h,u,g){const p={...t};p.ariaLabel=p.ariaLabel||Ut.vp.editorViewAccessibleLabel,super(e,p,{},i,n,s,o,c,d,h,u,g),this._standaloneKeybindingService=l instanceof so?l:null,function(e){if(!e){if(rr)return;rr=!0}Be.vr(e||a.G.document.body)}(p.ariaContainerElement),(0,tr.MW)(((e,t)=>i.createInstance(De.fO,e,t,{}))),(0,ir.e)(r)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++or,s=ee.M$.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.jG.None;const t=e.id,i=e.label,n=ee.M$.and(ee.M$.equals("editorId",this.getId()),ee.M$.deserialize(e.precondition)),s=e.keybindings,o=ee.M$.and(n,ee.M$.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,c=(t,...i)=>Promise.resolve(e.run(this,...i)),d=new l.Cm,h=this.getId()+":"+t;if(d.add(gt.w.registerCommand(h,c)),r){const e={command:{id:h,title:i},when:n,group:r,order:a};d.add(Qt.ZG.appendMenuItem(Qt.D8.EditorContext,e))}if(Array.isArray(s))for(const e of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,e,c,o));const u=new Jo.f(h,i,i,void 0,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,u),d.add((0,l.s)((()=>{this._actions.delete(t)}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof ne)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};ar=nr([sr(2,se._Y),sr(3,g.T),sr(4,gt.d),sr(5,ee.fN),sr(6,De.TN),sr(7,Ne.b),sr(8,Y.Gy),sr(9,ue.Ot),sr(10,Fe.j),sr(11,D.JZ),sr(12,R.ILanguageFeaturesService)],ar);let lr=class extends ar{constructor(e,t,i,n,s,o,r,a,l,c,d,h,u,g,p,f){const m={...t};uo(d,m,!1);const _=l.registerEditorContainer(e);"string"==typeof m.theme&&l.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&l.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const v=m.model;let b;if(delete m.model,super(e,m,i,n,s,o,r,a,l,c,h,p,f),this._configurationService=d,this._standaloneThemeService=l,this._register(_),void 0===v){const e=g.getLanguageIdByMimeType(m.language)||m.language||xo.vH;b=dr(u,g,m.value||"",e,void 0),this._ownsModel=!0}else b=v,this._ownsModel=!1;if(this._attachModel(b),b){const e={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){uo(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};lr=nr([sr(2,se._Y),sr(3,g.T),sr(4,gt.d),sr(5,ee.fN),sr(6,De.TN),sr(7,Ne.b),sr(8,cs.L),sr(9,ue.Ot),sr(10,Ie.pG),sr(11,Fe.j),sr(12,N.IModelService),sr(13,Ei.L),sr(14,D.JZ),sr(15,R.ILanguageFeaturesService)],lr);let cr=class extends er.T{constructor(e,t,i,n,s,o,r,a,l,c,d,h){const u={...t};uo(a,u,!0);const g=o.registerEditorContainer(e);"string"==typeof u.theme&&o.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&o.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},n,i,s,h,c),this._configurationService=a,this._standaloneThemeService=o,this._register(g)}dispose(){super.dispose()}updateOptions(e){uo(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(ar,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function dr(e,t,i,n,s){if(i=i||"",!n){const n=i.indexOf("\n");let o=i;return-1!==n&&(o=i.substring(0,n)),hr(e,i,t.createByFilepathOrFirstLine(s||null,o),s)}return hr(e,i,t.createById(n),s)}function hr(e,t,i,n){return e.createModel(t,i,n)}cr=nr([sr(2,se._Y),sr(3,ee.fN),sr(4,g.T),sr(5,cs.L),sr(6,ue.Ot),sr(7,Ie.pG),sr(8,Ee.Z),sr(9,Ht.N8),sr(10,vs.h),sr(11,Ks.Nt)],cr);var ur=i(64523),gr=i(64429),pr=i(1878),fr=i(95773),mr=i(72540),_r=i(28376),vr=i(56218),br=i(49678),wr=i(90072),Cr=i(86051),yr=i(41667),Sr=function(e,t){return function(i,n){t(i,n,e)}};class kr{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let xr=class extends l.jG{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=(0,pr.FY)(this,void 0),this._collapsed=(0,Ln.un)(this,(e=>this._viewModel.read(e)?.collapsed.read(e))),this._editorContentHeight=(0,pr.FY)(this,500),this.contentHeight=(0,Ln.un)(this,(e=>(this._collapsed.read(e)?0:this._editorContentHeight.read(e))+this._outerEditorHeight)),this._modifiedContentWidth=(0,pr.FY)(this,0),this._modifiedWidth=(0,pr.FY)(this,0),this._originalContentWidth=(0,pr.FY)(this,0),this._originalWidth=(0,pr.FY)(this,0),this.maxScroll=(0,Ln.un)(this,(e=>{const t=this._modifiedContentWidth.read(e)-this._modifiedWidth.read(e),i=this._originalContentWidth.read(e)-this._originalWidth.read(e);return t>i?{maxScroll:t,width:this._modifiedWidth.read(e)}:{maxScroll:i,width:this._originalWidth.read(e)}})),this._elements=(0,F.h)("div.multiDiffEntry",[(0,F.h)("div.header@header",[(0,F.h)("div.header-content",[(0,F.h)("div.collapse-button@collapseButton"),(0,F.h)("div.file-path",[(0,F.h)("div.title.modified.show-file-icons@primaryPath",[]),(0,F.h)("div.status.deleted@status",["R"]),(0,F.h)("div.title.original.show-file-icons@secondaryPath",[])]),(0,F.h)("div.actions@actions")])]),(0,F.h)("div.editorParent",[(0,F.h)("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(er.T,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=(0,wr.Ud)(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=(0,wr.Ud)(this.editor.getOriginalEditor()).isFocused,this.isFocused=(0,Ln.un)(this,(e=>this.isModifedFocused.read(e)||this.isOriginalFocused.read(e))),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new l.Cm),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const o=new an.$(this._elements.collapseButton,{});this._register((0,Ln.fm)((e=>{o.element.className="",o.icon=this._collapsed.read(e)?ii.W.chevronRight:ii.W.chevronDown}))),this._register(o.onDidClick((()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)}))),this._register((0,Ln.fm)((e=>{this._elements.editor.style.display=this._collapsed.read(e)?"none":"block"}))),this._register(this.editor.getModifiedEditor().onDidLayoutChange((e=>{const t=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(t,void 0)}))),this._register(this.editor.getOriginalEditor().onDidLayoutChange((e=>{const t=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(t,void 0)}))),this._register(this.editor.onDidContentSizeChange((e=>{(0,pr.YY)((t=>{this._editorContentHeight.set(e.contentHeight,t),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),t),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),t)}))}))),this._register(this.editor.getOriginalEditor().onDidScrollChange((e=>{if(this._isSettingScrollTop)return;if(!e.scrollTopChanged||!this._data)return;const t=e.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(t)}))),this._register((0,Ln.fm)((e=>{const t=this._viewModel.read(e)?.isActive.read(e);this._elements.root.classList.toggle("active",t)}))),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(s.createScoped(this._elements.actions));const r=this._register(this._instantiationService.createChild(new As.a([ee.fN,this._contextKeyService])));this._register(r.createInstance(Cr.m,this._elements.actions,Qt.D8.MultiDiffEditorFileToolbar,{actionRunner:this._register(new yr.I((()=>this._viewModel.get()?.modifiedUri))),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("navigation")},actionViewItemProvider:(e,t)=>(0,Gt.rN)(r,e,t)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(e){return{...e,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(this._data=e,!e)return void(0,pr.YY)((e=>{this._viewModel.set(void 0,e),this.editor.setDiffModel(null,e),this._dataStore.clear()}));const i=e.viewModel.documentDiffItem;if((0,pr.YY)((n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:void 0===e.viewModel.modifiedUri});let s=!1,o=!1,r=!1,a="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(a="R",s=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(a="A",r=!0):(a="D",o=!0),this._elements.status.classList.toggle("renamed",s),this._elements.status.classList.toggle("deleted",o),this._elements.status.classList.toggle("added",r),this._elements.status.innerText=a,this._resourceLabel2?.setUri(s?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))})),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange((()=>{this.editor.updateOptions(t(i.options??{}))}))),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,(e=>{e||this.setData(void 0)})),e.viewModel.documentDiffItem.contextKeys)for(const[t,i]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(t,i)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const s=e.length-this._headerHeight,o=Math.max(0,Math.min(n.start-e.start,s));this._elements.header.style.transform=`translateY(${o}px)`,(0,pr.YY)((i=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})}));try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",o>0||i>0),this._elements.header.classList.toggle("collapsed",o===s)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};xr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Sr(3,se._Y),Sr(4,ee.fN)],xr);class Lr{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(0===this._unused.size)t=this._create(e),this._itemData.set(t,e);else{const i=[...this._unused.values()];t=i.find((t=>this._itemData.get(t).getId()===e.getId()))??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var Dr=function(e,t){return function(i,n){t(i,n,e)}};let Er=class extends l.jG{constructor(e,t,i,n,s,o){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=o,this._scrollableElements=(0,F.h)("div.scrollContent",[(0,F.h)("div@content",{style:{overflow:"hidden"}}),(0,F.h)("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new fr.yE({forceIntegerValues:!1,scheduleAtNextAnimationFrame:e=>(0,F.PG)((0,F.zk)(this._element),e),smoothScrollDuration:100})),this._scrollableElement=this._register(new ti.oO(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=(0,F.h)("div.monaco-component.multiDiffEditor",{},[(0,F.h)("div",{},[this._scrollableElement.getDomNode()]),(0,F.h)("div.placeholder@placeholder",{},[(0,F.h)("div",[(0,C.kg)("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new mr.pN(this._element,void 0)),this._objectPool=this._register(new Lr((e=>{const t=this._instantiationService.createInstance(xr,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return t.setData(e),t}))),this.scrollTop=(0,Ln.y0)(this,this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollTop)),this.scrollLeft=(0,Ln.y0)(this,this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollLeft)),this._viewItemsInfo=(0,Ln.rm)(this,((e,t)=>{const i=this._viewModel.read(e);if(!i)return{items:[],getItem:e=>{throw new v.D7}};const n=i.items.read(e),s=new Map;return{items:n.map((e=>{const i=t.add(new Nr(e,this._objectPool,this.scrollLeft,(e=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+e})}))),n=this._lastDocStates?.[i.getKey()];return n&&(0,pr.Rn)((e=>{i.setViewState(n,e)})),s.set(e,i),i})),getItem:e=>s.get(e)}})),this._viewItems=this._viewItemsInfo.map(this,(e=>e.items)),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,((e,t)=>e.reduce(((e,i)=>e+i.contentHeight.read(t)+this._spaceBetweenPx),0))),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new As.a([ee.fN,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(br.R.inMultiDiffEditor.key,!0),this._register((0,Ln.yC)(((e,t)=>{const i=this._viewModel.read(e);if(i&&i.contextKeys)for(const[e,n]of Object.entries(i.contextKeys)){const i=this._contextKeyService.createKey(e,void 0);i.set(n),t.add((0,l.s)((()=>i.reset())))}})));const r=this._parentContextKeyService.createKey(br.R.multiDiffEditorAllCollapsed.key,!1);this._register((0,Ln.fm)((e=>{const t=this._viewModel.read(e);if(t){const i=t.items.read(e).every((t=>t.collapsed.read(e)));r.set(i)}}))),this._register((0,Ln.fm)((e=>{const t=this._dimension.read(e);this._sizeObserver.observe(t)}))),this._register((0,Ln.fm)((e=>{const t=this._viewItems.read(e);this._elements.placeholder.classList.toggle("visible",0===t.length)}))),this._scrollableElements.content.style.position="relative",this._register((0,Ln.fm)((e=>{const t=this._sizeObserver.height.read(e);this._scrollableElements.root.style.height=`${t}px`;const i=this._totalHeight.read(e);this._scrollableElements.content.style.height=`${i}px`;const n=this._sizeObserver.width.read(e);let s=n;const o=this._viewItems.read(e),r=(0,gr.Cn)(o,(0,w.VE)((t=>t.maxScroll.read(e).maxScroll),w.U9));r&&(s=n+r.maxScroll.read(e).maxScroll),this._scrollableElement.setScrollDimensions({width:n,height:t,scrollHeight:i,scrollWidth:s})}))),e.replaceChildren(this._elements.root),this._register((0,l.s)((()=>{e.replaceChildren()}))),this._register(this._register((0,Ln.fm)((e=>{(0,pr.YY)((t=>{this.render(e)}))}))))}render(e){const t=this.scrollTop.read(e);let i=0,n=0,s=0;const o=this._sizeObserver.height.read(e),r=_r.L.ofStartAndLength(t,o),a=this._sizeObserver.width.read(e);for(const l of this._viewItems.read(e)){const c=l.contentHeight.read(e),d=Math.min(c,o),h=_r.L.ofStartAndLength(n,d),u=_r.L.ofStartAndLength(s,c);if(u.isBefore(r))i-=c-d,l.hide();else if(u.isAfter(r))l.hide();else{const e=Math.max(0,Math.min(r.start-u.start,c-d));i-=e;const n=_r.L.ofStartAndLength(t+i,o);l.render(h,e,a,n)}n+=d+this._spaceBetweenPx,s+=c+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};Er=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Dr(4,ee.fN),Dr(5,se._Y)],Er);class Nr extends l.jG{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register((0,pr.X2)(this,void 0)),this.contentHeight=(0,Ln.un)(this,(e=>this._templateRef.read(e)?.object.contentHeight?.read(e)??this.viewModel.lastTemplateData.read(e).contentHeight)),this.maxScroll=(0,Ln.un)(this,(e=>this._templateRef.read(e)?.object.maxScroll.read(e)??{maxScroll:0,scrollWidth:0})),this.template=(0,Ln.un)(this,(e=>this._templateRef.read(e)?.object)),this._isHidden=(0,Ln.FY)(this,!1),this._isFocused=(0,Ln.un)(this,(e=>this.template.read(e)?.isFocused.read(e)??!1)),this.viewModel.setIsFocused(this._isFocused,void 0),this._register((0,Ln.fm)((e=>{const t=this._scrollLeft.read(e);this._templateRef.read(e)?.object.setScrollLeft(t)}))),this._register((0,Ln.fm)((e=>{const t=this._templateRef.read(e);t&&this._isHidden.read(e)&&(t.object.isFocused.read(e)||this._clear())})))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(vr.L.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);const s=this._templateRef.get();s&&n&&s.object.editor.setSelections(n)}_updateTemplateData(e){const t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&(0,pr.Rn)((t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)}))}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();if(!s){s=this._objectPool.getUnusedObj(new kr(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(s,void 0);const e=this.viewModel.lastTemplateData.get().selections;e&&s.object.editor.setSelections(e)}s.object.render(e,i,t,n)}}(0,Le.x1A)("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},(0,C.kg)("multiDiffEditor.headerBackground","The background color of the diff editor's header")),(0,Le.x1A)("multiDiffEditor.background",Le.YtV,(0,C.kg)("multiDiffEditor.background","The background color of the multi file diff editor")),(0,Le.x1A)("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},(0,C.kg)("multiDiffEditor.border","The border color of the multi file diff editor"));let Ir=class extends l.jG{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=(0,Ln.FY)(this,void 0),this._viewModel=(0,Ln.FY)(this,void 0),this._widgetImpl=(0,Ln.rm)(this,((e,t)=>((0,ur.b)(xr,e),t.add(this._instantiationService.createInstance((0,ur.b)(Er,e),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))))),this._register((0,Ln.OI)(this._widgetImpl))}};function Mr(e){const t=bo.get(Ne.b);return t instanceof so?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:ee.M$.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.jG.None)}Ir=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,se._Y)],Ir);var Tr=i(59321);function Rr(e,t){return"boolean"==typeof e?e:t}function Pr(e,t){return"string"==typeof e?e:t}function Ar(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function Or(e,t,i){t=t.replace(/@@/g,"");let n,s=0;do{n=!1,t=t.replace(/@(\w+)/g,(function(i,s){n=!0;let o="";if("string"==typeof e[s])o=e[s];else{if(!(e[s]&&e[s]instanceof RegExp))throw void 0===e[s]?Fo(e,"language definition does not contain attribute '"+s+"', used at: "+t):Fo(e,"attribute reference '"+s+"' must be a string, used at: "+t);o=e[s].source}return Po(o)?"":"(?:"+o+")"})),s++}while(n&&s<5);t=t.replace(/\x01/g,"@");const o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");if(i&&t.match(/\$[sS](\d\d?)/g)){let i=null,n=null;return s=>(n&&i===s||(i=s,n=new RegExp(function(e,t,i){let n=null;return t.replace(/\$[sS](\d\d?)/g,(function(t,s){return null===n&&(n=i.split("."),n.unshift(i)),!Po(s)&&s=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Fo(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw Fo(e,"the next state must be a string value in rule: "+t);{let s=i.next;if(!/^(@pop|@push|@popall)$/.test(s)&&("@"===s[0]&&(s=s.substr(1)),s.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,Bo(e,s,"",[],""))))throw Fo(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=s}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let s=0,o=i.length;s0&&"^"===i[0],this.name=this.name+": "+i,this.regex=Or(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=Br(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function Hr(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={languageId:e,includeLF:Rr(t.includeLF,!1),noThrow:!1,maxStack:100,start:"string"==typeof t.start?t.start:null,ignoreCase:Rr(t.ignoreCase,!1),unicode:Rr(t.unicode,!1),tokenPostfix:Pr(t.tokenPostfix,"."+e),defaultToken:Pr(t.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},n=t;function s(e,o,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw Fo(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw Fo(i,"include target '"+r+"' is not defined at: "+e);s(e+"."+r,o,t.tokenizer[r])}else{const t=new Wr(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw Fo(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Fo(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Rr(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}o.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw Fo(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,s("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Fo(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const o=[];for(const e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Fo(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw Fo(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");o.push({token:t.token+i.tokenPostfix,open:Ao(i,t.open),close:Ao(i,t.close)})}return i.brackets=o,i.noThrow=!0,i}class Vr{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return zr.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new ko.rY(n.tokens,n.endState)}}class zr{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,o=e.length;s0&&s[o-1]===l)continue;let c=a.startIndex;0===e?c=0:c{const i=await Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?jr(e,i):new Go(bo.get(Ei.L),bo.get(cs.L),e,Hr(e,i),bo.get(Ie.pG)):null}));return ko.dG.registerFactory(e,i)}var Kr=i(5973);o.qB.wrappingIndent.defaultValue=0,o.qB.glyphMargin.defaultValue=!1,o.qB.autoIndent.defaultValue=3,o.qB.overviewRulerLanes.defaultValue=2,Kr.Pj.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const $r=(0,r.createMonacoBaseAPI)();$r.editor={create:function(e,t,i){return bo.initialize(i||{}).createInstance(lr,e,t)},getEditors:function(){return bo.get(g.T).listCodeEditors()},getDiffEditors:function(){return bo.get(g.T).listDiffEditors()},onDidCreateEditor:function(e){return bo.get(g.T).onCodeEditorAdd((t=>{e(t)}))},onDidCreateDiffEditor:function(e){return bo.get(g.T).onDiffEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return bo.initialize(i||{}).createInstance(cr,e,t)},addCommand:function(e){if("string"!=typeof e.id||"function"!=typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return gt.w.registerCommand(e.id,e.run)},addEditorAction:function(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=ee.M$.deserialize(e.precondition),i=new l.Cm;if(i.add(gt.w.registerCommand(e.id,((i,...n)=>u.DX.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n))))))),e.contextMenuGroupId){const n={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};i.add(Qt.ZG.appendMenuItem(Qt.D8.EditorContext,n))}if(Array.isArray(e.keybindings)){const n=bo.get(Ne.b);if(n instanceof so){const s=ee.M$.and(t,ee.M$.deserialize(e.keybindingContext));i.add(n.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:s})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return i},addKeybindingRule:function(e){return Mr([e])},addKeybindingRules:Mr,createModel:function(e,t,i){const n=bo.get(Ei.L),s=n.getLanguageIdByMimeType(t)||t;return dr(bo.get(N.IModelService),n,e,s,i)},setModelLanguage:function(e,t){const i=bo.get(Ei.L),n=i.getLanguageIdByMimeType(t)||t||xo.vH;e.setLanguage(i.createById(n))},setModelMarkers:function(e,t,i){e&&bo.get(Ws.DR).changeOne(t,e.uri,i)},getModelMarkers:function(e){return bo.get(Ws.DR).read(e)},removeAllMarkers:function(e){bo.get(Ws.DR).changeAll(e,[])},onDidChangeMarkers:function(e){return bo.get(Ws.DR).onMarkerChanged(e)},getModels:function(){return bo.get(N.IModelService).getModels()},getModel:function(e){return bo.get(N.IModelService).getModel(e)},onDidCreateModel:function(e){return bo.get(N.IModelService).onModelAdded(e)},onWillDisposeModel:function(e){return bo.get(N.IModelService).onModelRemoved(e)},onDidChangeModelLanguage:function(e){return bo.get(N.IModelService).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))},createWebWorker:function(e){return function(e,t){return new wo(e,t)}(bo.get(N.IModelService),e)},colorizeElement:function(e,t){const i=bo.get(Ei.L),n=bo.get(cs.L);return Zo.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))},colorize:function(e,t,i){const n=bo.get(Ei.L);return bo.get(cs.L).registerEditorContainer(a.G.document.body),Zo.colorize(n,e,t,i)},colorizeModelLine:function(e,t,i=4){return bo.get(cs.L).registerEditorContainer(a.G.document.body),Zo.colorizeModelLine(e,t,i)},tokenize:function(e,t){ko.dG.getOrCreate(t);const i=(o=t,ko.dG.get(o)||{getInitialState:()=>Lo.r3,tokenize:(e,t,i)=>(0,Lo.$H)(o,i)}),n=(0,c.uz)(e),s=[];var o;let r=i.getInitialState();for(let e=0,t=n.length;e{if(!i)return null;const s=t.options?.selection;let o;return s&&"number"==typeof s.endLineNumber&&"number"==typeof s.endColumn?o=s:s&&(o={lineNumber:s.startLineNumber,column:s.startColumn}),await e.openCodeEditor(i,t.resource,o)?i:null}))},AccessibilitySupport:Eo.Gn,ContentWidgetPositionPreference:Eo.Qj,CursorChangeReason:Eo.h5,DefaultEndOfLine:Eo.of,EditorAutoIndentStrategy:Eo.e0,EditorOption:Eo.p2,EndOfLinePreference:Eo.kf,EndOfLineSequence:Eo.WU,MinimapPosition:Eo.R3,MinimapSectionHeaderStyle:Eo.VX,MouseTargetType:Eo.hS,OverlayWidgetPositionPreference:Eo.dE,OverviewRulerLane:Eo.A5,GlyphMarginLane:Eo.ZS,RenderLineNumbersType:Eo.DO,RenderMinimap:Eo.hW,ScrollbarVisibility:Eo.XR,ScrollType:Eo.ov,TextEditorCursorBlinkingStyle:Eo.U7,TextEditorCursorStyle:Eo.m9,TrackedRangeStickiness:Eo.kK,WrappingIndent:Eo.tJ,InjectedTextCursorStops:Eo.VW,PositionAffinity:Eo.Ic,ShowLightbulbIconMode:Eo.jT,ConfigurationChangedEvent:o.lw,BareFontInfo:yo._8,FontInfo:yo.YJ,TextModelResolvedOptions:Do.X2,FindMatch:Do.Dg,ApplyUpdateResult:o.hZ,EditorZoom:Co.D,createMultiFileDiffEditor:function(e,t){const i=bo.initialize(t||{});return new Ir(e,{},i)},EditorType:So._,EditorOptions:o.qB},$r.languages={register:function(e){xo.W6.registerLanguage(e)},getLanguages:function(){let e=[];return e=e.concat(xo.W6.getLanguages()),e},onLanguage:function(e,t){return bo.withServices((()=>{const i=bo.get(Ei.L).onDidRequestRichLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},onLanguageEncountered:function(e,t){return bo.withServices((()=>{const i=bo.get(Ei.L).onDidRequestBasicLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},getEncodedLanguageId:function(e){return bo.get(Ei.L).languageIdCodec.encodeLanguageId(e)},setLanguageConfiguration:function(e,t){if(!bo.get(Ei.L).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return bo.get(D.JZ).register(e,t,100)},setColorMap:function(e){const t=bo.get(cs.L);if(e){const i=[null];for(let t=1,n=e.length;tt}):ko.dG.register(e,jr(e,t))},setMonarchTokensProvider:function(e,t){return Ur(t)?qr(e,{create:()=>t}):ko.dG.register(e,(t=>new Go(bo.get(Ei.L),bo.get(cs.L),e,Hr(e,t),bo.get(Ie.pG)))(t))},registerReferenceProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).referenceProvider.register(e,t)},registerRenameProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).renameProvider.register(e,t)},registerNewSymbolNameProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).newSymbolNamesProvider.register(e,t)},registerCompletionItemProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).completionProvider.register(e,t)},registerSignatureHelpProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).signatureHelpProvider.register(e,t)},registerHoverProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).hoverProvider.register(e,{provideHover:async(e,i,n,s)=>{const o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n,s)).then((e=>{if(e)return!e.range&&o&&(e.range=new L.Q(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new L.Q(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentSymbolProvider.register(e,t)},registerDocumentHighlightProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentHighlightProvider.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).linkedEditingRangeProvider.register(e,t)},registerDefinitionProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).definitionProvider.register(e,t)},registerImplementationProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).implementationProvider.register(e,t)},registerTypeDefinitionProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).typeDefinitionProvider.register(e,t)},registerCodeLensProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).codeLensProvider.register(e,t)},registerCodeActionProvider:function(e,t,i){return bo.get(R.ILanguageFeaturesService).codeActionProvider.register(e,{providedCodeActionKinds:i?.providedCodeActionKinds,documentation:i?.documentation,provideCodeActions:(e,i,n,s)=>{const o=bo.get(Ws.DR).read({resource:e.uri}).filter((e=>L.Q.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:o,only:n.only,trigger:n.trigger},s)},resolveCodeAction:t.resolveCodeAction})},registerDocumentFormattingEditProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentFormattingEditProvider.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentRangeFormattingEditProvider.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).onTypeFormattingEditProvider.register(e,t)},registerLinkProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).linkProvider.register(e,t)},registerColorProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).colorProvider.register(e,t)},registerFoldingRangeProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).foldingRangeProvider.register(e,t)},registerDeclarationProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).declarationProvider.register(e,t)},registerSelectionRangeProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).selectionRangeProvider.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentSemanticTokensProvider.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentRangeSemanticTokensProvider.register(e,t)},registerInlineCompletionsProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).inlineCompletionsProvider.register(e,t)},registerInlineEditProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).inlineEditProvider.register(e,t)},registerInlayHintsProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).inlayHintsProvider.register(e,t)},DocumentHighlightKind:Eo.Kb,CompletionItemKind:Eo.Io,CompletionItemTag:Eo.QP,CompletionItemInsertTextRule:Eo._E,SymbolKind:Eo.v0,SymbolTag:Eo.H_,IndentAction:Eo.l,CompletionTriggerKind:Eo.t7,SignatureHelpTriggerKind:Eo.WA,InlayHintKind:Eo.r4,InlineCompletionTriggerKind:Eo.qw,InlineEditTriggerKind:Eo.sm,CodeActionTriggerType:Eo.ok,NewSymbolNameTag:Eo.OV,NewSymbolNameTriggerKind:Eo.YT,PartialAcceptTriggerKind:Eo.Ah,HoverVerbosityAction:Eo.M$,FoldingRangeKind:ko.lO,SelectedSuggestionInfo:ko.GE};const Gr=$r.CancellationTokenSource,Qr=$r.Emitter,Yr=$r.KeyCode,Zr=$r.KeyMod,Xr=$r.Position,Jr=$r.Range,ea=$r.Selection,ta=$r.SelectionDirection,ia=$r.MarkerSeverity,na=$r.MarkerTag,sa=$r.Uri,oa=$r.Token,ra=$r.editor,aa=$r.languages,la=globalThis.MonacoEnvironment;var ca;(la?.globalAPI||"function"==typeof define&&i.amdO)&&(globalThis.monaco=$r),void 0!==globalThis.require&&"function"==typeof globalThis.require.config&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]}),i(55172),i(95380),self.MonacoEnvironment=(ca={editorWorkerService:"editor.worker.js",css:"css.worker.js",less:"css.worker.js",scss:"css.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,s=(n?n.replace(/\/$/,"")+"/":"")+ca[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(s)){var o=String(window.location),r=o.substr(0,o.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(s.substring(0,r.length)!==r){/^(\/\/)/.test(s)&&(s=window.location.protocol+s);var a=new Blob(["/*"+t+'*/importScripts("'+s+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return s}});var da=n},75969:function(e,t,i){"use strict";i.d(t,{Dy:function(){return o},H8:function(){return d},Qu:function(){return f},Tc:function(){return c},c8:function(){return u},gm:function(){return l},m0:function(){return g},nr:function(){return h},pR:function(){return r}});var n=i(95601);class s{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new s}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function o(e,t,i){"string"==typeof t&&(t=e.matchMedia(t)),t.addEventListener("change",i)}function r(e){return s.INSTANCE.getZoomFactor(e)}const a=navigator.userAgent,l=a.indexOf("Firefox")>=0,c=a.indexOf("AppleWebKit")>=0,d=a.indexOf("Chrome")>=0,h=!d&&a.indexOf("Safari")>=0,u=!d&&!h&&c,g=(a.indexOf("Electron/"),a.indexOf("Android")>=0);let p=!1;if("function"==typeof n.G.matchMedia){const e=n.G.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=n.G.matchMedia("(display-mode: fullscreen)");p=e.matches,o(n.G,e,(({matches:e})=>{p&&t.matches||(p=e)}))}function f(){return p}},19621:function(e,t,i){"use strict";i.d(t,{e:function(){return r}});var n=i(75969),s=i(95601),o=i(79783);const r={clipboard:{writeText:o.ib||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.ib||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.ib||n.Qu()?0:navigator.keyboard||n.nr?1:2,touch:"ontouchstart"in s.G||navigator.maxTouchPoints>0,pointerEvents:s.G.PointerEvent&&("ontouchstart"in s.G||navigator.maxTouchPoints>0)}},88767:function(e,t,i){"use strict";i.d(t,{t:function(){return n}});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(5940).K.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},84201:function(e,t,i){"use strict";i.d(t,{$:function(){return Be},BC:function(){return Te},BK:function(){return q},Be:function(){return F},Bx:function(){return ke},CE:function(){return Ue},Cl:function(){return ee},Di:function(){return Ye},Ej:function(){return j},Er:function(){return ye},Fv:function(){return L},H4:function(){return Q},Hs:function(){return Re},Ij:function(){return P},Iv:function(){return k},L9:function(){return W},Ln:function(){return Pe},Mc:function(){return et},OK:function(){return Y},Oq:function(){return A},PG:function(){return O},Pl:function(){return Me},Q2:function(){return C},QX:function(){return Z},TT:function(){return Qe},Tf:function(){return qe},Tr:function(){return $},U2:function(){return _e},U3:function(){return R},WU:function(){return He},Wt:function(){return me},X7:function(){return ne},XD:function(){return X},Xc:function(){return T},ZF:function(){return y},a:function(){return oe},a4:function(){return Ge},b2:function(){return M},bo:function(){return We},bq:function(){return ie},cL:function(){return U},fg:function(){return z},fs:function(){return Le},fz:function(){return re},gI:function(){return $e},h:function(){return Je},i0:function(){return je},jD:function(){return Ve},jG:function(){return te},jh:function(){return le},ko:function(){return N},kx:function(){return Se},li:function(){return de},mU:function(){return K},nR:function(){return se},nY:function(){return we},pN:function(){return Ze},q3:function(){return x},sb:function(){return be},sd:function(){return xe},tG:function(){return H},vT:function(){return ze},w5:function(){return Ie},w_:function(){return D},wk:function(){return Ee},xZ:function(){return Ce},y6:function(){return G},yt:function(){return Ke},zK:function(){return De},zk:function(){return _}});var n=i(75969),s=i(19621),o=i(40478),r=i(34287),a=i(90890),l=i(20187),c=i(80670),d=i(19082),h=i(35114),u=i(84756),g=i(79783),p=i(65260),f=i(95601);const{registerWindow:m,getWindow:_,getDocument:v,getWindows:b,getWindowsCount:w,getWindowId:C,getWindowById:y,hasWindow:S,onDidRegisterWindow:k,onWillUnregisterWindow:x,onDidUnregisterWindow:L}=function(){const e=new Map;(0,f.y)(f.G,1);const t={window:f.G,disposables:new h.Cm};e.set(f.G.vscodeWindowId,t);const i=new c.vl,n=new c.vl,s=new c.vl;return{onDidRegisterWindow:i.event,onWillUnregisterWindow:s.event,onDidUnregisterWindow:n.event,registerWindow(t){if(e.has(t.vscodeWindowId))return h.jG.None;const o=new h.Cm,r={window:t,disposables:o.add(new h.Cm)};return e.set(t.vscodeWindowId,r),o.add((0,h.s)((()=>{e.delete(t.vscodeWindowId),n.fire(t)}))),o.add(N(t,ke.BEFORE_UNLOAD,(()=>{s.fire(t)}))),i.fire(r),o},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:function(i,n){return("number"==typeof i?e.get(i):void 0)??(n?t:void 0)},getWindow(e){const t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;const i=e;return i?.view?i.view.window:f.G},getDocument(e){return _(e).document}}}();function D(e){for(;e.firstChild;)e.firstChild.remove()}class E{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function N(e,t,i,n){return new E(e,t,i,n)}function I(e,t){return function(i){return t(new r.P(e,i))}}const M=function(e,t,i,n){let s=i;return"click"===t||"mousedown"===t||"contextmenu"===t?s=I(_(e),i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(s=function(e){return function(t){return e(new o.Z(t))}}(i)),N(e,t,s,n)},T=function(e,t,i){return function(e,t,i){return N(e,g.un&&s.e.pointerEvents?ke.POINTER_DOWN:ke.MOUSE_DOWN,t,i)}(e,I(_(e),t),i)};function R(e,t,i){return(0,a.b7)(e,t,i)}class P extends a.A0{constructor(e,t){super(e,t)}}let A,O;class F extends a.vb{constructor(e){super(),this.defaultTarget=e&&_(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}}class B{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dz)(e)}}static sort(e,t){return t.priority-e.priority}}function W(e){return _(e).getComputedStyle(e,null)}function H(e,t){const i=_(e),n=i.document;if(e!==n.body)return new z(e.clientWidth,e.clientHeight);if(g.un&&i?.visualViewport)return new z(i.visualViewport.width,i.visualViewport.height);if(i?.innerWidth&&i.innerHeight)return new z(i.innerWidth,i.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new z(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new z(n.documentElement.clientWidth,n.documentElement.clientHeight);if(t)return H(t);throw new Error("Unable to figure out browser width and height")}!function(){const e=new Map,t=new Map,i=new Map,n=new Map;O=(s,o,r=0)=>{const a=C(s),l=new B(o,r);let c=e.get(a);return c||(c=[],e.set(a,c)),c.push(l),i.get(a)||(i.set(a,!0),s.requestAnimationFrame((()=>(s=>{i.set(s,!1);const o=e.get(s)??[];for(t.set(s,o),e.set(s,[]),n.set(s,!0);o.length>0;)o.sort(B.sort),o.shift().execute();n.set(s,!1)})(a)))),l},A=(e,i,s)=>{const o=C(e);if(n.get(o)){const e=new B(i,s);let n=t.get(o);return n||(n=[],t.set(o,n)),n.push(e),e}return O(e,i,s)}}();class V{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=W(e),s=n?n.getPropertyValue(t):"0";return V.convertToPixels(e,s)}static getBorderLeftWidth(e){return V.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return V.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return V.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return V.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return V.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return V.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return V.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return V.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return V.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return V.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return V.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return V.getDimension(e,"margin-bottom","marginBottom")}}class z{static{this.None=new z(0,0)}constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new z(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof z?e:new z(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function U(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement;){i-=e.scrollTop;const s=J(e)?null:W(e);s&&(n-="rtl"!==s.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=V.getBorderLeftWidth(e),i+=V.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function j(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function q(e){const t=e.getBoundingClientRect(),i=_(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}function K(e){let t=e,i=1;do{const e=W(t).zoom;null!=e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==t.ownerDocument.documentElement);return i}function $(e){const t=V.getMarginLeft(e)+V.getMarginRight(e);return e.offsetWidth+t}function G(e){const t=V.getBorderLeftWidth(e)+V.getBorderRightWidth(e),i=V.getPaddingLeft(e)+V.getPaddingRight(e);return e.offsetWidth-t-i}function Q(e){const t=V.getBorderTopWidth(e)+V.getBorderBottomWidth(e),i=V.getPaddingTop(e)+V.getPaddingBottom(e);return e.offsetHeight-t-i}function Y(e){const t=V.getMarginTop(e)+V.getMarginBottom(e);return e.offsetHeight+t}function Z(e,t){return Boolean(t?.contains(e))}function X(e,t,i){return!!function(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}(e,t,i)}function J(e){return e&&!!e.host&&!!e.mode}function ee(e){return!!te(e)}function te(e){for(;e.parentNode;){if(e===e.ownerDocument?.body)return null;e=e.parentNode}return J(e)?e:null}function ie(){let e=oe().activeElement;for(;e?.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ne(e){return ie()===e}function se(e){return Z(ie(),e)}function oe(){return w()<=1?f.G.document:Array.from(b()).map((({window:e})=>e.document)).find((e=>e.hasFocus()))??f.G.document}function re(){const e=oe();return e.defaultView?.window??f.G}const ae=new Map;function le(){return new ce}class ce{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=de(f.G.document.head,(t=>t.innerText=e)))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function de(e=f.G.document.head,t,i){const n=document.createElement("style");if(n.type="text/css",n.media="screen",t?.(n),e.appendChild(n),i&&i.add((0,h.s)((()=>n.remove()))),e===f.G.document.head){const e=new Set;ae.set(n,e);for(const{window:t,disposables:s}of b()){if(t===f.G)continue;const o=s.add(he(n,e,t));i?.add(o)}}return n}function he(e,t,i){const n=new h.Cm,s=e.cloneNode(!0);i.document.head.appendChild(s),n.add((0,h.s)((()=>s.remove())));for(const t of fe(e))s.sheet?.insertRule(t.cssText,s.sheet?.cssRules.length);return n.add(ue.observe(e,n,{childList:!0})((()=>{s.textContent=e.textContent}))),t.add(s),n.add((0,h.s)((()=>t.delete(s)))),n}const ue=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));const s=(0,p.tW)(i);let o=n.get(s);if(o)o.users+=1;else{const r=new c.vl,a=new MutationObserver((e=>r.fire(e)));a.observe(e,i);const l=o={users:1,observer:a,onDidMutate:r.event};t.add((0,h.s)((()=>{l.users-=1,0===l.users&&(r.dispose(),a.disconnect(),n?.delete(s),0===n?.size&&this.mutationObservers.delete(e))}))),n.set(s,o)}return o.onDidMutate}};let ge=null;function pe(){return ge||(ge=de()),ge}function fe(e){return e?.sheet?.rules?e.sheet.rules:e?.sheet?.cssRules?e.sheet.cssRules:[]}function me(e,t,i=pe()){if(i&&t){i.sheet?.insertRule(`${e} {${t}}`,0);for(const n of ae.get(i)??[])me(e,t,n)}}function _e(e,t=pe()){if(!t)return;const i=fe(t),n=[];for(let t=0;t=0;e--)t.sheet?.deleteRule(n[e]);for(const i of ae.get(t)??[])_e(e,i)}function ve(e){return"string"==typeof e.selectorText}function be(e){return e instanceof HTMLElement||e instanceof _(e).HTMLElement}function we(e){return e instanceof HTMLAnchorElement||e instanceof _(e).HTMLAnchorElement}function Ce(e){return e instanceof SVGElement||e instanceof _(e).SVGElement}function ye(e){return e instanceof MouseEvent||e instanceof _(e).MouseEvent}function Se(e){return e instanceof KeyboardEvent||e instanceof _(e).KeyboardEvent}const ke={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Tc?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Tc?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Tc?"webkitAnimationIteration":"animationiteration"};function xe(e){const t=e;return!(!t||"function"!=typeof t.preventDefault||"function"!=typeof t.stopPropagation)}const Le={stop:(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e)};function De(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function Ee(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class Ne extends h.jG{static hasFocusWithin(e){if(be(e)){const t=te(e);return Z(t?t.activeElement:e.ownerDocument.activeElement,e)}{const t=e;return Z(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new c.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.vl),this.onDidBlur=this._onDidBlur.event;let t=Ne.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},s=()=>{t&&(i=!0,(be(e)?_(e):e).setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{Ne.hasFocusWithin(e)!==t&&(t?s():n())},this._register(N(e,ke.FOCUS,n,!0)),this._register(N(e,ke.BLUR,s,!0)),be(e)&&(this._register(N(e,ke.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(N(e,ke.FOCUS_OUT,(()=>this._refreshStateHandler()))))}}function Ie(e){return new Ne(e)}function Me(e,t){return e.after(t),t}function Te(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function Re(e,t){return e.insertBefore(t,e.firstChild),t}function Pe(e,...t){e.innerText="",Te(e,...t)}const Ae=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Oe;function Fe(e,t,i,...n){const s=Ae.exec(t);if(!s)throw new Error("Bad use of emmet");const o=s[1]||"div";let r;return r=e!==Oe.HTML?document.createElementNS(e,o):document.createElement(o),s[3]&&(r.id=s[3]),s[4]&&(r.className=s[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function Be(e,t,...i){return Fe(Oe.HTML,e,t,...i)}function We(e,...t){e?He(...t):Ve(...t)}function He(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function Ve(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function ze(e,t){const i=e.devicePixelRatio*t;return Math.max(1,Math.floor(i))/e.devicePixelRatio}function Ue(e){f.G.open(e,"_blank","noopener")}function je(e,t){const i=()=>{t(),n=O(e,i)};let n=O(e,i);return(0,h.s)((()=>n.dispose()))}function qe(e){return e?`url('${u.zl.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Ke(e){return`'${e.replace(/'/g,"%27")}'`}function $e(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=$e(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}function Ge(e,t=!1){const i=document.createElement("a");return d.$w("afterSanitizeAttributes",(n=>{for(const s of["href","src"])if(n.hasAttribute(s)){const o=n.getAttribute(s);if("href"===s&&o.startsWith("#"))continue;if(i.href=o,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===s&&i.href.startsWith("data:"))continue;n.removeAttribute(s)}}})),(0,h.s)((()=>{d.SV("afterSanitizeAttributes")}))}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(Oe||(Oe={})),Be.SVG=function(e,t,...i){return Fe(Oe.SVG,e,t,...i)},u.Ez.setPreferredWebSchema(/^https:/.test(f.G.location.href)?"https":"http");const Qe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class Ye extends c.vl{constructor(){super(),this._subscriptions=new h.Cm,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(c.Jh.runAndSubscribe(k,(({window:e,disposables:t})=>this.registerListeners(e,t)),{window:f.G,disposables:this._subscriptions}))}registerListeners(e,t){t.add(N(e,"keydown",(e=>{if(e.defaultPrevented)return;const t=new o.Z(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),t.add(N(e,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),t.add(N(e.document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(N(e.document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(N(e.document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),t.add(N(e,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Ye.instance||(Ye.instance=new Ye),Ye.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class Ze extends h.jG{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(N(this.element,ke.DRAG_START,(e=>{this.callbacks.onDragStart?.(e)}))),this.callbacks.onDrag&&this._register(N(this.element,ke.DRAG,(e=>{this.callbacks.onDrag?.(e)}))),this._register(N(this.element,ke.DRAG_ENTER,(e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter?.(e)}))),this._register(N(this.element,ke.DRAG_OVER,(e=>{e.preventDefault(),this.callbacks.onDragOver?.(e,e.timeStamp-this.dragStartTime)}))),this._register(N(this.element,ke.DRAG_LEAVE,(e=>{this.counter--,0===this.counter&&(this.dragStartTime=0,this.callbacks.onDragLeave?.(e))}))),this._register(N(this.element,ke.DRAG_END,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd?.(e)}))),this._register(N(this.element,ke.DROP,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop?.(e)})))}}const Xe=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function Je(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const s=Xe.exec(e);if(!s||!s.groups)throw new Error("Bad use of h");const o=s.groups.tag||"div",r=document.createElement(o);s.groups.id&&(r.id=s.groups.id);const a=[];if(s.groups.class)for(const e of s.groups.class.split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(s.groups.name&&(l[s.groups.name]=r),n)for(const e of n)be(e)?r.appendChild(e):"string"==typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(tt(e),"number"==typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(tt(e),t.toString());return l.root=r,l}function et(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const s=Xe.exec(e);if(!s||!s.groups)throw new Error("Bad use of h");const o=s.groups.tag||"div",r=document.createElementNS("http://www.w3.org/2000/svg",o);s.groups.id&&(r.id=s.groups.id);const a=[];if(s.groups.class)for(const e of s.groups.class.split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(s.groups.name&&(l[s.groups.name]=r),n)for(const e of n)be(e)?r.appendChild(e):"string"==typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(tt(e),"number"==typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(tt(e),t.toString());return l.root=r,l}function tt(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},19082:function(e,t,i){"use strict";i.d(t,{$w:function(){return ie},SV:function(){return ne},aj:function(){return te}});const{entries:n,setPrototypeOf:s,isFrozen:o,getPrototypeOf:r,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:d}=Object,{apply:h,construct:u}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),h||(h=function(e,t,i){return e.apply(t,i)}),u||(u=function(e,t){return new e(...t)});const g=L(Array.prototype.forEach),p=L(Array.prototype.pop),f=L(Array.prototype.push),m=L(String.prototype.toLowerCase),_=L(String.prototype.toString),v=L(String.prototype.match),b=L(String.prototype.replace),w=L(String.prototype.indexOf),C=L(String.prototype.trim),y=L(Object.prototype.hasOwnProperty),S=L(RegExp.prototype.test),k=(x=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i1?i-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:m;s&&s(e,null);let n=t.length;for(;n--;){let s=t[n];if("string"==typeof s){const e=i(s);e!==s&&(o(t)||(t[n]=e),s=e)}e[s]=!0}return e}function E(e){for(let t=0;t/gm),j=c(/\${[\w\W]*}/gm),q=c(/^data-[\-\w.\u00B7-\uFFFF]/),K=c(/^aria-[\-\w]+$/),$=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=c(/^(?:\w+script|data):/i),Q=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=c(/^html$/i),Z=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var X=Object.freeze({__proto__:null,MUSTACHE_EXPR:z,ERB_EXPR:U,TMPLIT_EXPR:j,DATA_ATTR:q,ARIA_ATTR:K,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Q,DOCTYPE_NAME:Y,CUSTOM_ELEMENT:Z});const J=function(){return"undefined"==typeof window?null:window};var ee=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J();const i=t=>e(t);if(i.version="3.1.7",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;let{document:s}=t;const o=s,r=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:h,Element:u,NodeFilter:x,NamedNodeMap:L=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:E,DOMParser:z,trustedTypes:U}=t,j=u.prototype,q=I(j,"cloneNode"),K=I(j,"remove"),G=I(j,"nextSibling"),Q=I(j,"childNodes"),Z=I(j,"parentNode");if("function"==typeof c){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let ee,te="";const{implementation:ie,createNodeIterator:ne,createDocumentFragment:se,getElementsByTagName:oe}=s,{importNode:re}=o;let ae={};i.isSupported="function"==typeof n&&"function"==typeof Z&&ie&&void 0!==ie.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:de,DATA_ATTR:he,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:pe,CUSTOM_ELEMENT:fe}=X;let{IS_ALLOWED_URI:me}=X,_e=null;const ve=D({},[...M,...T,...R,...A,...F]);let be=null;const we=D({},[...B,...W,...H,...V]);let Ce=Object.seal(d(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ye=null,Se=null,ke=!0,xe=!0,Le=!1,De=!0,Ee=!1,Ne=!0,Ie=!1,Me=!1,Te=!1,Re=!1,Pe=!1,Ae=!1,Oe=!0,Fe=!1,Be=!0,We=!1,He={},Ve=null;const ze=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ue=null;const je=D({},["audio","video","img","source","image","track"]);let qe=null;const Ke=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Ye=Qe,Ze=!1,Xe=null;const Je=D({},[$e,Ge,Qe],_);let et=null;const tt=["application/xhtml+xml","text/html"];let it=null,nt=null;const st=s.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=N(e),et=-1===tt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,it="application/xhtml+xml"===et?_:m,_e=y(e,"ALLOWED_TAGS")?D({},e.ALLOWED_TAGS,it):ve,be=y(e,"ALLOWED_ATTR")?D({},e.ALLOWED_ATTR,it):we,Xe=y(e,"ALLOWED_NAMESPACES")?D({},e.ALLOWED_NAMESPACES,_):Je,qe=y(e,"ADD_URI_SAFE_ATTR")?D(N(Ke),e.ADD_URI_SAFE_ATTR,it):Ke,Ue=y(e,"ADD_DATA_URI_TAGS")?D(N(je),e.ADD_DATA_URI_TAGS,it):je,Ve=y(e,"FORBID_CONTENTS")?D({},e.FORBID_CONTENTS,it):ze,ye=y(e,"FORBID_TAGS")?D({},e.FORBID_TAGS,it):{},Se=y(e,"FORBID_ATTR")?D({},e.FORBID_ATTR,it):{},He=!!y(e,"USE_PROFILES")&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Ne=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Ae=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||$,Ye=e.NAMESPACE||Qe,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(xe=!1),Pe&&(Re=!0),He&&(_e=D({},F),be=[],!0===He.html&&(D(_e,M),D(be,B)),!0===He.svg&&(D(_e,T),D(be,W),D(be,V)),!0===He.svgFilters&&(D(_e,R),D(be,W),D(be,V)),!0===He.mathMl&&(D(_e,A),D(be,H),D(be,V))),e.ADD_TAGS&&(_e===ve&&(_e=N(_e)),D(_e,e.ADD_TAGS,it)),e.ADD_ATTR&&(be===we&&(be=N(be)),D(be,e.ADD_ATTR,it)),e.ADD_URI_SAFE_ATTR&&D(qe,e.ADD_URI_SAFE_ATTR,it),e.FORBID_CONTENTS&&(Ve===ze&&(Ve=N(Ve)),D(Ve,e.FORBID_CONTENTS,it)),Be&&(_e["#text"]=!0),Ie&&D(_e,["html","head","body"]),_e.table&&(D(_e,["tbody"]),delete ye.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(U,r)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));l&&l(e),nt=e}},at=D({},["mi","mo","mn","ms","mtext"]),lt=D({},["annotation-xml"]),ct=D({},["title","style","font","a","script"]),dt=D({},[...T,...R,...P]),ht=D({},[...A,...O]),ut=function(e){f(i.removed,{element:e});try{Z(e).removeChild(e)}catch(t){K(e)}},gt=function(e,t){try{f(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!be[e])if(Re||Pe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t=null,i=null;if(Te)e=""+e;else{const t=v(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===et&&Ye===Qe&&(e=''+e+"");const n=ee?ee.createHTML(e):e;if(Ye===Qe)try{t=(new z).parseFromString(n,et)}catch(e){}if(!t||!t.documentElement){t=ie.createDocument(Ye,"template",null);try{t.documentElement.innerHTML=Ze?te:n}catch(e){}}const o=t.body||t.documentElement;return e&&i&&o.insertBefore(s.createTextNode(i),o.childNodes[0]||null),Ye===Qe?oe.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:o},ft=function(e){return ne.call(e.ownerDocument||e,e,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null)},mt=function(e){return e instanceof E&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof L)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function(e){return"function"==typeof h&&e instanceof h},vt=function(e,t,n){ae[e]&&g(ae[e],(e=>{e.call(i,t,n,nt)}))},bt=function(e){let t=null;if(vt("beforeSanitizeElements",e,null),mt(e))return ut(e),!0;const n=it(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:n,allowedTags:_e}),e.hasChildNodes()&&!_t(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return ut(e),!0;if(7===e.nodeType)return ut(e),!0;if(Ne&&8===e.nodeType&&S(/<[/\w]/g,e.data))return ut(e),!0;if(!_e[n]||ye[n]){if(!ye[n]&&Ct(n)){if(Ce.tagNameCheck instanceof RegExp&&S(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Be&&!Ve[n]){const t=Z(e)||e.parentNode,i=Q(e)||e.childNodes;if(i&&t)for(let n=i.length-1;n>=0;--n){const s=q(i[n],!0);s.__removalCount=(e.__removalCount||0)+1,t.insertBefore(s,G(e))}}return ut(e),!0}return e instanceof u&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});const i=m(e.tagName),n=m(t.tagName);return!!Xe[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===Qe?"svg"===i:t.namespaceURI===$e?"svg"===i&&("annotation-xml"===n||at[n]):Boolean(dt[i]):e.namespaceURI===$e?t.namespaceURI===Qe?"math"===i:t.namespaceURI===Ge?"math"===i&<[n]:Boolean(ht[i]):e.namespaceURI===Qe?!(t.namespaceURI===Ge&&!lt[n])&&!(t.namespaceURI===$e&&!at[n])&&!ht[i]&&(ct[i]||!dt[i]):!("application/xhtml+xml"!==et||!Xe[e.namespaceURI]))}(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,g([le,ce,de],(e=>{t=b(t,e," ")})),e.textContent!==t&&(f(i.removed,{element:e.cloneNode()}),e.textContent=t)),vt("afterSanitizeElements",e,null),!1):(ut(e),!0)},wt=function(e,t,i){if(Oe&&("id"===t||"name"===t)&&(i in s||i in st))return!1;if(xe&&!Se[t]&&S(he,t));else if(ke&&S(ue,t));else if(!be[t]||Se[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&S(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&S(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&S(Ce.tagNameCheck,i)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(i))))return!1}else if(qe[t]);else if(S(me,b(i,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(i,"data:")||!Ue[e])if(Le&&!S(ge,b(i,pe,"")));else if(i)return!1;return!0},Ct=function(e){return"annotation-xml"!==e&&v(e,fe)},yt=function(e){vt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be};let s=t.length;for(;s--;){const o=t[s],{name:r,namespaceURI:a,value:l}=o,c=it(r);let d="value"===r?l:C(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(gt(r,e),!n.keepAttr)continue;if(!De&&S(/\/>/i,d)){gt(r,e);continue}Ee&&g([le,ce,de],(e=>{d=b(d,e," ")}));const h=it(e.nodeName);if(wt(h,c,d))if(!Fe||"id"!==c&&"name"!==c||(gt(r,e),d="user-content-"+d),Ne&&S(/((--!?|])>)|<\/(style|title)/i,d))gt(r,e);else{if(ee&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(a);else switch(U.getAttributeType(h,c)){case"TrustedHTML":d=ee.createHTML(d);break;case"TrustedScriptURL":d=ee.createScriptURL(d)}try{a?e.setAttributeNS(a,r,d):e.setAttribute(r,d),mt(e)?ut(e):p(i.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)},St=function e(t){let i=null;const n=ft(t);for(vt("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)vt("uponSanitizeShadowNode",i,null),bt(i)||(i.content instanceof a&&e(i.content),yt(i));vt("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,r=null,l=null;if(Ze=!e,Ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw k("toString is not a function");if("string"!=typeof(e=e.toString()))throw k("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Me||rt(t),i.removed=[],"string"==typeof e&&(We=!1),We){if(e.nodeName){const t=it(e.nodeName);if(!_e[t]||ye[t])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof h)n=pt("\x3c!----\x3e"),s=n.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!Re&&!Ee&&!Ie&&-1===e.indexOf("<"))return ee&&Ae?ee.createHTML(e):e;if(n=pt(e),!n)return Re?null:Ae?te:""}n&&Te&&ut(n.firstChild);const c=ft(We?e:n);for(;r=c.nextNode();)bt(r)||(r.content instanceof a&&St(r.content),yt(r));if(We)return e;if(Re){if(Pe)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(be.shadowroot||be.shadowrootmode)&&(l=re.call(o,l,!0)),l}let d=Ie?n.outerHTML:n.innerHTML;return Ie&&_e["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(Y,n.ownerDocument.doctype.name)&&(d="\n"+d),Ee&&g([le,ce,de],(e=>{d=b(d,e," ")})),ee&&Ae?ee.createHTML(d):d},i.setConfig=function(){rt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},i.clearConfig=function(){nt=null,Me=!1},i.isValidAttribute=function(e,t,i){nt||rt({});const n=it(e),s=it(t);return wt(n,s,i)},i.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],f(ae[e],t))},i.removeHook=function(e){if(ae[e])return p(ae[e])},i.removeHooks=function(e){ae[e]&&(ae[e]=[])},i.removeAllHooks=function(){ae={}},i}();ee.version,ee.isSupported;const te=ee.sanitize,ie=(ee.setConfig,ee.clearConfig,ee.isValidAttribute,ee.addHook),ne=ee.removeHook;ee.removeHooks,ee.removeAllHooks},26745:function(e,t,i){"use strict";i.d(t,{f:function(){return s}});var n=i(80670);class s{get event(){return this.emitter.event}constructor(e,t,i){const s=e=>this.emitter.fire(e);this.emitter=new n.vl({onWillAddFirstListener:()=>e.addEventListener(t,s,i),onDidRemoveLastListener:()=>e.removeEventListener(t,s,i)})}dispose(){this.emitter.dispose()}}},43999:function(e,t,i){"use strict";i.d(t,{D:function(){return n},Z:function(){return o}});class n{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=s(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=s(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=s(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=s(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=s(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=s(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=s(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=s(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=s(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=s(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=s(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function s(e){return"number"==typeof e?`${e}px`:e}function o(e){return new n(e)}},39159:function(e,t,i){"use strict";i.d(t,{z:function(){return s}});var n=i(79783);const s=n.uF?'"Segoe WPC", "Segoe UI", sans-serif':n.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'},65745:function(e,t,i){"use strict";i.d(t,{S5:function(){return s},n:function(){return r},yk:function(){return o}});var n=i(84201);function s(e,t={}){const i=r(t);return i.textContent=e,i}function o(e,t={}){const i=r(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,s=i;const o=[],r=new a(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==c(r.peek(),t);if(i&&(e=r.next()),i||0===c(e,t)||e!==r.peek())if("\n"===e)2===s.type&&(s=o.pop()),s.children.push({type:8});else if(2!==s.type){const t={type:2,content:e};s.children.push(t),o.push(s),s=t}else s.content+=e;else{r.advance(),2===s.type&&(s=o.pop());const i=c(e,t);if(s.type===i||5===s.type&&6===i)s=o.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),s.children.push(e),o.push(s),s=e}}}return 2===s.type&&(s=o.pop()),o.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,s){let o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(7===t.type&&s)o=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.b2(e,"click",(e=>{i.callback(String(t.index),e)}))),o=e}else 8===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach((e=>{l(o,e,i,s)}))}function c(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},82884:function(e,t,i){"use strict";i.d(t,{_:function(){return o}});var n=i(84201),s=i(35114);class o{constructor(){this._hooks=new s.Cm,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,o,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=o,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,s.s)((()=>{try{e.releasePointerCapture(t)}catch(e){}})))}catch(t){a=n.zk(e)}this._hooks.add(n.ko(a,n.Bx.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(n.ko(a,n.Bx.POINTER_UP,(e=>this.stopMonitoring(!0))))}}},40478:function(e,t,i){"use strict";i.d(t,{Z:function(){return c}});var n=i(75969),s=i(62167),o=i(99559),r=i(79783);const a=r.zx?256:2048,l=r.zx?2048:256;class c{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=function(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return s.YM.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.gm)switch(t){case 59:return 85;case 60:if(r.j9)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(r.zx)return 57}else if(n.Tc){if(r.zx&&93===t)return 57;if(!r.zx&&92===t)return 57}return s.uw[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=l),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new o.dG(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},96710:function(e,t,i){"use strict";i.d(t,{Gc:function(){return I},R9:function(){return O}});var n=i(84201),s=i(19082),o=i(26745),r=i(65745),a=i(40478),l=i(34287),c=i(43014),d=i(20187),h=i(80670),u=i(85584),g=i(4590),p=i(68860),f=i(72582),m=i(35114);let _={};!function(){function e(e,t){t(_)}var t,i;e.amd=!0,t=this,i=function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const n=/[&<>"']/,s=new RegExp(n.source,"g"),o=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,r=new RegExp(o.source,"g"),a={"&":"&","<":"<",">":">",'"':""","'":"'"},l=e=>a[e];function c(e,t){if(t){if(n.test(e))return e.replace(s,l)}else if(o.test(e))return e.replace(r,l);return e}const d=/(^|[^\[])\^/g;function h(e,t){let i="string"==typeof e?e:e.source;t=t||"";const n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(d,"$1"),i=i.replace(e,s),n},getRegex:()=>new RegExp(i,t)};return n}function u(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const g={exec:()=>null};function p(e,t){const i=e.replace(/\|/g,((e,t,i)=>{let n=!1,s=t;for(;--s>=0&&"\\"===i[s];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:f(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t){const i=e.match(/^(\s+)(?:```)/);if(null===i)return t;const n=i[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=f(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:f(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=f(t[0],"\n").split("\n"),i="",n="";const s=[];for(;e.length>0;){let t=!1;const o=[];let r;for(r=0;r/.test(e[r]))o.push(e[r]),t=!0;else{if(t)break;o.push(e[r])}e=e.slice(r);const a=o.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}\n${a}`:a,n=n?`${n}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=c,0===e.length)break;const d=s[s.length-1];if("code"===d?.type)break;if("blockquote"===d?.type){const t=d,o=t.raw+"\n"+e.join("\n"),r=this.blockquote(o);s[s.length-1]=r,i=i.substring(0,i.length-t.raw.length)+r.raw,n=n.substring(0,n.length-t.text.length)+r.text;break}if("list"!==d?.type);else{const t=d,o=t.raw+"\n"+e.join("\n"),r=this.list(o);s[s.length-1]=r,i=i.substring(0,i.length-d.raw.length)+r.raw,n=n.substring(0,n.length-t.raw.length)+r.raw,e=o.substring(s[s.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const o=new RegExp(`^( {0,3}${i})((?:[\t ][^\\n]*)?(?:\\n|$))`);let r=!1;for(;e;){let i=!1,n="",a="";if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],d=!l.trim(),h=0;if(this.options.pedantic?(h=2,a=l.trimStart()):d?h=t[1].length+1:(h=t[2].search(/[^ ]/),h=h>4?1:h,a=l.slice(h),h+=t[1].length),d&&/^ *$/.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),i=!0),!i){const t=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),i=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;e;){const r=e.split("\n",1)[0];if(c=r,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),s.test(c))break;if(o.test(c))break;if(t.test(c))break;if(i.test(e))break;if(c.search(/[^ ]/)>=h||!c.trim())a+="\n"+c.slice(h);else{if(d)break;if(l.search(/[^ ]/)>=4)break;if(s.test(l))break;if(o.test(l))break;if(i.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),n+=r+"\n",e=e.substring(r.length+1),l=c.slice(h)}}s.loose||(r?s.loose=!0:/\n *\n *$/.test(n)&&(r=!0));let u,g=null;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(u="[ ] "!==g[0],a=a.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:n,task:!!g,checked:u,loose:!1,text:a,tokens:[]}),s.raw+=n}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e"space"===e.type)),i=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));s.loose=i}if(s.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const i=p(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const e of n)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:c(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=f(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let n=0;n-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^$/.test(e)?i.slice(1):i.slice(1,-1)),m(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=t[(i[2]||i[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return m(i,e,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(n&&(!n[3]||!i.match(/[\p{L}\p{N}]/u))&&(!n[1]&&!n[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...n[0]].length-1;let s,o,r=i,a=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){r+=o;continue}if((n[5]||n[6])&&i%3&&!((i+o)%3)){a+=o;continue}if(r-=o,r>0)continue;o=Math.min(o,o+r+a);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+o);if(Math.min(i,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=c(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=c(t[1]),i="mailto:"+e):(e=c(t[1]),i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,i;if("@"===t[2])e=c(t[0]),i="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(n!==t[0]);e=c(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:c(t[0]),{type:"text",raw:t[0],text:e}}}}const v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,b=/(?:[*+-]|\d{1,9}[.)])/,w=h(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,b).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y=/(?!\s*\])(?:\\.|[^\[\]\\])+/,S=h(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",y).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),k=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,b).getRegex(),x="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",L=/|$))/,D=h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",L).replace("tag",x).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),E=h(C).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),N={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",E).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:S,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:v,html:D,lheading:w,list:k,newline:/^(?: *(?:\n|$))+/,paragraph:E,table:g,text:/^[^\n]+/},I=h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),M={...N,table:I,paragraph:h(C).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",I).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex()},T={...N,html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",L).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(C).replace("hr",v).replace("heading"," *#{1,6} *[^\n]").replace("lheading",w).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,P=/^( {2,}|\\)\n(?!\s*$)/,A="\\p{P}\\p{S}",O=h(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,A).getRegex(),F=h(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,A).getRegex(),B=h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,A).getRegex(),W=h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,A).getRegex(),H=h(/\\([punct])/,"gu").replace(/punct/g,A).getRegex(),V=h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),z=h(L).replace("(?:--\x3e|$)","--\x3e").getRegex(),U=h("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",z).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),j=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q=h(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",j).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),K=h(/^!?\[(label)\]\[(ref)\]/).replace("label",j).replace("ref",y).getRegex(),$=h(/^!?\[(ref)\](?:\[\])?/).replace("ref",y).getRegex(),G={_backpedal:g,anyPunctuation:H,autolink:V,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:P,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:g,emStrongLDelim:F,emStrongRDelimAst:B,emStrongRDelimUnd:W,escape:R,link:q,nolink:$,punctuation:O,reflink:K,reflinkSearch:h("reflink|nolink(?!\\()","g").replace("reflink",K).replace("nolink",$).getRegex(),tag:U,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(i.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(n):(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(s.raw+="\n"+n.raw,s.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))s=t[t.length-1],i&&"paragraph"===s?.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,s,o,r,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(r||(a=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,l,a))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(s))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),r=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}class te{options;parser;constructor(t){this.options=t||e.defaults}space(e){return""}code({text:e,lang:t,escaped:i}){const n=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+"\n";return n?'
'+(i?s:c(s,!0))+"
\n":"
"+(i?s:c(s,!0))+"
\n"}blockquote({tokens:e}){return`
\n${this.parser.parse(e)}
\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,i=e.start;let n="";for(let t=0;t\n"+n+"\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

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

    An error occurred:

    "+c(i.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const re=new oe;function ae(e,t){return re.parse(e,t)}ae.options=ae.setOptions=function(e){return re.setOptions(e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.getDefaults=t,ae.defaults=e.defaults,ae.use=function(...e){return re.use(...e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.walkTokens=function(e,t){return re.walkTokens(e,t)},ae.parseInline=re.parseInline,ae.Parser=ne,ae.parser=ne.parse,ae.Renderer=te,ae.TextRenderer=ie,ae.Lexer=ee,ae.lexer=ee.lex,ae.Tokenizer=_,ae.Hooks=se,ae.parse=ae;const le=ae.options,ce=ae.setOptions,de=ae.use,he=ae.walkTokens,ue=ae.parseInline,ge=ae,pe=ne.parse,fe=ee.lex;e.Hooks=se,e.Lexer=ee,e.Marked=oe,e.Parser=ne,e.Renderer=te,e.TextRenderer=ie,e.Tokenizer=_,e.getDefaults=t,e.lexer=fe,e.marked=ae,e.options=le,e.parse=ge,e.parseInline=ue,e.parser=pe,e.setOptions=ce,e.use=de,e.walkTokens=he},e.amd?e(0,i):"object"==typeof exports?i(exports):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}(),_.Hooks||exports.Hooks,_.Lexer||exports.Lexer,_.Marked||exports.Marked,_.Parser||exports.Parser;var v=_.Renderer||exports.Renderer,b=(_.TextRenderer||exports.TextRenderer,_.Tokenizer||exports.Tokenizer,_.defaults||exports.defaults),w=(_.getDefaults||exports.getDefaults,_.lexer||exports.lexer),C=(_.marked||exports.marked,_.options||exports.options,_.parse||exports.parse),y=(_.parseInline||exports.parseInline,_.parser||exports.parser),S=(_.setOptions||exports.setOptions,_.use||exports.use,_.walkTokens||exports.walkTokens,i(23560)),k=i(84756),x=i(49134),L=i(59951),D=i(43920),E=i(54244);const N=Object.freeze({image:({href:e,title:t,text:i})=>{let n=[],s=[];return e&&(({href:e,dimensions:n}=(0,u.nI)(e)),s.push(`src="${(0,u.oO)(e)}"`)),i&&s.push(`alt="${(0,u.oO)(i)}"`),t&&s.push(`title="${(0,u.oO)(t)}"`),n.length&&(s=s.concat(n)),""},paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `},link({href:e,title:t,tokens:i}){let n=this.parser.parseInline(i);return"string"!=typeof e?"":(e===n&&(n=(0,u._W)(n)),t="string"==typeof t?(0,u.oO)((0,u._W)(t)):"",`
    /g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${t||e}" draggable="false">${n}`)}});function I(e,t={},i={}){const s=new m.Cm;let u=!1;const f=(0,r.n)(t),_=function(t){let i;try{i=(0,S.qg)(decodeURIComponent(t))}catch(e){}return i?(i=(0,x.PI)(i,(t=>e.uris&&e.uris[t]?E.r.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},L=function(t,i){const n=e.uris&&e.uris[t];let s=E.r.revive(n);return i?t.startsWith(k.ny.data+":")?t:(s||(s=E.r.parse(t)),k.zl.uriToBrowserUri(s).toString(!0)):s?E.r.parse(t).toString()===s.toString()?t:(s.query&&(s=s.with({query:_(s.query)})),s.toString()):t},I=new v;I.image=N.image,I.link=N.link,I.paragraph=N.paragraph;const R=[],A=[];if(t.codeBlockRendererSync?I.code=({text:e,lang:i})=>{const n=p.r.nextId(),s=t.codeBlockRendererSync(M(i),e);return A.push([n,s]),`
    ${(0,D.ih)(e)}
    `}:t.codeBlockRenderer&&(I.code=({text:e,lang:i})=>{const n=p.r.nextId(),s=t.codeBlockRenderer(M(i),e);return R.push(s.then((e=>[n,e]))),`
    ${(0,D.ih)(e)}
    `}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let s=n.dataset.href;s&&(e.baseUri&&(s=T(E.r.from(e.baseUri),s)),t.actionHandler.callback(s,i))}catch(e){(0,d.dz)(e)}finally{i.preventDefault()}},s=t.actionHandler.disposables.add(new o.f(f,"click")),r=t.actionHandler.disposables.add(new o.f(f,"auxclick"));t.actionHandler.disposables.add(h.Jh.any(s.event,r.event)((e=>{const t=new l.P(n.zk(f),e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(n.ko(f,"keydown",(e=>{const t=new a.Z(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(I.html=({text:i})=>t.sanitizerOptions?.replaceWithPlaintext?(0,D.ih)(i):(e.isTrusted?i.match(/^(]+>)|(<\/\s*span>)$/):void 0)?i:""),i.renderer=I;let O,F=e.value??"";if(F.length>1e5&&(F=`${F.substr(0,1e5)}…`),e.supportThemeIcons&&(F=(0,g.sA)(F)),t.fillInIncompleteTokens){const e={...b,...i},t=function(e){for(let t=0;t"string"==typeof e?e:e.outerHTML)).join(""));const B=(new DOMParser).parseFromString(P({isTrusted:e.isTrusted,...t.sanitizerOptions},O),"text/html");if(B.body.querySelectorAll("img, audio, video, source").forEach((i=>{const s=i.getAttribute("src");if(s){let o=s;try{e.baseUri&&(o=T(E.r.from(e.baseUri),o))}catch(e){}if(i.setAttribute("src",L(o,!0)),t.remoteImageIsAllowed){const e=E.r.parse(o);e.scheme===k.ny.file||e.scheme===k.ny.data||t.remoteImageIsAllowed(e)||i.replaceWith(n.$("",void 0,i.outerHTML))}}})),B.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=L(i,!1);e.baseUri&&(n=T(E.r.from(e.baseUri),i)),t.dataset.href=n}})),f.innerHTML=P({isTrusted:e.isTrusted,...t.sanitizerOptions},B.body.innerHTML),R.length>0)Promise.all(R).then((e=>{if(u)return;const i=new Map(e),s=f.querySelectorAll("div[data-code]");for(const e of s){const t=i.get(e.dataset.code??"");t&&n.Ln(e,t)}t.asyncRenderCallback?.()}));else if(A.length>0){const e=new Map(A),t=f.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(i.dataset.code??"");t&&n.Ln(i,t)}}if(t.asyncRenderCallback)for(const e of f.getElementsByTagName("img")){const i=s.add(n.ko(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()})))}return{element:f,dispose:()=>{u=!0,s.dispose()}}}function M(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function T(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?(0,L.o1)(e,t).toString():(0,L.o1)((0,L.pD)(e),t).toString()}const R=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function P(e,t){const{config:i,allowedSchemes:o}=function(e){const t=[k.ny.http,k.ny.https,k.ny.mailto,k.ny.data,k.ny.file,k.ny.vscodeFileResource,k.ny.vscodeRemote,k.ny.vscodeRemoteResource];return e.isTrusted&&t.push(k.ny.command),{config:{ALLOWED_TAGS:e.allowedTags??[...n.TT],ALLOWED_ATTR:A,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e),r=new m.Cm;r.add(J("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName){if("INPUT"===e.tagName&&"checkbox"===e.attributes.getNamedItem("type")?.value){if("type"===t.attrName&&"checkbox"===t.attrValue||"disabled"===t.attrName||"checked"===t.attrName)return void(t.keepAttr=!0);t.keepAttr=!1}}else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}))),r.add(J("uponSanitizeElement",((t,i)=>{if("input"===i.tagName&&("checkbox"===t.attributes.getNamedItem("type")?.value?t.setAttribute("disabled",""):e.replaceWithPlaintext||t.remove()),e.replaceWithPlaintext&&!i.allowedTags[i.tagName]&&"body"!==i.tagName&&t.parentElement){let e,n;if("#comment"===i.tagName)e=`\x3c!--${t.textContent}--\x3e`;else{const s=R.includes(i.tagName),o=t.attributes.length?" "+Array.from(t.attributes).map((e=>`${e.name}="${e.value}"`)).join(" "):"";e=`<${i.tagName}${o}>`,s||(n=``)}const s=document.createDocumentFragment(),o=t.parentElement.ownerDocument.createTextNode(e);s.appendChild(o);const r=n?t.parentElement.ownerDocument.createTextNode(n):void 0;for(;t.firstChild;)s.appendChild(t.firstChild);r&&s.appendChild(r),t.nodeType===Node.COMMENT_NODE?t.parentElement.insertBefore(s,t):t.parentElement.replaceChild(s,t)}}))),r.add(n.a4(o));try{return s.aj(t,{...i,RETURN_TRUSTED_TYPE:!0})}finally{r.dispose()}}const A=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];function O(e){return"string"==typeof e?e:function(e){let t=e.value??"";return t.length>1e5&&(t=`${t.substr(0,1e5)}…`),P({isTrusted:!1},C(t,{async:!1,renderer:W.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>F.get(e)??e))).toString()}(e)}const F=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function B(){const e=new v;return e.code=({text:e})=>e,e.blockquote=({text:e})=>e+"\n",e.html=e=>"",e.heading=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.hr=()=>"",e.list=function({items:e}){return e.map((e=>this.listitem(e))).join("\n")+"\n"},e.listitem=({text:e})=>e+"\n",e.paragraph=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.table=function({header:e,rows:t}){return e.map((e=>this.tablecell(e))).join(" ")+"\n"+t.map((e=>e.map((e=>this.tablecell(e))).join(" "))).join("\n")+"\n"},e.tablerow=({text:e})=>e,e.tablecell=function({tokens:e}){return this.parser.parseInline(e)},e.strong=({text:e})=>e,e.em=({text:e})=>e,e.codespan=({text:e})=>e,e.br=e=>"\n",e.del=({text:e})=>e,e.image=e=>"",e.text=({text:e})=>e,e.link=({text:e})=>e,e}const W=new f.d((e=>B()));new f.d((()=>{const e=B();return e.code=({text:e})=>`\n\`\`\`\n${e}\n\`\`\`\n`,e}));function H(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function V(e){if(e.tokens)for(let t=e.tokens.length-1;t>=0;t--){const i=e.tokens[t];if("text"===i.type){const n=i.raw.split("\n"),s=n[n.length-1];if(s.includes("`"))return q(e);if(s.includes("**"))return Z(e,"**");if(s.match(/\*\w/))return Z(e,"*");if(s.match(/(^|\s)__\w/))return Y(e);if(s.match(/(^|\s)_\w/))return K(e);if(s.match(/(^|\s)\[.*\]\(\w*/)||s.match(/^[^\[]*\]\([^\)]*$/)&&e.tokens.slice(0,t).some((e=>"text"===e.type&&e.raw.match(/\[[^\]]*$/)))){const i=e.tokens.slice(t+1);return"link"===i[0]?.type&&"text"===i[1]?.type&&i[1].raw.match(/^ *"[^"]*$/)||s.match(/^[^"]* +"[^"]*$/)?G(e):$(e)}if(s.match(/(^|\s)\[\w*/))return Q(e)}}}function z(e){const t=e.items[e.items.length-1],i=t.tokens?t.tokens[t.tokens.length-1]:void 0;let n;if("text"!==i?.type||"inRawBlock"in t||(n=V(i)),!n||"paragraph"!==n.type)return;const s=H(e.items.slice(0,-1)),o=t.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!o)return;const r=o+H(t.tokens.slice(0,-1))+n.raw,a=w(s+r)[0];return"list"===a.type?a:void 0}const U=3;function j(e){let t,i;for(t=0;t0){const e=s?i.slice(0,-1).join("\n"):t,o=!!e.match(/\|\s*$/),r=e+(o?"":"|")+`\n|${" --- |".repeat(n)}`;return w(r)}}function J(e,t){return s.$w(e,t),(0,m.s)((()=>s.SV(e)))}},34287:function(e,t,i){"use strict";i.d(t,{P:function(){return l},$:function(){return c}});var n=i(75969);const s=new WeakMap;function o(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return null}catch(e){return null}return e.parent}class r{static getSameOriginWindowChain(e){let t=s.get(e);if(!t){t=[],s.set(e,t);let i,n=e;do{i=o(n),i?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=i}while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const s=this.getSameOriginWindowChain(e);for(const e of s){const s=e.window.deref();if(i+=s?.scrollY??0,n+=s?.scrollX??0,s===t)break;if(!e.iframeElement)break;const o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}var a=i(79783);class l{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=0===t.button,this.middleButton=1===t.button,this.rightButton=2===t.button,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,"dblclick"===t.type&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,"number"==typeof t.pageX?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const i=r.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class c{constructor(e,t=0,i=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let s=!1;if(n.H8){const e=navigator.userAgent.match(/Chrome\/(\d+)/);s=(e?parseInt(e[1]):123)<=122}if(e){const t=e,i=e,o=e.view?.devicePixelRatio||1;if(void 0!==t.wheelDeltaY)this.deltaY=s?t.wheelDeltaY/(120*o):t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.gm&&!a.zx?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.nr&&a.uF?this.deltaX=-t.wheelDeltaX/120:this.deltaX=s?t.wheelDeltaX/(120*o):t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.gm&&!a.zx?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=s?e.wheelDelta/(120*o):e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}},56627:function(e,t,i){"use strict";var n;i.d(t,{p:function(){return n}}),function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i={...t},n={...t},s={...t};let o=0;const r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,h()}function c(){1===r.input&&(performance.mark("input/end"),r.input=2)}function d(){1===r.render&&(performance.mark("render/end"),r.render=2)}function h(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",s),o++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/o,max:e.max,min:e.min}}function f(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(c)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(d),h())},e.getAndClearMeasurements=function(){if(0===o)return;const e={keydown:p(t),input:p(i),render:p(n),total:p(s),sampleCount:o};return f(t),f(i),f(n),f(s),o=0,e}}(n||(n={}))},8670:function(e,t,i){"use strict";i.d(t,{c:function(){return l}});var n=i(84201),s=i(80670),o=i(35114);class r extends o.jG{constructor(e){super(),this._onDidChange=this._register(new s.vl),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,t){this._mediaQueryList?.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}}class a extends o.jG{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new s.vl),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const t=this._register(new r(e));this._register(t.onDidChange((()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)})))}_getPixelRatio(e){const t=document.createElement("canvas").getContext("2d");return(e.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}}const l=new class{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const t=(0,n.Q2)(e);let i=this.mapWindowIdToPixelRatioMonitor.get(t);return i||(i=(0,o.lC)(new a(e)),this.mapWindowIdToPixelRatioMonitor.set(t,i),(0,o.lC)(s.Jh.once(n.Fv)((({vscodeWindowId:e})=>{e===t&&(i?.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(t))})))),i}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}}},53510:function(e,t,i){"use strict";i.d(t,{B:function(){return n},q:function(){return h}});var n,s=i(84201),o=i(95601),r=i(97358),a=i(95578),l=i(80670),c=i(35114),d=i(54409);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class h extends c.jG{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new d.w,this.ignoreTargets=new d.w,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(l.Jh.runAndSubscribe(s.Iv,(({window:e,disposables:t})=>{t.add(s.ko(e.document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),t.add(s.ko(e.document,"touchend",(t=>this.onTouchEnd(e,t)))),t.add(s.ko(e.document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}),{window:o.G,disposables:this._store}))}static addTarget(e){if(!h.isTouchDevice())return c.jG.None;h.INSTANCE||(h.INSTANCE=(0,c.lC)(new h));const t=h.INSTANCE.targets.push(e);return(0,c.s)(t)}static ignoreTarget(e){if(!h.isTouchDevice())return c.jG.None;h.INSTANCE||(h.INSTANCE=(0,c.lC)(new h));const t=h.INSTANCE.ignoreTargets.push(e);return(0,c.s)(t)}static isTouchDevice(){return"ontouchstart"in o.G||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,s=e.targetTouches.length;i=h.HOLD_DELAY&&Math.abs(l.initialPageX-r.RT(l.rollingPageX))<30&&Math.abs(l.initialPageY-r.RT(l.rollingPageY))<30){const e=this.newGestureEvent(n.Contextmenu,l.initialTarget);e.pageX=r.RT(l.rollingPageX),e.pageY=r.RT(l.rollingPageY),this.dispatchEvent(e)}else if(1===s){const t=r.RT(l.rollingPageX),n=r.RT(l.rollingPageY),s=r.RT(l.rollingTimestamps)-l.rollingTimestamps[0],o=t-l.rollingPageX[0],a=n-l.rollingPageY[0],c=[...this.targets].filter((e=>l.initialTarget instanceof Node&&e.contains(l.initialTarget)));this.inertia(e,c,i,Math.abs(o)/s,o>0?1:-1,t,Math.abs(a)/s,a>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(n.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>h.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;const t=[];for(const i of this.targets)if(i.contains(e.initialTarget)){let n=0,s=e.initialTarget;for(;s&&s!==i;)n++,s=s.parentElement;t.push([n,i])}t.sort(((e,t)=>e[0]-t[0]));for(const[i,n]of t)n.dispatchEvent(e),this.dispatched=!0}}inertia(e,t,i,o,r,a,l,c,d){this.handle=s.PG(e,(()=>{const s=Date.now(),u=s-i;let g=0,p=0,f=!0;o+=h.SCROLL_FRICTION*u,l+=h.SCROLL_FRICTION*u,o>0&&(f=!1,g=r*o*u),l>0&&(f=!1,p=c*l*u);const m=this.newGestureEvent(n.Change);m.translationX=g,m.translationY=p,t.forEach((e=>e.dispatchEvent(m))),f||this.inertia(e,t,s,o,r,a+g,l,c,d+p)}))}onTouchMove(e){const t=Date.now();for(let i=0,s=e.changedTouches.length;i3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(s.pageX),o.rollingPageY.push(s.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}!function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)}([a.B],h,"isTouchDevice",null)},38945:function(e,t,i){"use strict";i.d(t,{H:function(){return s}});var n=i(20187);function s(e,t){const i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(e){return void(0,n.dz)(e)}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){return void(0,n.dz)(e)}}},9306:function(e,t,i){"use strict";i.d(t,{Z4:function(){return N},EH:function(){return E},XF:function(){return I}});var n=i(75969),s=i(88767),o=i(84201),r=i(53510),a=i(24764),l=i(26745),c=i(40478),d=i(96710),h=i(12048),u=i(67334),g=i(97358),p=i(80670),f=i(62167),m=i(35114),_=i(79783),v=i(14374);const b=o.$,w="selectOption.entry.template";class C{get templateId(){return w}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=o.BC(e,b(".option-text")),t.detail=o.BC(e,b(".option-detail")),t.decoratorRight=o.BC(e,b(".option-decorator-right")),t}renderElement(e,t,i){const n=i,s=e.text,o=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=s,n.detail.textContent=o||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class y extends m.jG{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=y.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new p.vl,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register((0,h.i)().setupManagedHover((0,a.nZ)("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return w}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=o.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=o.BC(this.selectDropDownContainer,b(".select-box-details-pane"));const t=o.BC(this.selectDropDownContainer,b(".select-box-dropdown-container-width-control")),i=o.BC(t,b(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",o.BC(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=o.li(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(o.ko(this.selectDropDownContainer,o.Bx.DRAG_START,(e=>{o.fs.stop(e,!0)})))}registerListeners(){let e;this._register(o.b2(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}))),this._register(o.ko(this.selectElement,o.Bx.CLICK,(e=>{o.fs.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(o.ko(this.selectElement,o.Bx.MOUSE_DOWN,(e=>{o.fs.stop(e)}))),this._register(o.ko(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(o.ko(this.selectElement,"touchend",(t=>{o.fs.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(o.ko(this.selectElement,o.Bx.KEY_DOWN,(e=>{const t=new c.Z(e);let i=!1;_.zx?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),o.fs.stop(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){g.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){const e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){const e=this.styles.selectBackground??"",t=o.gI(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;const i=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=o.zk(this.selectElement),i=o.BK(this.selectElement),n=o.zk(this.selectElement).getComputedStyle(this.selectElement),s=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-y.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),d=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const u=this._hasDetails?this._cachedMaxDetailsHeight:0,g=h+s+u,p=Math.floor((r-s-u)/this.getHeight()),f=Math.floor((a-s-u)/this.getHeight());if(e)return!(i.top+i.height>t.innerHeight-22||i.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),0));if(i.top+i.height>t.innerHeight-22||i.topr&&(h=p*this.getHeight())}else g>a&&(h=f*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=h+s+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=h+s+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=d,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const s=e.detail?e.detail.length:0,o=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+s+o;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=o.Tr(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=o.BC(e,b(".select-box-dropdown-list-container")),this.listRenderer=new C,this.selectList=this._register(new u.B8("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,v.kg)({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>_.zx?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new l.f(this.selectDropDownListContainer,"keydown")),i=p.Jh.chain(t.event,(e=>e.filter((()=>this.selectList.length>0)).map((e=>new c.Z(e)))));this._register(p.Jh.chain(i,(e=>e.filter((e=>3===e.keyCode))))(this.onEnter,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>2===e.keyCode))))(this.onEnter,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>9===e.keyCode))))(this.onEscape,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>16===e.keyCode))))(this.onUpArrow,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>18===e.keyCode))))(this.onDownArrow,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>12===e.keyCode))))(this.onPageDown,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>11===e.keyCode))))(this.onPageUp,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>14===e.keyCode))))(this.onHome,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>13===e.keyCode))))(this.onEnd,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))))(this.onCharacter,this)),this._register(o.ko(this.selectList.getHTMLElement(),o.Bx.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>void 0!==e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(o.ko(this.selectDropDownContainer,o.Bx.FOCUS_OUT,(e=>{this._isVisible&&!o.QX(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;o.fs.stop(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(o.fs.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){o.fs.stop(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){o.fs.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){o.fs.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=f.YM.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(o.ko(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(o.b2(this.selectElement,"click",(e=>{o.fs.stop(e,!0)}))),this._register(o.b2(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(o.b2(this.selectElement,"keydown",(e=>{let t=!1;_.zx?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&g.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new L.LN)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(r.q.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.gm&&this._register((0,o.ko)(e,o.Bx.DRAG_START,(e=>e.dataTransfer?.setData(s.t.TEXT,this._action.label))))),this._register((0,o.ko)(t,r.B.Tap,(e=>this.onClick(e,!0)))),this._register((0,o.ko)(t,o.Bx.MOUSE_DOWN,(e=>{i||o.fs.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),_.zx&&this._register((0,o.ko)(t,o.Bx.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,o.ko)(t,o.Bx.CLICK,(e=>{o.fs.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,o.ko)(t,o.Bx.DBLCLICK,(e=>{o.fs.stop(e,!0)}))),[o.Bx.MOUSE_UP,o.Bx.MOUSE_OUT].forEach((e=>{this._register((0,o.ko)(t,e,(e=>{o.fs.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){o.fs.stop(e,!0);const i=D.z(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){if(!this.element)return;const e=this.getTooltip()??"";if(this.updateAriaLabel(),this.options.hoverDelegate?.showNativeHover)this.element.title=e;else if(this.customHover||""===e)this.customHover&&this.customHover.update(e);else{const t=this.options.hoverDelegate??(0,a.nZ)("element");this.customHover=this._store.add((0,h.i)().setupManagedHover(t,this.element,e))}}updateAriaLabel(){if(this.element){const e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class N extends E{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),D.j(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){const e=document.createElement("span");e.classList.add("keybinding"),e.textContent=this.options.keybinding,this.element.appendChild(e)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===L.wv.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=v.kg({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){const e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class I extends E{constructor(e,t,i,n,s,o,r){super(e,t),this.selectBox=new x(i,n,s,o,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}},98099:function(e,t,i){"use strict";i.d(t,{E:function(){return h}});var n=i(84201),s=i(40478),o=i(9306),r=i(24764),a=i(30981),l=i(80670),c=i(35114),d=i(24219);class h extends c.jG{constructor(e,t={}){let i,d;switch(super(),this._actionRunnerDisposables=this._register(new c.Cm),this.viewItemDisposables=this._register(new c.$w),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.vl),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.vl({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l.vl),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new l.vl),this.onWillRun=this._onWillRun.event,this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register((0,r.bW)()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new a.LN,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:i=[15],d=[17];break;case 1:i=[16],d=[18],this.domNode.className+=" vertical"}this._register(n.ko(this.domNode,n.Bx.KEY_DOWN,(e=>{const t=new s.Z(e);let n=!0;const r="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;i&&(t.equals(i[0])||t.equals(i[1]))?n=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&r instanceof o.EH&&r.trapsArrowNavigation?n=this.focusNext(void 0,!0):this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.ko(this.domNode,n.Bx.KEY_UP,(e=>{const t=new s.Z(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.w5(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.bq()!==this.domNode&&n.QX(n.bq(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof o.EH&&e.isEnabled()));e instanceof o.EH&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof o.EH&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){if("number"==typeof e)return this.viewItems[e]?.action;if(n.sb(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const i=document.createElement("li");let r;i.className="action-item",i.setAttribute("role","presentation");const a={hoverDelegate:this._hoverDelegate,...t,isTabList:"tablist"===this.options.ariaRole};this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e,a)),r||(r=new o.Z4(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(r,n.ko(i,n.Bx.CONTEXT_MENU,(e=>{n.fs.stop(e,!0)}))),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(i),this.focusable&&r instanceof o.EH&&0===this.viewItems.length&&r.setFocusable(!0),null===s||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(r)):(this.actionsList.insertBefore(i,this.actionsList.children[s]),this.viewItems.splice(s,0,r),s++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,c.AS)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.w_(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===a.wv.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===a.wv.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();const n=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(n){let s=!0;d.Tn(n.focus)||(s=!1),this.options.focusOnlyEnabledItems&&d.Tn(n.isEnabled)&&!n.isEnabled()&&(s=!1),n.action.id===a.wv.ID&&(s=!1),s?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),s&&n.showHover?.()}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof o.EH){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=(0,c.AS)(this.viewItems),this.getContainer().remove(),super.dispose()}}},15075:function(e,t,i){"use strict";i.d(t,{h5:function(){return u},vr:function(){return d},xE:function(){return h}});var n=i(84201);const s=2e4;let o,r,a,l,c;function d(e){o=document.createElement("div"),o.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),o.appendChild(e),e};r=t(),a=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),o.appendChild(e),e};l=i(),c=i(),e.appendChild(o)}function h(e){o&&(r.textContent!==e?(n.w_(a),g(r,e)):(n.w_(r),g(a,e)))}function u(e){o&&(l.textContent!==e?(n.w_(c),g(l,e)):(n.w_(l),g(c,e)))}function g(e,t){n.w_(e),t.length>s&&(t=t.substr(0,s)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},96337:function(e,t,i){"use strict";i.d(t,{$:function(){return m}});var n=i(84201),s=i(19082),o=i(40478),r=i(96710),a=i(53510),l=i(24764),c=i(43014),d=i(59321),h=i(80670),u=i(85584),g=i(35114),p=i(56613),f=i(12048);d.Q1.white.toString(),d.Q1.white.toString();class m extends g.jG{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new h.vl),this._onDidEscape=this._register(new h.vl),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,s=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=s||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"==typeof t.title&&this.setTitle(t.title),"string"==typeof t.ariaLabel&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(a.q.addTarget(this._element)),[n.Bx.CLICK,a.B.Tap].forEach((e=>{this._register((0,n.ko)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):n.fs.stop(e)})))})),this._register((0,n.ko)(this._element,n.Bx.KEY_DOWN,(e=>{const t=new o.Z(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._onDidEscape.fire(e),this._element.blur(),i=!0),i&&n.fs.stop(t,!0)}))),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register((0,n.w5)(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of(0,c.n)(e))if("string"==typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){if(this._label===e)return;if((0,u.VS)(this._label)&&(0,u.VS)(e)&&(0,u.nK)(this._label,e))return;this._element.classList.add("monaco-text-button");const t=this.options.supportShortLabel?this._labelElement:this._element;if((0,u.VS)(e)){const i=(0,r.Gc)(e,{inline:!0});i.dispose();const o=i.element.querySelector("p")?.innerHTML;if(o){const e=(0,s.aj)(o,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});t.innerHTML=e}else(0,n.Ln)(t)}else this.options.supportIcons?(0,n.Ln)(t,...this.getContentElements(e)):t.textContent=e;let i="";"string"==typeof this.options.title?i=this.options.title:this.options.title&&(i=(0,r.R9)(e)),this.setTitle(i),"string"==typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",i),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...p.L.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){this._hover||""===e?this._hover&&this._hover.update(e):this._hover=this._register((0,f.i)().setupManagedHover(this.options.hoverDelegate??(0,l.nZ)("mouse"),this._element,e))}}},229:function(e,t,i){"use strict";i.d(t,{x:function(){return o}});var n=i(84201),s=i(43920);class o{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=(0,n.BC)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,s.GP)(this.countFormat,this.count),this.element.title=(0,s.GP)(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},99457:function(e,t,i){"use strict";i.d(t,{d:function(){return g}});var n=i(84201),s=i(9306),o=i(40478),r=i(53510),a=i(30981),l=i(80670);class c extends a.LN{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.BC)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.BC)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[n.Bx.CLICK,n.Bx.MOUSE_DOWN,r.B.Tap])this._register((0,n.ko)(this.element,e,(e=>n.fs.stop(e,!0))));for(const e of[n.Bx.MOUSE_DOWN,r.B.Tap])this._register((0,n.ko)(this._label,e,(e=>{(0,n.Er)(e)&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register((0,n.ko)(this._label,n.Bx.KEY_UP,(e=>{const t=new o.Z(e);(t.equals(3)||t.equals(10))&&(n.fs.stop(e,!0),this.visible?this.hide():this.show())})));const s=i(this._label);s&&this._register(s),this._register(r.q.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class d extends c{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}var h=i(24764),u=i(12048);class g extends s.EH{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,n.BC)(e,(0,n.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register((0,u.i)().setupManagedHover(this.options.hoverDelegate??(0,h.nZ)("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new d(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{this.element?.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return e.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){const e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}},72711:function(e,t,i){"use strict";i.d(t,{c:function(){return u}});var n=i(84201),s=i(68462),o=i(50216),r=i(6770),a=i(80670),l=i(14374),c=i(35114),d=i(24764);const h=l.kg("defaultLabel","input");class u extends r.x{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new c.HE),this.additionalToggles=[],this._onDidOptionChange=this._register(new a.vl),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new a.vl),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new a.vl),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new a.vl),this._onKeyUp=this._register(new a.vl),this._onCaseSensitiveKeyDown=this._register(new a.vl),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new a.vl),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||h,this.showCommonFindToggles=!!i.showCommonFindToggles;const r=i.appendCaseSensitiveLabel||"",l=i.appendWholeWordsLabel||"",u=i.appendRegexLabel||"",g=i.history||[],p=!!i.flexibleHeight,f=!!i.flexibleWidth,m=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new o.mJ(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:g,showHistoryHint:i.showHistoryHint,flexibleHeight:p,flexibleWidth:f,flexibleMaxHeight:m,inputBoxStyles:i.inputBoxStyles}));const _=this._register((0,d.bW)());if(this.showCommonFindToggles){this.regex=this._register(new s.Ix({appendTitle:u,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new s.nV({appendTitle:l,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new s.bc({appendTitle:r,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(this.domNode.ownerDocument.activeElement);if(i>=0){let s=-1;t.equals(17)?s=(i+1)%e.length:t.equals(15)&&(s=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):s>=0&&e[s].focus(),n.fs.stop(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(n.ko(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(n.ko(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(const e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const e of this.additionalToggles)e.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new c.Cm;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){this.inputBox.paddingRight=e?0:(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){return this.regex?.checked??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){this.caseSensitive?.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}},68462:function(e,t,i){"use strict";i.d(t,{Ix:function(){return u},bc:function(){return d},nV:function(){return h}});var n=i(24764),s=i(44925),o=i(93231),r=i(14374);const a=r.kg("caseDescription","Match Case"),l=r.kg("wordsDescription","Match Whole Word"),c=r.kg("regexDescription","Use Regular Expression");class d extends s.l{constructor(e){super({icon:o.W.caseSensitive,title:a+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class h extends s.l{constructor(e){super({icon:o.W.wholeWord,title:l+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class u extends s.l{constructor(e){super({icon:o.W.regex,title:c+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},2627:function(e,t,i){"use strict";i.d(t,{_:function(){return c}});var n=i(84201),s=i(12048),o=i(24764),r=i(43014),a=i(35114),l=i(49134);class c extends a.jG{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=t?.supportIcons??!1,this.domNode=n.BC(e,n.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=c.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&l.aI(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,s+=i;for(const e of t)e.end<=s||(e.start>=s&&(e.start+=n),e.end>=s&&(e.end+=n));return i+=n,"⏎"}))}}},12048:function(e,t,i){"use strict";i.d(t,{e:function(){return s},i:function(){return o}});let n={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>null,showManagedHover:()=>{}};function s(e){n=e}function o(){return n}},24764:function(e,t,i){"use strict";i.d(t,{MW:function(){return a},bW:function(){return c},nZ:function(){return l}});var n=i(72582);let s=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});const o=new n.d((()=>s("mouse",!1))),r=new n.d((()=>s("element",!1)));function a(e){s=e}function l(e){return"element"===e?r.value:o.value}function c(){return s("element",!0)}},49943:function(e,t,i){"use strict";i.d(t,{M4:function(){return g},N4:function(){return c},jQ:function(){return d},vV:function(){return u},vr:function(){return h}});var n=i(84201),s=i(40478),o=i(5390),r=i(35114),a=i(14374);const l=n.$;class c extends r.jG{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new o.MU(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class d extends r.jG{static render(e,t,i){return new d(e,t,i)}constructor(e,t,i){super(),this.actionLabel=t.label,this.actionKeybindingLabel=i,this.actionContainer=n.BC(e,l("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=n.BC(this.actionContainer,l("a.action")),this.action.setAttribute("role","button"),t.iconClass&&n.BC(this.action,l(`span.icon.${t.iconClass}`)),n.BC(this.action,l("span")).textContent=i?`${t.label} (${i})`:t.label,this._store.add(new u(this.actionContainer,t.run)),this._store.add(new g(this.actionContainer,t.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function h(e,t){return e&&t?(0,a.kg)("acessibleViewHint","Inspect this in the accessible view with {0}.",t):e?(0,a.kg)("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class u extends r.jG{constructor(e,t){super(),this._register(n.ko(e,n.Bx.CLICK,(i=>{i.stopPropagation(),i.preventDefault(),t(e)})))}}class g extends r.jG{constructor(e,t,i){super(),this._register(n.ko(e,n.Bx.KEY_DOWN,(n=>{const o=new s.Z(n);i.some((e=>o.equals(e)))&&(n.stopPropagation(),n.preventDefault(),t(e))})))}}},38403:function(e,t,i){"use strict";i.d(t,{s:function(){return g}});var n=i(84201),s=i(2627),o=i(35114),r=i(49134),a=i(69627),l=i(24764),c=i(12048),d=i(24219),h=i(4590);class u{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||(0,r.aI)(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class g extends o.jG{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new u(n.BC(e,n.$(".monaco-icon-label")))),this.labelContainer=n.BC(this.domNode.element,n.$(".monaco-icon-label-container")),this.nameContainer=n.BC(this.labelContainer,n.$("span.monaco-icon-name-container")),this.nameNode=t?.supportHighlights||t?.supportIcons?this._register(new f(this.nameContainer,!!t.supportIcons)):new p(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??(0,l.nZ)("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){const o=["monaco-icon-label"],r=["monaco-icon-label-container"];let a="";i&&(i.extraClasses&&o.push(...i.extraClasses),i.italic&&o.push("italic"),i.strikethrough&&o.push("strikethrough"),i.disabledCommand&&r.push("disabled"),i.title&&("string"==typeof i.title?a+=i.title:a+=e));const l=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let e;l&&n.sb(l)?e=l:(e=n.$(".monaco-icon-label-iconpath"),this.domNode.element.prepend(e)),e.style.backgroundImage=n.Tf(i?.iconPath)}else l&&l.remove();if(this.domNode.classNames=o,this.domNode.element.setAttribute("aria-label",a),this.labelContainer.classList.value="",this.labelContainer.classList.add(...r),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof s._?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines),this.setupHover(e.element,i?.descriptionTitle)):(e.textContent=t&&i?.labelEscapeNewLines?s._.escapeNewLines(t,[]):t||"",this.setupHover(e.element,i?.descriptionTitle||""),e.empty=!t)}(i?.suffix||this.suffixNode)&&(this.getOrCreateSuffixNode().textContent=i?.suffix??"")}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate.showNativeHover){function n(e,t){(0,d.Kg)(t)?e.title=(0,h.pS)(t):t?.markdownNotSupportedFallback?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}n(e,t)}else{const s=(0,c.i)().setupManagedHover(this.hoverDelegate,e,t);s&&this.customHovers.set(e,s)}else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new u(n.Pl(this.nameContainer,n.$("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new u(n.BC(e.element,n.$("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){const e=this._register(new u(n.BC(this.labelContainer,n.$("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new s._(n.BC(e.element,n.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new u(n.BC(e.element,n.$("span.label-description"))))}return this.descriptionNode}}class p{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,r.aI)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.BC(this.container,n.$("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:n,end:n+e.length},o=i.map((e=>a.Q.intersect(s,e))).filter((e=>!a.Q.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=s.end+t.length,o}))}(e,i,t?.matches);for(let r=0;r=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new g(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var f=i(49134),m=i(14374);const _=n.$,v={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class b extends h.x{constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new u.vl),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new u.vl),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.BC(e,_(".monaco-inputbox.idle"));const o=this.options.flexibleHeight?"textarea":"input",a=n.BC(this.element,_(".ibwrapper"));if(this.input=n.BC(a,_(o+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.BC(a,_("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new d.Se(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.BC(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new s.f(e.ownerDocument,"selectionchange")),i=u.Jh.filter(t.event,(()=>{const t=e.ownerDocument.getSelection();return t?.anchorNode===a}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new r.E(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register((0,l.i)().setupManagedHover((0,c.nZ)("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:n.OK(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return n.X7(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){const e=this.input.selectionStart;return null===e?null:{start:e,end:this.input.selectionEnd??e}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&(0,f.aI)(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${n.gI(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=n.Tr(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{if(!this.message)return null;e=n.BC(i,_(".monaco-inputbox-container")),t();const s={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?(0,o.yk)(this.message.content,s):(0,o.S5)(this.message.content,s);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background??"",r.style.color=a.foreground??"",r.style.border=a.border?`1px solid ${a.border}`:"",n.BC(e,r),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?m.kg("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?m.kg("alertWarningMessage","Warning: {0}",this.message.content):m.kg("alertInfoMessage","Info: {0}",this.message.content),a.xE(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}applyStyles(){const e=this.options.inputBoxStyles,t=e.inputBackground??"",i=e.inputForeground??"",s=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=i,this.input.style.backgroundColor="inherit",this.input.style.color=i,this.element.style.border=`1px solid ${n.gI(s,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.OK(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;null!==i&&null!==n&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}}class w extends b{constructor(e,t,i){const s=m.kg({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," or {0} for history","⇅"),o=m.kg({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new u.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new u.vl),this.onDidBlur=this._onDidBlur.event,this.history=new p(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?s:o,t=this.placeholder+e;i.showPlaceholderOnFocus&&!n.X7(this.input)?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(o)||e(s)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",a.h5(this.value?this.value:m.kg("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,a.h5(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}},15339:function(e,t,i){"use strict";i.d(t,{l:function(){return h},x:function(){return u}});var n=i(84201),s=i(12048),o=i(24764),r=i(92479),a=i(35114),l=i(49134),c=i(14374);const d=n.$,h={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class u extends a.jG{constructor(e,t,i){super(),this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);const r=this.options.keybindingLabelForeground;this.domNode=n.BC(e,d(".monaco-keybinding")),r&&(this.domNode.style.color=r),this.hover=this._register((0,s.i)().setupManagedHover((0,o.nZ)("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&u.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){const e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let t=1;t=n.range.end)continue;if(e.end({range:m(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(const n of e){const e=n.range.start,s=n.range.end,o=n.size;i&&o===i.size?i.range.end=s:(i={range:{start:e,end:s},size:o},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(s,r,o),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var b=i(20187),w=i(60028),C=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const y={CurrentDragAndDropData:void 0},S={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class k{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,this.getPosInSet=e?.getPosInSet?e.getPosInSet.bind(e):(e,t)=>t+1,this.getRole=e?.getRole?e.getRole.bind(e):e=>"listitem",this.isChecked=e?.isChecked?e.isChecked.bind(e):e=>{}}}class E{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,s.y6)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=S){if(this.virtualDelegate=t,this.domId="list_id_"+ ++E.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new c.ve(50),this.splicing=!1,this.dragOverAnimationStopDisposable=u.jG.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=u.jG.None,this.onDragLeaveTimeout=u.jG.None,this.disposables=new u.Cm,this._onDidChangeContentHeight=new h.vl,this._onDidChangeContentWidth=new h.vl,this.onDidChangeContentHeight=h.Jh.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(n.paddingTop??0);for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new v(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=n.horizontalScrolling??S.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new D(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(n.transformOptimization??S.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.q.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new p.yE({forceIntegerValues:!0,smoothScrollDuration:n.smoothScrolling?125:0,scheduleAtNextAnimationFrame:e=>(0,s.PG)((0,s.zk)(this.domNode),e)})),this.scrollableElement=this.disposables.add(new a.oO(this.rowsContainer,{alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel??S.alwaysConsumeMouseWheel,horizontal:1,vertical:n.verticalScrollMode??S.verticalScrollMode,useShadows:n.useShadows??S.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,s.ko)(this.rowsContainer,r.B.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,s.ko)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,s.ko)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,s.ko)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,s.ko)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,s.ko)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=n.setRowLineHeight??S.setRowLineHeight,this.setRowHeight=n.setRowHeight??S.setRowHeight,this.supportDynamicHeights=n.supportDynamicHeights??S.supportDynamicHeights,this.dnd=n.dnd??this.disposables.add(S.dnd),this.layout(n.initialSize?.height,n.initialSize?.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t={...t??{},scrollByPage:e.scrollByPage}),void 0!==e.mouseWheelScrollSensitivity&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new _(e)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},o=g.Q.intersect(n,s),r=new Map;for(let e=o.end-1;e>=o.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.unshift(t.row)}t.row=null,t.stale=!0}const a={start:e+t,end:this.items.length},l=g.Q.intersect(a,n),c=g.Q.relativeComplement(a,n),d=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:u.jG.None,checkedDisposable:u.jG.None,stale:!1})));let h;0===e&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));const p=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=m(l,p),v=g.Q.intersect(f,_);for(let e=v.start;em(e,p))),C=[{start:e,end:e+i.length},...w].map((e=>g.Q.intersect(f,e))).reverse();for(const e of C)for(let t=e.end-1;t>=e.start;t--){const e=this.items[t],i=r.get(e.templateId),n=i?.pop();this.insertItemInDOM(t,n)}for(const e of r.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,s.PG)((0,s.zk)(this.domNode),(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex((t=>t.element===e))}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:"number"==typeof e?e:(0,s.H4)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,s.y6)(this.domNode)})}render(e,t,i,n,s,o=!1){const r=this.getRenderRange(t,i),a=g.Q.relativeComplement(r,e).reverse(),l=g.Q.relativeComplement(e,r);if(o){const t=g.Q.intersect(e,r);for(let e=t.start;e{for(const e of l)for(let t=e.start;t=e.start;t--)this.insertItemInDOM(t)})),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==s&&(this.rowsContainer.style.width=`${Math.max(s,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){const i=this.items[e];if(!i.row)if(t)i.row=t,i.stale=!0;else{const e=this.cache.alloc(i.templateId);i.row=e.row,i.stale||=e.isReusingConnectedDomNode}const n=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",n);const o=this.accessibilityProvider.isChecked(i.element);if("boolean"==typeof o)i.row.domNode.setAttribute("aria-checked",String(!!o));else if(o){const e=e=>i.row.domNode.setAttribute("aria-checked",String(!!e));e(o.value),i.checkedDisposable=o.onDidChange((()=>e(o.value)))}if(i.stale||!i.row.domNode.parentElement){const t=this.items.at(e+1)?.row?.domNode??null;i.row.domNode.parentElement===this.rowsContainer&&i.row.domNode.nextElementSibling===t||this.rowsContainer.insertBefore(i.row.domNode,t),i.stale=!1}this.updateItemInDOM(i,e);const r=this.renderers.get(i.templateId);if(!r)throw new Error(`No renderer found for template id ${i.templateId}`);r?.renderElement(i.element,e,i.row.templateData,i.size);const a=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a&&(i.dragStartDisposable=(0,s.ko)(i.row.domNode,"dragstart",(e=>this.onDragStart(i.element,a,e)))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,s.y6)(e.row.domNode);const t=(0,s.zk)(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return h.Jh.filter(h.Jh.map(this.disposables.add(new o.f(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return h.Jh.any(h.Jh.map(this.disposables.add(new o.f(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),h.Jh.map(this.disposables.add(new o.f(this.domNode,r.B.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return h.Jh.map(this.disposables.add(new o.f(this.rowsContainer,r.B.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element,sector:this.getTargetSector(e,t)}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const o=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.t.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(o,i)),void 0===e&&(e=String(o.length));const t=(0,s.$)(".monaco-drag-image");t.textContent=e,(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||this.domNode.ownerDocument})(this.domNode).appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>t.remove()),0)}this.domNode.classList.add("dragging"),this.currentDragData=new k(o),y.CurrentDragAndDropData=new x(o),this.dnd.onDragStart?.(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),y.CurrentDragAndDropData&&"vscode-ui"===y.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(y.CurrentDragAndDropData)this.currentDragData=y.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new L}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?.type?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=(0,l.dM)(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i;let n="boolean"!=typeof t&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(s=this.currentDragFeedback,o=i,(Array.isArray(s)&&Array.isArray(o)?(0,l.aI)(s,o):s===o)&&this.currentDragFeedbackPosition===n)return!0;var s,o;if(this.currentDragFeedback=i,this.currentDragFeedbackPosition=n,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add(n),this.rowsContainer.classList.add(n),this.currentDragFeedbackDisposable=(0,u.s)((()=>{this.domNode.classList.remove(n),this.rowsContainer.classList.remove(n)}));else{if(i.length>1&&"drop-target"!==n)throw new Error("Can't use multiple feedbacks with position different than 'over'");"drop-target-after"===n&&i[0]{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row?.domNode.classList.remove(n)}}))}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,c.EQ)((()=>this.clearDragOverFeedback()),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=u.jG.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,s.cL)(this.domNode).top;this.dragOverAnimationDisposable=(0,s.i0)((0,s.zk)(this.domNode),this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,c.EQ)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(void 0===t)return;const i=e.offsetY/this.items[t].size,n=Math.floor(i/.25);return(0,w.qE)(n,0,3)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;((0,s.sb)(i)||(0,s.xZ)(i))&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,o;e===this.elementTop(n.start)?(s=n.start,o=0):n.end-n.start>1&&(s=n.start+1,o=this.elementTop(s)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=e.start;t--)this.insertItemInDOM(t);for(let e=a.start;en.splice(e,t,i)))}}var c=i(97358),d=i(90890),h=i(59321),u=i(95578),g=i(80670),p=i(17793),f=i(35114),m=i(60028),_=i(79783),v=i(24219);class b extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var w,C,y=i(26914),S=i(34287),k=i(73755),x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class L{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class D{get name(){return this._trait}get renderer(){return new L(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.vl,this.onChange=this._onChange.event}splice(e,t,i){const n=i.length-t,s=e+t,o=[];let r=0;for(;r=s;)o.push(this.sortedIndexes[r++]+n);this.renderer.splice(e,t,i.length),this._set(o,o)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(Y),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=Q(s,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,c.El)(this.sortedIndexes,e,Y)>=0}dispose(){(0,f.AS)(this._onChange)}}x([u.B],D.prototype,"renderer",null);class E extends D{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class N{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const s=new Set(n),o=i.map((e=>s.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,o)}}function I(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function M(e,t){return!!e.classList.contains(t)||!e.classList.contains("monaco-list")&&!!e.parentElement&&M(e.parentElement,t)}function T(e){return M(e,"monaco-editor")}function R(e){return M(e,"monaco-custom-toggle")}function P(e){return M(e,"action-item")}function A(e){return M(e,"monaco-tree-sticky-row")}function O(e){return e.classList.contains("monaco-tree-sticky-container")}function F(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&!!e.parentElement&&F(e.parentElement)}class B{get onKeyDown(){return g.Jh.chain(this.disposables.add(new s.f(this.view.domNode,"keydown")).event,(e=>e.filter((e=>!I(e.target))).map((e=>new o.Z(e)))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new f.Cm,this.multipleSelectionDisposables=new f.Cm,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown((e=>{switch(e.keyCode){case 3:return this.onEnter(e);case 16:return this.onUpArrow(e);case 18:return this.onDownArrow(e);case 11:return this.onPageUpArrow(e);case 12:return this.onPageDownArrow(e);case 9:return this.onEscape(e);case 31:this.multipleSelectionSupport&&(_.zx?e.metaKey:e.ctrlKey)&&this.onCtrlA(e)}})))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,c.y1)(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}x([u.B],B.prototype,"onKeyDown",null),function(e){e[e.Automatic=0]="Automatic",e[e.Trigger=1]="Trigger"}(w||(w={})),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(C||(C={}));const W=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class H{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=C.Idle,this.mode=w.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new f.Cm,this.disposables=new f.Cm,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??1?this.enable():this.disable(),this.mode=e.typeNavigationMode??w.Automatic}enable(){if(this.enabled)return;let e=!1;const t=g.Jh.chain(this.enabledDisposables.add(new s.f(this.view.domNode,"keydown")).event,(t=>t.filter((e=>!I(e.target))).filter((()=>this.mode===w.Automatic||this.triggered)).map((e=>new o.Z(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>n.fs.stop(e,!0))).map((e=>e.browserEvent.key)))),i=g.Jh.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables);g.Jh.reduce(g.Jh.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const t=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(e[0]));"string"==typeof t?(0,a.xE)(t):t&&(0,a.xE)(t.get())}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=C.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===C.Idle?1:0;this.state=C.Typing;for(let t=0;t1&&1===t.length)return this.previouslyFocused=i,this.list.setFocus([s]),void this.list.reveal(s)}}else if(void 0===r||(0,p.WP)(e,r))return this.previouslyFocused=i,this.list.setFocus([s]),void this.list.reveal(s)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class V{constructor(e,t){this.list=e,this.view=t,this.disposables=new f.Cm;const i=g.Jh.chain(this.disposables.add(new s.f(t.domNode,"keydown")).event,(e=>e.filter((e=>!I(e.target))).map((e=>new o.Z(e)))));g.Jh.chain(i,(e=>e.filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)))))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const s=i.querySelector("[tabIndex]");if(!s||!(0,n.sb)(s)||-1===s.tabIndex)return;const o=(0,n.zk)(s).getComputedStyle(s);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),s.focus())}dispose(){this.disposables.dispose()}}function z(e){return _.zx?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function U(e){return e.browserEvent.shiftKey}const j={isSelectionSingleChangeEvent:z,isSelectionRangeChangeEvent:U};class q{constructor(e){this.list=e,this.disposables=new f.Cm,this._onPointer=new g.vl,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||j),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(r.q.addTarget(e.getHTMLElement()))),g.Jh.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||j))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){T(e.browserEvent.target)||(0,n.bq)()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(I(e.browserEvent.target)||T(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(I(e.browserEvent.target)||T(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),i=e.browserEvent,(0,n.Er)(i)&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(I(e.browserEvent.target)||T(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){void 0===i&&(i=this.list.getFocus()[0]??t,this.list.setAnchor(i));const n=Math.min(i,t),s=Math.max(i,t),o=(0,c.y1)(n,s+1),r=this.list.getSelection(),a=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let s=i-1;for(;s>=0&&e[s]===t-(i-s);)n.push(e[s--]);for(n.reverse(),s=i;s=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){n++,s++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class K{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const s=(0,n.gI)(e.listFocusAndSelectionOutline,(0,n.gI)(e.listSelectionOutline,e.listFocusOutline??""));s&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const o=(0,n.gI)(e.listSelectionOutline,e.listInactiveFocusOutline??"");o&&i.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${o}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(`\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.listDropOverBackground} !important; color: inherit !important; }\n\t\t\t`),e.listDropBetweenBackground&&(i.push(`\n\t\t\t.monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,\n\t\t\t.monaco-list${t} .monaco-list-row.drop-target-before::before {\n\t\t\t\tcontent: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`),i.push(`\n\t\t\t.monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,\n\t\t\t.monaco-list${t} .monaco-list-row.drop-target-after::after {\n\t\t\t\tcontent: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`)),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&i.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=i.join("\n")}}const $={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:h.Q1.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:h.Q1.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:h.Q1.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},G={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function Q(e,t){const i=[];let n=0,s=0;for(;n=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){i.push(e[n]),n++,s++;continue}e[n]e-t;class Z{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let s=0;for(const o of this.renderers)o.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(const o of this.renderers)o.disposeElement?.(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class X{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new f.Cm}}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e),s=n&&"string"!=typeof n?n:(0,k.lk)(n);i.disposables.add((0,k.fm)((e=>{this.setAriaLabel(e.readObservable(s),i.container)})));const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.container.setAttribute("aria-level",`${o}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i,n){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class J{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,s){return this.dnd.onDragOver(e,t,i,n,s)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,s){this.dnd.drop(e,t,i,n,s)}dispose(){this.dnd.dispose()}}class ee{get onDidChangeFocus(){return g.Jh.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return g.Jh.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=g.Jh.chain(this.disposables.add(new s.f(this.view.domNode,"keydown")).event,(t=>t.map((e=>new o.Z(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>n.fs.stop(e,!0))).filter((()=>!1)))),i=g.Jh.chain(this.disposables.add(new s.f(this.view.domNode,"keyup")).event,(t=>t.forEach((()=>e=!1)).map((e=>new o.Z(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>n.fs.stop(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})))),r=g.Jh.chain(this.view.onContextMenu,(t=>t.filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new S.P((0,n.zk)(this.view.domNode),i),browserEvent:i})))));return g.Jh.any(t,i,r)}get onKeyDown(){return this.disposables.add(new s.f(this.view.domNode,"keydown")).event}get onDidFocus(){return g.Jh.signal(this.disposables.add(new s.f(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return g.Jh.signal(this.disposables.add(new s.f(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,s,o=G){this.user=e,this._options=o,this.focus=new D("focused"),this.anchor=new D("anchor"),this.eventBufferer=new g.at,this._ariaLabel="",this.disposables=new f.Cm,this._onDidDispose=new g.vl,this.onDidDispose=this._onDidDispose.event;const r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new E("listbox"!==r);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new X(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),s=s.map((e=>new Z(e.templateId,[...a,e])));const c={...o,dnd:o.dnd&&new J(this,o.dnd)};if(this.view=this.createListView(t,i,s,c),this.view.domNode.setAttribute("role",r),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=(0,n.li)(this.view.domNode);this.styleController=new K(e,this.view.domId)}if(this.spliceable=new l([new N(this.focus,this.view,o.identityProvider),new N(this.selection,this.view,o.identityProvider),new N(this.anchor,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new V(this,this.view)),("boolean"!=typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new B(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||W;this.typeNavigationController=new H(this,this.view,o.keyboardNavigationLabelProvider,o.keyboardNavigationEventFilter??(()=>!0),e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new y.uO(e,t,i,n)}createMouseController(e){return new q(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new b(this.user,`Invalid start index: ${e}`);if(t<0)throw new b(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,c.Fy)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findNextIndex(s.length>0?s[0]+e:0,t,n);o>-1&&this.setFocus([o],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);o>-1&&this.setFocus([o],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let o=s+this.view.renderHeight;i>n&&(o-=this.view.elementHeight(i)),this.view.setScrollTop(o),this.view.getScrollTop()!==s&&(this.setFocus([]),await(0,d.wR)(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=()=>0){let n;const s=i(),o=this.view.getScrollTop()+s;n=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);const r=this.getFocus()[0];if(r!==n&&(void 0===r||r>=n)){const i=this.findNextIndex(n,!1,t);i>-1&&r!==i?this.setFocus([i],e):this.setFocus([n],e)}else{const n=o;this.view.setScrollTop(o-this.view.renderHeight-s),this.view.getScrollTop()+i()!==n&&(this.setFocus([]),await(0,d.wR)(0),await this.focusPreviousPage(e,t,i))}}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),s=this.view.elementTop(e),o=this.view.elementHeight(e);if((0,v.Et)(t)){const e=o-this.view.renderHeight+i;this.view.setScrollTop(e*(0,m.qE)(t,0,1)+s-i)}else{const e=s+o,t=n+this.view.renderHeight;s=t||(s=t&&o>=this.view.renderHeight?this.view.setScrollTop(s-i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const o=s-this.view.renderHeight+t;return Math.abs((i+t-n)/o)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){const e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}x([u.B],ee.prototype,"onDidChangeFocus",null),x([u.B],ee.prototype,"onDidChangeSelection",null),x([u.B],ee.prototype,"onContextMenu",null),x([u.B],ee.prototype,"onKeyDown",null),x([u.B],ee.prototype,"onDidFocus",null),x([u.B],ee.prototype,"onDidBlur",null)},98435:function(e,t,i){"use strict";i.d(t,{v:function(){return a}});var n=i(84201),s=i(38175),o=i(80670),r=i(35114);class a{constructor(){let e;this._onDidWillResize=new o.vl,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new o.vl,this.onDidResize=this._onDidResize.event,this._sashListener=new r.Cm,this._size=new n.fg(0,0),this._minSize=new n.fg(0,0),this._maxSize=new n.fg(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new s.m(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new s.m(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new s.m(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:s.B.North}),this._southSash=new s.m(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:s.B.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(o.Jh.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(o.Jh.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(o.Jh.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(o.Jh.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:s}=this._minSize,{height:o,width:r}=this._maxSize;e=Math.max(i,Math.min(o,e)),t=Math.max(s,Math.min(r,t));const a=new n.fg(t,e);n.fg.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}},38175:function(e,t,i){"use strict";i.d(t,{B:function(){return n},m:function(){return b}});var n,s=i(84201),o=i(26745),r=i(53510),a=i(90890),l=i(95578),c=i(80670),d=i(35114),h=i(79783),u=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(n||(n={}));const g=new c.vl,p=new c.vl;class f{constructor(e){this.el=e,this.disposables=new d.Cm}get onPointerMove(){return this.disposables.add(new o.f((0,s.zk)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new o.f((0,s.zk)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}u([l.B],f.prototype,"onPointerMove",null),u([l.B],f.prototype,"onPointerUp",null);class m{get onPointerMove(){return this.disposables.add(new o.f(this.el,r.B.Change)).event}get onPointerUp(){return this.disposables.add(new o.f(this.el,r.B.End)).event}constructor(e){this.el=e,this.disposables=new d.Cm}dispose(){this.disposables.dispose()}}u([l.B],m.prototype,"onPointerMove",null),u([l.B],m.prototype,"onPointerUp",null);class _{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}u([l.B],_.prototype,"onPointerMove",null),u([l.B],_.prototype,"onPointerUp",null);const v="pointer-events-disabled";class b extends d.jG{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,s.BC)(this.el,(0,s.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,d.s)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new o.f(this._orthogonalStartDragHandle,"mouseenter")).event((()=>b.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new o.f(this._orthogonalStartDragHandle,"mouseleave")).event((()=>b.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,s.BC)(this.el,(0,s.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,d.s)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new o.f(this._orthogonalEndDragHandle,"mouseenter")).event((()=>b.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new o.f(this._orthogonalEndDragHandle,"mouseleave")).event((()=>b.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new a.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new c.vl),this._onDidStart=this._register(new c.vl),this._onDidChange=this._register(new c.vl),this._onDidReset=this._register(new c.vl),this._onDidEnd=this._register(new c.vl),this.orthogonalStartSashDisposables=this._register(new d.Cm),this.orthogonalStartDragHandleDisposables=this._register(new d.Cm),this.orthogonalEndSashDisposables=this._register(new d.Cm),this.orthogonalEndDragHandleDisposables=this._register(new d.Cm),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,s.BC)(e,(0,s.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),h.zx&&this.el.classList.add("mac");const n=this._register(new o.f(this.el,"mousedown")).event;this._register(n((t=>this.onPointerStart(t,new f(e))),this));const l=this._register(new o.f(this.el,"dblclick")).event;this._register(l(this.onPointerDoublePress,this));const u=this._register(new o.f(this.el,"mouseenter")).event;this._register(u((()=>b.onMouseEnter(this))));const _=this._register(new o.f(this.el,"mouseleave")).event;this._register(_((()=>b.onMouseLeave(this)))),this._register(r.q.addTarget(this.el));const v=this._register(new o.f(this.el,r.B.Start)).event;this._register(v((e=>this.onPointerStart(e,new m(this.el))),this));const w=this._register(new o.f(this.el,r.B.Tap)).event;let C;this._register(w((e=>{if(C)return clearTimeout(C),C=void 0,void this.onPointerDoublePress(e);clearTimeout(C),C=setTimeout((()=>C=void 0),250)}),this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(g.event((e=>{this.size=e,this.layout()})))),this._register(p.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(e,t){s.fs.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new _(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new _(t))),!this.state)return;const n=this.el.ownerDocument.getElementsByTagName("iframe");for(const e of n)e.classList.add(v);const o=e.pageX,r=e.pageY,a=e.altKey,l={startX:o,currentX:o,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=(0,s.li)(this.el),u=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":h.zx?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":h.zx?"col-resize":"ew-resize",c.textContent=`* { cursor: ${e} !important; }`},g=new d.Cm;u(),i||this.onDidEnablementChange.event(u,null,g),t.onPointerMove((e=>{s.fs.stop(e,!1);const t={startX:o,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{s.fs.stop(e,!1),c.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of n)e.classList.remove(v)}),null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&b.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&b.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){b.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){const t=e.initialTarget??e.target;if(t&&(0,s.sb)(t))return t.classList.contains("orthogonal-drag-handle")?t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},5390:function(e,t,i){"use strict";i.d(t,{MU:function(){return D},QC:function(){return S},Se:function(){return x},oO:function(){return L}});var n=i(75969),s=i(84201),o=i(43999),r=i(34287),a=i(82884),l=i(6770),c=i(90890),d=i(56613);class h extends l.x{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...d.L.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a._),this._register(s.b2(this.bgDomNode,s.Bx.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(s.b2(this.domNode,s.Bx.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new s.Be),this._pointerdownScheduleRepeatTimer=this._register(new c.pc)}_arrowPointerDown(e){e.target&&e.target instanceof Element&&(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet((()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24,s.zk(e))}),200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault())}}var u=i(35114);class g extends u.jG{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new c.pc)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode?.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}var p=i(79783);class f extends l.x{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new g(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a._),this._shouldRender=!0,this.domNode=(0,o.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(s.ko(this.domNode.domNode,s.Bx.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,o.Z)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(s.ko(this.slider.domNode,s.Bx.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=s.BK(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const s=this._sliderOrthogonalPointerPosition(e),o=Math.abs(s-i);if(p.uF&&o>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}var m=i(99758),_=i(93231);class v extends f{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new m.m(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,s.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.W.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,1,0))}),this._createArrow({className:"scra",icon:_.W.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class b extends f{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new m.m(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.W.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,1))}),this._createArrow({className:"scra",icon:_.W.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var w=i(80670),C=i(95773);class y{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class S{static{this.INSTANCE=new S}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const s=n===this._front?e:Math.pow(2,-i);if(e-=s,t+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}acceptStandardWheelEvent(e){if(n.H8){const t=s.zk(e.browserEvent),i=(0,n.pR)(t);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){let n=null;const s=new y(e,t,i);-1===this._front&&-1===this._rear?(this._memory[0]=s,this._front=0,this._rear=0):(n=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=s),s.score=this._computeScore(s,n)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if(this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(i+=.25),t){const n=Math.abs(e.deltaX),s=Math.abs(e.deltaY),o=Math.abs(t.deltaX),r=Math.abs(t.deltaY),a=Math.max(Math.min(n,o),1),l=Math.max(Math.min(s,r),1),c=Math.max(n,o),d=Math.max(s,r);c%a==0&&d%l==0&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}class k extends l.x{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new w.vl),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new w.vl),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,p.zx&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,o.Z)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,o.Z)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,o.Z)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new c.pc),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.AS)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,p.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.$(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.AS)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.$(e))};this._mouseWheelToDispose.push(s.ko(this._listenOnDomNode,s.Bx.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;const t=S.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+n===0?s=n=0:Math.abs(n)>=Math.abs(s)?s=0:n=0),this._options.flipAxes&&([n,s]=[s,n]);const o=!p.zx&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!o||s||(s=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(s*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(s){const e=50*s,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",o=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class x extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new C.yE({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>s.PG(s.zk(e),t)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class L extends k{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class D extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new C.yE({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>s.PG(s.zk(e),t)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}))),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},99758:function(e,t,i){"use strict";i.d(t,{m:function(){return n}});class n{constructor(e,t,i,n,s,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new n(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){const o=Math.max(0,i-e),r=Math.max(0,o-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),c=(r-l)/(n-i),d=s*c;return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=n._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t(0,n.PG)((0,n.zk)(this.el),e)})),this.scrollableElement=this._register(new r.oO(this.viewContainer,{vertical:0===this.orientation?t.scrollbarVisibility??1:2,horizontal:1===this.orientation?t.scrollbarVisibility??1:2},this.scrollable));const i=this._register(new s.f(this.viewContainer,"scroll")).event;this._register(i((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),(0,n.BC)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||p),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=g.b0(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this._contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i0&&(n.size=(0,h.qE)(Math.round(s*e/t),n.minimumSize,n.maximumSize))}}else{const t=(0,a.y1)(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),s=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const s=this.sashItems.findIndex((t=>t.sash===e)),o=(0,d.qE)((0,n.ko)(this.el.ownerDocument.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),(0,n.ko)(this.el.ownerDocument.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,r,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(s===this.sashItems.length-1){const e=this.viewItems[s];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[s+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}if(!t){const e=(0,a.y1)(s,-1),t=(0,a.y1)(s+1,this.viewItems.length),o=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),d=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),h=Math.max(o,d),u=Math.min(c,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?h-t:h+t,size:e.size}}if("number"==typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);r={index:p,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:s,sizes:i,minDelta:l,maxDelta:c,alt:t,snapBefore:n,snapAfter:r,disposable:o}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:o,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,d=this.resize(t,c,n,void 0,void 0,o,r,a,l);if(s){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,s=this.viewItems[n],o=s.size-s.maximumSize,r=s.size-s.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,o,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,h.qE)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;try{const i=(0,a.y1)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],s=i.filter((e=>2===this.viewItems[e].priority)),o=this.viewItems[e];t=Math.round(t),t=(0,h.qE)(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(n,s)}finally{this.state=v.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,h.qE)(i,t.minimumSize,t.maximumSize);const n=(0,a.y1)(this.viewItems.length),s=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));this.relayout(s,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,s){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;try{const r=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(i));const l=e.onDidChange((e=>this.onViewChange(p,e))),h=(0,d.s)((()=>r.remove())),u=(0,d.qE)(l,h);let g;"number"==typeof t?g=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),g="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const p=0===this.orientation?new m(r,e,g,u):new _(r,e,g,u);if(this.viewItems.splice(i,0,p),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new o.m(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},{...e,orientation:1}):new o.m(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},{...e,orientation:0}),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),s=c.Jh.map(t.onDidStart,n)(this.onSashStart,this),r=c.Jh.map(t.onDidChange,n)(this.onSashChange,this),l=c.Jh.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),h=l(this.onSashEnd,this),u=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.y1)(e,-1),n=(0,a.y1)(e+1,this.viewItems.length),s=this.findFirstSnapIndex(i),o=this.findFirstSnapIndex(n);("number"!=typeof s||this.viewItems[s].visible)&&("number"!=typeof o||this.viewItems[o].visible)&&this._onDidSashReset.fire(e)})),g=(0,d.qE)(s,r,h,u,t),p={sash:t,disposable:g};this.sashItems.splice(i-1,0,p)}let f;r.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(f=[t.index]),s||this.relayout([i],f),s||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}finally{this.state=v.Idle}}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,s,o=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const d=(0,a.y1)(e,-1),u=(0,a.y1)(e+1,this.viewItems.length);if(s)for(const e of s)(0,a._A)(d,e),(0,a._A)(u,e);if(n)for(const e of n)(0,a.r7)(d,e),(0,a.r7)(u,e);const g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),f=u.map((e=>this.viewItems[e])),m=u.map((e=>i[e])),_=d.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=d.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===u.length?Number.POSITIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),w=0===u.length?Number.NEGATIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),C=Math.max(_,w,o),y=Math.min(b,v,r);let S=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;S=i!==e.visible,e.setVisible(i,l.size)}if(!S&&c){const e=this.viewItems[c.index],i=te+t.size),0);let i=this.size-t;const n=(0,a.y1)(this.viewItems.length-1,-1),s=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));for(const e of o)(0,a._A)(n,e);for(const e of s)(0,a.r7)(n,e);"number"==typeof e&&(0,a.r7)(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const s=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const o=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:h&&t[e]&&(r0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),(0,d.AS)(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}},44925:function(e,t,i){"use strict";i.d(t,{F:function(){return l},l:function(){return c}});var n=i(6770),s=i(56613),o=i(80670),r=i(24764),a=i(12048);const l={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class c extends n.x{constructor(e){super(),this._onChange=this._register(new o.vl),this.onChange=this._onChange.event,this._onKeyDown=this._register(new o.vl),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...s.L.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register((0,a.i)().setupManagedHover(e.hoverDelegate??(0,r.nZ)("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},41703:function(e,t,i){"use strict";i.d(t,{DO:function(){return G},KP:function(){return n},RD:function(){return o},vD:function(){return s},w0:function(){return I}});var n,s,o,r=i(84201),a=(i(26745),i(40478)),l=(i(98099),i(72711),i(50216)),c=i(26914),d=i(67334),h=i(44925),u=i(64476),g=i(37345),p=(i(30981),i(97358)),f=i(90890),m=i(93231),_=i(56613),v=i(52732),b=i(80670),w=i(17793),C=i(35114),y=i(60028),S=i(24219),k=i(14374),x=(i(24764),i(73755)),L=i(15075);class D extends c.ur{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function E(e){return e instanceof c.ur?new D(e):e}class N{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=C.jG.None,this.disposables=new C.Cm}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart?.(E(e),t)}onDragOver(e,t,i,n,s,o=!0){const r=this.dnd.onDragOver(E(e),t&&t.element,i,n,s),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(a&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,f.EQ)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500,this.disposables)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return o?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),a=i.getNode(r),l=r&&i.getListIndex(r);return this.onDragOver(e,a,l,n,s,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),d=l.getListIndex(c),h=l.getListRenderCount(c);return{...r,feedback:(0,p.y1)(d,d+h)}}drop(e,t,i,n,s){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(E(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}class I{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(n||(n={}));class M{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new C.Cm,this.onDidChange=b.Jh.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class T{static{this.DefaultIndent=8}constructor(e,t,i,n,s,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=T.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=C.jG.None,this.disposables=new C.Cm,this.templateId=e.templateId,this.updateOptions(o),b.Jh.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){const t=(0,y.qE)(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if(void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==n.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new C.Cm;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,r.BC)(e,(0,r.$)(".monaco-tl-row")),i=(0,r.BC)(t,(0,r.$)(".monaco-tl-indent")),n=(0,r.BC)(t,(0,r.$)(".monaco-tl-twistie")),s=(0,r.BC)(t,(0,r.$)(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:C.jG.None,templateData:o}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=T.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(..._.L.asClassNameArray(m.W.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(..._.L.asClassNameArray(m.W.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,r.w_)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new C.Cm,n=this.modelProvider();for(;;){const s=n.getNodeLocation(e),o=n.getParentNodeLocation(s);if(!o)break;const a=n.getNode(o),l=(0,r.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),i.add((0,C.s)((()=>this.renderedIndentGuides.delete(a,l)))),e=a}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const s=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):s&&t.add(i.getNode(s))}catch{}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,C.AS)(this.disposables)}}class R{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new C.Cm,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"==typeof n?n?1:0:(0,u.iZ)(n)?(0,u.Mn)(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:w.ne.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(n)?n:[n];for(const e of r){const t=e&&e.toString();if(void 0===t)return{data:w.ne.Default,visibility:i};let n;if(this.tree.findMatchType===o.Contiguous){const e=t.toLowerCase().indexOf(this._lowercasePattern);if(e>-1){n=[Number.MAX_SAFE_INTEGER,0];for(let t=this._lowercasePattern.length;t>0;t--)n.push(e+t-1)}}else n=(0,w.dt)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===r.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===s.Filter?"number"==typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:w.ne.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,C.AS)(this.disposables)}}h.l,h.l,l.x8,h.F,function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(s||(s={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(o||(o={})),C.jG;class P{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,r,a={}){this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=r,this.options=a,this._pattern="",this.width=0,this._onDidChangeMode=new b.vl,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new b.vl,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new b.vl,this._onDidChangeOpenState=new b.vl,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new C.Cm,this.disposables=new C.Cm,this._mode=e.options.defaultFindMode??s.Highlight,this._matchType=e.options.defaultFindMatchType??o.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&e?((0,L.xE)((0,k.kg)("replFindNoResults","No results")),this.tree.options.showNotFoundMessage??1?this.widget?.showMessage({type:2,content:(0,k.kg)("not found","No elements found.")}):this.widget?.showMessage({type:2})):(this.widget?.clearMessage(),this.pattern&&(0,L.xE)((0,k.kg)("replFindResults","{0} results",this.filter.matchCount)))}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1||!w.ne.isDefault(e.filterData)}layout(e){this.width=e,this.widget?.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function A(e,t){return e.position===t.position&&O(e,t)}function O(e,t){return e.node.element===t.node.element&&e.startIndex===t.startIndex&&e.height===t.height&&e.endIndex===t.endIndex}class F{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return(0,p.aI)(this.stickyNodes,e.stickyNodes,A)}lastNodePartiallyVisible(){if(0===this.count)return!1;const e=this.stickyNodes[this.count-1];if(1===this.count)return 0!==e.position;const t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!(0,p.aI)(this.stickyNodes,e.stickyNodes,O))return!1;if(0===this.count)return!1;const t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class B{constrainStickyScrollNodes(e,t,i){for(let n=0;ni||n>=t)return e.slice(0,n)}return e}}class W extends C.jG{constructor(e,t,i,n,s,o={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=s,this.maxWidgetViewRatio=.4;const r=this.validateStickySettings(o);this.stickyScrollMaxItemCount=r.stickyScrollMaxItemCount,this.stickyScrollDelegate=o.stickyScrollDelegate??new B,this._widget=this._register(new H(i.getScrollableElement(),i,e,n,s,o.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll((()=>this.update()))),this._register(i.onDidChangeContentHeight((()=>this.update()))),this._register(e.onDidChangeCollapseState((()=>this.update()))),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(t=0===e?this.view.firstVisibleIndex:this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){const e=this.getNodeAtHeight(0);if(!e||0===this.tree.scrollTop)return void this._widget.setState(void 0);const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[];let i=e,n=0,s=this.getNextStickyNode(i,void 0,n);for(;s&&(t.push(s),n+=s.height,!(t.length<=this.stickyScrollMaxItemCount)||(i=this.getNextVisibleNode(s),i));)s=this.getNextStickyNode(i,s.node,n);const o=this.constrainStickyNodes(t);return o.length?new F(o):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n){if(n===e){if(!this.nodeIsUncollapsedParent(e))return;if(this.nodeTopAlignsWithStickyNodesBottom(e,i))return}return this.createStickyScrollNode(n,i)}}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),s=t;return this.view.scrollTop===n-s}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:s}=this.getNodeRange(e);return{node:e,position:this.calculateStickyNodePosition(s,t,i),height:i,startIndex:n,endIndex:s}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(void 0===t)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(null===n&&this.view.firstVisibleIndex===e&&e+1r&&t<=r?r-i:t}constrainStickyNodes(e){if(0===e.length)return[];const t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;const n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];const s=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||s.position+s.height>t)throw new Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){const t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){const t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");return{startIndex:i,endIndex:i+this.model.getListRenderCount(t)-1}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let e=0;e0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i)return this._previousState=void 0,this._previousElements=[],void this._previousStateDisposables.clear();const n=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${n.position}px`;else{this._previousStateDisposables.clear();const t=Array(e.count);for(let i=e.count-1;i>=0;i--){const n=e.stickyNodes[i],{element:s,disposable:o}=this.createElement(n,i,e.count);t[i]=s,this._rootDomNode.appendChild(s),this._previousStateDisposables.add(o)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}createElement(e,t,i){const n=e.startIndex,s=document.createElement("div");s.style.top=`${e.position}px`,!1!==this.tree.options.setRowHeight&&(s.style.height=`${e.height}px`),!1!==this.tree.options.setRowLineHeight&&(s.style.lineHeight=`${e.height}px`),s.classList.add("monaco-tree-sticky-row"),s.classList.add("monaco-list-row"),s.setAttribute("data-index",`${n}`),s.setAttribute("data-parity",n%2==0?"even":"odd"),s.setAttribute("id",this.view.getElementID(n));const o=this.setAccessibilityAttributes(s,e.node.element,t,i),r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find((e=>e.templateId===r));if(!a)throw new Error(`No renderer found for template id ${r}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));const c=a.renderTemplate(s);a.renderElement(l,e.startIndex,c,e.height);const d=(0,C.s)((()=>{o.dispose(),a.disposeElement(l,e.startIndex,c,e.height),a.disposeTemplate(c),s.remove()}));return{element:s,disposable:d}}setAccessibilityAttributes(e,t,i,n){if(!this.accessibilityProvider)return C.jG.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");const s=this.accessibilityProvider.getAriaLabel(t),o=s&&"string"!=typeof s?s:(0,x.lk)(s),r=(0,x.fm)((t=>{const i=t.readObservable(o);i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")}));"string"==typeof s||s&&e.setAttribute("aria-label",s.get());const a=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return"number"==typeof a&&e.setAttribute("aria-level",`${a}`),e.setAttribute("aria-selected",String(!1)),r}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class V extends C.jG{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new b.vl,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new b.vl,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register((0,r.ko)(this.container,"focus",(()=>this.onFocus()))),this._register((0,r.ko)(this.container,"blur",(()=>this.onBlur()))),this._register(this.view.onDidFocus((()=>this.toggleStickyScrollFocused(!1)))),this._register(this.view.onKeyDown((e=>this.onKeyDown(e)))),this._register(this.view.onMouseDown((e=>this.onMouseDown(e)))),this._register(this.view.onContextMenu((e=>this.handleContextMenu(e))))}handleContextMenu(e){const t=e.browserEvent.target;if(!(0,d.Es)(t)&&!(0,d.xu)(t))return void(this.focusedLast()&&this.view.domFocus());if(!(0,r.kx)(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const t=this.state.stickyNodes.findIndex((t=>t.node.element===e.element?.element));if(-1===t)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");return this.container.focus(),void this.setFocus(t)}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const i=this.state.stickyNodes[this.focusedIndex].node.element,n=this.elements[this.focusedIndex];this._onContextMenu.fire({element:i,anchor:n,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state)if("ArrowUp"===e.key)this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if("ArrowDown"===e.key||"ArrowRight"===e.key){if(this.focusedIndex>=this.state.count-1){const e=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([e]),this.scrollNodeUnderWidget(e,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}onMouseDown(e){const t=e.browserEvent.target;((0,d.Es)(t)||(0,d.xu)(t))&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&0===t.count)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){const e=(0,y.qE)(i,0,t.count-1);this.setFocus(e)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){const t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,s=this.view.getElementTop(e),o=n?n.position+n.height+i.height:i.height;this.view.scrollTop=s-o}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return!!this.state&&this.view.getHTMLElement().classList.contains("sticky-scroll-focused")}removeFocus(){-1!==this.focusedIndex&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){-1!==this.focusedIndex&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||0===this.elements.length)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),-1===this.focusedIndex&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function z(e){let t=g.Lx.Unknown;return(0,r.XD)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=g.Lx.Twistie:(0,r.XD)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=g.Lx.Element:(0,r.XD)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=g.Lx.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function U(e){const t=(0,d.Es)(e.browserEvent.target);return{element:e.element?e.element.element:null,browserEvent:e.browserEvent,anchor:e.anchor,isStickyScroll:t}}function j(e,t){t(e),e.children.forEach((e=>j(e,t)))}class q{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new b.vl,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&(0,p.aI)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>j(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>j(e,n)));const s=new Map,o=e=>s.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>j(e,o)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=s.get(t);e&&e.visible&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class K extends d.MH{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if((0,d.Bm)(e.browserEvent.target)||(0,d.B6)(e.browserEvent.target)||(0,d.bm)(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,s=(0,d.xu)(e.browserEvent.target);let o=!1;if(o=!!s||("function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick),s)this.handleStickyScrollMouseEvent(e,t);else{if(o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e)}if(t.collapsible&&(!s||n)){const i=this.tree.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,s),n)return void(e.browserEvent.isHandledByList=!0)}s||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if((0,d.b$)(e.browserEvent.target)||(0,d.W0)(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),s=this.list.getElementTop(n),o=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=s-o,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}onMouseDown(e){const t=e.browserEvent.target;(0,d.Es)(t)||(0,d.xu)(t)||super.onMouseDown(e)}onContextMenu(e){const t=e.browserEvent.target;(0,d.Es)(t)||(0,d.xu)(t)||super.onContextMenu(e)}}class $ extends d.B8{constructor(e,t,i,n,s,o,r,a){super(e,t,i,n,a),this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=r}createMouseController(e){return new K(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];let o;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i),this.anchorTrait.has(t)&&(o=e+i)})),n.length>0&&super.setFocus((0,p.dM)([...super.getFocus(),...n])),s.length>0&&super.setSelection((0,p.dM)([...super.getSelection(),...s])),"number"==typeof o&&super.setAnchor(o)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class G{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return b.Jh.filter(b.Jh.map(this.view.onMouseDblClick,z),(e=>e.target!==g.Lx.Filter))}get onMouseOver(){return b.Jh.map(this.view.onMouseOver,z)}get onMouseOut(){return b.Jh.map(this.view.onMouseOut,z)}get onContextMenu(){return b.Jh.any(b.Jh.filter(b.Jh.map(this.view.onContextMenu,U),(e=>!e.isStickyScroll)),this.stickyScrollController?.onContextMenu??b.Jh.None)}get onPointer(){return b.Jh.map(this.view.onPointer,z)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return b.Jh.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){return this.findController?.mode??s.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){return this.findController?.matchType??o.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,s,o={}){this._user=e,this._options=o,this.eventBufferer=new b.at,this.onDidChangeFindOpenState=b.Jh.None,this.onDidChangeStickyScrollFocused=b.Jh.None,this.disposables=new C.Cm,this._onWillRefilter=new b.vl,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new b.vl,this.treeDelegate=new I(i);const l=new b.Wj,c=new b.Wj,h=this.disposables.add(new M(c.event)),u=new v.db;this.renderers=s.map((e=>new T(e,(()=>this.model),l.event,h,u,o)));for(const e of this.renderers)this.disposables.add(e);let g;var p,m;o.keyboardNavigationLabelProvider&&(g=new R(this,o.keyboardNavigationLabelProvider,o.filter),o={...o,filter:g},this.disposables.add(g)),this.focus=new q((()=>this.view.getFocusedElements()[0]),o.identityProvider),this.selection=new q((()=>this.view.getSelectedElements()[0]),o.identityProvider),this.anchor=new q((()=>this.view.getAnchorElement()),o.identityProvider),this.view=new $(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...(p=()=>this.model,m=o,m&&{...m,identityProvider:m.identityProvider&&{getId(e){return m.identityProvider.getId(e.element)}},dnd:m.dnd&&new N(p,m.dnd),multipleSelectionController:m.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return m.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return m.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:m.accessibilityProvider&&{...m.accessibilityProvider,getSetSize(e){const t=p(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i);return t.getNode(n).visibleChildrenCount},getPosInSet(e){return e.visibleChildIndex+1},isChecked:m.accessibilityProvider&&m.accessibilityProvider.isChecked?e=>m.accessibilityProvider.isChecked(e.element):void 0,getRole:m.accessibilityProvider&&m.accessibilityProvider.getRole?e=>m.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel(e){return m.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return m.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:m.accessibilityProvider&&m.accessibilityProvider.getWidgetRole?()=>m.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:m.accessibilityProvider&&m.accessibilityProvider.getAriaLevel?e=>m.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:m.accessibilityProvider.getActiveDescendantId&&(e=>m.accessibilityProvider.getActiveDescendantId(e.element))},keyboardNavigationLabelProvider:m.keyboardNavigationLabelProvider&&{...m.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return m.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}}),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,o),l.input=this.model.onDidChangeCollapseState;const _=b.Jh.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);_((()=>null),null,this.disposables);const w=this.disposables.add(new b.vl),y=this.disposables.add(new f.ve(0));if(this.disposables.add(b.Jh.any(_,this.focus.onDidChange,this.selection.onDidChange)((()=>{y.trigger((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);w.fire([...e.values()])}))}))),c.input=w.event,!1!==o.keyboardSupport){const e=b.Jh.chain(this.view.onKeyDown,(e=>e.filter((e=>!(0,d.B6)(e.target))).map((e=>new a.Z(e)))));b.Jh.chain(e,(e=>e.filter((e=>15===e.keyCode))))(this.onLeftArrow,this,this.disposables),b.Jh.chain(e,(e=>e.filter((e=>17===e.keyCode))))(this.onRightArrow,this,this.disposables),b.Jh.chain(e,(e=>e.filter((e=>10===e.keyCode))))(this.onSpace,this,this.disposables)}if((o.findWidgetEnabled??1)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new P(this,this.model,this.view,g,o.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=b.Jh.None,this.onDidChangeFindMatchType=b.Jh.None;o.enableStickyScroll&&(this.stickyScrollController=new W(this,this.model,this.view,this.renderers,this.treeDelegate,o),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,r.li)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}updateOptions(e={}){this._options={...this._options,...e};for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new W(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=b.Jh.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t),(0,S.Et)(t)&&this.findController?.layout(t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const n=e.treeStickyScrollBackground??e.listBackground;n&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${n}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${n}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const s=(0,r.gI)(e.listFocusAndSelectionOutline,(0,r.gI)(e.listSelectionOutline,e.listFocusOutline??""));s&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}))}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}))}focusNext(e=1,t=!1,i,n=((0,r.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=((0,r.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=((0,r.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=((0,r.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusPreviousPage(e,t,(()=>this.stickyScrollController?.height??0))}focusLast(e,t=((0,r.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusLast(e,t)}focusFirst(e,t=((0,r.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(-1!==i)if(this.stickyScrollController){const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}else this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){(0,C.AS)(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose()}}},64476:function(e,t,i){"use strict";i.d(t,{G6:function(){return g},Mn:function(){return h},iZ:function(){return d}});var n=i(37345),s=i(97358),o=i(90890),r=i(4691),a=i(72491),l=i(80670),c=i(26182);function d(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function h(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function u(e){return"boolean"==typeof e.collapsible}class g{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new l.at,this._onDidChangeCollapseState=new l.vl,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new l.vl,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new l.vl,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new o.ve(r.h),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.allowNonCollapsibleParents=n.allowNonCollapsibleParents??!1,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=c.f.empty(),s={}){if(0===e.length)throw new n.jh(this.user,"Invalid tree location");s.diffIdentityProvider?this.spliceSmart(s.diffIdentityProvider,e,t,i,s):this.spliceSimple(e,t,i,s)}spliceSmart(e,t,i,n=c.f.empty(),s,o=s.diffDepth??0){const{parentNode:r}=this.getParentNodeWithListIndex(t);if(!r.lastDiffIds)return this.spliceSimple(t,i,n,s);const l=[...n],d=t[t.length-1],h=new a.uP({getElements:()=>r.lastDiffIds},{getElements:()=>[...r.children.slice(0,d),...l,...r.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(h.quitEarly)return r.lastDiffIds=void 0,this.spliceSimple(t,i,l,s);const u=t.slice(0,-1),g=(t,i,n)=>{if(o>0)for(let r=0;rt.originalStart-e.originalStart)))g(p,f,p-(e.originalStart+e.originalLength)),p=e.originalStart,f=e.modifiedStart-d,this.spliceSimple([...u,p],e.originalLength,c.f.slice(l,f,f+e.modifiedLength),s);g(p,f,p)}spliceSimple(e,t,i=c.f.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:h}=this.getParentNodeWithListIndex(e),u=[],g=c.f.map(i,(e=>this.createTreeNode(e,a,a.visible?1:0,d,u,n))),p=e[e.length-1];let f=0;for(let e=p;e>=0&&er.getId(e.element).toString()))):a.lastDiffIds=a.children.map((e=>r.getId(e.element).toString())):a.lastDiffIds=void 0;let w=0;for(const e of b)e.visible&&w++;if(0!==w)for(let e=p+m.length;ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(a,v-e),this.list.splice(l,e,u)}if(b.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};b.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:b});let C=a;for(;C;){if(2===C.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}C=C.parent}}rerender(e){if(0===e.length)throw new n.jh(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:s}=this.getTreeNodeWithListIndex(e);t.visible&&s&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,s)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),o=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&o&&!u(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return o}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const o=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=o-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(u(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!u(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,o){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&s.push(r);const l=e.children||c.f.empty(),d=n&&0!==a&&!r.collapsed;let h=0,u=1;for(const e of l){const t=this.createTreeNode(e,r,a,d,s,o);r.children.push(t),u+=t.renderNodeCount,t.visible&&(t.visibleChildIndex=h++)}return this.allowNonCollapsibleParents||(r.collapsible=r.collapsible||r.children.length>0),r.visibleChildrenCount=h,r.visible=2===a?h>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=u):(r.renderNodeCount=0,n&&s.pop()),o?.(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),0===s)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const o=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===s)e.visibleChildrenCount=0;else{let t=0;for(const o of e.children)r=this._updateNodeAfterFilterChange(o,s,i,n&&!e.collapsed)||r,o.visible&&(o.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===s?r:1===s,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-o):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):d(i)?(e.filterData=i.data,h(i.visibility)):(e.filterData=void 0,h(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...s]=e;if(i<0||i>t.children.length)throw new n.jh(this.user,"Invalid tree location");return this.getTreeNode(s,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:s,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new n.jh(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:s,visible:o&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,s=!0,o=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new n.jh(this.user,"Invalid tree location");for(let e=0;et(new o.P(n.zk(e),i)))))}onmousedown(e,t){this._register(n.ko(e,n.Bx.MOUSE_DOWN,(i=>t(new o.P(n.zk(e),i)))))}onmouseover(e,t){this._register(n.ko(e,n.Bx.MOUSE_OVER,(i=>t(new o.P(n.zk(e),i)))))}onmouseleave(e,t){this._register(n.ko(e,n.Bx.MOUSE_LEAVE,(i=>t(new o.P(n.zk(e),i)))))}onkeydown(e,t){this._register(n.ko(e,n.Bx.KEY_DOWN,(e=>t(new s.Z(e)))))}onkeyup(e,t){this._register(n.ko(e,n.Bx.KEY_UP,(e=>t(new s.Z(e)))))}oninput(e,t){this._register(n.ko(e,n.Bx.INPUT,t))}onblur(e,t){this._register(n.ko(e,n.Bx.BLUR,t))}onfocus(e,t){this._register(n.ko(e,n.Bx.FOCUS,t))}ignoreGesture(e){return r.q.ignoreTarget(e)}}},95601:function(e,t,i){"use strict";function n(e,t){const i=e;"number"!=typeof i.vscodeWindowId&&Object.defineProperty(i,"vscodeWindowId",{get:()=>t})}i.d(t,{G:function(){return s},y:function(){return n}});const s=window},30981:function(e,t,i){"use strict";i.d(t,{HJ:function(){return d},LN:function(){return a},YH:function(){return c},ih:function(){return h},rc:function(){return r},wv:function(){return l}});var n=i(80670),s=i(35114),o=i(14374);class r extends s.jG{constructor(e,t="",i="",s=!0,o){super(),this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=s,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}}class a extends s.jG{constructor(){super(...arguments),this._onWillRun=this._register(new n.vl),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new n.vl),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;let i;this._onWillRun.fire({action:e});try{await this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}async runAction(e,t){await e.run(t)}}class l{constructor(){this.id=l.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t=t.length?[...t,new l,...i]:i);return t}static{this.ID="vs.actions.separator"}async run(){}}class c{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}async run(){}}class d extends r{static{this.ID="vs.actions.empty"}constructor(){super(d.ID,o.kg("submenu.empty","(empty)"),void 0,!1)}}function h(e){return{id:e.id,label:e.label,tooltip:e.tooltip??e.label,class:e.class,enabled:e.enabled??!0,checked:e.checked,run:async(...t)=>e.run(...t)}}},97358:function(e,t,i){"use strict";function n(e,t=0){return e[e.length-(1+t)]}function s(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function o(e,t,i=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n0))return n;o=n-1}}return-(s+1)}(e.length)}function l(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],s=[],o=[],r=[];for(const e of t){const t=i(e,n);t<0?s.push(e):t>0?o.push(e):r.push(e)}return e!!e))}function p(e){let t=0;for(let i=0;i0}function _(e,t=e=>e){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function v(e,t){return e.length>0?e[0]:t}function b(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function w(e,t,i){const n=e.slice(0,t),s=e.slice(t);return n.concat(i,s)}function C(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function S(e,t){for(const i of t)e.push(i)}function k(e){return Array.isArray(e)?e:[e]}function x(e,t,i,n){const s=L(e,t);let o=e.splice(s,i);return void 0===o&&(o=[]),function(e,t,i){const n=L(e,t),s=e.length,o=i.length;e.length=s+o;for(let t=s-1;t>=n;t--)e[t+o]=e[t];for(let t=0;tt(e(i),e(n))}function N(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!D.isNeitherLessOrGreaterThan(e))return e}return D.neitherLessOrGreaterThan}}i.d(t,{$z:function(){return c},Ct:function(){return f},E4:function(){return S},EI:function(){return m},El:function(){return a},Fy:function(){return v},Hw:function(){return T},RT:function(){return n},SK:function(){return p},SO:function(){return l},TS:function(){return M},U9:function(){return I},UH:function(){return r},V4:function(){return x},VE:function(){return E},Yc:function(){return g},_A:function(){return C},_j:function(){return k},aI:function(){return o},bS:function(){return s},c1:function(){return P},dM:function(){return _},j3:function(){return R},kj:function(){return u},n:function(){return d},nH:function(){return N},nK:function(){return w},pN:function(){return h},r7:function(){return y},t9:function(){return A},y1:function(){return b}}),function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(D||(D={}));const I=(e,t)=>e-t,M=(e,t)=>I(e?1:0,t?1:0);function T(e){return(t,i)=>-e(t,i)}class R{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class P{static{this.empty=new P((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new P((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new P((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||D.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}class A{constructor(e){this._indexMap=e}static createSortPermutation(e,t){const i=Array.from(e.keys()).sort(((i,n)=>t(e[i],e[n])));return new A(i)}apply(e){return e.map(((t,i)=>e[this._indexMap[i]]))}inverse(){const e=this._indexMap.slice();for(let t=0;t=0;n--)if(t(e[n]))return n;return-1}(e,t);if(-1!==i)return e[i]}function s(e,t){const i=o(e,t);return-1===i?void 0:e[i]}function o(e,t,i=0,n=e.length){let s=i,o=n;for(;s0&&(i=s)}return i}function d(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=s)}return i}function h(e,t){return c(e,((e,i)=>-t(e,i)))}function u(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n0&&(i=n);return i}function g(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}},93066:function(e,t,i){"use strict";i.d(t,{Ft:function(){return a},V7:function(){return r},Xo:function(){return l},ok:function(){return s},xb:function(){return o}});var n=i(20187);function s(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function o(e,t="Unreachable"){throw new Error(t)}function r(e){e||(0,n.dz)(new n.D7("Soft Assertion Failed"))}function a(e){e()||(e(),(0,n.dz)(new n.D7("Assertion Failed")))}function l(e,t){let i=0;for(;i{const o=t.token.onCancellationRequested((()=>{o.dispose(),n(new s.AL)}));Promise.resolve(i).then((i=>{o.dispose(),t.dispose(),e(i)}),(e=>{o.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel(),t.dispose()}then(e,t){return o.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return o.finally(e)}}}function h(e,t,i){return new Promise(((n,s)=>{const o=t.onCancellationRequested((()=>{o.dispose(),n(i)}));e.then(n,s).finally((()=>o.dispose()))}))}class u{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}class g{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=t===l.h?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new s.AL),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}class p{constructor(e){this.delayer=new g(e),this.throttler=new u}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function f(e,t){return t?new Promise(((i,n)=>{const o=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(o),r.dispose(),n(new s.AL)}))})):d((t=>f(e,t)))}function m(e,t=0,i){const n=setTimeout((()=>{e(),i&&s.dispose()}),t),s=(0,r.s)((()=>{clearTimeout(n),i?.deleteAndLeak(s)}));return i?.add(s),s}function _(e,t=e=>!!e,i=null){let n=0;const s=e.length,o=()=>{if(n>=s)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):o()))};return o()}class v{constructor(e,t){this._isDisposed=!1,this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new s.D7("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){if(this._isDisposed)throw new s.D7("Calling 'setIfNotSet' on a disposed TimeoutTimer");-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class b{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new s.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const n=i.setInterval((()=>{e()}),t);this.disposable=(0,r.s)((()=>{i.clearInterval(n),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class w{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let C,y;y="function"!=typeof globalThis.requestIdleCallback||"function"!=typeof globalThis.cancelIdleCallback?(e,t)=>{(0,a._p)((()=>{if(i)return;const e=Date.now()+15,n={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(n))}));let i=!1;return{dispose(){i||(i=!0)}}}:(e,t,i)=>{const n=e.requestIdleCallback(t,"number"==typeof i?{timeout:i}:void 0);let s=!1;return{dispose(){s||(s=!0,e.cancelIdleCallback(n))}}},C=e=>y(globalThis,e);class S{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=y(e,(()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class k extends S{constructor(e){super(globalThis,e)}}class x{get isRejected(){return 1===this.outcome?.outcome}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new s.AL)}}var L;!function(e){e.settled=async function(e){let t;const i=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i},e.withAsyncBody=function(e){return new Promise((async(t,i)=>{try{await e(t,i)}catch(e){i(e)}}))}}(L||(L={}));class D{static fromArray(e){return new D((t=>{t.emitMany(e)}))}static fromPromise(e){return new D((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new D((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new D((async t=>{await Promise.all(e.map((async e=>{for await(const i of e)t.emitOne(i)})))}))}static{this.EMPTY=D.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new o.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new D((async i=>{for await(const n of e)i.emitOne(t(n))}))}map(e){return D.map(this,e)}static filter(e,t){return new D((async i=>{for await(const n of e)t(n)&&i.emitOne(n)}))}filter(e){return D.filter(this,e)}static coalesce(e){return D.filter(e,(e=>!!e))}coalesce(){return D.coalesce(this)}static async toPromise(e){const t=[];for await(const i of e)t.push(i);return t}toPromise(){return D.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}class E extends D{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function N(e){const t=new n.Qi,i=e(t.token);return new E(t,(async e=>{const n=t.token.onCancellationRequested((()=>{n.dispose(),t.dispose(),e.reject(new s.AL)}));try{for await(const n of i){if(t.token.isCancellationRequested)return;e.emitOne(n)}n.dispose(),t.dispose()}catch(i){n.dispose(),t.dispose(),e.reject(i)}}))}},28198:function(e,t,i){"use strict";i.d(t,{$l:function(){return a},Gs:function(){return u},MB:function(){return r},Sw:function(){return d},bb:function(){return c},gN:function(){return l},pJ:function(){return h}});var n=i(72582);const s="undefined"!=typeof Buffer;let o;new n.d((()=>new Uint8Array(256)));class r{static wrap(e){return s&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new r(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return s?this.buffer.toString():(o||(o=new TextDecoder),o.decode(this.buffer))}}function a(e,t){return(0|e[t+0])>>>0|e[t+1]<<8>>>0}function l(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function c(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function d(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function h(e,t){return e[t]}function u(e,t,i){e[i]=t}},44808:function(e,t,i){"use strict";function n(e){return e}i.d(t,{VV:function(){return o},o5:function(){return s}});class s{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof e?(this._fn=e,this._computeKey=n):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class o{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"==typeof e?(this._fn=e,this._computeKey=n):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const i=this._fn(e);return this._map.set(e,i),this._map2.set(t,i),i}}},76611:function(e,t,i){"use strict";i.d(t,{Qi:function(){return a},XO:function(){return o},bs:function(){return l}});var n=i(80670);const s=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var o;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof r||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s})}(o||(o={}));class r{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new n.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=o.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=o.None}}function l(e){const t=new a;return e.add({dispose(){t.cancel()}}),t.token}},93231:function(e,t,i){"use strict";i.d(t,{W:function(){return s}});var n=i(81040);const s={add:(0,n.k)("add",6e4),plus:(0,n.k)("plus",6e4),gistNew:(0,n.k)("gist-new",6e4),repoCreate:(0,n.k)("repo-create",6e4),lightbulb:(0,n.k)("lightbulb",60001),lightBulb:(0,n.k)("light-bulb",60001),repo:(0,n.k)("repo",60002),repoDelete:(0,n.k)("repo-delete",60002),gistFork:(0,n.k)("gist-fork",60003),repoForked:(0,n.k)("repo-forked",60003),gitPullRequest:(0,n.k)("git-pull-request",60004),gitPullRequestAbandoned:(0,n.k)("git-pull-request-abandoned",60004),recordKeys:(0,n.k)("record-keys",60005),keyboard:(0,n.k)("keyboard",60005),tag:(0,n.k)("tag",60006),gitPullRequestLabel:(0,n.k)("git-pull-request-label",60006),tagAdd:(0,n.k)("tag-add",60006),tagRemove:(0,n.k)("tag-remove",60006),person:(0,n.k)("person",60007),personFollow:(0,n.k)("person-follow",60007),personOutline:(0,n.k)("person-outline",60007),personFilled:(0,n.k)("person-filled",60007),gitBranch:(0,n.k)("git-branch",60008),gitBranchCreate:(0,n.k)("git-branch-create",60008),gitBranchDelete:(0,n.k)("git-branch-delete",60008),sourceControl:(0,n.k)("source-control",60008),mirror:(0,n.k)("mirror",60009),mirrorPublic:(0,n.k)("mirror-public",60009),star:(0,n.k)("star",60010),starAdd:(0,n.k)("star-add",60010),starDelete:(0,n.k)("star-delete",60010),starEmpty:(0,n.k)("star-empty",60010),comment:(0,n.k)("comment",60011),commentAdd:(0,n.k)("comment-add",60011),alert:(0,n.k)("alert",60012),warning:(0,n.k)("warning",60012),search:(0,n.k)("search",60013),searchSave:(0,n.k)("search-save",60013),logOut:(0,n.k)("log-out",60014),signOut:(0,n.k)("sign-out",60014),logIn:(0,n.k)("log-in",60015),signIn:(0,n.k)("sign-in",60015),eye:(0,n.k)("eye",60016),eyeUnwatch:(0,n.k)("eye-unwatch",60016),eyeWatch:(0,n.k)("eye-watch",60016),circleFilled:(0,n.k)("circle-filled",60017),primitiveDot:(0,n.k)("primitive-dot",60017),closeDirty:(0,n.k)("close-dirty",60017),debugBreakpoint:(0,n.k)("debug-breakpoint",60017),debugBreakpointDisabled:(0,n.k)("debug-breakpoint-disabled",60017),debugHint:(0,n.k)("debug-hint",60017),terminalDecorationSuccess:(0,n.k)("terminal-decoration-success",60017),primitiveSquare:(0,n.k)("primitive-square",60018),edit:(0,n.k)("edit",60019),pencil:(0,n.k)("pencil",60019),info:(0,n.k)("info",60020),issueOpened:(0,n.k)("issue-opened",60020),gistPrivate:(0,n.k)("gist-private",60021),gitForkPrivate:(0,n.k)("git-fork-private",60021),lock:(0,n.k)("lock",60021),mirrorPrivate:(0,n.k)("mirror-private",60021),close:(0,n.k)("close",60022),removeClose:(0,n.k)("remove-close",60022),x:(0,n.k)("x",60022),repoSync:(0,n.k)("repo-sync",60023),sync:(0,n.k)("sync",60023),clone:(0,n.k)("clone",60024),desktopDownload:(0,n.k)("desktop-download",60024),beaker:(0,n.k)("beaker",60025),microscope:(0,n.k)("microscope",60025),vm:(0,n.k)("vm",60026),deviceDesktop:(0,n.k)("device-desktop",60026),file:(0,n.k)("file",60027),fileText:(0,n.k)("file-text",60027),more:(0,n.k)("more",60028),ellipsis:(0,n.k)("ellipsis",60028),kebabHorizontal:(0,n.k)("kebab-horizontal",60028),mailReply:(0,n.k)("mail-reply",60029),reply:(0,n.k)("reply",60029),organization:(0,n.k)("organization",60030),organizationFilled:(0,n.k)("organization-filled",60030),organizationOutline:(0,n.k)("organization-outline",60030),newFile:(0,n.k)("new-file",60031),fileAdd:(0,n.k)("file-add",60031),newFolder:(0,n.k)("new-folder",60032),fileDirectoryCreate:(0,n.k)("file-directory-create",60032),trash:(0,n.k)("trash",60033),trashcan:(0,n.k)("trashcan",60033),history:(0,n.k)("history",60034),clock:(0,n.k)("clock",60034),folder:(0,n.k)("folder",60035),fileDirectory:(0,n.k)("file-directory",60035),symbolFolder:(0,n.k)("symbol-folder",60035),logoGithub:(0,n.k)("logo-github",60036),markGithub:(0,n.k)("mark-github",60036),github:(0,n.k)("github",60036),terminal:(0,n.k)("terminal",60037),console:(0,n.k)("console",60037),repl:(0,n.k)("repl",60037),zap:(0,n.k)("zap",60038),symbolEvent:(0,n.k)("symbol-event",60038),error:(0,n.k)("error",60039),stop:(0,n.k)("stop",60039),variable:(0,n.k)("variable",60040),symbolVariable:(0,n.k)("symbol-variable",60040),array:(0,n.k)("array",60042),symbolArray:(0,n.k)("symbol-array",60042),symbolModule:(0,n.k)("symbol-module",60043),symbolPackage:(0,n.k)("symbol-package",60043),symbolNamespace:(0,n.k)("symbol-namespace",60043),symbolObject:(0,n.k)("symbol-object",60043),symbolMethod:(0,n.k)("symbol-method",60044),symbolFunction:(0,n.k)("symbol-function",60044),symbolConstructor:(0,n.k)("symbol-constructor",60044),symbolBoolean:(0,n.k)("symbol-boolean",60047),symbolNull:(0,n.k)("symbol-null",60047),symbolNumeric:(0,n.k)("symbol-numeric",60048),symbolNumber:(0,n.k)("symbol-number",60048),symbolStructure:(0,n.k)("symbol-structure",60049),symbolStruct:(0,n.k)("symbol-struct",60049),symbolParameter:(0,n.k)("symbol-parameter",60050),symbolTypeParameter:(0,n.k)("symbol-type-parameter",60050),symbolKey:(0,n.k)("symbol-key",60051),symbolText:(0,n.k)("symbol-text",60051),symbolReference:(0,n.k)("symbol-reference",60052),goToFile:(0,n.k)("go-to-file",60052),symbolEnum:(0,n.k)("symbol-enum",60053),symbolValue:(0,n.k)("symbol-value",60053),symbolRuler:(0,n.k)("symbol-ruler",60054),symbolUnit:(0,n.k)("symbol-unit",60054),activateBreakpoints:(0,n.k)("activate-breakpoints",60055),archive:(0,n.k)("archive",60056),arrowBoth:(0,n.k)("arrow-both",60057),arrowDown:(0,n.k)("arrow-down",60058),arrowLeft:(0,n.k)("arrow-left",60059),arrowRight:(0,n.k)("arrow-right",60060),arrowSmallDown:(0,n.k)("arrow-small-down",60061),arrowSmallLeft:(0,n.k)("arrow-small-left",60062),arrowSmallRight:(0,n.k)("arrow-small-right",60063),arrowSmallUp:(0,n.k)("arrow-small-up",60064),arrowUp:(0,n.k)("arrow-up",60065),bell:(0,n.k)("bell",60066),bold:(0,n.k)("bold",60067),book:(0,n.k)("book",60068),bookmark:(0,n.k)("bookmark",60069),debugBreakpointConditionalUnverified:(0,n.k)("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:(0,n.k)("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:(0,n.k)("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:(0,n.k)("debug-breakpoint-data-unverified",60072),debugBreakpointData:(0,n.k)("debug-breakpoint-data",60073),debugBreakpointDataDisabled:(0,n.k)("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:(0,n.k)("debug-breakpoint-log-unverified",60074),debugBreakpointLog:(0,n.k)("debug-breakpoint-log",60075),debugBreakpointLogDisabled:(0,n.k)("debug-breakpoint-log-disabled",60075),briefcase:(0,n.k)("briefcase",60076),broadcast:(0,n.k)("broadcast",60077),browser:(0,n.k)("browser",60078),bug:(0,n.k)("bug",60079),calendar:(0,n.k)("calendar",60080),caseSensitive:(0,n.k)("case-sensitive",60081),check:(0,n.k)("check",60082),checklist:(0,n.k)("checklist",60083),chevronDown:(0,n.k)("chevron-down",60084),chevronLeft:(0,n.k)("chevron-left",60085),chevronRight:(0,n.k)("chevron-right",60086),chevronUp:(0,n.k)("chevron-up",60087),chromeClose:(0,n.k)("chrome-close",60088),chromeMaximize:(0,n.k)("chrome-maximize",60089),chromeMinimize:(0,n.k)("chrome-minimize",60090),chromeRestore:(0,n.k)("chrome-restore",60091),circleOutline:(0,n.k)("circle-outline",60092),circle:(0,n.k)("circle",60092),debugBreakpointUnverified:(0,n.k)("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:(0,n.k)("terminal-decoration-incomplete",60092),circleSlash:(0,n.k)("circle-slash",60093),circuitBoard:(0,n.k)("circuit-board",60094),clearAll:(0,n.k)("clear-all",60095),clippy:(0,n.k)("clippy",60096),closeAll:(0,n.k)("close-all",60097),cloudDownload:(0,n.k)("cloud-download",60098),cloudUpload:(0,n.k)("cloud-upload",60099),code:(0,n.k)("code",60100),collapseAll:(0,n.k)("collapse-all",60101),colorMode:(0,n.k)("color-mode",60102),commentDiscussion:(0,n.k)("comment-discussion",60103),creditCard:(0,n.k)("credit-card",60105),dash:(0,n.k)("dash",60108),dashboard:(0,n.k)("dashboard",60109),database:(0,n.k)("database",60110),debugContinue:(0,n.k)("debug-continue",60111),debugDisconnect:(0,n.k)("debug-disconnect",60112),debugPause:(0,n.k)("debug-pause",60113),debugRestart:(0,n.k)("debug-restart",60114),debugStart:(0,n.k)("debug-start",60115),debugStepInto:(0,n.k)("debug-step-into",60116),debugStepOut:(0,n.k)("debug-step-out",60117),debugStepOver:(0,n.k)("debug-step-over",60118),debugStop:(0,n.k)("debug-stop",60119),debug:(0,n.k)("debug",60120),deviceCameraVideo:(0,n.k)("device-camera-video",60121),deviceCamera:(0,n.k)("device-camera",60122),deviceMobile:(0,n.k)("device-mobile",60123),diffAdded:(0,n.k)("diff-added",60124),diffIgnored:(0,n.k)("diff-ignored",60125),diffModified:(0,n.k)("diff-modified",60126),diffRemoved:(0,n.k)("diff-removed",60127),diffRenamed:(0,n.k)("diff-renamed",60128),diff:(0,n.k)("diff",60129),diffSidebyside:(0,n.k)("diff-sidebyside",60129),discard:(0,n.k)("discard",60130),editorLayout:(0,n.k)("editor-layout",60131),emptyWindow:(0,n.k)("empty-window",60132),exclude:(0,n.k)("exclude",60133),extensions:(0,n.k)("extensions",60134),eyeClosed:(0,n.k)("eye-closed",60135),fileBinary:(0,n.k)("file-binary",60136),fileCode:(0,n.k)("file-code",60137),fileMedia:(0,n.k)("file-media",60138),filePdf:(0,n.k)("file-pdf",60139),fileSubmodule:(0,n.k)("file-submodule",60140),fileSymlinkDirectory:(0,n.k)("file-symlink-directory",60141),fileSymlinkFile:(0,n.k)("file-symlink-file",60142),fileZip:(0,n.k)("file-zip",60143),files:(0,n.k)("files",60144),filter:(0,n.k)("filter",60145),flame:(0,n.k)("flame",60146),foldDown:(0,n.k)("fold-down",60147),foldUp:(0,n.k)("fold-up",60148),fold:(0,n.k)("fold",60149),folderActive:(0,n.k)("folder-active",60150),folderOpened:(0,n.k)("folder-opened",60151),gear:(0,n.k)("gear",60152),gift:(0,n.k)("gift",60153),gistSecret:(0,n.k)("gist-secret",60154),gist:(0,n.k)("gist",60155),gitCommit:(0,n.k)("git-commit",60156),gitCompare:(0,n.k)("git-compare",60157),compareChanges:(0,n.k)("compare-changes",60157),gitMerge:(0,n.k)("git-merge",60158),githubAction:(0,n.k)("github-action",60159),githubAlt:(0,n.k)("github-alt",60160),globe:(0,n.k)("globe",60161),grabber:(0,n.k)("grabber",60162),graph:(0,n.k)("graph",60163),gripper:(0,n.k)("gripper",60164),heart:(0,n.k)("heart",60165),home:(0,n.k)("home",60166),horizontalRule:(0,n.k)("horizontal-rule",60167),hubot:(0,n.k)("hubot",60168),inbox:(0,n.k)("inbox",60169),issueReopened:(0,n.k)("issue-reopened",60171),issues:(0,n.k)("issues",60172),italic:(0,n.k)("italic",60173),jersey:(0,n.k)("jersey",60174),json:(0,n.k)("json",60175),kebabVertical:(0,n.k)("kebab-vertical",60176),key:(0,n.k)("key",60177),law:(0,n.k)("law",60178),lightbulbAutofix:(0,n.k)("lightbulb-autofix",60179),linkExternal:(0,n.k)("link-external",60180),link:(0,n.k)("link",60181),listOrdered:(0,n.k)("list-ordered",60182),listUnordered:(0,n.k)("list-unordered",60183),liveShare:(0,n.k)("live-share",60184),loading:(0,n.k)("loading",60185),location:(0,n.k)("location",60186),mailRead:(0,n.k)("mail-read",60187),mail:(0,n.k)("mail",60188),markdown:(0,n.k)("markdown",60189),megaphone:(0,n.k)("megaphone",60190),mention:(0,n.k)("mention",60191),milestone:(0,n.k)("milestone",60192),gitPullRequestMilestone:(0,n.k)("git-pull-request-milestone",60192),mortarBoard:(0,n.k)("mortar-board",60193),move:(0,n.k)("move",60194),multipleWindows:(0,n.k)("multiple-windows",60195),mute:(0,n.k)("mute",60196),noNewline:(0,n.k)("no-newline",60197),note:(0,n.k)("note",60198),octoface:(0,n.k)("octoface",60199),openPreview:(0,n.k)("open-preview",60200),package:(0,n.k)("package",60201),paintcan:(0,n.k)("paintcan",60202),pin:(0,n.k)("pin",60203),play:(0,n.k)("play",60204),run:(0,n.k)("run",60204),plug:(0,n.k)("plug",60205),preserveCase:(0,n.k)("preserve-case",60206),preview:(0,n.k)("preview",60207),project:(0,n.k)("project",60208),pulse:(0,n.k)("pulse",60209),question:(0,n.k)("question",60210),quote:(0,n.k)("quote",60211),radioTower:(0,n.k)("radio-tower",60212),reactions:(0,n.k)("reactions",60213),references:(0,n.k)("references",60214),refresh:(0,n.k)("refresh",60215),regex:(0,n.k)("regex",60216),remoteExplorer:(0,n.k)("remote-explorer",60217),remote:(0,n.k)("remote",60218),remove:(0,n.k)("remove",60219),replaceAll:(0,n.k)("replace-all",60220),replace:(0,n.k)("replace",60221),repoClone:(0,n.k)("repo-clone",60222),repoForcePush:(0,n.k)("repo-force-push",60223),repoPull:(0,n.k)("repo-pull",60224),repoPush:(0,n.k)("repo-push",60225),report:(0,n.k)("report",60226),requestChanges:(0,n.k)("request-changes",60227),rocket:(0,n.k)("rocket",60228),rootFolderOpened:(0,n.k)("root-folder-opened",60229),rootFolder:(0,n.k)("root-folder",60230),rss:(0,n.k)("rss",60231),ruby:(0,n.k)("ruby",60232),saveAll:(0,n.k)("save-all",60233),saveAs:(0,n.k)("save-as",60234),save:(0,n.k)("save",60235),screenFull:(0,n.k)("screen-full",60236),screenNormal:(0,n.k)("screen-normal",60237),searchStop:(0,n.k)("search-stop",60238),server:(0,n.k)("server",60240),settingsGear:(0,n.k)("settings-gear",60241),settings:(0,n.k)("settings",60242),shield:(0,n.k)("shield",60243),smiley:(0,n.k)("smiley",60244),sortPrecedence:(0,n.k)("sort-precedence",60245),splitHorizontal:(0,n.k)("split-horizontal",60246),splitVertical:(0,n.k)("split-vertical",60247),squirrel:(0,n.k)("squirrel",60248),starFull:(0,n.k)("star-full",60249),starHalf:(0,n.k)("star-half",60250),symbolClass:(0,n.k)("symbol-class",60251),symbolColor:(0,n.k)("symbol-color",60252),symbolConstant:(0,n.k)("symbol-constant",60253),symbolEnumMember:(0,n.k)("symbol-enum-member",60254),symbolField:(0,n.k)("symbol-field",60255),symbolFile:(0,n.k)("symbol-file",60256),symbolInterface:(0,n.k)("symbol-interface",60257),symbolKeyword:(0,n.k)("symbol-keyword",60258),symbolMisc:(0,n.k)("symbol-misc",60259),symbolOperator:(0,n.k)("symbol-operator",60260),symbolProperty:(0,n.k)("symbol-property",60261),wrench:(0,n.k)("wrench",60261),wrenchSubaction:(0,n.k)("wrench-subaction",60261),symbolSnippet:(0,n.k)("symbol-snippet",60262),tasklist:(0,n.k)("tasklist",60263),telescope:(0,n.k)("telescope",60264),textSize:(0,n.k)("text-size",60265),threeBars:(0,n.k)("three-bars",60266),thumbsdown:(0,n.k)("thumbsdown",60267),thumbsup:(0,n.k)("thumbsup",60268),tools:(0,n.k)("tools",60269),triangleDown:(0,n.k)("triangle-down",60270),triangleLeft:(0,n.k)("triangle-left",60271),triangleRight:(0,n.k)("triangle-right",60272),triangleUp:(0,n.k)("triangle-up",60273),twitter:(0,n.k)("twitter",60274),unfold:(0,n.k)("unfold",60275),unlock:(0,n.k)("unlock",60276),unmute:(0,n.k)("unmute",60277),unverified:(0,n.k)("unverified",60278),verified:(0,n.k)("verified",60279),versions:(0,n.k)("versions",60280),vmActive:(0,n.k)("vm-active",60281),vmOutline:(0,n.k)("vm-outline",60282),vmRunning:(0,n.k)("vm-running",60283),watch:(0,n.k)("watch",60284),whitespace:(0,n.k)("whitespace",60285),wholeWord:(0,n.k)("whole-word",60286),window:(0,n.k)("window",60287),wordWrap:(0,n.k)("word-wrap",60288),zoomIn:(0,n.k)("zoom-in",60289),zoomOut:(0,n.k)("zoom-out",60290),listFilter:(0,n.k)("list-filter",60291),listFlat:(0,n.k)("list-flat",60292),listSelection:(0,n.k)("list-selection",60293),selection:(0,n.k)("selection",60293),listTree:(0,n.k)("list-tree",60294),debugBreakpointFunctionUnverified:(0,n.k)("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:(0,n.k)("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:(0,n.k)("debug-breakpoint-function-disabled",60296),debugStackframeActive:(0,n.k)("debug-stackframe-active",60297),circleSmallFilled:(0,n.k)("circle-small-filled",60298),debugStackframeDot:(0,n.k)("debug-stackframe-dot",60298),terminalDecorationMark:(0,n.k)("terminal-decoration-mark",60298),debugStackframe:(0,n.k)("debug-stackframe",60299),debugStackframeFocused:(0,n.k)("debug-stackframe-focused",60299),debugBreakpointUnsupported:(0,n.k)("debug-breakpoint-unsupported",60300),symbolString:(0,n.k)("symbol-string",60301),debugReverseContinue:(0,n.k)("debug-reverse-continue",60302),debugStepBack:(0,n.k)("debug-step-back",60303),debugRestartFrame:(0,n.k)("debug-restart-frame",60304),debugAlt:(0,n.k)("debug-alt",60305),callIncoming:(0,n.k)("call-incoming",60306),callOutgoing:(0,n.k)("call-outgoing",60307),menu:(0,n.k)("menu",60308),expandAll:(0,n.k)("expand-all",60309),feedback:(0,n.k)("feedback",60310),gitPullRequestReviewer:(0,n.k)("git-pull-request-reviewer",60310),groupByRefType:(0,n.k)("group-by-ref-type",60311),ungroupByRefType:(0,n.k)("ungroup-by-ref-type",60312),account:(0,n.k)("account",60313),gitPullRequestAssignee:(0,n.k)("git-pull-request-assignee",60313),bellDot:(0,n.k)("bell-dot",60314),debugConsole:(0,n.k)("debug-console",60315),library:(0,n.k)("library",60316),output:(0,n.k)("output",60317),runAll:(0,n.k)("run-all",60318),syncIgnored:(0,n.k)("sync-ignored",60319),pinned:(0,n.k)("pinned",60320),githubInverted:(0,n.k)("github-inverted",60321),serverProcess:(0,n.k)("server-process",60322),serverEnvironment:(0,n.k)("server-environment",60323),pass:(0,n.k)("pass",60324),issueClosed:(0,n.k)("issue-closed",60324),stopCircle:(0,n.k)("stop-circle",60325),playCircle:(0,n.k)("play-circle",60326),record:(0,n.k)("record",60327),debugAltSmall:(0,n.k)("debug-alt-small",60328),vmConnect:(0,n.k)("vm-connect",60329),cloud:(0,n.k)("cloud",60330),merge:(0,n.k)("merge",60331),export:(0,n.k)("export",60332),graphLeft:(0,n.k)("graph-left",60333),magnet:(0,n.k)("magnet",60334),notebook:(0,n.k)("notebook",60335),redo:(0,n.k)("redo",60336),checkAll:(0,n.k)("check-all",60337),pinnedDirty:(0,n.k)("pinned-dirty",60338),passFilled:(0,n.k)("pass-filled",60339),circleLargeFilled:(0,n.k)("circle-large-filled",60340),circleLarge:(0,n.k)("circle-large",60341),circleLargeOutline:(0,n.k)("circle-large-outline",60341),combine:(0,n.k)("combine",60342),gather:(0,n.k)("gather",60342),table:(0,n.k)("table",60343),variableGroup:(0,n.k)("variable-group",60344),typeHierarchy:(0,n.k)("type-hierarchy",60345),typeHierarchySub:(0,n.k)("type-hierarchy-sub",60346),typeHierarchySuper:(0,n.k)("type-hierarchy-super",60347),gitPullRequestCreate:(0,n.k)("git-pull-request-create",60348),runAbove:(0,n.k)("run-above",60349),runBelow:(0,n.k)("run-below",60350),notebookTemplate:(0,n.k)("notebook-template",60351),debugRerun:(0,n.k)("debug-rerun",60352),workspaceTrusted:(0,n.k)("workspace-trusted",60353),workspaceUntrusted:(0,n.k)("workspace-untrusted",60354),workspaceUnknown:(0,n.k)("workspace-unknown",60355),terminalCmd:(0,n.k)("terminal-cmd",60356),terminalDebian:(0,n.k)("terminal-debian",60357),terminalLinux:(0,n.k)("terminal-linux",60358),terminalPowershell:(0,n.k)("terminal-powershell",60359),terminalTmux:(0,n.k)("terminal-tmux",60360),terminalUbuntu:(0,n.k)("terminal-ubuntu",60361),terminalBash:(0,n.k)("terminal-bash",60362),arrowSwap:(0,n.k)("arrow-swap",60363),copy:(0,n.k)("copy",60364),personAdd:(0,n.k)("person-add",60365),filterFilled:(0,n.k)("filter-filled",60366),wand:(0,n.k)("wand",60367),debugLineByLine:(0,n.k)("debug-line-by-line",60368),inspect:(0,n.k)("inspect",60369),layers:(0,n.k)("layers",60370),layersDot:(0,n.k)("layers-dot",60371),layersActive:(0,n.k)("layers-active",60372),compass:(0,n.k)("compass",60373),compassDot:(0,n.k)("compass-dot",60374),compassActive:(0,n.k)("compass-active",60375),azure:(0,n.k)("azure",60376),issueDraft:(0,n.k)("issue-draft",60377),gitPullRequestClosed:(0,n.k)("git-pull-request-closed",60378),gitPullRequestDraft:(0,n.k)("git-pull-request-draft",60379),debugAll:(0,n.k)("debug-all",60380),debugCoverage:(0,n.k)("debug-coverage",60381),runErrors:(0,n.k)("run-errors",60382),folderLibrary:(0,n.k)("folder-library",60383),debugContinueSmall:(0,n.k)("debug-continue-small",60384),beakerStop:(0,n.k)("beaker-stop",60385),graphLine:(0,n.k)("graph-line",60386),graphScatter:(0,n.k)("graph-scatter",60387),pieChart:(0,n.k)("pie-chart",60388),bracket:(0,n.k)("bracket",60175),bracketDot:(0,n.k)("bracket-dot",60389),bracketError:(0,n.k)("bracket-error",60390),lockSmall:(0,n.k)("lock-small",60391),azureDevops:(0,n.k)("azure-devops",60392),verifiedFilled:(0,n.k)("verified-filled",60393),newline:(0,n.k)("newline",60394),layout:(0,n.k)("layout",60395),layoutActivitybarLeft:(0,n.k)("layout-activitybar-left",60396),layoutActivitybarRight:(0,n.k)("layout-activitybar-right",60397),layoutPanelLeft:(0,n.k)("layout-panel-left",60398),layoutPanelCenter:(0,n.k)("layout-panel-center",60399),layoutPanelJustify:(0,n.k)("layout-panel-justify",60400),layoutPanelRight:(0,n.k)("layout-panel-right",60401),layoutPanel:(0,n.k)("layout-panel",60402),layoutSidebarLeft:(0,n.k)("layout-sidebar-left",60403),layoutSidebarRight:(0,n.k)("layout-sidebar-right",60404),layoutStatusbar:(0,n.k)("layout-statusbar",60405),layoutMenubar:(0,n.k)("layout-menubar",60406),layoutCentered:(0,n.k)("layout-centered",60407),target:(0,n.k)("target",60408),indent:(0,n.k)("indent",60409),recordSmall:(0,n.k)("record-small",60410),errorSmall:(0,n.k)("error-small",60411),terminalDecorationError:(0,n.k)("terminal-decoration-error",60411),arrowCircleDown:(0,n.k)("arrow-circle-down",60412),arrowCircleLeft:(0,n.k)("arrow-circle-left",60413),arrowCircleRight:(0,n.k)("arrow-circle-right",60414),arrowCircleUp:(0,n.k)("arrow-circle-up",60415),layoutSidebarRightOff:(0,n.k)("layout-sidebar-right-off",60416),layoutPanelOff:(0,n.k)("layout-panel-off",60417),layoutSidebarLeftOff:(0,n.k)("layout-sidebar-left-off",60418),blank:(0,n.k)("blank",60419),heartFilled:(0,n.k)("heart-filled",60420),map:(0,n.k)("map",60421),mapHorizontal:(0,n.k)("map-horizontal",60421),foldHorizontal:(0,n.k)("fold-horizontal",60421),mapFilled:(0,n.k)("map-filled",60422),mapHorizontalFilled:(0,n.k)("map-horizontal-filled",60422),foldHorizontalFilled:(0,n.k)("fold-horizontal-filled",60422),circleSmall:(0,n.k)("circle-small",60423),bellSlash:(0,n.k)("bell-slash",60424),bellSlashDot:(0,n.k)("bell-slash-dot",60425),commentUnresolved:(0,n.k)("comment-unresolved",60426),gitPullRequestGoToChanges:(0,n.k)("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:(0,n.k)("git-pull-request-new-changes",60428),searchFuzzy:(0,n.k)("search-fuzzy",60429),commentDraft:(0,n.k)("comment-draft",60430),send:(0,n.k)("send",60431),sparkle:(0,n.k)("sparkle",60432),insert:(0,n.k)("insert",60433),mic:(0,n.k)("mic",60434),thumbsdownFilled:(0,n.k)("thumbsdown-filled",60435),thumbsupFilled:(0,n.k)("thumbsup-filled",60436),coffee:(0,n.k)("coffee",60437),snake:(0,n.k)("snake",60438),game:(0,n.k)("game",60439),vr:(0,n.k)("vr",60440),chip:(0,n.k)("chip",60441),piano:(0,n.k)("piano",60442),music:(0,n.k)("music",60443),micFilled:(0,n.k)("mic-filled",60444),repoFetch:(0,n.k)("repo-fetch",60445),copilot:(0,n.k)("copilot",60446),lightbulbSparkle:(0,n.k)("lightbulb-sparkle",60447),robot:(0,n.k)("robot",60448),sparkleFilled:(0,n.k)("sparkle-filled",60449),diffSingle:(0,n.k)("diff-single",60450),diffMultiple:(0,n.k)("diff-multiple",60451),surroundWith:(0,n.k)("surround-with",60452),share:(0,n.k)("share",60453),gitStash:(0,n.k)("git-stash",60454),gitStashApply:(0,n.k)("git-stash-apply",60455),gitStashPop:(0,n.k)("git-stash-pop",60456),vscode:(0,n.k)("vscode",60457),vscodeInsiders:(0,n.k)("vscode-insiders",60458),codeOss:(0,n.k)("code-oss",60459),runCoverage:(0,n.k)("run-coverage",60460),runAllCoverage:(0,n.k)("run-all-coverage",60461),coverage:(0,n.k)("coverage",60462),githubProject:(0,n.k)("github-project",60463),mapVertical:(0,n.k)("map-vertical",60464),foldVertical:(0,n.k)("fold-vertical",60464),mapVerticalFilled:(0,n.k)("map-vertical-filled",60465),foldVerticalFilled:(0,n.k)("fold-vertical-filled",60465),goToSearch:(0,n.k)("go-to-search",60466),percentage:(0,n.k)("percentage",60467),sortPercentage:(0,n.k)("sort-percentage",60467),attach:(0,n.k)("attach",60468),dialogError:(0,n.k)("dialog-error","error"),dialogWarning:(0,n.k)("dialog-warning","warning"),dialogInfo:(0,n.k)("dialog-info","info"),dialogClose:(0,n.k)("dialog-close","close"),treeItemExpanded:(0,n.k)("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:(0,n.k)("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:(0,n.k)("tree-filter-on-type-off","list-selection"),treeFilterClear:(0,n.k)("tree-filter-clear","close"),treeItemLoading:(0,n.k)("tree-item-loading","loading"),menuSelection:(0,n.k)("menu-selection","check"),menuSubmenu:(0,n.k)("menu-submenu","chevron-right"),menuBarMore:(0,n.k)("menubar-more","more"),scrollbarButtonLeft:(0,n.k)("scrollbar-button-left","triangle-left"),scrollbarButtonRight:(0,n.k)("scrollbar-button-right","triangle-right"),scrollbarButtonUp:(0,n.k)("scrollbar-button-up","triangle-up"),scrollbarButtonDown:(0,n.k)("scrollbar-button-down","triangle-down"),toolBarMore:(0,n.k)("toolbar-more","more"),quickInputBack:(0,n.k)("quick-input-back","arrow-left"),dropDownButton:(0,n.k)("drop-down-button",60084),symbolCustomColor:(0,n.k)("symbol-customcolor",60252),exportIcon:(0,n.k)("export",60332),workspaceUnspecified:(0,n.k)("workspace-unspecified",60355),newLine:(0,n.k)("newline",60394),thumbsDownFilled:(0,n.k)("thumbsdown-filled",60435),thumbsUpFilled:(0,n.k)("thumbsup-filled",60436),gitFetch:(0,n.k)("git-fetch",60445),lightbulbSparkleAutofix:(0,n.k)("lightbulb-sparkle-autofix",60447),debugBreakpointPending:(0,n.k)("debug-breakpoint-pending",60377)}},81040:function(e,t,i){"use strict";i.d(t,{J:function(){return r},k:function(){return o}});var n=i(24219);const s=Object.create(null);function o(e,t){if((0,n.Kg)(t)){const i=s[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return s[e]=t,{id:e}}function r(){return s}},34027:function(e,t,i){"use strict";function n(e,t){const i=[],n=[];for(const n of e)t.has(n)||i.push(n);for(const i of t)e.has(i)||n.push(i);return{removed:i,added:n}}function s(e,t){const i=new Set;for(const n of t)e.has(n)&&i.add(n);return i}i.d(t,{E:function(){return s},Z:function(){return n}})},59321:function(e,t,i){"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{$J:function(){return r},Q1:function(){return a},bU:function(){return s},hB:function(){return o}});class s{constructor(e,t,i,s=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class o{constructor(e,t,i,s){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const d=(a+r)/2,h=r-a;if(h>0){switch(c=Math.min(d<=.5?h/(2*d):h/(2-2*d),1),r){case t:l=(i-n)/h+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,c;if(0===i)a=l=c=n;else{const e=n<.5?n*(1+i):n+i-n*i,s=2*n-e;a=o._hue2rgb(s,e,t+1/3),l=o._hue2rgb(s,e,t),c=o._hue2rgb(s,e,t-1/3)}return new s(Math.round(255*a),Math.round(255*l),Math.round(255*c),r)}}class r{constructor(e,t,i,s){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),o=s-Math.min(t,i,n),a=0===s?0:o/s;let l;return l=0===o?0:s===t?((i-n)/o%6+6)%6:s===i?(n-t)/o+2:(t-i)/o+4,new r(Math.round(60*l),a,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[c,d,h]=[0,0,0];return t<60?(c=r,d=a):t<120?(c=a,d=r):t<180?(d=r,h=a):t<240?(d=a,h=r):t<300?(c=a,h=r):t<=360&&(c=r,h=a),c=Math.round(255*(c+l)),d=Math.round(255*(d+l)),h=Math.round(255*(h+l)),new s(c,d,h,o)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof s)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}equals(e){return!!e&&s.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()e,asFile:()=>{},value:"string"==typeof e?e:void 0}}function a(e,t,i){const n={id:(0,o.b)(),name:e,uri:t,data:i};return{asString:async()=>"",asFile:()=>n,value:void 0}}class l{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return s.f.some(this,(([e,t])=>t.asFile()))&&t.push("files"),h(c(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return c(e)}}function c(e){return e.toLowerCase()}function d(e,t){return h(c(e),t.map(c))}function h(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,s,o]=i;return"*"===o&&t.some((e=>e.startsWith(s+"/")))}const u=Object.freeze({create:e=>(0,n.dM)(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>u.split(e).filter((e=>!e.startsWith("#")))})},95578:function(e,t,i){"use strict";function n(e,t,i){let n=null,s=null;if("function"==typeof i.value?(n="value",s=i.value,0!==s.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",s=i.get),!s)throw new Error("not supported");const o=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:s.apply(this,e)}),this[o]}}i.d(t,{B:function(){return n}})},72491:function(e,t,i){"use strict";i.d(t,{uP:function(){return d},F1:function(){return r}});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var s=i(65260);class o{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class d{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,s,o]=d._getElements(e),[r,a,l]=d._getElements(t);this._hasStrings=o&&l,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(d._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&s>=i&&this.ElementsAreEqual(t,s);)t--,s--;if(e>t||i>s){let o;return i<=s?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new n(e,0,i,s-i+1)]):e<=t?(a.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),o=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const r=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,s,r,l,o),d=r[0],h=l[0];if(null!==c)return c;if(!o[0]){const r=this.ComputeDiffRecursive(e,d,i,h,o);let a=[];return a=o[0]?[new n(d+1,t-(d+1)+1,h+1,s-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,s,o),this.ConcatenateChanges(r,a)}return[new n(e,t-e+1,i,s-i+1)]}WALKTRACE(e,t,i,s,o,r,a,l,d,h,u,g,p,f,m,_,v,b){let w=null,C=null,y=new c,S=t,k=i,x=p[0]-_[0]-s,L=-1073741824,D=this.m_forwardHistory.length-1;do{const t=x+e;t===S||t=0&&(e=(d=this.m_forwardHistory[D])[0],S=1,k=d.length-1)}while(--D>=-1);if(w=y.getReverseChanges(),b[0]){let e=p[0]+1,t=_[0]+1;if(null!==w&&w.length>0){const i=w[w.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}C=[new n(e,g-e+1,t,m-t+1)]}else{y=new c,S=r,k=a,x=p[0]-_[0]-l,L=1073741824,D=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=x+o;e===S||e=h[e+1]?(f=(u=h[e+1]-1)-x-l,u>L&&y.MarkNextChange(),L=u+1,y.AddOriginalElement(u+1,f+1),x=e+1-o):(f=(u=h[e-1])-x-l,u>L&&y.MarkNextChange(),L=u,y.AddModifiedElement(u+1,f+1),x=e-1-o),D>=0&&(o=(h=this.m_reverseHistory[D])[0],S=1,k=h.length-1)}while(--D>=-1);C=y.getChanges()}return this.ConcatenateChanges(w,C)}ComputeRecursionPoint(e,t,i,s,o,r,a){let c=0,d=0,h=0,u=0,g=0,p=0;e--,i--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(s-i),m=f+1,_=new Int32Array(m),v=new Int32Array(m),b=s-i,w=t-e,C=e-i,y=t-s,S=(w-b)%2==0;_[b]=e,v[w]=t,a[0]=!1;for(let k=1;k<=f/2+1;k++){let f=0,x=0;h=this.ClipDiagonalBound(b-k,k,b,m),u=this.ClipDiagonalBound(b+k,k,b,m);for(let e=h;e<=u;e+=2){c=e===h||ef+x&&(f=c,x=d),!S&&Math.abs(e-w)<=k-1&&c>=v[e])return o[0]=c,r[0]=d,i<=v[e]&&k<=1448?this.WALKTRACE(b,h,u,C,w,g,p,y,_,v,c,t,o,d,s,r,S,a):null}const L=(f-e+(x-i)-k)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(f,L))return a[0]=!0,o[0]=f,r[0]=x,L>0&&k<=1448?this.WALKTRACE(b,h,u,C,w,g,p,y,_,v,c,t,o,d,s,r,S,a):(e++,i++,[new n(e,t-e+1,i,s-i+1)]);g=this.ClipDiagonalBound(w-k,k,w,m),p=this.ClipDiagonalBound(w+k,k,w,m);for(let n=g;n<=p;n+=2){c=n===g||n=v[n+1]?v[n+1]-1:v[n-1],d=c-(n-w)-y;const l=c;for(;c>e&&d>i&&this.ElementsAreEqual(c,d);)c--,d--;if(v[n]=c,S&&Math.abs(n-b)<=k&&c<=_[n])return o[0]=c,r[0]=d,l>=_[n]&&k<=1448?this.WALKTRACE(b,h,u,C,w,g,p,y,_,v,c,t,o,d,s,r,S,a):null}if(k<=1447){let e=new Int32Array(u-h+2);e[0]=b-h+1,l.Copy2(_,h,e,1,u-h+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=w-g+1,l.Copy2(v,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,h,u,C,w,g,p,y,_,v,c,t,o,d,s,r,S,a)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,s=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,s=i.modifiedStart+i.modifiedLength}const o=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=d,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const s=e.originalStart;let o=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(s,o,r,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&ee===t;function o(e=s){return(t,i)=>n.aI(t,i,e)}function r(){return(e,t)=>e.equals(t)}function a(e,t,i){if(void 0!==i){return null==e||null==t?t===e:i(e,t)}{const t=e;return(e,i)=>null==e||null==i?i===e:t(e,i)}}function l(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i1?o.kg("error.moreErrors","{0} ({1} errors in total)",s,i.length):s}if(s.Kg(e))return e;if(e.detail){const i=e.detail;if(i.error)return r(i.error,t);if(i.exception)return r(i.exception,t)}return e.stack?r(e,t):e.message?e.message:o.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}},20187:function(e,t,i){"use strict";i.d(t,{AL:function(){return c},D7:function(){return f},EM:function(){return g},MB:function(){return l},M_:function(){return o},Qg:function(){return h},aD:function(){return d},cU:function(){return r},dz:function(){return s},iH:function(){return u}});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(p.isErrorNoTelemetry(e))throw new p(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function s(e){l(e)||n.onUnexpectedError(e)}function o(e){l(e)||n.onUnexpectedExternalError(e)}function r(e){if(e instanceof Error){const{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack,noTelemetry:p.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof c||e instanceof Error&&e.name===a&&e.message===a}class c extends Error{constructor(){super(a),this.name=this.message}}function d(){const e=new Error(a);return e.name=e.message,e}function h(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class g extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class p extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof p)return e;const t=new p;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}},80670:function(e,t,i){"use strict";i.d(t,{Jh:function(){return n},QT:function(){return w},Qy:function(){return m},Wj:function(){return S},_B:function(){return C},at:function(){return y},fV:function(){return v},uI:function(){return b},vl:function(){return f}});var n,s=i(20187),o=i(96845),r=i(35114),a=i(54409),l=i(43857);!function(e){function t(e){return(t,i=null,n)=>{let s,o=!1;return s=e((e=>{if(!o)return s?s.dispose():o=!0,t.call(i,e)}),null,n),o&&s.dispose(),s}}function i(e,t,i){return s(((i,n=null,s)=>e((e=>i.call(n,t(e))),null,s)),i)}function n(e,t,i){return s(((i,n=null,s)=>e((e=>t(e)&&i.call(n,e)),null,s)),i)}function s(e,t){let i;const n=new f({onWillAddFirstListener(){i=e(n.fire,n)},onDidRemoveLastListener(){i?.dispose()}});return t?.add(n),n.event}function o(e,t,i=100,n=!1,s=!1,o,r){let a,l,c,d,h=0;const u=new f({leakWarningThreshold:o,onWillAddFirstListener(){a=e((e=>{h++,l=t(l,e),n&&!c&&(u.fire(l),l=void 0),d=()=>{const e=l;l=void 0,c=void 0,(!n||h>1)&&u.fire(e),h=0},"number"==typeof i?(clearTimeout(c),c=setTimeout(d,i)):void 0===c&&(c=0,queueMicrotask(d))}))},onWillRemoveListener(){s&&h>0&&d?.()},onDidRemoveLastListener(){d=void 0,a.dispose()}});return r?.add(u),u.event}e.None=()=>r.jG.None,e.defer=function(e,t){return o(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=t,e.onceIf=function(t,i){return e.once(e.filter(t,i))},e.map=i,e.forEach=function(e,t,i){return s(((i,n=null,s)=>e((e=>{t(e),i.call(n,e)}),null,s)),i)},e.filter=n,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>{return s=(0,r.qE)(...e.map((e=>e((e=>t.call(i,e)))))),(o=n)instanceof Array?o.push(s):o&&o.add(s),s;var s,o}},e.reduce=function(e,t,n,s){let o=n;return i(e,(e=>(o=t(o,e),o)),s)},e.debounce=o,e.accumulate=function(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)},e.latch=function(e,t=(e,t)=>e===t,i){let s,o=!0;return n(e,(e=>{const i=o||!t(e,s);return o=!1,s=e,i}),i)},e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[],n){let s=i.slice(),o=e((e=>{s?s.push(e):a.fire(e)}));n&&n.add(o);const r=()=>{s?.forEach((e=>a.fire(e))),s=null},a=new f({onWillAddFirstListener(){o||(o=e((e=>a.fire(e))),n&&n.add(o))},onDidAddFirstListener(){s&&(t?setTimeout(r):r())},onDidRemoveLastListener(){o&&o.dispose(),o=null}});return n&&n.add(a),a.event},e.chain=function(e,t){return(i,n,s)=>{const o=t(new l);return e((function(e){const t=o.evaluate(e);t!==a&&i.call(n,t)}),void 0,s)}};const a=Symbol("HaltChainable");class l{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:a)),this}reduce(e,t){let i=t;return this.steps.push((t=>(i=e(i,t),i))),this}latch(e=(e,t)=>e===t){let t,i=!0;return this.steps.push((n=>{const s=i||!e(n,t);return i=!1,t=n,s?n:a})),this}evaluate(e){for(const t of this.steps)if((e=t(e))===a)break;return e}}e.fromNodeEventEmitter=function(e,t,i=e=>e){const n=(...e)=>s.fire(i(...e)),s=new f({onWillAddFirstListener:()=>e.on(t,n),onDidRemoveLastListener:()=>e.removeListener(t,n)});return s.event},e.fromDOMEventEmitter=function(e,t,i=e=>e){const n=(...e)=>s.fire(i(...e)),s=new f({onWillAddFirstListener:()=>e.addEventListener(t,n),onDidRemoveLastListener:()=>e.removeEventListener(t,n)});return s.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.fromPromise=function(e){const t=new f;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.forward=function(e,t){return e((e=>t.fire(e)))},e.runAndSubscribe=function(e,t,i){return t(i),e((e=>t(e)))};class c{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new f(i),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new c(e,t).emitter.event},e.fromObservableLight=function(e){return(t,i,n)=>{let s=0,o=!1;const a={beginUpdate(){s++},endUpdate(){s--,0===s&&(e.reportChanges(),o&&(o=!1,t.call(i)))},handlePossibleChange(){},handleChange(){o=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return n instanceof r.Cm?n.add(l):Array.isArray(n)&&n.push(l),l}}}(n||(n={}));class c{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${c._idPool++}`,c.all.add(this)}start(e){this._stopWatch=new l.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}class d{static{this._idPool=1}constructor(e,t,i=(d._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=i,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[i,n]of this._stacks)(!e||t{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],i=new g(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||s.dz)(i),r.jG.None}if(this._disposed)return r.jG.None;t&&(e=e.bind(t));const n=new p(e);let o;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(n.stack=h.create(),o=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof p?(this._deliveryQueue??=new _,this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;const a=(0,r.s)((()=>{o?.(),this._removeListener(n)}));return i instanceof r.Cm?i.add(a):Array.isArray(i)&&i.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,i=t.indexOf(e);if(-1===i)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;const n=this._deliveryQueue.current===this;if(2*this._size<=t.length){let e=0;for(let i=0;i0}}const m=()=>new _;class _{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class v extends f{constructor(e){super(e),this._isPaused=0,this._eventQueue=new a.w,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class b extends v{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class w extends f{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class C{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new f({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),(0,r.s)((0,o.P)((()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)})))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(const e of this.events)e.listener?.dispose();this.events=[]}}class y{constructor(){this.data=[]}wrapEvent(e,t,i){return(n,s,o)=>e((e=>{const o=this.data[this.data.length-1];if(!t)return void(o?o.buffers.push((()=>n.call(s,e))):n.call(s,e));const r=o;r?(r.items??=[],r.items.push(e),0===r.buffers.length&&o.buffers.push((()=>{r.reducedResult??=i?r.items.reduce(t,i):r.items.reduce(t),n.call(s,r.reducedResult)}))):n.call(s,t(i,e))}),void 0,o)}bufferEvents(e){const t={buffers:new Array};this.data.push(t);const i=e();return this.data.pop(),t.buffers.forEach((e=>e())),i}}class S{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=r.jG.None,this.emitter=new f({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},11354:function(e,t,i){"use strict";i.d(t,{No:function(){return u},TH:function(){return a},Zn:function(){return c},_1:function(){return d},kb:function(){return l}});var n=i(68847),s=i(79783),o=i(43920);function r(e){return 47===e||92===e}function a(e){return e.replace(/[\\/]/g,n.SA.sep)}function l(e){return-1===e.indexOf("/")&&(e=a(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function c(e,t=n.SA.sep){if(!e)return"";const i=e.length,s=e.charCodeAt(0);if(r(s)){if(r(e.charCodeAt(1))&&!r(e.charCodeAt(2))){let n=3;const s=n;for(;ne.length)return!1;if(i){if(!(0,o.ns)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===s&&i--,e.charAt(i)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}function h(e){return e>=65&&e<=90||e>=97&&e<=122}function u(e,t=s.uF){return!!t&&h(e.charCodeAt(0))&&58===e.charCodeAt(1)}},17793:function(e,t,i){"use strict";i.d(t,{ne:function(){return te},Nd:function(){return ie},Jo:function(){return H},WJ:function(){return V},dt:function(){return ne},uU:function(){return oe},Tt:function(){return f},yr:function(){return B},O:function(){return W},WP:function(){return g},dE:function(){return m},J1:function(){return T},or:function(){return u}});var n=i(52732);let s=0;const o=new Uint32Array(10);function r(e,t,i){var n;e>=i&&e>8&&(o[s++]=n>>8&255),n>>16&&(o[s++]=n>>16&255)))}const a=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),l=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),c=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),d=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);var h=i(43920);function u(...e){return function(t,i){for(let n=0,s=e.length;n0?[{start:0,end:t.length}]:[]:null}function f(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function m(e,t){return _(e.toLowerCase(),t.toLowerCase(),0,0)}function _(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let s=null;return(s=_(e,t,i+1,n+1))?E({start:n,end:n+1},s):null}return _(e,t,i,n+1)}function v(e){return 97<=e&&e<=122}function b(e){return 65<=e&&e<=90}function w(e){return 48<=e&&e<=57}function C(e){return 32===e||9===e||10===e||13===e}const y=new Set;function S(e){return C(e)||y.has(e)}function k(e,t){return e===t||S(e)&&S(t)}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>y.add(e.charCodeAt(0))));const x=new Map;function L(e){if(x.has(e))return x.get(e);let t;const i=function(e){const t=function(e){if(s=0,r(e,a,4352),s>0)return o.subarray(0,s);if(r(e,l,4449),s>0)return o.subarray(0,s);if(r(e,c,4520),s>0)return o.subarray(0,s);if(r(e,d,12593),s)return o.subarray(0,s);if(e>=44032&&e<=55203){const t=e-44032,i=t%588,n=Math.floor(t/588),h=Math.floor(i/28),u=i%28-1;if(n=0&&(u0)return o.subarray(0,s)}}(e);if(t&&t.length>0)return new Uint32Array(t)}(e);return i&&(t=i),x.set(e,t),t}function D(e){return v(e)||b(e)||w(e)}function E(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function N(e,t){for(let i=t;i0&&!D(e.charCodeAt(i-1)))return i}return e.length}function I(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let s=null,o=n+1;for(s=I(e,t,i+1,n+1);!s&&(o=N(t,o))60&&(t=t.substring(0,60));const i=function(e){let t=0,i=0,n=0,s=0,o=0;for(let r=0;r.2&&t<.8&&n>.6&&s<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,s=0;for(e=e.toLowerCase();s0&&S(e.charCodeAt(i-1)))return i;return e.length}const A=u(g,M,f),O=u(g,M,m),F=new n.qK(1e4);function B(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=F.get(e);n||(n=new RegExp(h.Bm(e),"i"),F.set(e,n));const s=n.exec(t);return s?[{start:s.index,end:s.index+s[0].length}]:i?O(e,t):A(e,t)}function W(e,t){const i=ne(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?V(i):null}function H(e,t,i,n,s,o){const r=Math.min(13,e.length);for(;i1;n--){const s=e[n]+i,o=t[t.length-1];o&&o.end===s?o.end=s+1:t.push({start:s,end:s+1})}return t}const z=128;function U(){const e=[],t=[];for(let e=0;e<=z;e++)t[e]=0;for(let i=0;i<=z;i++)e.push(t.slice(0));return e}function j(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const q=j(2*z),K=j(2*z),$=U(),G=U(),Q=U(),Y=!1;function Z(e,t,i,n,s){function o(e,t,i=" "){for(;e.lengtho(e,3))).join("|")}\n`;for(let n=0;n<=i;n++)r+=0===n?" |":`${t[n-1]}|`,r+=e[n].slice(0,s+1).map((e=>o(e.toString(),3))).join("|")+"\n";return r}function X(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!h.Ss(i)}}function J(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function ee(e,t,i){return t[e]!==i[e]}var te;!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(te||(te={}));class ie{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function ne(e,t,i,n,s,o,r=ie.default){const a=e.length>z?z:e.length,l=n.length>z?z:n.length;if(i>=a||o>=l||a-i>l-o)return;if(!function(e,t,i,n,s,o,r=!1){for(;t=i&&a>=n;)s[r]===o[a]&&(K[r]=a,r--),a--}(a,l,i,o,t,s);let c=1,d=1,h=i,u=o;const g=[!1];for(c=1,h=i;hr,v=_?G[c][d-1]+($[c][d-1]>0?-5:0):0,b=u>r+1&&$[c][d-1]>0,w=b?G[c][d-2]+($[c][d-2]>0?-5:0):0;if(b&&(!_||w>=v)&&(!f||w>=m))G[c][d]=w,Q[c][d]=3,$[c][d]=0;else if(_&&(!f||v>=m))G[c][d]=v,Q[c][d]=2,$[c][d]=0;else{if(!f)throw new Error("not possible");G[c][d]=m,Q[c][d]=1,$[c][d]=$[c-1][d-1]+1}}}if(Y&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(Z(G,e,e.length,i,i.length)),console.log(Z(Q,e,e.length,i,i.length)),console.log(Z($,e,e.length,i,i.length))}(e,i,n,o),!g[0]&&!r.firstMatchCanBeWeak)return;c--,d--;const p=[G[c][d],o];let f=0,m=0;for(;c>=1;){let e=d;do{const t=Q[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);f>1&&t[i+c-1]===s[o+d-1]&&!ee(e+o-1,n,s)&&f+1>$[c][e]&&(e=d),e===d?f++:f=1,m||(m=e),c--,d=e-1,p.push(d)}l-o===a&&r.boostFullMatch&&(p[0]+=2);const _=m-a;return p[0]-=_,p}function se(e,t,i,n,s,o,r,a,l,c,d){if(t[i]!==o[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===i-n?h=e[i]===s[r]?7:5:!ee(r,s,o)||0!==r&&ee(r-1,s,o)?!X(o,r)||0!==r&&X(o,r-1)?(X(o,r-1)||J(o,r-1))&&(h=5,u=!0):h=5:(h=e[i]===s[r]?7:5,u=!0),h>1&&i===n&&(d[0]=!0),u||(u=ee(r,s,o)||X(o,r-1)||J(o,r-1)),i===n?r>l&&(h-=u?3:5):h+=c?u?2:0:u?0:1,r+1===a&&(h-=u?3:5),h}function oe(e,t,i,n,s,o,r){return function(e,t,i,n,s,o,r,a){let l=ne(e,t,i,n,s,o,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}(e,t,i,n,s,o,0,r)}function re(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}},96845:function(e,t,i){"use strict";function n(e,t){const i=this;let n,s=!1;return function(){if(s)return n;if(s=!0,t)try{n=e.apply(i,arguments)}finally{t()}else n=e.apply(i,arguments);return n}}i.d(t,{P:function(){return n}})},90562:function(e,t,i){"use strict";i.d(t,{YW:function(){return N},qg:function(){return I}});var n=i(90890),s=i(11354),o=i(52732),r=i(68847),a=i(79783),l=i(43920);const c="**",d="/",h="[/\\\\]",u="[^/\\\\]",g=/\//g;function p(e,t){switch(e){case 0:return"";case 1:return`${u}*?`;default:return`(?:${h}|${u}+${h}${t?`|${h}${u}+`:""})*?`}}function f(e,t){if(!e)return[];const i=[];let n=!1,s=!1,o="";for(const r of e){switch(r){case t:if(!n&&!s){i.push(o),o="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1}o+=r}return o&&i.push(o),i}function m(e){if(!e)return"";let t="";const i=f(e,d);if(i.every((e=>e===c)))t=".*";else{let e=!1;i.forEach(((n,s)=>{if(n===c){if(e)return;t+=p(2,s===i.length-1)}else{let e=!1,o="",r=!1,a="";for(const i of n)if("}"!==i&&e)o+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=`(?:${f(o,",").map((e=>m(e))).join("|")})`;t+=i,e=!1,o="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=u;continue;case"*":t+=p(1);continue;default:t+=(0,l.bm)(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?i===d?"":(0,l.bm)(i):"^",a+=e}sL(e,t))).filter((e=>e!==x)),e),n=i.length;if(!n)return x;if(1===n)return i[0];const s=function(t,n){for(let s=0,o=i.length;s!!e.allBasenames));o&&(s.allBasenames=o.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(s.allPaths=r),s}(i,t):(o=C.exec(D(i,t)))?E(o[1].substr(1),i,!0):(o=y.exec(D(i,t)))?E(o[1],i,!1):function(e){try{const t=new RegExp(`^${m(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return x}}(i),S.set(n,c)),function(e,t){if("string"==typeof t)return e;const i=function(i,n){return(0,s._1)(i,t.base,!a.j9)?e((0,l.NB)(i.substr(t.base.length),r.Vn),n):null};return i.allBasenames=e.allBasenames,i.allPaths=e.allPaths,i.basenames=e.basenames,i.patterns=e.patterns,i}(c,e)}function D(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function E(e,t,i){const n=r.Vn===r.SA.sep,s=n?e:e.replace(g,r.Vn),o=r.Vn+s,a=r.SA.sep+e;let l;return l=i?function(i,r){return"string"!=typeof i||i!==s&&!i.endsWith(o)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,o){return"string"!=typeof i||i!==s&&(n||i!==e)?null:t},l.allPaths=[(i?"*/":"./")+e],l}function N(e,t,i){return!(!e||"string"!=typeof t)&&I(e)(t,void 0,i)}function I(e,t={}){if(!e)return k;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const i=L(e,t);if(i===x)return k;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=M(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return x;const s=L(e,i);if(s===x)return x;if("boolean"==typeof t)return s;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,r,a)=>{if(!a||!s(t,o))return null;const l=a(i.replace("$(basename)",(()=>r)));return(0,n.Qg)(l)?l.then((t=>t?e:null)):l?e:null};return t.requiresSiblings=!0,t}}return s}(i,e[i],t))).filter((e=>e!==x))),s=i.length;if(!s)return x;if(!i.some((e=>!!e.requiresSiblings))){if(1===s)return i[0];const e=function(e,t){let s;for(let o=0,r=i.length;o{for(const e of s){const t=await e;if("string"==typeof t)return t}return null})():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,s){let o,a;for(let l=0,c=i.length;l{for(const e of a){const t=await e;if("string"==typeof t)return t}return null})():null},a=i.find((e=>!!e.allBasenames));a&&(o.allBasenames=a.allBasenames);const l=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(o.allPaths=l),o}(e,t)}function M(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let s;if(t){s=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const o=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?s[i]:null};o.basenames=n,o.patterns=s,o.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(o),r}},65260:function(e,t,i){"use strict";i.d(t,{e2:function(){return a},sN:function(){return o},tW:function(){return s},v7:function(){return h}});var n=i(43920);function s(e){return o(e,0)}function o(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(i=e,n=r(104579,n=t),i.reduce(((e,t)=>o(t,e)),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),o(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}var i,n}function r(e,t){return(t<<5)-t+e|0}function a(e,t){t=r(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function c(e,t=0,i=e.byteLength,n=0){for(let s=0;se.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class h{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let s,o,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(s=a,o=-1,a=0):(s=e.charCodeAt(0),o=0);;){let l=s;if(n.pc(s)){if(!(o+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),d(this._h0)+d(this._h1)+d(this._h2)+d(this._h3)+d(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=h._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,s,o=this._h0,r=this._h1,a=this._h2,c=this._h3,d=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&c,n=1518500249):t<40?(i=r^a^c,n=1859775393):t<60?(i=r&a|r&c|a&c,n=2400959708):(i=r^a^c,n=3395469782),s=l(o,5)+i+d+n+e.getUint32(4*t,!1)&4294967295,d=c,c=a,a=l(r,30),r=o,o=s;this._h0=this._h0+o&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+d&4294967295}}},74159:function(e,t,i){"use strict";i.d(t,{k:function(){return n}});class n{static{this.sep="."}static{this.None=new n("@@none@@")}static{this.Empty=new n("")}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+n.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new n((this.value?[this.value,...e]:e).join(n.sep))}}},87312:function(e,t,i){"use strict";i.d(t,{O:function(){return o},e:function(){return s}});var n=i(93915);function s(){return n._K&&!!n._K.VSCODE_DEV}function o(e){if(s()){const t=function(){r||(r=new Set);const e=globalThis;return e.$hotReload_applyNewExports||(e.$hotReload_applyNewExports=e=>{const t={config:{mode:void 0},...e},i=[];for(const e of r){const n=e(t);n&&i.push(n)}if(i.length>0)return e=>{let t=!1;for(const n of i)n(e)&&(t=!0);return t}}),r}();return t.add(e),{dispose(){t.delete(e)}}}return{dispose(){}}}let r;s()&&o((({oldExports:e,newSrc:t,config:i})=>{if("patch-prototype"===i.mode)return t=>{for(const i in t){const n=t[i];if(console.log(`[hot-reload] Patching prototype methods of '${i}'`,{exportedItem:n}),"function"==typeof n&&n.prototype){const s=e[i];if(s){for(const e of Object.getOwnPropertyNames(n.prototype)){const t=Object.getOwnPropertyDescriptor(n.prototype,e),o=Object.getOwnPropertyDescriptor(s.prototype,e);t?.value?.toString()!==o?.value?.toString()&&console.log(`[hot-reload] Patching prototype method '${i}.${e}'`),Object.defineProperty(s.prototype,e,t)}t[i]=s}}}return!0}}))},64523:function(e,t,i){"use strict";i.d(t,{b:function(){return o}});var n=i(87312),s=i(73755);function o(e,t){return function(e,t){(0,n.e)()&&(0,s.yQ)("reload",(t=>(0,n.O)((({oldExports:i})=>{if([...Object.values(i)].some((t=>e.includes(t))))return e=>(t(void 0),!0)})))).read(t)}([e],t),e}},85584:function(e,t,i){"use strict";i.d(t,{Bc:function(){return l},VS:function(){return d},_W:function(){return g},it:function(){return c},nI:function(){return p},nK:function(){return h},oO:function(){return u}});var n=i(20187),s=i(4590),o=i(59951),r=i(43920),a=i(54244);class l{constructor(e="",t=!1){if(this.value=e,"string"!=typeof this.value)throw(0,n.Qg)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=t.isTrusted??void 0,this.supportThemeIcons=t.supportThemeIcons??!1,this.supportHtml=t.supportHtml??!1)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,s.m2)(e):e,i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`\n${function(e,t){const i=e.match(/^`+/gm)?.reduce(((e,t)=>e.length>t.length?e:t)).length??0,n=i>=3?i+1:3;return[`${"`".repeat(n)}${t}`,e,`${"`".repeat(n)}`].join("\n")}(t,e)}\n`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp((0,r.bm)(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function c(e){return d(e)?!e.value:!Array.isArray(e)||e.every(c)}function d(e){return e instanceof l||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&"object"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function h(e,t){return e===t||!(!e||!t)&&e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons&&e.supportHtml===t.supportHtml&&(e.baseUri===t.baseUri||!!e.baseUri&&!!t.baseUri&&(0,o.n4)(a.r.from(e.baseUri),a.r.from(t.baseUri)))}function u(e){return e.replace(/"/g,""")}function g(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}function p(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),s=e?e[1]:"",o=i?i[1]:"",r=isFinite(parseInt(o)),a=isFinite(parseInt(s));r&&t.push(`width="${o}"`),a&&t.push(`height="${s}"`)}return{href:e,dimensions:t}}},4590:function(e,t,i){"use strict";i.d(t,{R$:function(){return p},_k:function(){return m},m2:function(){return c},pS:function(){return g},pz:function(){return _},sA:function(){return h}});var n=i(17793),s=i(43920),o=i(56613);const r="$(",a=new RegExp(`\\$\\(${o.L.iconNameExpression}(?:${o.L.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function c(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const d=new RegExp(`\\\\${a.source}`,"g");function h(e){return e.replace(d,(e=>`\\${e}`))}const u=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(r)?e:e.replace(u,((e,t,i,n)=>i?e:t||n||""))}function p(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}const f=new RegExp(`\\$\\(${o.L.iconNameCharacter}+\\)`,"g");function m(e){f.lastIndex=0;let t="";const i=[];let n=0;for(;;){const s=f.lastIndex,o=f.exec(e),r=e.substring(s,o?.index);if(r.length>0){t+=r;for(let e=0;e=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){let i=0;for(const n of e)if(t(n,i++))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.flatMap=function*(e,t){let i=0;for(const n of e)yield*t(n,i++)},e.concat=function*(...e){for(const t of e)yield*t},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t>>0)>>>0}!function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],i=[],n=[];for(const e of t){const[t,p,f,m,_,v,b,w,C]=e;if(n[p]||(n[p]=!0,c[p]=f,d[f]=p,h[f.toLowerCase()]=p,t&&(u[p]=m,0!==m&&3!==m&&5!==m&&4!==m&&6!==m&&57!==m&&(g[m]=p))),!i[m]){if(i[m]=!0,!_)throw new Error(`String representation missing for key code ${m} around scan code ${f}`);s.define(m,_),o.define(m,w||_),r.define(m,C||w||_)}v&&(a[v]=m),b&&(l[b]=m)}g[3]=46}(),function(e){e.toString=function(e){return s.keyCodeToStr(e)},e.fromString=function(e){return s.strToKeyCode(e)},e.toUserSettingsUS=function(e){return o.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return r.keyCodeToStr(e)},e.fromUserSettings=function(e){return o.strToKeyCode(e)||r.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return s.keyCodeToStr(e)}}(p||(p={}))},92479:function(e,t,i){"use strict";i.d(t,{G$:function(){return l},Of:function(){return o},r0:function(){return r},rr:function(){return a}});var n=i(14374);class s{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let s=0,o=t.length;s>>0,n=(4294901760&e)>>>16;return new a(0!==n?[o(i,t),o(n,t)]:[o(i,t)])}{const i=[];for(let n=0;n1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function u(...e){const t=g((()=>h(e)));return function(e,t){if(o)for(const i of e)o.setParent(i,t)}(e,t),t}function g(e){const t=r({dispose:(0,n.P)((()=>{a(t),e()}))});return t}class p{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,r(this)}dispose(){this._isDisposed||(a(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{h(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return l(e,this),this._isDisposed?p.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),l(e,null))}}class f{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new p,r(this),l(this._store,this)}dispose(){a(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class m{constructor(){this._isDisposed=!1,r(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&l(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,a(this),this._value?.dispose(),this._value=void 0}}class _{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class v{constructor(e){this.object=e}dispose(){}}class b{constructor(){this._store=new Map,this._isDisposed=!1,r(this)}dispose(){a(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{h(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},54409:function(e,t,i){"use strict";i.d(t,{w:function(){return s}});class n{static{this.Undefined=new n(void 0)}constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}class s{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},52732:function(e,t,i){"use strict";var n,s;i.d(t,{cO:function(){return d},db:function(){return h},fT:function(){return r},qK:function(){return c}});class o{constructor(e,t){this.uri=e,this.value=t}}class r{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[n]="ResourceMap",e instanceof r)this.map=new Map(e.map),this.toKey=t??r.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=t??r.defaultToKey;for(const[t,i]of e)this.set(t,i)}else this.map=new Map,this.toKey=e??r.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new o(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class a{constructor(){this[s]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(s=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.previous,i--;this._tail=t,this._size=i,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class l extends a{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class c extends l{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class d{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class h{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}}},23560:function(e,t,i){"use strict";i.d(t,{As:function(){return o},qg:function(){return r}});var n=i(28198),s=i(54244);function o(e){return JSON.stringify(e,a)}function r(e){let t=JSON.parse(e);return t=l(t),t}function a(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function l(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return s.r.revive(e);case 2:return new RegExp(e.source,e.flags);case 17:return new Date(e.source)}if(e instanceof n.MB||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;ic(e,t)))}!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"}(n||(n={}));const h=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,n.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return s.dz(t),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const r=this._ports[t],l=this._connectionTokens[t];let c=`path=${encodeURIComponent(e.path)}`;return"string"==typeof l&&(c+=`&tkn=${encodeURIComponent(l)}`),a.r.from({scheme:o.HZ?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${r}`,path:this._remoteResourcesPath,query:c})}};class u{static{this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===n.vscodeRemote?h.rewrite(e):e.scheme!==n.file||!o.ib&&o.lg!==`${n.vscodeFileResource}://${u.FALLBACK_AUTHORITY}`?e:e.with({scheme:n.vscodeFileResource,authority:e.authority||u.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const i=l.fj(t,e);return a.r.file(i)}return a.r.parse(t.toUrl(e))}}const g=new u;var p;!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";e.getHeadersFromQuery=function(e){let n;"string"==typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:a.r.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const s=n?.get(i);if(s)return t.get(s)},e.addSearchParam=function(e,t,n){if(!globalThis.crossOriginIsolated)return;const s=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,s):e[i]=s}}(p||(p={}))},60028:function(e,t,i){"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{Uq:function(){return s},mu:function(){return o},qE:function(){return n}});class s{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class o{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{t[e]=i&&"object"==typeof i?s(i):i})),t}function o(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const s=e[i];"object"!=typeof s||Object.isFrozen(s)||(0,n.iu)(s)||t.push(s)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.z)(e))return e;const s=t(e);if(void 0!==s)return s;if(Array.isArray(e)){const n=[];for(const s of e)n.push(l(s,t,i));return n}if((0,n.Gv)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const s in e)r.call(e,s)&&(n[s]=l(e[s],t,i));return i.delete(e),n}return e}function c(e,t,i=!0){return(0,n.Gv)(e)?((0,n.Gv)(t)&&Object.keys(t).forEach((s=>{s in e?i&&((0,n.Gv)(e[s])&&(0,n.Gv)(t[s])?c(e[s],t[s],i):e[s]=t[s]):e[s]=t[s]})),e):t}function d(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ifunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const t of e)n[t]=i(t);return n}},73755:function(e,t,i){"use strict";i.d(t,{BK:function(){return _},fm:function(){return c},Y:function(){return h},zL:function(){return d},yC:function(){return g},ht:function(){return u},lk:function(){return f.lk},un:function(){return s.un},nb:function(){return s.nb},ZX:function(){return f.ZX},C:function(){return s.C},rm:function(){return s.rm},X2:function(){return n.X2},y0:function(){return f.y0},Yd:function(){return f.Yd},yQ:function(){return f.yQ},FY:function(){return n.FY},Zh:function(){return y},OI:function(){return f.OI},PO:function(){return n.PO},Rn:function(){return n.Rn},oJ:function(){return b}});var n=i(1878),s=i(98018),o=i(93066),r=i(35114),a=i(86147),l=i(83810);function c(e){return new p(new a.nA(void 0,void 0,e),e,void 0,void 0)}function d(e,t){return new p(new a.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,void 0)}function h(e,t){return new p(new a.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,e.createEmptyChangeSummary,e.handleChange)}function u(e,t){const i=new r.Cm,n=h({owner:e.owner,debugName:e.debugName,debugReferenceFn:e.debugReferenceFn??t,createEmptyChangeSummary:e.createEmptyChangeSummary,handleChange:e.handleChange},((e,n)=>{i.clear(),t(e,n,i)}));return(0,r.s)((()=>{n.dispose(),i.dispose()}))}function g(e){const t=new r.Cm,i=d({owner:void 0,debugName:void 0,debugReferenceFn:e},(i=>{t.clear(),e(i,t)}));return(0,r.s)((()=>{i.dispose(),t.dispose()}))}class p{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n){this._debugNameData=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),(0,l.tZ)()?.handleAutorunCreated(this),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){(0,l.tZ)()?.handleAutorunTriggered(this);const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{t||(0,l.tZ)()?.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,o.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}!function(e){e.Observer=p}(c||(c={}));var f=i(84230),m=i(20187);class _{static fromFn(e){return new _(e())}constructor(e){this._value=(0,n.FY)(this,void 0),this.promiseResult=this._value,this.promise=e.then((e=>((0,n.Rn)((t=>{this._value.set(new v(e,void 0),t)})),e)),(e=>{throw(0,n.Rn)((t=>{this._value.set(new v(void 0,e),t)})),e}))}}class v{constructor(e,t){this.data=e,this.error=t}}function b(e,t,i,n){return t||(t=e=>null!=e),new Promise(((s,o)=>{let r=!0,a=!1;const l=e.map((e=>({isFinished:t(e),error:!!i&&i(e),state:e}))),d=c((e=>{const{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:d.dispose(),i?o(!0===i?n:i):s(n))}));if(n){const e=n.onCancellationRequested((()=>{d.dispose(),e.dispose(),o(new m.AL)}));if(n.isCancellationRequested)return d.dispose(),e.dispose(),void o(new m.AL)}r=!1,a&&d.dispose()}))}var w=i(57981);class C extends n.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i){super(),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const e of this.observers)for(const t of this._deltas)e.handleChange(this,t);this._deltas.length=0}else for(const e of this.observers)e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(const e of this.observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){this._update();const e=[...this.observers];for(const t of e)t.endUpdate(this)}}addObserver(e){const t=!this.observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){if(void 0===i&&this._equalityComparator(this._value,e))return;let s;t||(t=s=new n.XL((()=>{}),(()=>`Setting ${this.debugName}`)));try{if(this._isUpToDate=!1,this._setValue(e),void 0!==i&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(e,t)=>{},handlePossibleChange:e=>{}},this),this._updateCounter>1)for(const e of this.observers)e.handlePossibleChange(this)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function y(e,t){return e.lazy?new C(new a.nA(e.owner,e.debugName,void 0),t,e.equalsFn??w.nx):new n.Lj(new a.nA(e.owner,e.debugName,void 0),t,e.equalsFn??w.nx)}},1878:function(e,t,i){"use strict";i.d(t,{Bm:function(){return d},FB:function(){return h},FY:function(){return w},Lj:function(){return C},N2:function(){return u},PO:function(){return v},Rn:function(){return f},X2:function(){return y},XL:function(){return b},YY:function(){return m},ZK:function(){return p},fL:function(){return _},zV:function(){return g}});var n=i(57981),s=i(86147),o=i(83810);let r,a,l,c;function d(e){r=e}function h(e){a=e}function u(e){l=e}class g{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=void 0===t?void 0:e,n=void 0===t?e:t;return l({owner:i,debugName:()=>{const e=(0,s.qQ)(n);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(n.toString());return t?`${this.debugName}.${t[2]}`:i?void 0:`${this.debugName} (mapped)`},debugReferenceFn:n},(e=>n(this.read(e),e)))}flatten(){return l({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(r(this,t)),this}keepObserved(e){return e.add(a(this)),this}}class p extends g{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function f(e,t){const i=new b(e,t);try{e(i)}finally{i.finish()}}function m(e){if(c)e(c);else{const t=new b(e,void 0);c=t;try{e(t)}finally{t.finish(),c=void 0}}}async function _(e,t){const i=new b(e,t);try{await e(i)}finally{i.finish()}}function v(e,t,i){e?t(e):f(t,i)}class b{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],(0,o.tZ)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,s.qQ)(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t{}),(()=>`Setting ${this.debugName}`)));try{const n=this._value;this._setValue(e),(0,o.tZ)()?.handleObservableChanged(this,{oldValue:n,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function y(e,t){let i;return i="string"==typeof e?new s.nA(void 0,e,void 0):new s.nA(e,void 0,void 0),new S(i,t,n.nx)}class S extends C{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}},86147:function(e,t,i){"use strict";i.d(t,{nA:function(){return n},qQ:function(){return l}});class n{constructor(e,t,i){this.owner=e,this.debugNameSource=t,this.referenceFn=i}getDebugName(e){return function(e,t){const i=o.get(e);if(i)return i;const n=function(e,t){const i=o.get(e);if(i)return i;const n=t.owner?function(e){const t=a.get(e);if(t)return t;const i=function(e){const t=e.constructor;return t?t.name:"Object"}(e);let n=r.get(i)??0;n++,r.set(i,n);const s=1===n?i:`${i}#${n}`;return a.set(e,s),s}(t.owner)+".":"";let s;const c=t.debugNameSource;if(void 0!==c){if("function"!=typeof c)return n+c;if(s=c(),void 0!==s)return n+s}const d=t.referenceFn;if(void 0!==d&&(s=l(d),void 0!==s))return n+s;if(void 0!==t.owner){const i=function(e,t){for(const i in e)if(e[i]===t)return i}(t.owner,e);if(void 0!==i)return n+i}}(e,t);if(n){let t=s.get(n)??0;t++,s.set(n,t);const i=1===t?n:`${n}#${t}`;return o.set(e,i),i}}(e,this)}}const s=new Map,o=new WeakMap,r=new Map,a=new WeakMap;function l(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),n=i?i[1]:void 0;return n?.trim()}},98018:function(e,t,i){"use strict";i.d(t,{C:function(){return h},a0:function(){return p},dQ:function(){return d},nb:function(){return u},rm:function(){return g},un:function(){return c}});var n=i(93066),s=i(57981),o=i(35114),r=i(1878),a=i(86147),l=i(83810);function c(e,t){return void 0!==t?new f(new a.nA(e,void 0,t),t,void 0,void 0,void 0,s.nx):new f(new a.nA(void 0,void 0,e),e,void 0,void 0,void 0,s.nx)}function d(e,t,i){return new m(new a.nA(e,void 0,t),t,void 0,void 0,void 0,s.nx,i)}function h(e,t){return new f(new a.nA(e.owner,e.debugName,e.debugReferenceFn),t,void 0,void 0,e.onLastObserverRemoved,e.equalsFn??s.nx)}function u(e,t){return new f(new a.nA(e.owner,e.debugName,void 0),t,e.createEmptyChangeSummary,e.handleChange,void 0,e.equalityComparer??s.nx)}function g(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const r=new o.Cm;return new f(new a.nA(n,void 0,i),(e=>(r.clear(),i(e,r))),void 0,void 0,(()=>r.dispose()),s.nx)}function p(e,t){let i,n,r;return void 0===t?(i=e,n=void 0):(n=e,i=t),new f(new a.nA(n,void 0,i),(e=>{r?r.clear():r=new o.Cm;const t=i(e);return t&&r.add(t),t}),void 0,void 0,(()=>{r&&(r.dispose(),r=void 0)}),s.nx)}(0,r.N2)(h);class f extends r.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n,s=void 0,o){super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=i,this._handleChange=n,this._handleLastObserverRemoved=s,this._equalityComparator=o,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=this.createChangeSummary?.(),(0,l.tZ)()?.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(0===this.observers.size){const e=this._computeFn(this,this.createChangeSummary?.());return this.onLastObserverRemoved(),e}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;const t=0!==this.state,i=this.value;this.state=3;const n=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this.value=this._computeFn(this,n)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const s=t&&!this._equalityComparator(i,this.value);if((0,l.tZ)()?.handleDerivedRecomputed(this,{oldValue:i,newValue:this.value,change:void 0,didChange:s,hadValue:t}),s)for(const e of this.observers)e.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,n.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}class m extends f{constructor(e,t,i,n,s=void 0,o,r){super(e,t,i,n,s,o),this.set=r}}},83810:function(e,t,i){"use strict";let n;function s(e){n=e}function o(){return n}i.d(t,{Br:function(){return s},jm:function(){return r},tZ:function(){return o}});class r{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return function(e){const t=new Array,i=[];let n="";!function e(s){if("length"in s)for(const t of s)t&&e(t);else"text"in s?(n+=`%c${s.text}`,t.push(s.style),s.data&&i.push(...s.data)):"data"in s&&i.push(...s.data)}(e);const s=[n,...t];return s.push(...i),s}([a(h("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[a(" "),c(d(e.oldValue,70),{color:"red",strikeThrough:!0}),a(" "),c(d(e.newValue,60),{color:"green"})]:[a(" (unchanged)")]:[a(" "),c(d(e.newValue,60),{color:"green"}),a(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([l("observable value changed"),c(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return c(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleDerivedRecomputed(e,t){const i=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([l("derived recomputed"),c(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),i.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([l("observable from event triggered"),c(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([l("autorun"),c(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([l("transaction"),c(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function a(e){return c(e,{color:"black"})}function l(e){return c(function(e){for(;e.length<10;)e+=" ";return e}(`${e}: `),{color:"black",bold:!0})}function c(e,t={color:"black"}){const i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:(n=i,Object.entries(n).reduce(((e,[t,i])=>`${e}${t}:${i};`),""))};var n}function d(e,t){switch(typeof e){case"number":default:return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?function(e,t){let i="[ ",n=!0;for(const s of e){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${d(s,t-i.length)}`}return i+=" ]",i}(e,t):function(e,t){let i="{ ",n=!0;for(const[s,o]of Object.entries(e)){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${s}: ${d(o,t-i.length)}`}return i+=" }",i}(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`}}function h(e,t){let i="";for(let n=1;n<=t;n++)i+=e;return i}},84230:function(e,t,i){"use strict";i.d(t,{OI:function(){return v},Rl:function(){return C},Yd:function(){return m},ZX:function(){return w},eP:function(){return u},lk:function(){return c},t:function(){return S},y0:function(){return h},yQ:function(){return p}}),i(80670);var n=i(35114),s=i(1878),o=i(86147),r=i(98018),a=i(83810),l=i(57981);function c(e){return new d(e)}class d extends s.zV{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function h(...e){let t,i,n;return 3===e.length?[t,i,n]=e:[i,n]=e,new g(new o.nA(t,void 0,n),i,n,(()=>g.globalTransaction),l.nx)}function u(e,t,i){return new g(new o.nA(e.owner,e.debugName,e.debugReferenceFn??i),t,i,(()=>g.globalTransaction),e.equalsFn??l.nx)}class g extends s.ZK{constructor(e,t,i,n,o){super(),this._debugNameData=e,this.event=t,this._getValue=i,this._getTransaction=n,this._equalityComparator=o,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),i=this.value,n=!this.hasValue||!this._equalityComparator(i,t);let o=!1;n&&(this.value=t,this.hasValue&&(o=!0,(0,s.PO)(this._getTransaction(),(e=>{(0,a.tZ)()?.handleFromEventObservableTriggered(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),o||(0,a.tZ)()?.handleFromEventObservableTriggered(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}function p(e,t){return new f(e,t)}!function(e){e.Observer=g,e.batchEventsGlobally=function(e,t){let i=!1;void 0===g.globalTransaction&&(g.globalTransaction=e,i=!0);try{t()}finally{i&&(g.globalTransaction=void 0)}}}(h||(h={}));class f extends s.ZK{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{(0,s.Rn)((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function m(e){return"string"==typeof e?new _(e):new _(void 0,e)}class _ extends s.ZK{get debugName(){return new o.nA(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else(0,s.Rn)((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function v(e,t){const i=new b(!0,t);return e.addObserver(i),t?t(e.get()):e.reportChanges(),(0,n.s)((()=>{e.removeObserver(i)}))}(0,s.FB)((function(e){const t=new b(!1,void 0);return e.addObserver(t),(0,n.s)((()=>{e.removeObserver(t)}))})),(0,s.Bm)(v);class b{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}function w(e,t){let i;return(0,r.C)({owner:e,debugReferenceFn:t},(e=>(i=t(e,i),i)))}function C(e,t,i,n){let s=new y(i,n);return(0,r.C)({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{s.dispose(),s=new y(i)}},(e=>(s.setItems(t.read(e)),s.getItems())))}class y{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach((e=>e.store.dispose())),this._cache.clear()}setItems(e){const t=[],i=new Set(this._cache.keys());for(const s of e){const e=this._keySelector?this._keySelector(s):s;let o=this._cache.get(e);if(o)i.delete(e);else{const t=new n.Cm;o={out:this._map(s,t),store:t},this._cache.set(e,o)}t.push(o.out)}for(const e of i)this._cache.get(e).store.dispose(),this._cache.delete(e);this._items=t}getItems(){return this._items}}function S(e,t){return w(e,((e,i)=>i??t(e)))}},68847:function(e,t,i){"use strict";i.d(t,{IN:function(){return m},LC:function(){return x},P8:function(){return k},S8:function(){return b},SA:function(){return v},V8:function(){return y},Vn:function(){return L},fj:function(){return w},hd:function(){return C},pD:function(){return S}});var n=i(93915);const s=46,o=47,r=92,a=58;class l extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=-1!==e.indexOf(".")?"property":"argument";let o=`The "${e}" ${s} ${n} of type ${t}`;o+=". Received type "+typeof i,super(o),this.code="ERR_INVALID_ARG_TYPE"}}function c(e,t){if("string"!=typeof e)throw new l(t,"string",e)}const d="win32"===n.iD;function h(e){return e===o||e===r}function u(e){return e===o}function g(e){return e>=65&&e<=90||e>=97&&e<=122}function p(e,t,i,n){let r="",a=0,l=-1,c=0,d=0;for(let h=0;h<=e.length;++h){if(h2){const e=r.lastIndexOf(i);-1===e?(r="",a=0):(r=r.slice(0,e),a=r.length-1-r.lastIndexOf(i)),l=h,c=0;continue}if(0!==r.length){r="",a=0,l=h,c=0;continue}}t&&(r+=r.length>0?`${i}..`:"..",a=2)}else r.length>0?r+=`${i}${e.slice(l+1,h)}`:r=e.slice(l+1,h),a=h-l-1;l=h,c=0}else d===s&&-1!==c?++c:c=-1}return r}function f(e,t){!function(e){if(null===e||"object"!=typeof e)throw new l("pathObject","Object",e)}(t);const i=t.dir||t.root,n=t.base||`${t.name||""}${s=t.ext,s?`${"."===s[0]?"":"."}${s}`:""}`;var s;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const m={resolve(...e){let t="",i="",s=!1;for(let o=e.length-1;o>=-1;o--){let l;if(o>=0){if(l=e[o],c(l,`paths[${o}]`),0===l.length)continue}else 0===t.length?l=n.bJ():(l=n._K[`=${t}`]||n.bJ(),(void 0===l||l.slice(0,2).toLowerCase()!==t.toLowerCase()&&l.charCodeAt(2)===r)&&(l=`${t}\\`));const d=l.length;let u=0,p="",f=!1;const m=l.charCodeAt(0);if(1===d)h(m)&&(u=1,f=!0);else if(h(m))if(f=!0,h(l.charCodeAt(1))){let e=2,t=e;for(;e2&&h(l.charCodeAt(2))&&(f=!0,u=3));if(p.length>0)if(t.length>0){if(p.toLowerCase()!==t.toLowerCase())continue}else t=p;if(s){if(t.length>0)break}else if(i=`${l.slice(u)}\\${i}`,s=f,f&&t.length>0)break}return i=p(i,!s,"\\",h),s?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){c(e,"path");const t=e.length;if(0===t)return".";let i,n=0,s=!1;const o=e.charCodeAt(0);if(1===t)return u(o)?"\\":e;if(h(o))if(s=!0,h(e.charCodeAt(1))){let s=2,o=s;for(;s2&&h(e.charCodeAt(2))&&(s=!0,n=3));let r=n0&&h(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?s?`\\${r}`:r:s?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){c(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return h(i)||t>2&&g(i)&&e.charCodeAt(1)===a&&h(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=s:t+=`\\${s}`)}if(void 0===t)return".";let n=!0,s=0;if("string"==typeof i&&h(i.charCodeAt(0))){++s;const e=i.length;e>1&&h(i.charCodeAt(1))&&(++s,e>2&&(h(i.charCodeAt(2))?++s:n=!1))}if(n){for(;s=2&&(t=`\\${t.slice(s)}`)}return m.normalize(t)},relative(e,t){if(c(e,"from"),c(t,"to"),e===t)return"";const i=m.resolve(e),n=m.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let s=0;for(;ss&&e.charCodeAt(o-1)===r;)o--;const a=o-s;let l=0;for(;ll&&t.charCodeAt(d-1)===r;)d--;const h=d-l,u=au){if(t.charCodeAt(l+p)===r)return n.slice(l+p+1);if(2===p)return n.slice(l+p)}a>u&&(e.charCodeAt(s+p)===r?g=p:2===p&&(g=3)),-1===g&&(g=0)}let f="";for(p=s+g+1;p<=o;++p)p!==o&&e.charCodeAt(p)!==r||(f+=0===f.length?"..":"\\..");return l+=g,f.length>0?`${f}${n.slice(l,d)}`:(n.charCodeAt(l)===r&&++l,n.slice(l,d))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=m.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===r){if(t.charCodeAt(1)===r){const e=t.charCodeAt(2);if(63!==e&&e!==s)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(g(t.charCodeAt(0))&&t.charCodeAt(1)===a&&t.charCodeAt(2)===r)return`\\\\?\\${t}`;return e},dirname(e){c(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const s=e.charCodeAt(0);if(1===t)return h(s)?e:".";if(h(s)){if(i=n=1,h(e.charCodeAt(1))){let s=2,o=s;for(;s2&&h(e.charCodeAt(2))?3:2,n=i);let o=-1,r=!0;for(let i=t-1;i>=n;--i)if(h(e.charCodeAt(i))){if(!r){o=i;break}}else r=!1;if(-1===o){if(-1===i)return".";o=i}return e.slice(0,o)},basename(e,t){void 0!==t&&c(t,"suffix"),c(e,"path");let i,n=0,s=-1,o=!0;if(e.length>=2&&g(e.charCodeAt(0))&&e.charCodeAt(1)===a&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(h(l)){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(s=i):(r=-1,s=a))}return n===s?s=a:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(h(e.charCodeAt(i))){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){c(e,"path");let t=0,i=-1,n=0,o=-1,r=!0,l=0;e.length>=2&&e.charCodeAt(1)===a&&g(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(h(t)){if(!r){n=a+1;break}}else-1===o&&(r=!1,o=a+1),t===s?-1===i?i=a:1!==l&&(l=1):-1!==i&&(l=-1)}return-1===i||-1===o||0===l||1===l&&i===o-1&&i===n+1?"":e.slice(i,o)},format:f.bind(null,"\\"),parse(e){c(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return h(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(h(o)){if(n=1,h(e.charCodeAt(1))){let t=2,s=t;for(;t0&&(t.root=e.slice(0,n));let r=-1,l=n,d=-1,u=!0,p=e.length-1,f=0;for(;p>=n;--p)if(o=e.charCodeAt(p),h(o)){if(!u){l=p+1;break}}else-1===d&&(u=!1,d=p+1),o===s?-1===r?r=p:1!==f&&(f=1):-1!==r&&(f=-1);return-1!==d&&(-1===r||0===f||1===f&&r===d-1&&r===l+1?t.base=t.name=e.slice(l,d):(t.name=e.slice(l,r),t.base=e.slice(l,d),t.ext=e.slice(r,d))),t.dir=l>0&&l!==n?e.slice(0,l-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},_=(()=>{if(d){const e=/\\/g;return()=>{const t=n.bJ().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>n.bJ()})(),v={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const s=n>=0?e[n]:_();c(s,`paths[${n}]`),0!==s.length&&(t=`${s}/${t}`,i=s.charCodeAt(0)===o)}return t=p(t,!i,"/",u),i?`/${t}`:t.length>0?t:"."},normalize(e){if(c(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===o,i=e.charCodeAt(e.length-1)===o;return 0===(e=p(e,!t,"/",u)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return c(e,"path"),e.length>0&&e.charCodeAt(0)===o},join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":v.normalize(t)},relative(e,t){if(c(e,"from"),c(t,"to"),e===t)return"";if((e=v.resolve(e))===(t=v.resolve(t)))return"";const i=e.length,n=i-1,s=t.length-1,r=nr){if(t.charCodeAt(1+l)===o)return t.slice(1+l+1);if(0===l)return t.slice(1+l)}else n>r&&(e.charCodeAt(1+l)===o?a=l:0===l&&(a=0));let d="";for(l=1+a+1;l<=i;++l)l!==i&&e.charCodeAt(l)!==o||(d+=0===d.length?"..":"/..");return`${d}${t.slice(1+a)}`},toNamespacedPath(e){return e},dirname(e){if(c(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===o;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===o){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&c(t,"ext"),c(e,"path");let i,n=0,s=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){const c=e.charCodeAt(i);if(c===o){if(!r){n=i+1;break}}else-1===l&&(r=!1,l=i+1),a>=0&&(c===t.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=l))}return n===s?s=l:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===o){if(!r){n=i+1;break}}else-1===s&&(r=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){c(e,"path");let t=-1,i=0,n=-1,r=!0,a=0;for(let l=e.length-1;l>=0;--l){const c=e.charCodeAt(l);if(c!==o)-1===n&&(r=!1,n=l+1),c===s?-1===t?t=l:1!==a&&(a=1):-1!==t&&(a=-1);else if(!r){i=l+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===i+1?"":e.slice(t,n)},format:f.bind(null,"/"),parse(e){c(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===o;let n;i?(t.root="/",n=1):n=0;let r=-1,a=0,l=-1,d=!0,h=e.length-1,u=0;for(;h>=n;--h){const t=e.charCodeAt(h);if(t!==o)-1===l&&(d=!1,l=h+1),t===s?-1===r?r=h:1!==u&&(u=1):-1!==r&&(u=-1);else if(!d){a=h+1;break}}if(-1!==l){const n=0===a&&i?1:a;-1===r||0===u||1===u&&r===l-1&&r===a+1?t.base=t.name=e.slice(n,l):(t.name=e.slice(n,r),t.base=e.slice(n,l),t.ext=e.slice(r,l))}return a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};v.win32=m.win32=m,v.posix=m.posix=v;const b=d?m.normalize:v.normalize,w=d?m.join:v.join,C=d?m.resolve:v.resolve,y=d?m.relative:v.relative,S=d?m.dirname:v.dirname,k=d?m.basename:v.basename,x=d?m.extname:v.extname,L=d?m.sep:v.sep},79783:function(e,t,i){"use strict";i.d(t,{BH:function(){return P},Fr:function(){return T},H8:function(){return V},HZ:function(){return N},OS:function(){return F},UP:function(){return j},_p:function(){return O},cm:function(){return H},gm:function(){return z},ib:function(){return E},j9:function(){return D},lg:function(){return I},m0:function(){return q},nr:function(){return U},uF:function(){return x},un:function(){return M},zx:function(){return L}});var n=i(14374);const s="en";let o,r,a=!1,l=!1,c=!1,d=!1,h=!1,u=!1,g=!1,p=!1,f=!1,m=!1,_=s,v=null,b=null;const w=globalThis;let C;void 0!==w.vscode&&void 0!==w.vscode.process?C=w.vscode.process:"undefined"!=typeof process&&"string"==typeof process?.versions?.node&&(C=process);const y="string"==typeof C?.versions?.electron,S=y&&"renderer"===C?.type;if("object"==typeof C){a="win32"===C.platform,l="darwin"===C.platform,c="linux"===C.platform,d=c&&!!C.env.SNAP&&!!C.env.SNAP_REVISION,g=y,f=!!C.env.CI||!!C.env.BUILD_ARTIFACTSTAGINGDIRECTORY,o=s,_=s;const e=C.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);o=t.userLocale,v=t.osLocale,_=t.resolvedLanguage||s,b=t.languagePack?.translationsConfigFile}catch(e){}h=!0}else"object"!=typeof navigator||S?console.error("Unable to resolve platform."):(r=navigator.userAgent,a=r.indexOf("Windows")>=0,l=r.indexOf("Macintosh")>=0,p=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=r.indexOf("Linux")>=0,m=r?.indexOf("Mobi")>=0,u=!0,_=n.i8()||s,o=navigator.language.toLowerCase(),v=o);let k=0;l?k=1:a?k=3:c&&(k=2);const x=a,L=l,D=c,E=h,N=u,I=u&&"function"==typeof w.importScripts?w.origin:void 0,M=p,T=m,R=r,P=_,A="function"==typeof w.postMessage&&!w.importScripts,O=(()=>{if(A){const e=[];w.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),w.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),F=l||p?2:a?1:3;let B=!0,W=!1;function H(){if(!W){W=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);B=513===t[0]}return B}const V=!!(R&&R.indexOf("Chrome")>=0),z=!!(R&&R.indexOf("Firefox")>=0),U=!!(!V&&R&&R.indexOf("Safari")>=0),j=!!(R&&R.indexOf("Edg/")>=0),q=!!(R&&R.indexOf("Android")>=0)},93915:function(e,t,i){"use strict";i.d(t,{_K:function(){return a},bJ:function(){return r},iD:function(){return l}});var n=i(79783);let s;const o=globalThis.vscode;if(void 0!==o&&void 0!==o.process){const e=o.process;s={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else s="undefined"!=typeof process&&"string"==typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:{get platform(){return n.uF?"win32":n.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const r=s.cwd,a=s.env,l=s.platform},69627:function(e,t,i){"use strict";var n;i.d(t,{Q:function(){return n}}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],s={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return i(s)||n.push(s),i(o)||n.push(o),n}}(n||(n={}))},59951:function(e,t,i){"use strict";i.d(t,{B6:function(){return S},Fd:function(){return v},LC:function(){return f},P8:function(){return p},Pi:function(){return g},er:function(){return h},iZ:function(){return b},n4:function(){return u},o1:function(){return w},pD:function(){return m},su:function(){return c},uJ:function(){return _}});var n=i(11354),s=i(84756),o=i(68847),r=i(79783),a=i(43920),l=i(54244);function c(e){return(0,l.I)(e,!0)}class d{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===s.ny.file)return n._1(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(C(e.authority,t.authority))return n._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return p(e)||e.authority}basename(e){return o.SA.basename(e.path)}extname(e){return o.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===s.ny.file?t=l.r.file(o.pD(c(e))).path:(t=o.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===s.ny.file?l.r.file(o.S8(c(e))).path:o.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!C(e.authority,t.authority))return;if(e.scheme===s.ny.file){const i=o.V8(c(e),c(t));return r.uF?n.TH(i):i}let i=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,a.length);en.Zn(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=o.Vn){return y(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=o.Vn){let i=!1;if(e.scheme===s.ny.file){const s=c(e);i=void 0!==s&&s.length===n.Zn(s).length&&s[s.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||y(e,t)?e:e.with({path:e.path+"/"})}}const h=new d((()=>!1)),u=(new d((e=>e.scheme!==s.ny.file||!r.j9)),new d((e=>!0)),h.isEqual.bind(h)),g=(h.isEqualOrParent.bind(h),h.getComparisonKey.bind(h),h.basenameOrAuthority.bind(h)),p=h.basename.bind(h),f=h.extname.bind(h),m=h.dirname.bind(h),_=h.joinPath.bind(h),v=h.normalizePath.bind(h),b=h.relativePath.bind(h),w=h.resolvePath.bind(h),C=(h.isAbsolutePath.bind(h),h.isEqualAuthority.bind(h)),y=h.hasTrailingPathSeparator.bind(h);var S;h.removeTrailingPathSeparator.bind(h),h.addTrailingPathSeparator.bind(h),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(S||(S={}))},95773:function(e,t,i){"use strict";i.d(t,{yE:function(){return r}});var n=i(80670),s=i(35114);class o{constructor(e,t,i,n,s,o,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,s|=0,o|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),r+s>o&&(r=o-s),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new o(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new o(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends s.jG{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.vl),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new o(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new c(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=c.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class c{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e=t.length?e:t[n]}))}function l(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function c(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function d(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function h(e,t=" "){return g(u(e,t),t)}function u(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function g(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let s=n,o=-1;for(;o=e.lastIndexOf(t,s-1),-1!==o&&o+i===s;){if(0===o)return"";s=o}return e.substring(0,s)}function p(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(e){return e.replace(/\*/g,"")}function m(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=d(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function v(e){return e.split(/\r\n|\r|\n/)}function b(e){const t=[],i=e.split(/(\r\n|\r|\n)/);for(let e=0;e=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function S(e,t){return et?1:0}function k(e,t,i=0,n=e.length,s=0,o=t.length){for(;io)return 1}const r=n-i,a=o-s;return ra?1:0}function x(e,t){return L(e,t,0,e.length,0,t.length)}function L(e,t,i=0,n=e.length,s=0,o=t.length){for(;i=128||a>=128)return k(e.toLowerCase(),t.toLowerCase(),i,n,s,o);E(r)&&(r-=32),E(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=o-s;return ra?1:0}function D(e){return e>=48&&e<=57}function E(e){return e>=97&&e<=122}function N(e){return e>=65&&e<=90}function I(e,t){return e.length===t.length&&0===L(e,t)}function M(e,t){const i=t.length;return!(t.length>e.length)&&0===L(e,t,0,i)}function T(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n1){const n=e.charCodeAt(t-2);if(P(n))return O(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=F(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class W{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new B(e,t)}nextGraphemeLength(){const e=ie.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(te(n,s)){t.setOffset(i);break}n=s}return t.offset-i}prevGraphemeLength(){const e=ie.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(te(s,n)){t.setOffset(i);break}n=s}return i-t.offset}eol(){return this._iterator.eol()}}function H(e,t){return new W(e,t).nextGraphemeLength()}function V(e,t){return new W(e,t).prevGraphemeLength()}function z(e,t){t>0&&A(e.charCodeAt(t))&&t--;const i=t+H(e,t);return[i-V(e,i),i]}let U;function j(e){return U||(U=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),U.test(e)}const q=/^[\t\n\r\x20-\x7E]*$/;function K(e){return q.test(e)}const $=/[\u2028\u2029]/;function G(e){return $.test(e)}function Q(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Y(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const Z=String.fromCharCode(65279);function X(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function J(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ee(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function te(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ie{static{this._INSTANCE=null}static getInstance(){return ie._INSTANCE||(ie._INSTANCE=new ie),ie._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function ne(e,t){if(0===e)return 0;const i=function(e,t){const i=new B(t,e);let n=i.prevCodePoint();for(;se(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!Y(n))return;let s=i.offset;return s>0&&8205===i.prevCodePoint()&&(s=i.offset),s}(e,t);if(void 0!==i)return i;const n=new B(t,e);return n.prevCodePoint(),n.offset}function se(e){return 127995<=e&&e<=127999}const oe=" ";class re{static{this.ambiguousCharacterData=new s.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new n.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in n));0===o.length&&(o=["_default"]);for(const e of o)s=i(s,t(n[e]));const r=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(n._common),s);return new re(r)}))}static getInstance(e){return re.cache.get(Array.from(e))}static{this._locales=new s.d((()=>Object.keys(re.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return re._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class ae{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(ae.getRawData())),this._data}static isInvisibleCharacter(e){return ae.getData().has(e)}static get codePoints(){return ae.getData()}}},4691:function(e,t,i){"use strict";i.d(t,{h:function(){return n}});const n=Symbol("MicrotaskDelay")},80945:function(e,t,i){"use strict";i.d(t,{cB:function(){return c}});var n=i(43920);class s{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new c(new a(e,t))}static forStrings(){return new c(new s)}static forConfigKeys(){return new c(new o)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new l,this._root.segment=i.value());const s=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new l,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new l,n.right.segment=i.value()),s.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),s.push([0,n]),n=n.mid}}const o=n.value;n.value=t,n.key=e;for(let e=s.length-1;e>=0;e--){const t=s[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=s[e][0],n=s[e+1][0];if(1===i&&1===n)s[e][1]=t.rotateLeft();else if(-1===i&&-1===n)s[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=s[e+1][1]=s[e+1][1].rotateRight(),s[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=s[e+1][1]=s[e+1][1].rotateLeft(),s[e][1]=t.rotateRight()}if(e>0)switch(s[e-1][0]){case-1:s[e-1][1].left=s[e][1];break;case 1:s[e-1][1].right=s[e][1];break;case 0:s[e-1][1].mid=s[e][1]}else this._root=s[0][1]}}return o}get(e){return this._getNode(e)?.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===t?.value&&void 0===t?.mid)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let s=this._root;for(;s;){const e=i.cmp(s.segment);if(e>0)n.push([-1,s]),s=s.left;else if(e<0)n.push([1,s]),s=s.right;else{if(!i.hasNext())break;i.next(),n.push([0,s]),s=s.mid}}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const e=this._min(s.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}}else{const e=s.left??s.right;if(n.length>0){const[t,i]=n[n.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=n.length-1;e>=0;e--){const t=n[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),n[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),n[e][1]=t.rotateRight()),e>0)switch(n[e-1][0]){case-1:n[e-1][1].left=n[e][1];break;case 1:n[e-1][1].right=n[e][1];break;case 0:n[e-1][1].mid=n[e][1]}else this._root=n[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}},56613:function(e,t,i){"use strict";i.d(t,{L:function(){return s}});var n,s,o=i(93231);!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(n||(n={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(o.W.error);const[,s,r]=n,a=["codicon","codicon-"+s];return r&&a.push("codicon-modifier-"+r.substring(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};const s=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=s.exec(e);if(!t)return;const[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){return e.id===t.id&&e.color?.id===t.color?.id}}(s||(s={}))},24219:function(e,t,i){"use strict";function n(e){return"string"==typeof e}function s(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){const t=Object.getPrototypeOf(Uint8Array);return"object"==typeof e&&e instanceof t}function r(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!!e&&"function"==typeof e[Symbol.iterator]}function l(e){return!0===e||!1===e}function c(e){return void 0===e}function d(e){return!h(e)}function h(e){return c(e)||null===e}function u(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function g(e){if(h(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function p(e){return"function"==typeof e}function f(e,t){const i=Math.min(e.length,t.length);for(let n=0;n255?255:0|e}function s(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{W:function(){return n},j:function(){return s}})},54244:function(e,t,i){"use strict";i.d(t,{I:function(){return _},r:function(){return h}});var n=i(68847),s=i(79783);const o=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//,l="",c="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,s,d=!1){"object"==typeof e?(this.scheme=e.scheme||l,this.authority=e.authority||l,this.path=e.path||l,this.query=e.query||l,this.fragment=e.fragment||l):(this.scheme=function(e,t){return e||t?e:"file"}(e,d),this.authority=t||l,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,i||l),this.query=n||l,this.fragment=s||l,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,d))}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=l),void 0===i?i=this.authority:null===i&&(i=l),void 0===n?n=this.path:null===n&&(n=l),void 0===s?s=this.query:null===s&&(s=l),void 0===o?o=this.fragment:null===o&&(o=l),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment?this:new g(t,i,n,s,o)}static parse(e,t=!1){const i=d.exec(e);return i?new g(i[2]||l,C(i[4]||l),C(i[5]||l),C(i[7]||l),C(i[9]||l),t):new g(l,l,l,l,l)}static file(e){let t=l;if(s.uF&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const i=e.indexOf(c,2);-1===i?(t=e.substring(2),e=c):(t=e.substring(2,i),e=e.substring(i)||c)}return new g("file",t,e,l,l)}static from(e,t){return new g(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=s.uF&&"file"===e.scheme?h.file(n.IN.join(_(e,!0),...t)).path:n.SA.join(e.path,...t),e.with({path:i})}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new g(e);return t._formatted=e.external??null,t._fsPath=e._sep===u?e.fsPath??null:null,t}}return e}}const u=s.uF?1:void 0;class g extends h{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t,i){let n,s=-1;for(let o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));const t=p[r];void 0!==t?(-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),n+=t):-1===s&&(s=o)}}return-1!==s&&(n+=encodeURIComponent(e.substring(s))),void 0!==n?n:e}function m(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s.uF&&(i=i.replace(/\//g,"\\")),i}function v(e,t){const i=t?m:f;let n="",{scheme:s,authority:o,path:r,query:a,fragment:l}=e;if(s&&(n+=s,n+=":"),(o||"file"===s)&&(n+=c,n+=c),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}o=o.toLowerCase(),e=o.lastIndexOf(":"),-1===e?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:f(l,!1,!1)),n}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(w)?e.replace(w,(e=>b(e))):e}},20419:function(e,t,i){"use strict";i.d(t,{b:function(){return n}});const n=function(){if("object"==typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t{this._pendingReplies[n]={resolve:s,reject:o},this._send(new g(this._workerId,n,e,t,i))}))}listen(e,t,i){let n=null;const o=new s.vl({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,o),this._send(new f(this._workerId,n,e,t,i))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new _(this._workerId,n)),n=null}});return o.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const i={get:(i,n)=>("string"!=typeof n||i[n]||(C(n)?i[n]=t=>this.listen(e,n,t):w(n)?i[n]=this.listen(e,n,void 0):36===n.charCodeAt(0)&&(i[n]=async(...i)=>(await(t?.()),this.sendMessage(e,n,i)))),i[n])};return new Proxy(Object.create(null),i)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then((e=>{this._send(new p(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,n.cU)(e.detail)),this._send(new p(this._workerId,t,void 0,(0,n.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new m(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{(0,n.dz)(e)}))),this._protocol=new v({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,i)=>this._handleMessage(e,t,i),handleEvent:(e,t,i)=>this._handleEvent(e,t,i)}),this._protocol.setWorkerId(this._worker.getId());let i=null;const s=globalThis.require;void 0!==s&&"function"==typeof s.getConfig?i=s.getConfig():void 0!==globalThis.requirejs&&(i=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(c,d,[this._worker.getId(),JSON.parse(JSON.stringify(i)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(c,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,i){const n=this._localChannels.get(e);if(!n)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!=typeof n[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(n[t].apply(n,i))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,i){const n=this._localChannels.get(e);if(!n)throw new Error(`Missing channel ${e} on main thread`);if(C(t)){const s=n[t].call(n,i);if("function"!=typeof s)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return s}if(w(t)){const i=n[t];if("function"!=typeof i)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return i}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function w(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function C(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class y{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new v({sendMessage:(t,i)=>{e(t,i)},handleMessage:(e,t,i)=>this._handleMessage(e,t,i),handleEvent:(e,t,i)=>this._handleEvent(e,t,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,i){if(e===c&&t===d)return this.initialize(i[0],i[1],i[2]);const n=e===c?this._requestHandler:this._localChannels.get(e);if(!n)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!=typeof n[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(n[t].apply(n,i))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,i){const n=e===c?this._requestHandler:this._localChannels.get(e);if(!n)throw new Error(`Missing channel ${e} on worker thread`);if(C(t)){const e=n[t].call(n,i);if("function"!=typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(w(t)){const e=n[t];if("function"!=typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,n){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){t&&(void 0!==t.baseUrl&&delete t.baseUrl,void 0!==t.paths&&void 0!==t.paths.vs&&delete t.paths.vs,void 0!==t.trustedTypesPolicy&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t));{const e=r.zl.asBrowserUri(`${n}.js`).toString(!0);return i(12694)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}}this._requestHandler=this._requestHandlerFactory(this)}}function S(e){return new y(e,null)}},12694:function(e,t,i){var n={"./simpleWorker":79757,"./simpleWorker.js":79757};function s(e){return Promise.resolve().then((function(){if(!i.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i(n[e])}))}s.keys=function(){return Object.keys(n)},s.id=12694,e.exports=s},71882:function(e,t,i){"use strict";i.d(t,{K:function(){return g}});var n=i(47091),s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||s(e,l,{get:()=>t[l],enumerable:!(n=o(t,l))||n.enumerable});return e},c={};l(c,n,"default");var d={},h={},u=class e{static getOrCreate(t){return h[t]||(h[t]=new e(t)),h[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,d[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function g(e){const t=e.id;d[t]=e,c.languages.register(e);const i=u.getOrCreate(t);c.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),c.languages.onLanguageEncountered(t,(async()=>{const e=await i.load();c.languages.setLanguageConfiguration(t,e.conf)}))}},55172:function(e,t,i){"use strict";(0,i(71882).K)({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(7714).then(i.bind(i,37714))})},43193:function(e,t,i){"use strict";i.d(t,{M:function(){return s}});var n=i(43999);function s(e,t){e instanceof n.D?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}},75083:function(e,t,i){"use strict";i.d(t,{u:function(){return r}});var n=i(35114),s=i(80670),o=i(84201);class r extends n.jG{constructor(e,t){super(),this._onDidChange=this._register(new s.vl),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const s=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{(0,o.PG)((0,o.zk)(this._referenceDomElement),(()=>{n=!1,s()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?{width:t[0].contentRect.width,height:t[0].contentRect.height}:null,i=!0,s()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}},57614:function(e,t,i){"use strict";i.d(t,{T:function(){return p}});var n=i(84201),s=i(8670),o=i(80670),r=i(35114),a=i(43193);class l{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class c{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),this._container?.remove(),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");(0,a.M)(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");(0,a.M)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");(0,a.M)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const s=[];for(const e of this._requests){let o;0===e.type&&(o=t),2===e.type&&(o=i),1===e.type&&(o=n),o.appendChild(document.createElement("br"));const r=document.createElement("span");c._render(r,e),o.appendChild(r),s.push(r)}this._container=e,this._testElements=s}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)}),5e3))}_evictUntrustedReadings(e){const t=this._ensureCache(e),i=t.getValues();let n=!1;for(const e of i)e.isTrusted||(n=!0,t.remove(e));n&&this._onDidChange.fire()}readFontInfo(e,t){const i=this._ensureCache(e);if(!i.has(t)){let i=this._actualReadFontInfo(e,t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new h.YJ({pixelRatio:s.c.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(e,t,i)}return i.get(t)}_createRequest(e,t,i,n){const s=new l(e,t);return i.push(s),n?.push(s),s}_actualReadFontInfo(e,t){const i=[],n=[],o=this._createRequest("n",0,i,n),r=this._createRequest("m",0,i,null),a=this._createRequest(" ",0,i,n),l=this._createRequest("0",0,i,n),u=this._createRequest("1",0,i,n),g=this._createRequest("2",0,i,n),p=this._createRequest("3",0,i,n),f=this._createRequest("4",0,i,n),m=this._createRequest("5",0,i,n),_=this._createRequest("6",0,i,n),v=this._createRequest("7",0,i,n),b=this._createRequest("8",0,i,n),w=this._createRequest("9",0,i,n),C=this._createRequest("→",0,i,n),y=this._createRequest("→",0,i,null),S=this._createRequest("·",0,i,n),k=this._createRequest(String.fromCharCode(11825),0,i,null),x="|/-_ilm%";for(let e=0,t=8;e.001){D=!1;break}}let N=!0;return D&&y.width!==E&&(N=!1),y.width>C.width&&(N=!1),new h.YJ({pixelRatio:s.c.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:D,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:a.width,middotWidth:S.width,wsmiddotWidth:k.width,maxDigitWidth:L},!0)}}class g{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const p=new u},52055:function(e,t,i){"use strict";i.d(t,{M:function(){return s}});var n=i(80670);const s=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new n.vl,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}},55036:function(e,t,i){"use strict";i.d(t,{$D:function(){return n},Eq:function(){return b},M0:function(){return k},Mz:function(){return S},No:function(){return y},bs:function(){return w}});var n,s=i(75969),o=i(84201),r=i(26745),a=i(40478),l=i(56627),c=i(90890),d=i(80670),h=i(35114),u=i(5940),g=i(43920),p=i(41069),f=i(56218),m=i(68745),_=i(76925),v=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const b={forceCopyWithSyntaxHighlighting:!1};class w{static{this.INSTANCE=new w}constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}class C{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let y=class extends h.jG{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,o){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=o,this._onFocus=this._register(new d.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new d.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new d.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new d.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new d.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new d.vl),this.onPaste=this._onPaste.event,this._onType=this._register(new d.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new d.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new d.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new d.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new d.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new h.HE),this._asyncTriggerCut=this._register(new c.uC((()=>this._onCut.fire()),0)),this._textAreaState=p._O.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(d.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new c.uC((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)):this._asyncFocusGainWriteScreenReaderContent.clear()}))),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown((e=>{const t=new a.Z(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new a.Z(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{p.Hf&&console.log("[compositionstart]",e);const t=new C;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code))return p.Hf&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{p.Hf&&console.log("[compositionupdate]",e);const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=p._O.readFromTextArea(this._textArea,this._textAreaState),i=p._O.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p._O.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{p.Hf&&console.log("[compositionend]",e);const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=p._O.readFromTextArea(this._textArea,this._textAreaState),t=p._O.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p._O.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(p.Hf&&console.log("[input]",e),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=p._O.readFromTextArea(this._textArea,this._textAreaState),i=p._O.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!g.pc(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=S.getTextData(e.clipboardData);t&&(i=i||w.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new c.uC((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return o.ko(this._textArea.ownerDocument,"selectionchange",(t=>{if(l.p.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100)return;if(!this._textAreaState.selection)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const c=this._textAreaState.deduceEditorPosition(r),d=this._host.deduceModelPosition(c[0],c[1],c[2]),h=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(h[0],h[1],h[2]),g=new f.L(d.lineNumber,d.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&"render"===e||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};w.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&S.setTextData(e.clipboardData,t.text,t.html,i)}};y=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([v(4,m.j),v(5,_.rr)],y);const S={getTextData(e){const t=e.getData(u.K.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return 0===t.length&&null===i&&e.files.length>0?[Array.prototype.slice.call(e.files,0).map((e=>e.name)).join("\n"),null]:[t,i]},setTextData(e,t,i,n){e.setData(u.K.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class k extends h.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new r.f(this._actual,"keydown")).event,this.onKeyUp=this._register(new r.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new r.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new r.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new r.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new r.f(this._actual,"beforeinput")).event,this.onInput=this._register(new r.f(this._actual,"input")).event,this.onCut=this._register(new r.f(this._actual,"cut")).event,this.onCopy=this._register(new r.f(this._actual,"copy")).event,this.onPaste=this._register(new r.f(this._actual,"paste")).event,this.onFocus=this._register(new r.f(this._actual,"focus")).event,this.onBlur=this._register(new r.f(this._actual,"blur")).event,this._onSyntheticTap=this._register(new d.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>l.p.onKeyDown()))),this._register(this.onBeforeInput((()=>l.p.onBeforeInput()))),this._register(this.onInput((()=>l.p.onInput()))),this._register(this.onKeyUp((()=>l.p.onKeyUp()))),this._register(o.ko(this._actual,n.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=o.jG(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&o.bq()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let r=null;const a=o.jG(n);r=a?a.activeElement:o.bq();const l=o.zk(r),c=r===n,d=n.selectionStart,h=n.selectionEnd;if(c&&d===t&&h===i)s.gm&&l.parent!==l&&n.focus();else{if(c)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(s.gm&&l.parent!==l&&n.focus());try{const e=o.zK(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),o.wk(n,e)}catch(e){}}}}},41069:function(e,t,i){"use strict";i.d(t,{Al:function(){return a},Hf:function(){return o},_O:function(){return r}});var n=i(43920),s=i(40393);const o=!1;class r{static{this.EMPTY=new r("",0,0,null,void 0)}constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd();let o;return t&&i.substring(0,n)===t.value.substring(0,t.selectionStart)&&(o=t.newlineCountBeforeSelection),new r(i,n,s,null,o)}collapseSelection(){return this.selectionStart===this.value.length?this:new r(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){o&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;-1!==(s=t.indexOf("\n",s+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};o&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));const s=Math.min(n.Qp(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(n.Vi(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),a=e.value.substring(s,e.value.length-r),l=t.value.substring(s,t.value.length-r),c=e.selectionStart-s,d=e.selectionEnd-s,h=t.selectionStart-s,u=t.selectionEnd-s;if(o&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${c}, selectionEnd: ${d}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${h}, selectionEnd: ${u}`)),h===u){const t=e.selectionStart-s;return o&&console.log(`REMOVE PREVIOUS: ${t} chars`),{text:l,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:d-c,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(o&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Qp(e.value,t.value),e.selectionEnd),s=Math.min(n.Vi(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-s),a=t.value.substring(i,t.value.length-s),l=e.selectionStart-i,c=e.selectionEnd-i,d=t.selectionStart-i,h=t.selectionEnd-i;return o&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${d}, selectionEnd: ${h}`)),{text:a,replacePrevCharCnt:c,replaceNextCharCnt:r.length-c,positionDelta:h-a.length}}}class a{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,o=i+t;return new s.Q(n,1,o+1,1)}static fromEditorSelection(e,t,i,n){const o=500,l=a._getPageOfLine(t.startLineNumber,i),c=a._getRangeForPage(l,i),d=a._getPageOfLine(t.endLineNumber,i),h=a._getRangeForPage(d,i);let u=c.intersectRanges(new s.Q(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(u,1)>o){const t=e.modifyPosition(u.getEndPosition(),-500);u=s.Q.fromPositions(t,u.getEndPosition())}const g=e.getValueInRange(u,1),p=e.getLineCount(),f=e.getLineMaxColumn(p);let m=h.intersectRanges(new s.Q(t.endLineNumber,t.endColumn,p,f));if(n&&e.getValueLengthInRange(m,1)>o){const t=e.modifyPosition(m.getStartPosition(),o);m=s.Q.fromPositions(m.getStartPosition(),t)}const _=e.getValueInRange(m,1);let v;if(l===d||l+1===d)v=e.getValueInRange(t,1);else{const i=c.intersectRanges(t),n=h.intersectRanges(t);v=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&v.length>1e3&&(v=v.substring(0,o)+String.fromCharCode(8230)+v.substring(v.length-o,v.length)),new r(g+v+_,g.length,g.length+v.length,t,u.endLineNumber-u.startLineNumber)}}},34157:function(e,t,i){"use strict";i.d(t,{Yh:function(){return N},QM:function(){return f}});var n=i(14374),s=i(75969),o=i(24219),r=i(15075),a=i(52694),l=i(72777),c=i(30699),d=i(62993),h=i(40393);class u{static columnSelect(e,t,i,n,s,o){const r=Math.abs(s-i)+1,a=i>s,l=n>o,u=no)continue;if(_n)continue;if(m0&&n--,u.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=s;i<=o;i++){const s=t.getLineMaxColumn(i),o=e.visibleColumnFromColumn(t,new d.y(i,s));n=Math.max(n,o)}let r=i.toViewVisualColumn;return r{const i=e.get(l.T).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=(0,y.bq)();return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(i),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.T).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends k{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.c.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&2!==t.revealType&&e.revealAllCursors(t.source,!0,!0))}}e.MoveTo=(0,a.E_)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.E_)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends k{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>c.MF.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=(0,a.E_)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if(void 0===n.position||void 0===n.viewPosition||void 0===n.mouseColumn)return null;const s=e.model.validatePosition(n.position),o=e.coordinatesConverter.validateViewPosition(new d.y(n.viewPosition.lineNumber,n.viewPosition.column),s),r=n.doColumnSelect?i.fromViewLineNumber:o.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return u.columnSelect(e.cursorConfig,e,r,a,o.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.E_)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.E_)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectRight(e.cursorConfig,e,i)}});class o extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.E_)(new o({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.E_)(new o({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.E_)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.E_)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3596,linux:{primary:0}}}));class f extends k{constructor(){super({id:"cursorMove",precondition:void 0,metadata:_.S.metadata})}runCoreEditorCommand(e,t){const i=_.S.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,f._move(e,e.getCursorStates(),i)),e.revealAllCursors(t,!0)}static _move(e,t,i){const n=i.select,s=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.c.simpleMove(e,t,i.direction,n,s,i.unit);case 11:case 13:case 12:case 14:return _.c.viewportMove(e,t,i.direction,n,s);default:return null}}}e.CursorMoveImpl=f,e.CursorMove=(0,a.E_)(new f);class m extends k{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.c.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealAllCursors(t.source,!0)}}e.CursorLeft=(0,a.E_)(new m({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.E_)(new m({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1039}})),e.CursorRight=(0,a.E_)(new m({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.E_)(new m({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1041}})),e.CursorUp=(0,a.E_)(new m({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.E_)(new m({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.E_)(new m({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.E_)(new m({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1035}})),e.CursorDown=(0,a.E_)(new m({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.E_)(new m({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.E_)(new m({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.E_)(new m({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.E_)(new class extends k{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?_.c.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.c.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const s=i.modelState?i.modelState.position:null,o=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;io&&(s=o);const r=new h.Q(s,1,s,e.model.getLineMaxColumn(s));let a=0;if(i.at)switch(i.at){case p.RawAtArgument.Top:a=3;break;case p.RawAtArgument.Center:a=1;break;case p.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends x{constructor(){super(a.tc)}runDOMCommand(e){s.gm&&(e.focus(),e.select()),e.ownerDocument.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.c.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.E_)(new class extends k{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[c.MF.fromModelSelection(t.selection)]))}})}(f||(f={}));const L=w.M$.and(b.R.textInputFocus,b.R.columnSelection);function D(e,t){C.f.registerKeybindingRule({id:e,primary:t,when:L,weight:1})}function E(e){return e.register(),e}var N;D(f.CursorColumnSelectLeft.id,1039),D(f.CursorColumnSelectRight.id,1041),D(f.CursorColumnSelectUp.id,1040),D(f.CursorColumnSelectPageUp.id,1035),D(f.CursorColumnSelectDown.id,1042),D(f.CursorColumnSelectPageDown.id,1036),function(e){class t extends a.DX{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.E_)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.R.writable,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,S.AO.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.E_)(new class extends t{constructor(){super({id:"outdent",precondition:b.R.writable,kbOpts:{weight:0,kbExpr:w.M$.and(b.R.editorTextFocus,b.R.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.T.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.E_)(new class extends t{constructor(){super({id:"tab",precondition:b.R.writable,kbOpts:{weight:0,kbExpr:w.M$.and(b.R.editorTextFocus,b.R.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.T.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.E_)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,s]=m.g.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.E_)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,s]=m.g.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(3)}}),e.Undo=new class extends x{constructor(){super(a.aU)}runDOMCommand(e){e.ownerDocument.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(92))return t.getModel().undo()}},e.Redo=new class extends x{constructor(){super(a.ih)}runDOMCommand(e){e.ownerDocument.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(92))return t.getModel().redo()}}}(N||(N={}));class I extends a.uB{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.T).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function M(e,t){E(new I("default:"+e,e)),E(new I(e,e,t))}M("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),M("replacePreviousChar"),M("compositionType"),M("compositionStart"),M("compositionEnd"),M("paste"),M("cut")},92559:function(e,t,i){"use strict";i.d(t,{l:function(){return h},q:function(){return l}});var n=i(88767),s=i(71859),o=i(5940),r=i(54244),a=i(19312);function l(e){const t=new s.Vq;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,(0,s.gf)(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,c(n))}}return t}function c(e){const t=e.path?r.r.parse(e.path):void 0;return(0,s.VX)(e.name,t,(async()=>new Uint8Array(await e.arrayBuffer())))}const d=Object.freeze([a.sV.EDITORS,a.sV.FILES,n.t.RESOURCES,n.t.INTERNAL_URI_LIST]);function h(e,t=!1){const i=l(e),a=i.get(n.t.INTERNAL_URI_LIST);if(a)i.replace(o.K.uriList,a);else if(t||!i.has(o.K.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(r.r.file(i).toString()):t.push(r.r.parse(e.name,!0).toString())}catch{}}}t.length&&i.replace(o.K.uriList,(0,s.gf)(s.jt.create(t)))}for(const e of d)i.delete(e);return i}},47010:function(e,t,i){"use strict";i.d(t,{Np:function(){return o},jA:function(){return r},z9:function(){return s}});var n=i(48872);function s(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n._.ICodeEditor}function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n._.IDiffEditor}function r(e){return s(e)?e:o(e)?e.getModifiedEditor():function(e){return!!e&&"object"==typeof e&&"function"==typeof e.onDidChangeActiveEditor}(e)&&s(e.activeCodeEditor)?e.activeCodeEditor:null}},55266:function(e,t,i){"use strict";i.d(t,{$z:function(){return m},BA:function(){return v},DW:function(){return _},Hh:function(){return d},Qn:function(){return b},dO:function(){return f},i_:function(){return p},nz:function(){return c},wt:function(){return g}});var n=i(84201),s=i(82884),o=i(34287),r=i(90890),a=i(35114),l=i(4195);class c{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new d(this.x-e.scrollX,this.y-e.scrollY)}}class d{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new c(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class h{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class u{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function g(e){const t=n.BK(e);return new h(t.left,t.top,t.width,t.height)}function p(e,t,i){const n=t.width/e.offsetWidth,s=t.height/e.offsetHeight,o=(i.x-t.x)/n,r=(i.y-t.y)/s;return new u(o,r)}class f extends o.P{constructor(e,t,i){super(n.zk(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new c(this.posx,this.posy),this.editorPos=g(i),this.relativePos=p(i,this.editorPos,this.pos)}}class m{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return n.ko(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return n.ko(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return n.ko(e,n.Bx.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return n.ko(e,n.Bx.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return n.ko(e,"mousemove",(e=>t(this._create(e))))}}class _{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return n.ko(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return n.ko(e,n.Bx.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return n.ko(e,"pointermove",(e=>t(this._create(e))))}}class v extends a.jG{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new s._),this._keydownListener=null}startMonitoring(e,t,i,s,o){this._keydownListener=n.b2(e.ownerDocument,"keydown",(e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{s(new f(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class b{static{this._idPool=0}constructor(e){this._editor=e,this._instanceId=++b._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new r.uC((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const s=this._counter++;i=new w(t,`dyn-rule-${this._instanceId}-${s}`,n.Cl(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}class w{constructor(e,t,i,s){this.key=e,this.className=t,this.properties=s,this._referenceCount=0,this._styleElementDisposables=new a.Cm,this._styleElement=n.li(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let s;s="object"==typeof n?(0,l.GuP)(n.id):n,i+=`\n\t${C(e)}: ${s};`}return i+="\n}",i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function C(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}},52694:function(e,t,i){"use strict";i.d(t,{DX:function(){return S},E_:function(){return E},Fl:function(){return N},HW:function(){return T},PF:function(){return x},aU:function(){return A},dS:function(){return n},fE:function(){return C},gW:function(){return I},ih:function(){return O},ke:function(){return D},ks:function(){return k},qO:function(){return L},tc:function(){return F},uB:function(){return w},xX:function(){return M}});var n,s=i(14374),o=i(54244),r=i(72777),a=i(62993),l=i(59266),c=i(20878),d=i(93223),h=i(21335),u=i(97848),g=i(63619),p=i(19561),f=i(56419),m=i(2727),_=i(24219),v=i(76925),b=i(84201);class w{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?u.M$.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};p.f.registerKeybindingRule(i)}}h.w.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){d.ZG.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class C extends w{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(u.fN).contextMatchesRules(i??void 0))return n(e,o,t)}))}runCommand(e,t){return S.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class k extends S{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=d.D8.EditorContext),t.title||(t.title=e.label),t.when=u.M$.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(k.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(m.k).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class x extends k{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e{const i=e.get(u.fN),s=e.get(v.rr);if(i.contextMatchesRules(this.desc.precondition??void 0))return this.runEditorCommand(e,n,...t);s.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize())}))}}function D(e,t){h.w.registerCommand(e,(function(e,...i){const n=e.get(g._Y),[s,r]=i;(0,_.j)(o.r.isUri(s)),(0,_.j)(a.y.isIPosition(r));const d=e.get(l.IModelService).getModel(s);if(d){const e=a.y.lift(r);return n.invokeFunction(t,d,e,...i.slice(2))}return e.get(c.ITextModelService).createModelReference(s).then((e=>new Promise(((s,o)=>{try{s(n.invokeFunction(t,e.object.textEditorModel,a.y.lift(r),i.slice(2)))}catch(e){o(e)}})).finally((()=>{e.dispose()}))))}))}function E(e){return R.INSTANCE.registerEditorCommand(e),e}function N(e){const t=new e;return R.INSTANCE.registerEditorAction(t),t}function I(e){return R.INSTANCE.registerEditorAction(e),e}function M(e){R.INSTANCE.registerEditorAction(e)}function T(e,t,i){R.INSTANCE.registerEditorContribution(e,t,i)}!function(e){e.getEditorCommand=function(e){return R.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return R.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return R.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return R.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return R.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class R{static{this.INSTANCE=new R}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function P(e){return e.register(),e}f.O.add("editor.contributions",R.INSTANCE);const A=P(new C({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:s.kg({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:d.D8.CommandPalette,group:"",title:s.kg("undo","Undo"),order:1}]}));P(new y(A,{id:"default:undo",precondition:void 0}));const O=P(new C({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:s.kg({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:d.D8.CommandPalette,group:"",title:s.kg("redo","Redo"),order:1}]}));P(new y(O,{id:"default:redo",precondition:void 0}));const F=P(new C({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:d.D8.MenubarSelectionMenu,group:"1_basic",title:s.kg({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:d.D8.CommandPalette,group:"",title:s.kg("selectAll","Select All"),order:1}]}))},90072:function(e,t,i){"use strict";i.d(t,{Qg:function(){return u},Ud:function(){return c},jD:function(){return h}});var n=i(57981),s=i(35114),o=i(73755),r=i(1878),a=i(98018),l=i(56218);function c(e){return d.get(e)}class d extends s.jG{static{this._map=new Map}static get(e){let t=d._map.get(e);if(!t){t=new d(e),d._map.set(e,t);const i=e.onDidDispose((()=>{const t=d._map.get(e);t&&(d._map.delete(e),t.dispose(),i.dispose())}))}return t}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&(this._currentTransaction=new r.XL((()=>{})))}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){const e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=(0,o.FY)(this,this.editor.getModel()),this.model=this._model,this.isReadonly=(0,o.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(92))),this._versionId=(0,o.Zh)({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=(0,o.Zh)({owner:this,equalsFn:(0,n.KC)((0,n.S3)(l.L.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.isFocused=(0,o.y0)(this,(e=>{const t=this.editor.onDidFocusEditorWidget(e),i=this.editor.onDidBlurEditorWidget(e);return{dispose(){t.dispose(),i.dispose()}}}),(()=>this.editor.hasWidgetFocus())),this.value=(0,a.dQ)(this,(e=>(this.versionId.read(e),this.model.read(e)?.getValue()??"")),((e,t)=>{const i=this.model.get();null!==i&&e!==i.getValue()&&i.setValue(e)})),this.valueIsEmpty=(0,o.un)(this,(e=>(this.versionId.read(e),0===this.editor.getModel()?.getValueLength()))),this.cursorSelection=(0,o.C)({owner:this,equalsFn:(0,n.KC)(l.L.selectionsEqual)},(e=>this.selections.read(e)?.[0]??null)),this.onDidType=(0,o.Yd)(this),this.scrollTop=(0,o.y0)(this.editor.onDidScrollChange,(()=>this.editor.getScrollTop())),this.scrollLeft=(0,o.y0)(this.editor.onDidScrollChange,(()=>this.editor.getScrollLeft())),this.layoutInfo=(0,o.y0)(this.editor.onDidLayoutChange,(()=>this.editor.getLayoutInfo())),this.layoutInfoContentLeft=this.layoutInfo.map((e=>e.contentLeft)),this.layoutInfoDecorationsLeft=this.layoutInfo.map((e=>e.decorationsLeft)),this.contentWidth=(0,o.y0)(this.editor.onDidContentSizeChange,(()=>this.editor.getContentWidth())),this._overlayWidgetCounter=0,this._register(this.editor.onBeginUpdate((()=>this._beginUpdate()))),this._register(this.editor.onEndUpdate((()=>this._endUpdate()))),this._register(this.editor.onDidChangeModel((()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}}))),this._register(this.editor.onDidType((e=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,e)}finally{this._endUpdate()}}))),this._register(this.editor.onDidChangeModelContent((e=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,e),this._forceUpdate()}finally{this._endUpdate()}}))),this._register(this.editor.onDidChangeCursorSelection((e=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,e),this._forceUpdate()}finally{this._endUpdate()}})))}forceUpdate(e){this._beginUpdate();try{if(this._forceUpdate(),!e)return;return e(this._currentTransaction)}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e){return(0,o.y0)(this,(t=>this.editor.onDidChangeConfiguration((i=>{i.hasChanged(e)&&t(void 0)}))),(()=>this.editor.getOption(e)))}setDecorations(e){const t=new s.Cm,i=this.editor.createDecorationsCollection();return t.add((0,o.zL)({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},(t=>{const n=e.read(t);i.set(n)}))),t.add({dispose:()=>{i.clear()}}),t}createOverlayWidget(e){const t="observableOverlayWidget"+this._overlayWidgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(i);const n=(0,o.fm)((t=>{e.position.read(t),e.minContentWidthInPx.read(t),this.editor.layoutOverlayWidget(i)}));return(0,s.s)((()=>{n.dispose(),this.editor.removeOverlayWidget(i)}))}}function h(e,t){return(0,o.ht)({createEmptyChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(t,i)=>{if(t.didChange(e)){const e=t.change;void 0!==e&&i.deltas.push(e),i.didChange=!0}return!0}},((i,n)=>{const s=e.read(i);n.didChange&&t(s,n.deltas)}))}function u(e,t){const i=new s.Cm,n=h(e,((e,n)=>{i.clear(),t(e,n,i)}));return{dispose(){n.dispose(),i.dispose()}}}},98325:function(e,t,i){"use strict";i.d(t,{cw:function(){return l},jN:function(){return a},nu:function(){return r}});var n=i(63619),s=i(54244),o=i(24219);const r=(0,n.u1)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(l.is(e))return l.lift(e);if(c.is(e))return c.lift(e);throw new Error("Unsupported edit")}))}}class l extends a{static is(e){return e instanceof l||(0,o.Gv)(e)&&s.r.isUri(e.resource)&&(0,o.Gv)(e.textEdit)}static lift(e){return e instanceof l?e:new l(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class c extends a{static is(e){return e instanceof c||(0,o.Gv)(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof c?e:new c(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},72777:function(e,t,i){"use strict";i.d(t,{T:function(){return n}});const n=(0,i(63619).u1)("codeEditorService")},61554:function(e,t,i){"use strict";i.d(t,{D:function(){return n}});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const s=e.getVisibleRanges();if(s.length>0){t=s[0].getStartPosition();const n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}},3916:function(e,t,i){"use strict";i.d(t,{BG:function(){return o},IO:function(){return a},Y:function(){return r},eh:function(){return s},pj:function(){return c},qN:function(){return l}});class n{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class s extends n{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class o{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class r{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i=o.left?n.width=Math.max(n.width,o.left+o.width-n.left):(t[i++]=n,n=o)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let s=0,o=e.length;sr)return null;if((t=Math.min(r,Math.max(0,t)))===(n=Math.min(r,Math.max(0,n)))&&i===s&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return o.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,o.clientRectDeltaLeft,o.clientRectScale)}t!==n&&n>0&&0===s&&(n--,s=1073741824);let a=e.children[t].firstChild,l=e.children[n].firstChild;if(a&&l||(!a&&0===i&&t>0&&(a=e.children[t-1].firstChild,i=1073741824),!l&&0===s&&n>0&&(l=e.children[n-1].firstChild,s=1073741824)),!a||!l)return null;i=Math.min(a.textContent.length,Math.max(0,i)),s=Math.min(l.textContent.length,Math.max(0,s));const c=this._readClientRects(a,i,l,s,o.endNode);return o.markDidDomLayout(),this._createHorizontalRangesFromClientRects(c,o.clientRectDeltaLeft,o.clientRectScale)}}var l=i(10621),c=i(73055),d=i(39679),h=i(3520);const u=!!o.ib||!(o.j9||n.gm||n.nr);let g=!0;class p{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50),s=i.get(38);this.renderWhitespace="off"===s?i.get(100):"none",this.renderControlCharacters=i.get(95),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(118),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class f{static{this.CLASS_NAME="view-line"}constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,s.Z)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!(0,d.Bb)(this._options.themeType)&&"selection"!==this._options.renderWhitespace||(this._isMaybeInvalid=!0,0))}renderLine(e,t,i,n,s){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=n.getViewLineRenderingData(e),r=this._options,a=l.d.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let p=null;if((0,d.Bb)(r.themeType)||"selection"===this._options.renderWhitespace){const t=n.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t');const v=(0,c.UW)(_,s);s.appendString("");let w=null;return g&&u&&o.isBasicASCII&&r.useMonospaceOptimizations&&0===v.containsForeignElements&&(w=new m(this._renderedViewLine?this._renderedViewLine.domNode:null,_,v.characterMapping)),w||(w=b(this._renderedViewLine?this._renderedViewLine.domNode:null,_,v.characterMapping,v.containsRTL,v.containsForeignElements)),this._renderedViewLine=w,!0}layoutLine(e,t,i){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(i))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof m}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof m?this._renderedViewLine.monospaceAssumptionsAreValid():g}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof m&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const s=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==s&&t>s+1&&i>s+1)return new r.pj(!0,[new r.IO(this.getWidth(n),0)]);-1!==s&&t>s+1&&(t=s+1),-1!==s&&i>s+1&&(i=s+1);const o=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return o&&o.length>0?new r.pj(!1,o):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}class m{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),g=!1)}return g}toSlowRenderedLine(){return b(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const s=this._getColumnPixelOffset(e,t,n),o=this._getColumnPixelOffset(e,i,n);return[new r.IO(s,o-s)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,s=300*(n+1)+1;let o=-1;if(this._keyColumnPixelOffsetCache&&(o=this._keyColumnPixelOffsetCache[n],-1===o&&(o=this._actualReadPixelOffset(e,s,i),this._keyColumnPixelOffsetCache[n]=o)),-1===o){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(s),a=this._characterMapping.getHorizontalOffset(t);return o+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),s=a.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return s&&0!==s.length?s[0].left:-1}getColumnOfNodeOffset(e,t){return w(this._characterMapping,e,t)}}class _{constructor(e,t,i,n,s){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const s=this._readPixelOffset(this.domNode,e,t,n);if(-1===s)return null;const o=this._readPixelOffset(this.domNode,e,i,n);return-1===o?null:[new r.IO(s,o-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,s){if(i===n){const n=this._readPixelOffset(e,t,i,s);return-1===n?null:[new r.IO(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,s)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const s=this._pixelOffsetCache[i];if(-1!==s)return s;const o=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=o,o}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=a.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const s=this._characterMapping.getDomPosition(i),o=a.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n);if(!o||0===o.length)return-1;const r=o[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new r.IO(0,this.getWidth(n))];const s=this._characterMapping.getDomPosition(t),o=this._characterMapping.getDomPosition(i);return a.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,o.partIndex,o.charIndex,n)}getColumnOfNodeOffset(e,t){return w(this._characterMapping,e,t)}}class v extends _{_readVisibleRangesForRange(e,t,i,n,s){const o=super._readVisibleRangesForRange(e,t,i,n,s);if(!o||0===o.length||i===n||1===i&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,s);if(-1!==i){const e=o[o.length-1];e.left=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(r=1,a=n.IMarkerDecorationsService,function(e,t){a(e,t,r)})],o),(0,s.HW)(o.ID,o,0);var l=i(84201),c=i(20187),d=i(80670),h=i(35114),u=i(84756),g=i(43193),p=i(75969),f=i(97358),m=i(49134),_=i(79783),v=i(75083),b=i(57614);class w{static{this.items=[]}constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=w._read(e,this.key);this.migrate(t,(t=>w._read(e,t)),((t,i)=>w._write(e,t,i)))}static _read(e,t){if(void 0===e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const s=t.substring(0,n);return e[s]=e[s]||{},void this._write(e[s],t.substring(n+1),i)}e[t]=i}}function C(e,t){w.items.push(new w(e,t))}function y(e,t){C(e,((i,n,s)=>{if(void 0!==i)for(const[n,o]of t)if(i===n)return void s(e,o)}))}y("wordWrap",[[!0,"on"],[!1,"off"]]),y("lineNumbers",[[!0,"on"],[!1,"off"]]),y("cursorBlinking",[["visible","solid"]]),y("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),y("renderLineHighlight",[[!0,"line"],[!1,"none"]]),y("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),y("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),y("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("autoIndent",[[!1,"advanced"],[!0,"full"]]),y("matchBrackets",[[!0,"always"],[!1,"never"]]),y("renderFinalNewline",[[!0,"on"],[!1,"off"]]),y("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),y("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),y("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),C("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))})),C("renderIndentGuides",((e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))})),C("highlightActiveIndentGuide",((e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const S={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};C("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"==typeof e){for(const n of Object.entries(S))!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}})),C("quickSuggestions",((e,t,i)=>{if("boolean"==typeof e){const t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}})),C("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),C("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))})),C("codeActionsOnSave",((e,t,i)=>{if(e&&"object"==typeof e){let t=!1;const n={};for(const i of Object.entries(e))"boolean"==typeof i[1]?(t=!0,n[i[0]]=i[1]?"explicit":"never"):n[i[0]]=i[1];t&&i("codeActionsOnSave",n)}})),C("codeActionWidget.includeNearbyQuickfixes",((e,t,i)=>{"boolean"==typeof e&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),void 0===t("codeActionWidget.includeNearbyQuickFixes")&&i("codeActionWidget.includeNearbyQuickFixes",e))})),C("lightbulb.enabled",((e,t,i)=>{"boolean"==typeof e&&i("lightbulb.enabled",e?void 0:"off")}));var k=i(52055),x=i(3520),L=i(76543),D=i(78336),E=i(68745),N=i(8670);let I=class extends h.jG{constructor(e,t,i,n,s){super(),this._accessibilityService=s,this._onDidChange=this._register(new d.vl),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new d.vl),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new x.n0,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new v.u(n,i.dimension)),this._targetWindowId=(0,l.zk)(n).vscodeWindowId,this._rawOptions=A(i),this._validatedOptions=P.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(L.D.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(k.M.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(b.T.onDidChange((()=>this._recomputeOptions()))),this._register(N.c.getInstance((0,l.zk)(n)).onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=P.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=D._8.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:k.M.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return P.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:M(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:p.Tc||p.gm,pixelRatio:N.c.getInstance((0,l.ZF)(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return b.T.readFontInfo((0,l.ZF)(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=A(e);P.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=P.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function M(){let e="";return p.nr||p.c8||(e+="no-user-select "),p.nr&&(e+="no-minimap-shadow ",e+="enable-user-select "),_.zx&&(e+="mac "),e}I=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(4,E.j)],I);class T{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class R{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class P{static validateOptions(e){const t=new T;for(const i of x.BE){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new R;for(const n of x.BE)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&f.aI(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!P._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of x.BE){const o=!P._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new x.lw(i):null}static applyUpdate(e,t){let i=!1;for(const n of x.BE)if(t.hasOwnProperty(n.name)){const s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function A(e){const t=m.Go(e);return function(e){w.items.forEach((t=>t.apply(e)))}(t),t}var O=i(72777),F=i(43999),B=i(56627),W=i(55266);class H extends h.jG{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=4&&3===e[0]&&8===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&8===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&6===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&9===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&5===e[0]}}class te{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(146),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(67),this.stickyTabStops=n.get(117),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return te.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,s=e.viewModel.getLineCount();let o,r=null,a=null;return i.afterLineNumber!==s&&(a=new q.y(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new q.y(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),o=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,re._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class ne extends ie{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=z.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,i,n,s){super(e,t,i,n),this.hitTestResult=new Q.d((()=>re.doHitTest(this._ctx,this))),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=s;const o=Boolean(this._eventTarget);this._useHitTestTarget=!o}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columno.contentLeft+o.width)continue;const i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=s&&s<=i+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return ee.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};if(s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth){const r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),a=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber);return o.glyphMarginLane=a[Math.floor(s/e.lineHeight)],t.fulfillMargin(2,n,i.range,o)}return s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,o))}return null}static _hitTestViewLines(e,t){if(!ee.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new q.y(1,1),se);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new q.y(i,n),se)}if(ee.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),s=oe(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new q.y(i,1),s)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const s=oe(t.mouseContentHorizontalOffset-n),o=new q.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}}const i=t.hitTestResult.value;return 1===i.type?re.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(ee.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new q.y(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(ee.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new q.y(i,n))}}return null}static _hitTestScrollbar(e,t){if(ee.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new q.y(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(146),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return re._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){const o=n.lineNumber,r=n.column,a=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>a){const e=oe(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const c=e.visibleRangeForPosition(o,r);if(!c)return t.fulfillUnknown(n);const d=c.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});const h=[];if(h.push({offset:c.left,column:r}),r>1){const t=e.visibleRangeForPosition(o,r-1);t&&h.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const u=t.pos.toClientCoordinates(l.zk(e.viewDomNode)),g=i.getBoundingClientRect(),p=g.left<=u.clientX&&u.clientX<=g.right;let f=null;for(let e=1;es)){const i=Math.floor((n+s)/2);let o=t.pos.y+(i-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const r=new W.nz(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(l.zk(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(l.zk(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=l.jG(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let s=e.elementFromPoint(t,i);if(null!==s){for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;const e=s.getBoundingClientRect(),i=l.zk(s),o=`${i.getComputedStyle(s,null).getPropertyValue("font-style")} ${i.getComputedStyle(s,null).getPropertyValue("font-variant")} ${i.getComputedStyle(s,null).getPropertyValue("font-weight")} ${i.getComputedStyle(s,null).getPropertyValue("font-size")}/${i.getComputedStyle(s,null).getPropertyValue("line-height")} ${i.getComputedStyle(s,null).getPropertyValue("font-family")}`,r=s.innerText;let a,c=e.left,d=0;if(t>e.left+e.width)d=r.length;else{const e=ae.getInstance();for(let i=0;ithis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(146).height;const n=new W.$z(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=l.ko(this.viewHelper.viewDomNode.ownerDocument,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new W.dO(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{s=t}))),this._register(l.ko(this.viewHelper.viewDomNode,l.Bx.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,s)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=ge.QC.INSTANCE;let t=0,i=L.D.getZoomLevel(),n=!1,s=0;function o(e){return _.zx?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(l.ko(this.viewHelper.viewDomNode,l.Bx.MOUSE_WHEEL,(r=>{if(this.viewController.emitMouseWheel(r),!this._context.configuration.options.get(76))return;const a=new he.$(r);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(o(r)){const e=L.D.getZoomLevel(),t=a.deltaY>0?1:-1;L.D.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=L.D.getZoomLevel(),n=o(r),s=0),t=Date.now(),s+=a.deltaY,n&&(L.D.setZoomLevel(i+s/5),a.preventDefault(),a.stopPropagation())}),{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(146)){const e=this._context.configuration.options.get(146).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new W.Hh(e,t).toPageCoordinates(l.zk(this.viewHelper.viewDomNode)),n=(0,W.wt)(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const s=(0,W.i_)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=l.jG(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(n||o&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(a){const n=i.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class fe extends h.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new W.BA(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new me(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new ve,this._currentSelection=new ue.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const s=this._context.configuration.options;if(!s.get(92)&&s.get(35)&&!s.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);l.kx(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posyt.y+t.height){const o=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=te.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return J.createOutsideEditor(s,e,"below",o)}const l=n.getLineNumberAtVerticalOffset(r);return J.createOutsideEditor(s,new q.y(l,i.getLineMaxColumn(l)),"below",o)}const o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const n=e.posx-t.x-t.width;return J.createOutsideEditor(s,new q.y(o,i.getLineMaxColumn(o)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return J.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new q.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class me extends h.jG{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new _e(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class _e extends h.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=o,this._lastTime=Date.now(),this._animationFrameDisposable=l.PG(l.zk(o.browserEvent),(()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(67),t=this._context.configuration.options.get(146).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(67),t=this._getScrollSpeed()*(this._tick()/1e3)*e,i="above"===this._position.outsidePosition?-t:t;this._context.viewModel.viewLayout.deltaScrollNow(0,i),this._viewHelper.renderNow();const n=this._context.viewLayout.getLinesViewportData(),s="above"===this._position.outsidePosition?n.startLineNumber:n.endLineNumber;let o;{const e=(0,W.wt)(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(146).horizontalScrollbarHeight,i=new W.nz(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=(0,W.i_)(this._viewHelper.viewDomNode,e,i);o=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}o.position&&o.position.lineNumber===s||(o="above"===this._position.outsidePosition?J.createOutsideEditor(this._position.mouseColumn,new q.y(s,1),"above",this._position.outsideDistance):J.createOutsideEditor(this._position.mouseColumn,new q.y(s,this._context.viewModel.getLineMaxColumn(s)),"below",this._position.outsideDistance)),this._dispatchMouse(o,!0,2),this._animationFrameDisposable=l.PG(l.zk(o.element),(()=>this._execute()))}}class ve{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>ve.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var be=i(55036);class we extends pe{constructor(e,t,i){super(e,t,i),this._register(ce.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Tap,(e=>this.onTap(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Change,(e=>this.onChange(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Contextmenu,(e=>this._onContextMenu(new W.dO(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(l.ko(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new W.DW(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){const i=this._createMouseTarget(new W.dO(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class Ce extends pe{constructor(e,t,i){super(e,t,i),this._register(ce.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Tap,(e=>this.onTap(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Change,(e=>this.onChange(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Contextmenu,(e=>this._onContextMenu(new W.dO(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new W.dO(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(be.$D.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class ye extends h.jG{constructor(e,t,i){super(),(_.un||_.m0&&_.Fr)&&le.e.pointerEvents?this.handler=this._register(new we(e,t,i)):de.G.TouchEvent?this.handler=this._register(new Ce(e,t,i)):this.handler=this._register(new pe(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Se=i(14374),ke=i(43920),xe=i(41069);class Le extends H{}var De=i(40616),Ee=i(99851);class Ne extends Le{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new q.y(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const t=e.get(68);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(96);const i=e.get(146);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new q.y(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0||i===this._context.viewModel.getLineCount()?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=_.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter((e=>!!e.options.lineNumberClassName));s.sort(((e,t)=>K.Q.compareRangesUsingEnds(e.range,t.range)));let o=0;const r=this._context.viewModel.getLineCount(),a=[];for(let e=i;e<=n;e++){const n=e-i;let l=this._getLineRenderLineNumber(e),c="";for(;o${l}`):a[n]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,De.zy)(((e,t)=>{const i=e.getColor(Ee.Qt),n=e.getColor(Ee.JB);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));class Ie extends V{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,F.Z)(document.createElement("div")),this._domNode.setClassName(Ie.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,F.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Ie.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}var Me=i(59810);const Te="monaco-mouse-cursor-text";var Re=i(35720),Pe=i(59321),Ae=i(80175),Oe=i(87163),Fe=i(63619),Be=function(e,t){return function(i,n){t(i,n,e)}};class We{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new q.y(this.modelLineNumber,this.distanceToModelLineStart+1),i=new q.y(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const He=p.gm;let Ve=class extends V{constructor(e,t,i,n,s){super(e),this._keybindingService=n,this._instantiationService=s,this._primaryCursorPosition=new q.y(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const o=this._context.configuration.options,r=o.get(146);this._setAccessibilityOptions(o),this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,this._contentHeight=r.height,this._fontInfo=o.get(50),this._lineHeight=o.get(67),this._emptySelectionClipboard=o.get(37),this._copyWithSyntaxHighlighting=o.get(25),this._visibleTextArea=null,this._selections=[new ue.L(1,1,1,1)],this._modelSelections=[new ue.L(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,F.Z)(document.createElement("textarea")),z.write(this.textArea,7),this.textArea.setClassName(`inputarea ${Te}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:a}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=a*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(o)),this.textArea.setAttribute("aria-required",o.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(o.get(125))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",Se.kg("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",o.get(92)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,F.Z)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const l={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},c={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,_.uF),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,s=Array.isArray(e)?e.join(t):e;let o,r=null;if(be.Eq.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&s.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(o=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:s,html:o,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(_.zx&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new xe._O(i,i.length,i.length,K.Q.fromPositions(t),0)}const t=500;if(_.zx&&!e.isEmpty()&&l.getValueLengthInRange(e,0)0)return new xe._O(i,n,n,K.Q.fromPositions(t),0)}return xe._O.EMPTY}return xe.Al.fromEditorSelection(l,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},d=this._register(new be.M0(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(be.No,c,d,_.OS,{isAndroid:p.m0,isChrome:p.H8,isFirefox:p.gm,isSafari:p.nr})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(xe.Hf&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(xe.Hf&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:s}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),s=e.substring(n+1),o=s.lastIndexOf("\t"),r=s.length-o-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),c=a.column-1-l,d=s.substring(0,s.length-l),{tabSize:h}=this._context.viewModel.model.getOptions(),u=function(e,t,i,n){if(0===t.length)return 0;const s=e.createElement("div");s.style.position="absolute",s.style.top="-50000px",s.style.width="50000px";const o=e.createElement("span");(0,g.M)(o,i),o.style.whiteSpace="pre",o.style.tabSize=n*i.spaceWidth+"px",o.append(t),s.appendChild(o),e.body.appendChild(s);const r=o.offsetWidth;return s.remove(),r}(this.textArea.domNode.ownerDocument,d,this._fontInfo,h);return{distanceToModelLineStart:c,widthOfHiddenTextBefore:u}})(),{distanceToModelLineEnd:o}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),s=-1===n?e:e.substring(0,n),o=s.indexOf("\t"),r=-1===o?s.length:s.length-o-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,K.Q.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new We(this._context,i.startLineNumber,n,s,o),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Te} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Te}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(Ae.M.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,Me.i)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',[]);let n=!0,s=e.column,o=!0,r=e.column,a=0;for(;a<50&&(n||o);){if(n&&s<=1&&(n=!1),n){const e=t.charCodeAt(s-2);0!==i.get(e)?n=!1:s--}if(o&&r>t.length&&(o=!1),o){const e=t.charCodeAt(r-1);0!==i.get(e)?o=!1:r++}a++}return[t.substring(s-1,r-1),e.column-s]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,Me.i)(this._context.configuration.options.get(132),[]);let n=e.column,s=0;for(;n>1;){const o=t.charCodeAt(n-2);if(0!==i.get(o)||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!ke.pc(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){if(1===e.get(2)){const e=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),t=this._keybindingService.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),i=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),n=Se.kg("accessibilityModeOff","The editor is not accessible at this time.");return e?Se.kg("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",n,e):t?Se.kg("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",n,t):i?Se.kg("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",n,i):n}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===x.qB.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(146).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){const t=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=He?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(67),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(125))),(e.hasChanged(34)||e.hasChanged(92))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!Ae.M.enabled||e.get(34)&&e.get(92)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new q.y(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const s=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,o=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const c=this._context.viewModel.getViewLineData(i.lineNumber),d=c.tokens.findTokenIndexAtOffset(i.column-1),h=d===c.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(h?c.tokens.getPresentation(d):null);this.textArea.domNode.scrollTop=o*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:s,left:a,width:l,height:this._lineHeight,useCover:!1,color:(Re.dG.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)this._renderAtTopLeft();else if(_.zx||2===this._accessibilitySupport){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:He?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;i=e.indexOf("\n",i+1),-1!==i;)t++;return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:He?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;(0,g.M)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?Pe.Q1.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+Ie.OUTER_CLASS_NAME):0!==n.get(68).renderType?i.setClassName("monaco-editor-background textAreaCover "+Ne.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};Ve=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Be(3,Oe.b),Be(4,Fe._Y)],Ve);var ze=i(3916),Ue=i(34157);class je{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ue.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Ue.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Ue.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ue.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ue.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Ue.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Ue.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Ue.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Ue.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Ue.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Ue.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Ue.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Ue.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Ue.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}var qe=i(38945),Ke=i(52192);class $e{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new c.D7("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,o=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===o?(s=i,o=1):o++)}if(e=n&&t<=s&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);const o=[];for(let e=0;ei)continue;const r=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class Ge{constructor(e){this._lineFactory=e,this.domNode=this._createDomNode(),this._linesCollection=new $e(this._lineFactory)}_createDomNode(){const e=(0,F.Z)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(146)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;ee})}constructor(e,t,i){this._domNode=e,this._lineFactory=t,this._viewportData=i}render(e,t,i,n){const s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1t){const e=t,o=Math.min(i,s.rendLineNumberStart-1);e<=o&&(this._insertLinesBefore(s,e,o,n,t),s.linesLength+=o-e+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,e),s.linesLength-=e)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){const e=Math.max(0,i-s.rendLineNumberStart+1),t=s.linesLength-1-e+1;t>0&&(this._removeLinesAfter(s,t),s.linesLength-=t)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const o=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=o+e;r[e].layoutLine(t,n[t-s],this._viewportData.lineHeight)}}_insertLinesBefore(e,t,i,n,s){const o=[];let r=0;for(let e=t;e<=i;e++)o[r++]=this._lineFactory.createLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");Qe._ttPolicy&&(t=Qe._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;tnew Ze(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(50);(0,g.M)(this.domNode,t),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),s.appendString(o),s.appendString(""),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i))}}class Xe extends Ye{constructor(e){super(e);const t=this._context.configuration.options.get(146);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(146);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Je extends Ye{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,g.M)(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;(0,g.M)(this.domNode,t.get(50));const i=t.get(146);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class et{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return et.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),5!==i.type&&8!==i.type||(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new q.y(e.afterLineNumber,1)).lineNumber}}}class tt extends V{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,F.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const t=this._context.configuration.options.get(146),i=t.contentWidth-t.verticalScrollbarWidth;this.contentWidth!==i&&(this.contentWidth=i,e=!0);const n=t.contentLeft;return this.contentLeft!==n&&(this.contentLeft=n,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;const i=e.getDecorationsInViewport();for(const n of i){if(!n.options.blockClassName)continue;let i,s,o=this.blocks[t];o||(o=this.blocks[t]=(0,F.Z)(document.createElement("div")),this.domNode.appendChild(o)),n.options.blockIsAfterEnd?(i=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!1),s=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0)):(i=e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!0),s=n.range.isEmpty()&&!n.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0));const[r,a,l,c]=n.options.blockPadding??[0,0,0,0];o.setClassName("blockDecorations-block "+n.options.blockClassName),o.setLeft(this.contentLeft-c),o.setWidth(this.contentWidth+c+a),o.setTop(i-e.scrollTop-r),o.setHeight(s-i+r+l),t++}for(let e=t;e0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const s=e.top,o=s,r=e.top+e.height,a=s-i,l=o>=i,c=r,d=n.viewportHeight-r>=i;let h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),ho){const e=a-(o-n);a-=e,i-=e}if(a=22,m=h+i<=u.height-22;return this._fixedOverflowWidgets?{fitsAbove:f,aboveTop:Math.max(d,22),fitsBelow:m,belowTop:h,left:p}:{fitsAbove:f,aboveTop:s,fitsBelow:m,belowTop:o,left:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new ot(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){return{primary:t(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),secondary:t(this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,this._affinity,this._lineHeight)};function t(t,i,n){if(!t)return null;const s=e.visibleRangeForPosition(t);if(!s)return null;const o=1===t.column&&3===i?0:s.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new rt(r,o,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let s=t.left;return s=se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||"offViewport"===this._renderData.kind)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,"offViewport"===this._renderData?.kind&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&at(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&at(this._actual.afterRender,this._actual,this._renderData.position)}}class st{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class ot{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class rt{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function at(e,t,...i){try{return e.call(t,...i)}catch{return null}}var lt=i(39679);class ct extends Le{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(146);this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new ue.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=new Set;for(const e of this._selections)t.add(e.positionLineNumber);const i=Array.from(t);i.sort(((e,t)=>e-t)),f.aI(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let e=t;e<=i;e++)n[e-t]="";if(this._wordWrap){const s=this._renderOne(e,!1);for(const e of this._cursorLineNumbers){const o=this._context.viewModel.coordinatesConverter,r=o.convertViewPositionToModelPosition(new q.y(e,1)).lineNumber,a=o.convertModelPositionToViewPosition(new q.y(r,1)).lineNumber,l=o.convertModelPositionToViewPosition(new q.y(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,c=Math.max(a,t),d=Math.min(l,i);for(let e=c;e<=d;e++)n[e-t]=s}}const s=this._renderOne(e,!0);for(const e of this._cursorLineNumbers)ei||(n[e-t]=s);this._renderData=n}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class dt extends ct{_renderOne(e,t){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class ht extends ct{_renderOne(e,t){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,De.zy)(((e,t)=>{const i=e.getColor(Ee.kG);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Ee.Mf)){const i=e.getColor(Ee.Mf);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),(0,lt.Bb)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}));class ut extends Le{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,s=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:K.Q.compareRangesUsingStarts(e.range,t.range)}));const s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=[];for(let e=s;e<=o;e++)r[e-s]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,o=t.length;e',a=Math.max(o.range.startLineNumber,n),l=Math.min(o.range.endLineNumber,s);for(let e=a;e<=l;e++)i[e-n]+=r}}_renderNormalDecorations(e,t,i){const n=e.visibleRange.startLineNumber;let s=null,o=!1,r=null,a=!1;for(let l=0,c=t.length;l';r[l]+=c}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class gt extends V{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(104),r=s.get(75),a=s.get(40),c=s.get(107),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,De.Pz)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:c,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new ge.oO(t.domNode,d,this._context.viewLayout.getScrollable())),z.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,F.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(l.ko(i.domNode,"scroll",(e=>h(i.domNode,!0,!0)))),this._register(l.ko(t.domNode,"scroll",(e=>h(t.domNode,!0,!1)))),this._register(l.ko(n.domNode,"scroll",(e=>h(n.domNode,!0,!1)))),this._register(l.ko(this.scrollbarDomNode.domNode,"scroll",(e=>h(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(146);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(73).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(104)||e.hasChanged(75)||e.hasChanged(40)){const e=this._context.configuration.options,t=e.get(104),i=e.get(75),n=e.get(40),s=e.get(107),o={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:s};this.scrollbar.updateOptions(o)}return e.hasChanged(146)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,De.Pz)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}var pt=i(62067);class ft{constructor(e,t,i,n,s){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=s??0}}class mt{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class _t{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class vt extends Le{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=new _t;if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.classNamen)continue;const a=Math.max(o,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new q.y(a,0)),c=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(e.preference.lane);t.push(new Ct(a,c,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.laneIndex===t.laneIndex?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className0;){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex));if(!n||0===n.length)break;const s=n[0];if(0===s.type){const e=[];for(const t of n){if(t.zIndex!==s.zIndex||t.type!==s.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(s.accept(e.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const e=this._managedDomNodes.pop();e?.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;ithis._decorationGlyphsToRender.length;){const e=this._managedDomNodes.pop();e?.domNode.remove()}}}class wt{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new yt(this.lineNumber,this.laneIndex,e)}}class Ct{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class yt{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}var St=i(24219),kt=i(49374),xt=i(79007);class Lt extends Le{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(147),n=t.get(50);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(147),n=t.get(50);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();return!this._primaryPosition?.equals(t)&&(this._primaryPosition=t,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.scrollWidth,s=this._primaryPosition,o=this.getGuidesByLine(t,Math.min(i+1,this._context.viewModel.getLineCount()),s),r=[];for(let s=t;s<=i;s++){const i=s-t,a=o[i];let l="";const c=e.visibleRangeForPosition(new q.y(s,1))?.left??0;for(const t of a){const i=-1===t.column?c+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new q.y(s,t.column)).left;if(i>n||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(e.visibleRangeForPosition(new q.y(s,t.horizontalLine.endColumn))?.left??i+this._spaceWidth)-i:this._spaceWidth;l+=`
    `}r[i]=l}this._renderResult=r}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?xt.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?xt.N6.EnabledForActive:xt.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let o=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);o=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let i=e;i<=t;i++){const t=new Array;c.push(t);const d=n?n[i-e]:[],h=new f.j3(d),u=s?s[i-e]:0;for(let e=1;e<=u;e++){const n=(e-1)*l+1,s=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===d.length)&&o<=i&&i<=r&&e===a;t.push(...h.takeWhile((e=>e.visibleColumn!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Dt(e){if(!e||!e.isTransparent())return e}(0,De.zy)(((e,t)=>{const i=[{bracketColor:Ee.sN,guideColor:Ee.n4,guideColorActive:Ee.bB},{bracketColor:Ee.lQ,guideColor:Ee.I2,guideColorActive:Ee.WS},{bracketColor:Ee.ss,guideColor:Ee.Bo,guideColorActive:Ee.Pe},{bracketColor:Ee.l5,guideColor:Ee.If,guideColorActive:Ee.WD},{bracketColor:Ee.sH,guideColor:Ee.BD,guideColorActive:Ee.P1},{bracketColor:Ee.zp,guideColor:Ee.IW,guideColorActive:Ee.WY}],n=new kt.k,s=[{indentColor:Ee.vV,indentColorActive:Ee.H0},{indentColor:Ee.ob,indentColorActive:Ee.Am},{indentColor:Ee.hz,indentColorActive:Ee.tK},{indentColor:Ee.ow,indentColorActive:Ee.A3},{indentColor:Ee.vP,indentColorActive:Ee.tp},{indentColor:Ee.CM,indentColorActive:Ee.As}],o=i.map((t=>{const i=e.getColor(t.bracketColor),n=e.getColor(t.guideColor),s=e.getColor(t.guideColorActive),o=Dt(Dt(n)??i?.transparent(.3)),r=Dt(Dt(s)??i);if(o&&r)return{guideColor:o,guideColorActive:r}})).filter(St.O9),r=s.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),s=Dt(i),o=Dt(n);if(s&&o)return{indentColor:s,indentColorActive:o}})).filter(St.O9);if(o.length>0){for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));var Et=i(90890);class Nt{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class It{constructor(){this._currentVisibleRange=new K.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Mt{constructor(e,t,i,n,s,o,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Tt{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let o=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;enew j.Gb(this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,z.write(this.domNode,8),this.domNode.setClassName(`view-lines ${Te}`),(0,g.M)(this.domNode,s),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Et.uC((()=>{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new Et.uC((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new It,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(116).enabled,this._maxNumberStickyLines=n.get(116).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(147)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(147);return this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(101),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(116).enabled,this._maxNumberStickyLines=t.get(116).maxLineCount,(0,g.M)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(146)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new j.Ax(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Mt(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Tt(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new q.y(n,1);const s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(no)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri)return-1;const n=new Nt(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=K.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let o=0;const r=new Nt(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new q.y(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ec)continue;const d=e===n.startLineNumber?n.startColumn:1,h=e!==n.endLineNumber,u=h?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,u,r);if(g){if(t&&ethis._visibleLines.getEndLineNumber())return null;const n=new Nt(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new ze.qN(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let o=t;o<=i;o++){const t=this._visibleLines.getVisibleLine(o);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):s=!1}return s&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const i=this._visibleLines.getVisibleLine(s);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=s)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),_.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=s[0].startLineNumber,t=s[0].endLineNumber;for(let i=1,n=s.length;ia){if(!c)return-1;u=d}else if(5===o||6===o)if(6===o&&r<=d&&h<=l)u=r;else{const e=d-Math.max(5*this._lineHeight,.2*a),t=h-a;u=Math.max(t,e)}else if(1===o||2===o)if(2===o&&r<=d&&h<=l)u=r;else{const e=(d+h)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,d,h,3===o,4===o);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(146),n=t.left,s=n+t.width-i.verticalScrollbarWidth;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return e.minimalReveal||(o=Math.max(0,o-Rt.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,s,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,s,o){s=!!s,o=!!o;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}class Pt extends vt{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(146);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(146);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,s=t.length;e',o=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i].getDecorations();let a="";for(const e of r){let t='
    ';s[i]=r}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var Ot=i(82884);class Ft{static{this.Empty=new Ft(0,0,0,0)}constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Ft._clamp(e),this.g=Ft._clamp(t),this.b=Ft._clamp(i),this.a=Ft._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}class Bt extends h.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,h.lC)(new Bt)),this._INSTANCE}constructor(){super(),this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Re.dG.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=Re.dG.getColorMap();if(!e)return this._colors=[Ft.Empty],void(this._backgroundIsLight=!0);this._colors=[Ft.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}var Wt=i(68316),Ht=i(4195);const Vt=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var zt=i(18116);class Ut{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Ut.soften(e,.8),this.charDataLight=Ut.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=c?this.charDataLight:this.charDataNormal,f=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),m=4*e.width,_=r.r,v=r.g,b=r.b,w=s.r-_,C=s.g-v,y=s.b-b,S=Math.max(o,a),k=e.data;let x=f*h*u,L=i*m+4*t;for(let e=0;ee.width||i+d>e.height)return void console.warn("bad render request outside image data");const h=4*e.width,u=s/255*.5,g=o.r,p=o.g,f=o.b,m=g+(n.r-g)*u,_=p+(n.g-p)*u,v=f+(n.b-f)*u,b=Math.max(s,r),w=e.data;let C=i*h+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=qt[e[i]]<<4|15&qt[e[i+1]];return t},$t={1:(0,jt.P)((()=>Kt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,jt.P)((()=>Kt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class Gt{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=$t[e]?new Ut($t[e](),e):Gt.createFromSampleData(Gt.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of Vt)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=Gt._downsample(e,t);return new Ut(i,t)}static _downsampleChar(e,t,i,n,s){const o=1*s,r=2*s;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;tGt.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=Zt._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=Zt._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(Ht.ILr);return i?new Ft(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Ht.K1Z);return t?Ft._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){const i=e.getColor(Ht.By2);return i?new Ft(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class Xt{constructor(e,t,i,n,s,o,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,o,r,a,l,c,d){const h=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,s-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(s*s/t)),n=Math.max(0,e.minimapHeight-i),o=n/(c-s),d=l*o,h=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new Xt(l,c,h,o,d,i,g,1,Math.min(r,u))}let f;if(o&&i!==r){const e=i-t+1;f=Math.floor(e*u/h)}else{const e=s/p;f=Math.floor(e*u/h)}const m=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=s/p;v=Math.max(v,e-1)}_=v>0?(m+r+v-s/p-1)*u/h:Math.max(0,(m+r)*u/h-f),_=Math.min(e.minimapHeight-f,_);const b=_/(c-s),w=l*b;if(g>=m+r+v)return new Xt(l,c,_>0,b,w,f,m,1,r);{let i,s;i=t>1?t+m:Math.max(1,l/p);let o=Math.max(1,Math.floor(i-w*h/u));ol&&(o=Math.min(o,d.startLineNumber),s=Math.max(s,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?(t-o+s+_)*u/h:l/e.paddingTop*(s+_)*u/h,new Xt(l,c,!0,b,v,f,s,o,a)}}}class Jt{static{this.INVALID=new Jt(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class ei{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new $e({createLine:()=>Jt.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=n-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=ii.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,o=t-e+1;s!e.options.minimap?.sectionHeaderStyle));if(this._samplingState){const e=[];for(const t of i){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),s=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new Wt.vo(new K.Q(n,i.startColumn,s,i.endColumn),t.options))}return e}return i}getSectionHeaderDecorationsInViewport(e,t){const i=this.options.minimapLineHeight,n=this.options.sectionHeaderFontSize/i;return e=Math.floor(Math.max(1,e-n)),this._getMinimapDecorationsInViewport(e,t).filter((e=>!!e.options.minimap?.sectionHeaderStyle))}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],s=this._samplingState.minimapLines[t-1];i=new K.Q(n,1,s,this._context.viewModel.getLineMaxColumn(s))}else i=new K.Q(e,1,t,this._context.viewModel.getLineMaxColumn(t));return this._context.viewModel.getMinimapDecorationsInRange(i)}getSectionHeaderText(e,t){const i=e.options.minimap?.sectionHeaderText;if(!i)return null;const n=this._sectionHeaderCache.get(i);if(n)return n;const s=t(i);return this._sectionHeaderCache.set(i,s),s}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new K.Q(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class si extends h.jG{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Ht.yr0),this._domNode=(0,F.Z)(document.createElement("div")),z.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,F.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,F.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,F.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,F.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,F.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=l.b2(this._domNode.domNode,l.Bx.POINTER_DOWN,(e=>{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=l.BK(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderPointerMoveMonitor=new Ot._,this._sliderPointerDownListener=l.b2(this._slider.domNode,l.Bx.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=ce.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=l.ko(this._domNode.domNode,ce.B.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=l.ko(this._domNode.domNode,ce.B.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=l.b2(this._domNode.domNode,ce.B.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!(e.target&&e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(e,s)=>{const o=l.BK(this._domNode.domNode),r=Math.min(Math.abs(s-n),Math.abs(s-o.left),Math.abs(s-o.left-o.width));if(_.uF&&r>140)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>s(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new ti(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Ht.yr0),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=Xt.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(K.Q.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,s);const c=new oi(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,o),this._renderDecorationsLineHighlights(l,i,c,e,o);const d=new oi(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,o,a,r,n),this._renderDecorationsHighlights(l,i,d,e,o,a,r,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,c]=t;for(let e=l;e<=c;e++)i.set(e,!0);const d=n.getYForLineNumber(l,s),h=n.getYForLineNumber(c,s);r>=d||(r>o&&e.fillRect(x.xq,o,e.canvas.width,r-o),o=d),r=h}r>o&&e.fillRect(x.xq,o,e.canvas.width,r-o)}_renderDecorationsLineHighlights(e,t,i,n,s){const o=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||1!==l.position)continue;const c=n.intersectWithViewport(a.range);if(!c)continue;const[d,h]=c,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=o.get(u.toString());g||(g=u.transparent(.5).toString(),o.set(u.toString(),g)),e.fillStyle=g;for(let t=d;t<=h;t++){if(i.has(t))continue;i.set(t,!0);const o=n.getYForLineNumber(d,s);e.fillRect(x.xq,o,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[c,d]=t;for(let t=c;t<=d;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,s,s,o,r,a)}}_renderDecorationsHighlights(e,t,i,n,s,o,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=n.intersectWithViewport(l.range);if(!c)continue;const[d,h]=c,u=t.getColor(this._theme.value);if(u&&!u.isTransparent())for(let c=d;c<=h;c++)switch(t.position){case 1:this.renderDecorationOnLine(e,i,l.range,u,n,c,s,s,o,r,a);continue;case 2:{const t=n.getYForLineNumber(c,s),i=2;this.renderDecoration(e,u,i,t,2,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,o,r,a,l,c,d){const h=s.getYForLineNumber(o,a);if(h+r<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===o?i.startColumn:1,f=g===o?i.endColumn:this._model.getLineMaxColumn(o),m=this.getXOffsetForPosition(t,o,p,l,c,d),_=this.getXOffsetForPosition(t,o,f,l,c,d);this.renderDecoration(e,n,m,h,_-m,r)}getXOffsetForPosition(e,t,i,n,s,o){if(1===i)return x.xq;if((i-1)*s>=o)return o;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[x.xq];let a=x.xq;for(let e=1;e=o){r[e]=o;break}r[e]=l,a=l}e.set(t,r)}return i-1e.range.startLineNumber-t.range.startLineNumber));const g=si._fitSectionHeader.bind(null,h,o-x.xq);for(const n of u){const r=e.getYForLineNumber(n.range.startLineNumber,t)+i,l=r-i,d=l+2,u=this._model.getSectionHeaderText(n,g);si._renderSectionLabel(h,u,2===n.options.minimap?.sectionHeaderStyle,a,c,o,l,s,r,d)}}static _fitSectionHeader(e,t,i){if(!i)return i;const n=e.measureText(i).width,s=e.measureText("…").width;if(n<=t||n<=s)return i;const o=i.length,r=n/i.length,a=Math.floor((t-s)/r)-1;let l=Math.ceil(a/2);for(;l>0&&/\s/.test(i[l-1]);)--l;return i.substring(0,l)+"…"+i.substring(o-(a-l))}static _renderSectionLabel(e,t,i,n,s,o,r,a,l,c){t&&(e.fillStyle=n,e.fillRect(0,r,o,a),e.fillStyle=s,e.fillText(t,x.xq,l)),i&&(e.beginPath(),e.moveTo(0,c),e.lineTo(o,c),e.closePath(),e.stroke())}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new ei(e,t.imageData,t.lines)}const s=this._getBuffer();if(!s)return null;const[o,r,a]=si._renderUntouchedLines(s,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,h=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),f=this._model.options.renderMinimap,m=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===f?2:3)*_,w=n>b?Math.floor((n-b)/2):0,C=h.a/255,y=new Ft(Math.round((h.r-d.r)*C+d.r),Math.round((h.g-d.g)*C+d.g),Math.round((h.b-d.b)*C+d.b),255);let S=e.topPaddingLineCount*n;const k=[];for(let e=0,o=i-t+1;e=0&&n_)return;const r=f.charCodeAt(w);if(9===r){const e=h-(w+C)%h;C+=e-1,b+=e*o}else if(32===r)b+=o;else{const h=ke.ne(r)?2:1;for(let u=0;u_)return}}}}}class oi{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;ethis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class ri extends V{constructor(e,t){super(e),this._viewDomNode=t;const i=this._context.configuration.options.get(146);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,F.Z)(document.createElement("div")),z.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,F.Z)(document.createElement("div")),z.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(146);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,F.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()],n=t?t.preference:null,s=t?.stackOridinal;return i.preference===n&&i.stack===s?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=s,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0;const t=Object.keys(this._widgets);for(let i=0,n=t.length;i0));t.sort(((e,t)=>(this._widgets[e].stack||0)-(this._widgets[t].stack||0)));for(let e=0,n=t.length;e=3){const t=Math.floor(n/3),i=Math.floor(n/3),s=n-t-i,o=e+t;return[[0,e,o,e,e+t+s,e,o,e],[0,t,s,t+s,i,t+s+i,s+i,t+s+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&Pe.Q1.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class li extends V{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,F.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Re.dG.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[{position:new q.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new ai(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t1&&(n=0===t?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort(((e,t)=>q.y.compare(e.position,t.position))),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return!!e.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return!!e.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes)return this._domNode.setBackgroundColor(e?Pe.Q1.Format.CSS.formatHexA(e):""),void this._domNode.setDisplay("none");const t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(Wt.Uv.compareByRenderingProps),1!==this._actualShouldRender||Wt.Uv.equalsArr(this._renderedDecorations,t)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,f.aI)(this._renderedCursorPositions,this._cursorPositions,((e,t)=>e.position.lineNumber===t.position.lineNumber&&e.color===t.color))||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,o=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,c=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(c.fillStyle=Pe.Q1.Format.CSS.formatHexA(e),c.fillRect(0,0,i,n)):(c.clearRect(0,0,i,n),c.fillStyle=Pe.Q1.Format.CSS.formatHexA(e),c.fillRect(0,0,i,n)):c.clearRect(0,0,i,n);const d=this._settings.x,h=this._settings.w;for(const e of t){const t=e.color,i=e.data;c.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=i.length/3;en&&(e=n-l),_=e-l,v=e+l}_>p+1||t!==u?(0!==e&&c.fillRect(d[u],g,h[u],p-g),u=t,g=_,p=v):v>p&&(p=v)}c.fillRect(d[u],g,h[u],p-g)}if(!this._settings.hideCursor){const e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],s=this._settings.w[7];let a=-100,l=-100,d=null;for(let h=0,u=this._cursorPositions.length;hn&&(p=n-t);const f=p-t,m=f+e;f>l+1||u!==d?(0!==h&&d&&c.fillRect(i,a,s,l-a),a=f,l=m):m>l&&(l=m),d=u,c.fillStyle=u}d&&c.fillRect(i,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(c.beginPath(),c.lineWidth=1,c.strokeStyle=this._settings.borderColor,c.moveTo(0,0),c.lineTo(0,n),c.moveTo(1,0),c.lineTo(i,0),c.stroke())}}var ci,di=i(81655);class hi extends H{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,F.Z)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new di.rW((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(67)),this._zoneManager.setPixelRatio(i.get(144)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(t.get(67)),this._render()),e.hasChanged(144)&&(this._zoneManager.setPixelRatio(t.get(144)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,o=0,r=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==s?(e.fillRect(0,o,n,r-o),s=t,e.fillStyle=i[s],o=l,r=c):r>=l?r=Math.max(r,c):(e.fillRect(0,o,n,r-o),o=l,r=c)}e.fillRect(0,o,n,r-o)}}class ui extends V{constructor(e){super(e),this.domNode=(0,F.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=(0,F.Z)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),s--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(146);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(104);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class pi{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class fi{constructor(e,t){this.lineNumber=e,this.ranges=t}}function mi(e){return new pi(e)}function _i(e){return new fi(e.lineNumber,e.ranges.map(mi))}class vi extends Le{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,o=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!s&&e=0;e--)i[e].lineNumber===r&&(o=i[e].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,s=t[e-1].ranges[0].left+t[e-1].ranges[0].width;bi(a-i)i&&(c.top=1),bi(l-s)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const s=!!n[0].ranges[0].startStyle,o=n[0].lineNumber,r=n[n.length-1].lineNumber;for(let a=0,l=n.length;a1,r)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function bi(e){return e<0?-e:e}(0,De.zy)(((e,t)=>{const i=e.getColor(Ht.rm4);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));class wi{constructor(e,t,i,n,s,o,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=o,this.textContentClassName=r}}!function(e){e[e.Single=0]="Single",e[e.MultiPrimary=1]="MultiPrimary",e[e.MultiSecondary=2]="MultiSecondary"}(ci||(ci={}));class Ci{constructor(e,t){this._context=e;const i=this._context.configuration.options,n=i.get(50);this._cursorStyle=i.get(28),this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,F.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${Te}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,g.M)(this._domNode,n),this._domNode.setDisplay("none"),this._position=new q.y(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case ci.Single:this._pluralityClass="";break;case ci.MultiPrimary:this._pluralityClass="cursor-primary";break;case ci.MultiSecondary:this._pluralityClass="cursor-secondary"}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),(0,g.M)(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=ke.m(i,t-1);return[new q.y(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="";const[n,s]=this._getGraphemeAwarePosition();if(this._cursorStyle===x.m9.Line||this._cursorStyle===x.m9.LineThin){const o=e.visibleRangeForPosition(n);if(!o||o.outsideRenderedLine)return null;const r=l.zk(this._domNode.domNode);let a;this._cursorStyle===x.m9.Line?(a=l.vT(r,this._lineCursorWidth>0?this._lineCursorWidth:2),a>2&&(t=s,i=this._getTokenClassName(n))):a=l.vT(r,1);let c=o.left,d=0;a>=2&&c>=1&&(d=1,c-=d);const h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new wi(h,c,d,a,this._lineHeight,t,i)}const o=e.linesVisibleRangesForRange(new K.Q(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],c="\t"===s||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===x.m9.Block&&(t=s,i=this._getTokenClassName(n));let d=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==x.m9.Underline&&this._cursorStyle!==x.m9.UnderlineThin||(d+=this._lineHeight-2,h=2),new wi(d,a.left,0,c,h,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${Te} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class yi extends V{static{this.BLINK_INTERVAL=500}constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Ci(this._context,ci.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,F.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Et.pc,this._cursorFlatBlinkInterval=new l.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),yi.BLINK_INTERVAL,(0,l.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),yi.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case x.m9.Line:e+=" cursor-line-style";break;case x.m9.Block:e+=" cursor-block-style";break;case x.m9.Underline:e+=" cursor-underline-style";break;case x.m9.LineThin:e+=" cursor-line-thin-style";break;case x.m9.BlockOutline:e+=" cursor-block-outline-style";break;case x.m9.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=[{class:".cursor",foreground:Ee.D0,background:Ee.kM},{class:".cursor-primary",foreground:Ee.sC,background:Ee.je},{class:".cursor-secondary",foreground:Ee.we,background:Ee.L0}];for(const n of i){const i=e.getColor(n.foreground);if(i){let s=e.getColor(n.background);s||(s=i.opposite()),t.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${i}; border-color: ${i}; color: ${s}; }`),(0,lt.Bb)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}}}));const Si=()=>{throw new Error("Invalid change accessor")};class ki extends V{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._lineHeight=t.get(67),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,F.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,F.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let s=0,o=n.length;s{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(e){(0,c.dz)(e)}}(e,n),n.addZone=Si,n.removeZone=Si,n.layoutZone=Si})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,F.Z)(t.domNode),marginDomNode:t.marginDomNode?(0,F.Z)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,c.dz)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,c.dz)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const s=Object.keys(this._zones);for(let t=0,n=s.length;tt)continue;const e=i.startLineNumber===t?i.startColumn:n.minColumn,s=i.endLineNumber===t?i.endColumn:n.maxColumn;e=S.endOffset&&(y++,S=i&&i[y]),9!==s&&32!==s)continue;if(h&&!w&&n<=v)continue;if(d&&n>=C&&n<=v&&32===s){const e=n-1>=0?r.charCodeAt(n-1):0,t=n+1=0?r.charCodeAt(n-1):0;if(32===s&&32!==e&&9!==e)continue}if(i&&(!S||S.startOffset>n||S.endOffset<=n))continue;const c=e.visibleRangeForPosition(new q.y(t,n+1));c&&(o?(k=Math.max(k,c.left),b+=9===s?this._renderArrow(u,f,c.left):``):b+=9===s?`
    ${_?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:`
    ${String.fromCharCode(m)}
    `)}return o?(k=Math.round(k+f),``+b+""):b}_renderArrow(e,t,i){const n=e/2,s=i,o={x:0,y:t/7/2},r={x:.8*t,y:o.y},a={x:r.x-.2*r.x,y:r.y+.2*r.x},l={x:a.x+.1*r.x,y:a.y+.1*r.x},c={x:l.x+.35*r.x,y:l.y-.35*r.x};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Di{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(100),this.renderWithSVG=!0):(this.renderWhitespace=t.get(100),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(67),this.stopRenderingLineAfter=t.get(118)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class Ei{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.lineHeight=0|t.lineHeight,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new K.Q(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Ni{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class Ii{constructor(e,t,i){this.configuration=e,this.theme=new Ni(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}let Mi=class extends H{constructor(e,t,i,n,s,o,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new ue.L(1,1,1,1)],this._renderAnimationFrame=null;const a=new je(t,n,s,e);this._context=new Ii(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(Ve,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,F.Z)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,F.Z)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,F.Z)(document.createElement("div")),z.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new gt(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Rt(this._context,this._linesContent),this._viewZones=new ki(this._context),this._viewParts.push(this._viewZones);const l=new li(this._context);this._viewParts.push(l);const c=new gi(this._context);this._viewParts.push(c);const d=new Xe(this._context);this._viewParts.push(d),d.addDynamicOverlay(new dt(this._context)),d.addDynamicOverlay(new vi(this._context)),d.addDynamicOverlay(new Lt(this._context)),d.addDynamicOverlay(new ut(this._context)),d.addDynamicOverlay(new Li(this._context));const h=new Je(this._context);this._viewParts.push(h),h.addDynamicOverlay(new ht(this._context)),h.addDynamicOverlay(new At(this._context)),h.addDynamicOverlay(new Pt(this._context)),h.addDynamicOverlay(new Ne(this._context)),this._glyphMarginWidgets=new bt(this._context),this._viewParts.push(this._glyphMarginWidgets);const u=new Ie(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(h.getDomNode()),u.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(u),this._contentWidgets=new it(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new yi(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new ri(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const g=new ui(this._context);this._viewParts.push(g);const p=new tt(this._context);this._viewParts.push(p);const f=new ni(this._context);if(this._viewParts.push(f),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),o?(o.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),o.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new ye(this._context,a,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes;let i=[],n=0;i=i.concat(e.getAllMarginDecorations().map((e=>{const t=e.options.glyphMargin?.position??pt.ZS.Center;return n=Math.max(n,e.range.endLineNumber),{range:e.range,lane:t,persist:e.options.glyphMargin?.persistLane}}))),i=i.concat(this._glyphMarginWidgets.getWidgets().map((t=>{const i=e.validateRange(t.preference.range);return n=Math.max(n,i.endLineNumber),{range:i,lane:t.preference.lane}}))),i.sort(((e,t)=>K.Q.compareRangesUsingStarts(e.range,t.range))),t.reset(n);for(const e of i)t.push(e.lane,e.range,e.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new X(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new q.y(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(146);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(143)+" "+(0,De.Pz)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new c.D7;if(null===this._renderAnimationFrame){const e=this._createCoordinatedRendering();this._renderAnimationFrame=Ri.INSTANCE.scheduleCoordinatedRendering({window:l.zk(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new c.D7;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new c.D7;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new c.D7;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new c.D7;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();Ti((()=>e.prepareRenderText()));const t=Ti((()=>e.renderText()));if(t){const[i,n]=t;Ti((()=>e.prepareRender(i,n))),Ti((()=>e.render(i,n)))}}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}B.p.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new Ei(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new ze.eh(this._context.viewLayout,i,this._viewLines)]},prepareRender:(e,t)=>{for(const i of e)i.prepareRender(t)},render:(e,t)=>{for(const i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new q.y(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?et.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new hi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};function Ti(e){try{return e()}catch(e){return(0,c.dz)(e),null}}Mi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,Fe._Y)],Mi);class Ri{static{this.INSTANCE=new Ri}constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(-1!==t&&(this._coordinatedRenderings.splice(t,1),0===this._coordinatedRenderings.length)){for(const[e,t]of this._animationFrameRunners)t.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,l.Oq(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const t of e)Ti((()=>t.prepareRenderText()));const t=[];for(let i=0,n=e.length;in.renderText()))}for(let i=0,n=e.length;in.prepareRender(o,r)))}for(let i=0,n=e.length;in.render(o,r)))}}}var Pi=i(93066);class Ai{constructor(e,t,i,n,s){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;ethis.injectionOffsets[e];e++)i0?this.breakOffsets[s-1]:0,0===t)if(e<=o)n=s-1;else{if(!(e>r))break;i=s+1}else if(e=r))break;i=s+1}}let r=e-o;return s>0&&(r+=this.wrappedTextIndentLength),new Bi(s,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new Bi(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&Oi(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(Fi(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!Oi(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!Fi(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}(0,Pi.xb)(t)}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let s=0;se)break;if(e<=a)return{injectedTextIndex:s,offsetInInputWithInjections:r,length:o};n+=o}}}}function Oi(e){return null==e||e===pt.VW.Right||e===pt.VW.Both}function Fi(e){return null==e||e===pt.VW.Left||e===pt.VW.Both}class Bi{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new q.y(e+this.outputLineIndex,this.outputOffset+1)}}var Wi=i(40699);const Hi=(0,qe.H)("domLineBreaksComputer",{createHTML:e=>e});class Vi{static create(e){return new Vi(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,s){const o=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t)},finalize:()=>function(e,t,i,n,s,o,r,a){function l(e){const i=a[e];if(i){const n=Wi.uK.applyInjectedText(t[e],i),s=i.map((e=>e.options)),o=i.map((e=>e.column-1));return new Ai(o,s,[n.length],[],0)}return null}if(-1===s){const e=[];for(let i=0,n=t.length;ic?(r=0,l=0):d=c-e}const h=s.substr(r),g=zi(h,l,n,d,f,u);m[e]=r,_[e]=l,v[e]=h,b[e]=g[0],w[e]=g[1]}const C=f.build(),y=Hi?.createHTML(C)??C;p.innerHTML=y,p.style.position="absolute",p.style.top="10000","keepAll"===r?(p.style.wordBreak="keep-all",p.style.overflowWrap="anywhere"):(p.style.wordBreak="inherit",p.style.overflowWrap="break-word"),e.document.body.appendChild(p);const S=document.createRange(),k=Array.prototype.slice.call(p.children,0),x=[];for(let e=0;ee.options)),c=d.map((e=>e.column-1))):(r=null,c=null),x[e]=new Ai(c,r,t,o,n)}return p.remove(),x}((0,St.eU)(this.targetWindow.deref()),o,e,t,i,n,s,r)}}}function zi(e,t,i,n,s,o){if(0!==o){const e=String(o);s.appendString('
    ');const r=e.length;let a=t,l=0;const c=[],d=[];let h=0");for(let t=0;t"),c[t]=l,d[t]=a;const n=h;h=t+1"),c[e.length]=l,d[e.length]=a,s.appendString("
    "),[c,d]}function Ui(e,t,i,n){if(i.length<=1)return null;const s=Array.prototype.slice.call(t.children,0),o=[];try{ji(e,s,n,0,null,i.length-1,null,o)}catch(e){return console.log(e),null}return 0===o.length?null:(o.push(i.length),o)}function ji(e,t,i,n,s,o,r,a){if(n===o)return;if(s=s||qi(e,t,i[n],i[n+1]),r=r||qi(e,t,i[o],i[o+1]),Math.abs(s[0].top-r[0].top)<=.1)return;if(n+1===o)return void a.push(o);const l=n+(o-n)/2|0,c=qi(e,t,i[l],i[l+1]);ji(e,t,i,n,s,l,c,a),ji(e,t,i,l,c,o,r,a)}function qi(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class Ki extends h.jG{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new h.$w),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const e of t)this._pending.has(e.id)?(0,c.dz)(new Error(`Cannot have two contributions with the same id ${e.id}`)):this._pending.set(e.id,e);this._instantiateSome(0),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(1)}))),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(2)}))),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return(0,l.U3)((0,l.zk)(this._editor?.getDomNode()),(()=>{this._instantiateSome(1)}),50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const e of t)this._instantiateById(e.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(e){(0,c.dz)(e)}}}}var $i=i(40469),Gi=i(19527),Qi=i(48872),Yi=i(49678),Zi=i(8494),Xi=i(49079),Ji=i(69122),en=i(82282);class tn{static create(e){return new tn(e.get(135),e.get(134))}constructor(e,t){this.classifier=new nn(e,t)}createLineBreaksComputer(e,t,i,n,s){const o=[],r=[],a=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let e=0,d=o.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let sn=[],on=[];function rn(e,t,i,n,s,o,r,a){if(-1===s)return null;const l=i.length;if(l<=1)return null;const c="keepAll"===a,d=t.breakOffsets,h=t.breakOffsetsVisibleColumn,u=hn(i,n,s,o,r),g=s-u,p=sn,f=on;let m=0,_=0,v=0,b=s;const w=d.length;let C=0;if(C>=0){let e=Math.abs(h[C]-b);for(;C+1=e)break;e=t,C++}}for(;Ct&&(t=_,s=v);let r=0,a=0,u=0,y=0;if(s<=b){let v=s,w=0===t?0:i.charCodeAt(t-1),C=0===t?0:e.get(w),S=!0;for(let s=t;s_&&dn(0,C,l,d,c)&&(r=t,a=v),v+=h,v>b){t>_?(u=t,y=v-h):(u=s+1,y=v),v-a>g&&(r=0),S=!1;break}w=l,C=d}if(S){m>0&&(p[m]=d[d.length-1],f[m]=h[d.length-1],m++);break}}if(0===r){let l=s,d=i.charCodeAt(t),h=e.get(d),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,s=i.charCodeAt(n);if(9===s){p=!0;break}let f,m;if(ke.LJ(s)?(n--,f=0,m=2):(f=e.get(s),m=ke.ne(s)?o:1),l<=b){if(0===u&&(u=t,y=l),l<=b-g)break;if(dn(0,f,d,h,c)){r=t,a=l;break}}l-=m,d=s,h=f}if(0!==r){const e=g-(y-a);if(e<=n){const t=i.charCodeAt(u);let s;s=ke.pc(t)?2:ln(t,y,n,o),e-s<0&&(r=0)}}if(p){C--;continue}}if(0===r&&(r=u,a=y),r<=_){const e=i.charCodeAt(_);ke.pc(e)?(r=_+2,a=v+2):(r=_+1,a=v+ln(e,v,n,o))}for(_=r,p[m]=r,v=a,f[m]=a,m++,b=a+g;C<0||C=S)break;S=e,C++}}return 0===m?null:(p.length=m,f.length=m,sn=t.breakOffsets,on=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=f,t.wrappedTextIndentLength=u,t)}function an(e,t,i,n,s,o,r,a){const l=Wi.uK.applyInjectedText(t,i);let c,d;if(i&&i.length>0?(c=i.map((e=>e.options)),d=i.map((e=>e.column-1))):(c=null,d=null),-1===s)return c?new Ai(d,c,[l.length],[],0):null;const h=l.length;if(h<=1)return c?new Ai(d,c,[l.length],[],0):null;const u="keepAll"===a,g=hn(l,n,s,o,r),p=s-g,f=[],m=[];let _=0,v=0,b=0,w=s,C=l.charCodeAt(0),y=e.get(C),S=ln(C,0,n,o),k=1;ke.pc(C)&&(S+=1,C=l.charCodeAt(1),y=e.get(C),k++);for(let t=k;tw&&((0===v||S-b>p)&&(v=i,b=S-a),f[_]=v,m[_]=b,_++,w=b+p,v=0),C=s,y=r}return 0!==_||i&&0!==i.length?(f[_]=h,m[_]=S,new Ai(d,c,f,m,g)):null}function ln(e,t,i,n){return 9===e?i-t%i:ke.ne(e)||e<32?n:1}function cn(e,t){return t-e%t}function dn(e,t,i,n,s){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!s&&3===t&&2!==n||!s&&3===n&&1!==t)}function hn(e,t,i,n,s){let o=0;if(0!==s){const r=ke.HG(e);if(-1!==r){for(let i=0;ii&&(o=0)}}return o}var un=i(64429),gn=i(30699);class pn{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new gn.mG(new K.Q(1,1,1,1),0,0,new q.y(1,1),0),new gn.mG(new K.Q(1,1,1,1),0,0,new q.y(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new gn.MF(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?ue.L.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):ue.L.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),o=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,o),a=this._validatePositionWithCache(e,s,n,r);return i.equals(o)&&n.equals(r)&&s.equals(a)?t:new gn.mG(K.Q.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,o,t.leftoverVisibleColumns+i.column-o.column)}_setState(e,t,i){if(i&&(i=pn._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),o=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new gn.mG(i,t.selectionStartKind,n,s,o)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new gn.mG(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new gn.mG(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new q.y(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new q.y(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new K.Q(n.lineNumber,n.column,s.lineNumber,s.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new gn.mG(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class fn{constructor(e){this.context=e,this.cursors=[new pn(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return(0,un.kh)(this.cursors,(0,f.VE)((e=>e.viewState.position),q.y.compare)).viewState.position}getBottomMostViewPosition(){return(0,un.ot)(this.cursors,(0,f.VE)((e=>e.viewState.position),q.y.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(gn.MF.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),K.Q.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class mn{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var _n=i(97494),vn=i(93997),bn=i(67041);class wn{constructor(){this.type=0}}class Cn{constructor(){this.type=1}}class yn{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Sn{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class kn{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class xn{constructor(){this.type=5}}class Ln{constructor(e){this.type=6,this.isFocused=e}}class Dn{constructor(){this.type=7}}class En{constructor(){this.type=8}}class Nn{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class In{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class Mn{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class Tn{constructor(e,t,i,n,s,o,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=o,this.scrollType=r,this.type=12}}class Rn{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Pn{constructor(e){this.theme=e,this.type=14}}class An{constructor(e){this.type=15,this.ranges=e}}class On{constructor(){this.type=16}}class Fn{constructor(){this.type=17}}class Bn extends h.jG{constructor(){super(),this._onEvent=this._register(new d.vl),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Wn{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Hn{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new Hn(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Vn{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new Vn(this.oldHasFocus,e.hasFocus)}}class zn{constructor(e,t,i,n,s,o,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}attemptToMerge(e){return e.kind!==this.kind?null:new zn(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Un{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class jn{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class qn{constructor(e,t,i,n,s,o,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=o,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;to&&(n=n.slice(0,o),s=!0);const r=es.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,i,n,s,o){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=K.Q.fromPositions(r[0],r[0]),e.emitViewEvent(new Tn(t,i,a,l,n,s,o))}revealPrimary(e,t,i,n,s,o){const r=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new Tn(t,i,null,r,n,s,o))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const t=gn.MF.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,gn.MF.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,gn.MF.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let s=0,o=e.length;s0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const o=es.from(this._model,this);if(o.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new Sn(a,r,i)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new qn(a,r,l,o.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const s=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;const o=s[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-s[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let s=null;"snippet"===t&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const o=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(s)for(let t=0,i=s.length;t0&&this._pushAutoClosedAction(o,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=es.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,c.dz)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return ts.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new ss(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(vn.T.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(vn.T.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))}),e,o);else if(0!==s){const t=this.getSelections().map((e=>{const t=e.getPosition();return new ue.L(t.lineNumber,t.column+s,t.lineNumber,t.column+s)}));this.setSelections(e,o,t,0)}}paste(e,t,i,n,s){this._executeEdit((()=>{this._executeEditOperation(vn.T.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,s,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(_n.g.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new gn.vY(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new gn.vY(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class es{static from(e,t){return new es(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class is{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e0&&(o[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,o,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,o=[];for(let i=0;i0?(n[i].sort(s),o[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new ue.L(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new ue.L(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):o[i]=e.selectionsBefore[i];return o}));r||(r=e.selectionsBefore);const a=[];for(const e in s)s.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{K.Q.isEmpty(e)&&""===o||n.push({identifier:{major:t,minor:s++},range:e,text:o,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a={addEditOperation:o,addTrackedEditOperation:(e,t,i)=>{r=!0,o(e,t,i)},trackSelection:(t,i)=>{const n=ue.L.liftSelection(t);let s;if(n.isEmpty())if("boolean"==typeof i)s=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);s=n.startColumn===t?2:3}else s=1;const o=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,s);return e.trackedRanges[o]=r,e.trackedRangesDirection[o]=n.getDirection(),o.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,c.dz)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-K.Q.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;is.identifier.major?n.identifier.major:s.identifier.major,t[o.toString()]=!0;for(let t=0;t0&&i--}}return t}}class ns{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class ss{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new ns(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=ss._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=ss._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let e=0,t=this._original.length;e>>1;t===e[o].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,s|=0;const o=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new cs(o,e,i,n,s)),o},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const s=new Map;for(const e of t)s.set(e.id,e);const o=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(s.has(i.id)){const e=s.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=o(this._arr).concat(o(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=ds.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[s+1].afterLineNumber>=e)return s;i=s+1|0}else n=s-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0,i+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0))+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){return this._checkPendingChanges(),e|=0,this._lineHeight*e+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0))+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,s=t;for(;n=o+i)n=t+1;else{if(e>=o)return t;s=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(n);let o=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===r?(r=a,c=o+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let d=s,h=d;const u=5e5;let g=0;s>=u&&(g=Math.floor(s/u)*u,g=Math.floor(g/i)*i,h-=g);const p=[],f=e+(t-e)/2;let m=-1;for(let e=n;e<=o;e++){for(-1===m&&(d<=f&&ff)&&(m=e),d+=i,p[e-n]=h,h+=i;c===e;)h+=l,d+=l,r++,r>=a?c=o+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){o=e;break}}-1===m&&(m=o);const _=0|this.getVerticalOffsetForLineNumber(o);let v=n,b=o;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:o,relativeVerticalOffset:p,centeredLineNumber:m,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=s+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=s)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;s.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}class hs{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class us extends h.jG{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new d.vl),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new hs(0,0,0,0),this._scrollable=this._register(new as.yE({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new Hn(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class gs extends h.jG{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(146),o=n.get(84);this._linesLayout=new ds(t,n.get(67),o.top,o.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new us(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new hs(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(115)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(t.get(67)),e.hasChanged(84)){const e=t.get(84);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(146)){const e=t.get(146),i=e.contentWidth,n=e.height,s=this._scrollable.getScrollDimensions(),o=s.contentWidth;this._scrollable.setScrollDimensions(new hs(i,s.contentWidth,n,this._getContentHeight(i,n,o)))}else this._updateHeight();e.hasChanged(115)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(104);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(106)?s+=Math.max(0,t-n.get(67)-n.get(84).bottom):n.get(104).ignoreHorizontalScrollbarInContentHeight||(s+=this._getHorizontalScrollbarHeight(e,i)),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new hs(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Wt.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Wt.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(147),n=e.get(50),s=e.get(146);if(i.isViewportWrapping){const i=e.get(73);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+s.verticalScrollbarWidth:t}{const i=e.get(105)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+s.verticalScrollbarWidth,o,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new hs(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var ps=i(77002),fs=i(44425);function ms(e,t){return null===e?t?vs.INSTANCE:bs.INSTANCE:new _s(e,t)}class _s{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let o;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new Wi.uK(0,0,e+1,this._projectionData.injectionOptions[t],0)));o=Wi.uK.applyInjectedText(e.getLineContent(t),i).substring(n,s)}else o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(o=Cs(this._projectionData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,o,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,c=a.injectionOptions;let d,h=null;if(l){h=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,o=a.breakOffsets[i];for(;to)break;if(s0?a.wrappedTextIndentLength:0,r=t+Math.max(d-s,0),l=t+Math.min(h-s,o-s);r!==l&&n.push(new Wt.or(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(h<=o))break;e+=r,t++}}}d=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:fs.f.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let e=i;e0?n.wrappedTextIndentLength:0,o=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(o,r,s);let l=a.getLineContent();i>0&&(l=Cs(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,h=i+1=ws.length)for(let t=1;t<=e;t++)ws[t]=ys(t);return ws[e]}function ys(e){return new Array(e+1).join(" ")}var Ss=i(45354);class ks{constructor(e,t,i,n,s,o,r,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Ds(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,o=this.createLineBreaksComputer(),r=new f.j3(Wi.uK.fromDecorations(n));for(let e=0;et.lineNumber===e+1));o.addRequest(i[e],n,t?t[e]:null)}const a=o.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(K.Q.compareRangesUsingStarts);let d=1,h=0,u=-1,g=u+1=d&&t<=h,n=ms(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Ss.c2(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(K.Q.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,s=t[0].endLineNumber;for(let e=1,o=t.length;es+1?(i.push(new K.Q(n,1,s,1)),n=o.startLineNumber,s=o.endLineNumber):o.endLineNumber>s&&(s=o.endLineNumber)}return i.push(new K.Q(n,1,s,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(K.Q.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n({range:e,options:Xi.kI.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const s=t;let o=1,r=0,a=-1,l=a+1=o&&t<=r?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(c=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,c=this.wordBreak===s;if(o&&r&&a&&l&&c)return!1;const d=o&&r&&!a&&l&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let h=null;if(d){h=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),o=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let e=0,t=n.length;er?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+r-1,u=c+1,g=u+(s-r)-1,a=!0):st?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new xs(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new q.y(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new q.y(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let o=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const s=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,o=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=s;t{if(-1!==e.forWrappedLinesAfterColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=n.modelLineWrappedLineIdx)return;if(-1!==e.forWrappedLinesBeforeOrAtColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumbern.modelLineWrappedLineIdx)return}const i=this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn),s=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return s.lineNumber===n.modelLineWrappedLineIdx?new xt.TH(e.visibleColumn,t,e.className,new xt.pv(e.horizontalLine.top,i.column),-1,-1):s.lineNumber!!e)))}}return o}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const o=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),s=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=s-n+1;let d=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,s)&&(d=0===n?1:2),o.push(l),r.push(d),null===c&&(c=new q.y(e+1,0))}else null!==c&&(s=s.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(s=s.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const d=t-e+1,h=new Array(d);let u=0;for(let e=0,t=s.length;et&&(h=!0,d=t-s+1),l.getViewLinesData(this.model,n+1,c,d,s-e,i,a),s+=d,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,o=n.remainder,r=this.modelLineProjections[s],a=r.getViewLineMinColumn(this.model,s+1,o),l=r.getViewLineMaxColumn(this.model,s+1,o);tl&&(t=l);const c=r.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new q.y(s+1,c)).equals(i)?new q.y(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new K.Q(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new q.y(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new K.Q(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){const o=this.model.validatePosition(new q.y(e,t)),r=o.lineNumber,a=o.column;let l=r-1,c=!1;if(s)for(;l0&&!this.modelLineProjections[l].isVisible();)l--,c=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new q.y(n?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(l);let h;return h=c?s?this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(d,a,i),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return K.Q.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new K.Q(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s){const o=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-o.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new K.Q(o.lineNumber,1,r.lineNumber,r.column),t,i,n,s);let a=[];const l=o.lineNumber-1,c=r.lineNumber-1;let d=null;for(let e=l;e<=c;e++)if(this.modelLineProjections[e].isVisible())null===d&&(d=new q.y(e+1,e===l?o.column:1));else if(null!==d){const s=this.model.getLineMaxColumn(e);a=a.concat(this.model.getDecorationsInRange(new K.Q(d.lineNumber,d.column,e,s),t,i,n)),d=null}null!==d&&(a=a.concat(this.model.getDecorationsInRange(new K.Q(d.lineNumber,d.column,r.lineNumber,r.column),t,i,n)),d=null),a.sort(((e,t)=>{const i=K.Q.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));const h=[];let u=0,g=null;for(const e of a){const t=e.id;g!==t&&(g=t,h[u++]=e)}return h}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class xs{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class Ls{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Ds{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class Es{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Ns(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new In(t,i)}onModelLinesInserted(e,t,i,n){return new Mn(t,i)}onModelLineChanged(e,t,i){return[!1,new Nn(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let e=0;et)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}const Is=pt.ZS.Right;class Ms{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*Is/8))}reset(e){const t=Math.ceil((e+1)*Is/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=Rs.create(this.model),this.glyphLanes=new Ms(0),this.model.isTooLargeForTokenization())this._lines=new Es(this.model);else{const e=this._configuration.options,t=e.get(50),i=e.get(140),o=e.get(147),r=e.get(139),a=e.get(130);this._lines=new ks(this._editorId,this.model,n,s,t,this.model.getOptions().tabSize,i,o.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Jn(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new gs(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new Rn(e)),this._eventDispatcher.emitOutgoingEvent(new zn(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new ps.UB(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(Bt.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new On)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Pn(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new K.Q(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Ln(e)),this._eventDispatcher.emitOutgoingEvent(new Vn(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new wn)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Cn)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new q.y(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new Fs(t,this._viewportStart.startLineDelta)}return new Fs(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,s=n.get(50),o=n.get(140),r=n.get(147),a=n.get(139),l=n.get(130);this._lines.setWrappingSettings(s,o,r.wrappingColumn,a,l)&&(e.emitViewEvent(new xn),e.emitViewEvent(new En),e.emitViewEvent(new kn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(92)&&(this._decorations.reset(),e.emitViewEvent(new kn(null))),t.hasChanged(99)&&(this._decorations.reset(),e.emitViewEvent(new kn(null))),e.emitViewEvent(new yn(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),gn.d$.shouldRecreate(t)&&(this.cursorConfig=new gn.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const s=e instanceof Wi.Ic?e.rawContentChangedEvent.changes:e.changes,o=e instanceof Wi.Ic?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of s)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new f.j3(a);for(const e of s)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new xn),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(o,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),s=this._lines.onModelLinesInserted(o,e.fromLineNumber,e.toLineNumber,n);null!==s&&(t.emitViewEvent(s),this.viewLayout.onLinesInserted(s.fromLineNumber,s.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[s,r,a,c]=this._lines.onModelLineChanged(o,e.lineNumber,i);n=s,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}}null!==o&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new En),t.emitViewEvent(new kn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof Wi.Ic&&t.emitOutgoingEvent(new Yn(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new Dn),this.cursorConfig=new gn.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Qn(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new gn.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Gn(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new xn),e.emitViewEvent(new En),e.emitViewEvent(new kn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new gn.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Zn(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new kn(e)),this._eventDispatcher.emitOutgoingEvent(new $n(e))})))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const n=this._captureStableViewport();let s=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();s=this._lines.setHiddenAreas(i),s&&(e.emitViewEvent(new xn),e.emitViewEvent(new En),e.emitViewEvent(new kn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const t=n.viewportStartModelPosition?.lineNumber;t&&i.some((e=>e.startLineNumber<=t&&t<=e.endLineNumber))||n.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),s&&this._eventDispatcher.emitOutgoingEvent(new jn)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(146),t=this._configuration.options.get(67),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),o=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new K.Q(s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let s=0,o=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(ot.toInlineDecoration(e)))]),new Wt.qL(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,i,n,o.tokens,t,s,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new Wt.nt(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,x.$C)(this._configuration.options)),i=new Ps;for(const n of t){const t=n.options,s=t.overviewRuler;if(!s)continue;const o=s.position;if(0===o)continue;const r=s.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,o)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e?.invalidateCachedColor();const i=t.options.minimap;i?.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e),n=this.model.modifyPosition(i,t);return this.coordinatesConverter.convertModelPositionToViewPosition(n)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const s=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(K.Q.compareRangesUsingStarts);let s=!1,o=!1;for(const t of e)t.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";const i=e.map((e=>e.startLineNumber));let s="";for(let e=0;e0&&i[e-1]===i[e]||(s+=this.model.getLineContent(i[e])+n);return s}if(s&&t){const t=[];let n=0;for(const s of e){const e=s.startLineNumber;s.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(s,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===os.vH)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new K.Q(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const s=this._configuration.options.get(50),o=this._getColorMap();let r;return/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===x.jU.fontFamily?r=x.jU.fontFamily:(r=s.fontFamily,r=r.replace(/"/g,"'"),/[,']/.test(r)||/[+ ]/.test(r)&&(r=`'${r}'`),r=`${r}, ${x.jU.fontFamily}`),{mode:i,html:`
    `+this._getHTMLToCopy(n,o)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=s;e++){const l=this.model.tokenization.getLineTokens(e),c=l.getLineContent(),d=e===i?n-1:0,h=e===s?o-1:c.length;a+=""===c?"
    ":(0,rs.s0)(c,l.inflate(),t,d,h,r,_.uF)}return a}_getColorMap(){const e=Re.dG.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Kn):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,s){this._executeCursorEdit((o=>this._cursor.compositionType(o,e,t,i,n,s)))}paste(e,t,i,n){this._executeCursorEdit((s=>this._cursor.paste(s,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealAll(n,e,i,0,t,0)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new K.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Tn(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new K.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Tn(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,s){this._withViewEventsCollector((o=>o.emitViewEvent(new Tn(e,!1,i,null,n,t,s))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Fn),this._eventDispatcher.emitOutgoingEvent(new Un))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges((()=>{try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}))}batchEvents(e){this._withViewEventsCollector((()=>{e()}))}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class Rs{static create(e){const t=e._setTrackedRange(null,new K.Q(1,1,1,1),1);return new Rs(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new q.y(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new K.Q(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),o=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=o-s}invalidate(){this._isValid=!1}}class Ps{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const o=this._asMap[e];if(o){const e=o.data,t=e[e.length-3],r=e[e.length-1];if(t===s&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(s,i,n)}else{const o=new Wt.Uv(e,t,[s,i,n]);this._asMap[e]=o,this.asArray.push(o)}}}class As{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&Os(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>function(e,t){const i=[];let n=0,s=0;for(;n{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(146)){const e=t.get(146);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=u,this._codeEditorService=o,this._commandService=r,this._themeService=h,this._register(new Ys(this,this._contextKeyService)),this._register(new Zs(this,this._contextKeyService,f)),this._instantiationService=this._register(n.createChild(new Vs.a([Hs.fN,this._contextKeyService]))),this._modelData=null,this._focusTracker=new Xs(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},_=Array.isArray(i.contributions)?i.contributions:s.dS.getEditorContributions(),this._contributions.initialize(this,_,this._instantiationService);for(const e of s.dS.getEditorActions()){if(this._actions.has(e.id)){(0,c.dz)(new Error(`Cannot have two actions with the same id ${e.id}`));continue}const t=new Gi.f(e.id,e.label,e.alias,e.metadata,e.precondition??void 0,(t=>this._instantiationService.invokeFunction((i=>Promise.resolve(e.runEditorCommand(i,this,t))))),this._contextKeyService);this._actions.set(t.id,t)}const v=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new l.pN(this._domElement,{onDragOver:e=>{if(!v())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this.showDropIndicatorAt(t.position)},onDrop:async e=>{if(!v())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this._onDropIntoEditor.fire({position:t.position,event:e})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i,n){return new I(e,t,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Qi._.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?$i.z.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(i);const n=this.hasTextFocus(),s=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(o.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?Bs._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Bs._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber,n)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return-1;const i=this._modelData.model.getLineMaxColumn(e);return Bs._getVerticalOffsetAfterPosition(this._modelData,e,i,t)}setHiddenAreas(e,t){this._modelData?.viewModel.setHiddenAreas(e.map((e=>K.Q.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return $.A.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!q.y.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!K.Q.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,o,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new K.Q(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!q.y.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new K.Q(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=ue.L.isISelection(e),n=K.Q.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new ue.L(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new K.Q(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!K.Q.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(K.Q.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){i=i||{};try{switch(this._beginUpdate(),t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null,t.clipboardEvent)}case"cut":return void this._cut(e)}const n=this.getAction(t);if(n)return void Promise.resolve(n.run(i)).then(void 0,c.dz);if(!this._modelData)return;if(this._triggerEditorCommand(e,t,i))return;this._triggerCommand(t,i)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s,o){if(!this._modelData)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({clipboardEvent:o,range:new K.Q(a.lineNumber,a.column,l.lineNumber,l.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=s.dS.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,c.dz)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(92)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(92)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(92))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new Js(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,x.$C)(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,(0,x.$C)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations((e=>e.deltaDecorations(t,[]))),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(146)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(146);return{top:Bs._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),height:i.get(67)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.viewModel.batchEvents((()=>{this._modelData.view.render(!0,e)}))}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,g.M)(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new Ts(this._id,this._configuration,e,Vi.create(l.zk(this._domElement)),tn.create(this._configuration.options),(e=>l.PG(l.zk(this._domElement),e)),this.languageConfigurationService,this._themeService,i,{batchChanges:e=>{try{return this._beginUpdate(),e()}finally{this._endUpdate()}}});t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=this.getOption(80),t=Se.kg("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",e);this._notificationService.prompt(zs.AI.Warning,t,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:Se.kg("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let i=0,n=t.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const s={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",s)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const s={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",s)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new et(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new Mi(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new K.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:Bs.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,0===this._updateCounter&&this._onEndUpdate.fire()}};qs=Bs=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([js(3,Fe._Y),js(4,O.T),js(5,Ws.d),js(6,Hs.fN),js(7,De.Gy),js(8,zs.Ot),js(9,E.j),js(10,Zi.JZ),js(11,Ji.ILanguageFeaturesService)],qs);let Ks=0;class $s{constructor(e,t,i,n,s,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=o}dispose(){(0,h.AS)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class Gs extends h.jG{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new d.vl(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new d.vl(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class Qs extends d.vl{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class Ys extends h.jG{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Yi.R.editorSimpleInput.bindTo(t),this._editorFocus=Yi.R.focus.bindTo(t),this._textInputFocus=Yi.R.textInputFocus.bindTo(t),this._editorTextFocus=Yi.R.editorTextFocus.bindTo(t),this._tabMovesFocus=Yi.R.tabMovesFocus.bindTo(t),this._editorReadonly=Yi.R.readOnly.bindTo(t),this._inDiffEditor=Yi.R.inDiffEditor.bindTo(t),this._editorColumnSelection=Yi.R.columnSelection.bindTo(t),this._hasMultipleSelections=Yi.R.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Yi.R.hasNonEmptySelection.bindTo(t),this._canUndo=Yi.R.canUndo.bindTo(t),this._canRedo=Yi.R.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._register(k.M.onDidChangeTabFocus((e=>this._tabMovesFocus.set(e)))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(k.M.getTabFocusMode()),this._editorReadonly.set(e.get(92)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Zs extends h.jG{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=Yi.R.languageId.bindTo(t),this._hasCompletionItemProvider=Yi.R.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Yi.R.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Yi.R.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Yi.R.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Yi.R.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Yi.R.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Yi.R.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Yi.R.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Yi.R.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Yi.R.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Yi.R.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Yi.R.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Yi.R.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Yi.R.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Yi.R.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Yi.R.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Yi.R.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Yi.R.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=Yi.R.isInEmbeddedEditor.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===u.ny.walkThroughSnippet||e.uri.scheme===u.ny.vscodeChatCodeBlock)})):this.reset()}}class Xs extends h.jG{constructor(e,t){super(),this._onChange=this._register(new d.vl),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(l.w5(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus((()=>{this._hasDomElementFocus=!0,this._update()}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasDomElementFocus=!1,this._update()}))),t&&(this._overflowWidgetsDomNode=this._register(l.w5(t)),this._register(this._overflowWidgetsDomNode.onDidFocus((()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()}))),this._register(this._overflowWidgetsDomNode.onDidBlur((()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()}))))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class Js{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations((i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)}))}finally{this._isChangingDecorations=!1}return t}}const eo=encodeURIComponent("");function io(e){return eo+encodeURIComponent(e.toString())+to}const no=encodeURIComponent('');(0,De.zy)(((e,t)=>{const i=e.getColor(Ht.Rbi);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${io(i)}") repeat-x bottom left; }`);const n=e.getColor(Ht.Hng);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${io(n)}") repeat-x bottom left; }`);const s=e.getColor(Ht.pOz);s&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${io(s)}") repeat-x bottom left; }`);const o=e.getColor(Ht.i61);o&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return no+encodeURIComponent(e.toString())+so}(o)}") no-repeat bottom left; }`);const r=e.getColor(Ee.yw);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}))},11797:function(e,t,i){"use strict";i.d(t,{t:function(){return f}});var n=i(49134),s=i(72777),o=i(16827),r=i(8494),a=i(69122),l=i(68745),c=i(21335),d=i(97848),h=i(63619),u=i(31835),g=i(40616),p=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends o.x{constructor(e,t,i,n,s,o,r,a,l,c,d,h,u){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,s,o,r,a,l,c,d,h,u),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.co(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([p(4,h._Y),p(5,s.T),p(6,c.d),p(7,d.fN),p(8,g.Gy),p(9,u.Ot),p(10,l.j),p(11,r.JZ),p(12,a.ILanguageFeaturesService)],f)},71955:function(e,t,i){"use strict";var n=i(93231),s=i(84201),o=i(52694),r=i(72777),a=i(68831),l=i(49678),c=i(14374),d=i(93223),h=i(47901),u=i(97848);i(51903);class g extends d.L{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:(0,c.aS)("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:n.W.map,toggled:u.M$.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:u.M$.has("isInDiffEditor"),menu:{when:u.M$.has("isInDiffEditor"),id:d.D8.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(h.pG),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class p extends d.L{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:(0,c.aS)("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:u.M$.has("isInDiffEditor")})}run(e,...t){const i=e.get(h.pG),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class f extends d.L{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:(0,c.aS)("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:u.M$.has("isInDiffEditor")})}run(e,...t){const i=e.get(h.pG),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const m=(0,c.aS)("diffEditor","Diff Editor");class _ extends o.qO{constructor(){super({id:"diffEditor.switchSide",title:(0,c.aS)("switchSide","Switch Side"),icon:n.W.arrowSwap,precondition:u.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,i){const n=x(e);if(n instanceof a.T){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class v extends o.qO{constructor(){super({id:"diffEditor.exitCompareMove",title:(0,c.aS)("exitCompareMove","Exit Compare Move"),icon:n.W.close,precondition:l.R.comparingMovedCode,f1:!1,category:m,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=x(e);n instanceof a.T&&n.exitCompareMove()}}class b extends o.qO{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:(0,c.aS)("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:n.W.fold,precondition:u.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,...i){const n=x(e);n instanceof a.T&&n.collapseAllUnchangedRegions()}}class w extends o.qO{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:(0,c.aS)("showAllUnchangedRegions","Show All Unchanged Regions"),icon:n.W.unfold,precondition:u.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,...i){const n=x(e);n instanceof a.T&&n.showAllUnchangedRegions()}}class C extends d.L{constructor(){super({id:"diffEditor.revert",title:(0,c.aS)("revert","Revert"),f1:!1,category:m})}run(e,t){const i=function(e,t,i){return e.get(r.T).listDiffEditors().find((e=>{const n=e.getModifiedEditor(),s=e.getOriginalEditor();return n&&n.getModel()?.uri.toString()===i.toString()&&s&&s.getModel()?.uri.toString()===t.toString()}))||null}(e,t.originalUri,t.modifiedUri);i instanceof a.T&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const y=(0,c.aS)("accessibleDiffViewer","Accessible Diff Viewer");class S extends d.L{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:S.id,title:(0,c.aS)("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:y,precondition:u.M$.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=x(e);t?.accessibleDiffViewerNext()}}class k extends d.L{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:k.id,title:(0,c.aS)("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:y,precondition:u.M$.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=x(e);t?.accessibleDiffViewerPrev()}}function x(e){const t=e.get(r.T).listDiffEditors(),i=(0,s.bq)();if(i)for(const e of t)if(L(e.getContainerDomNode(),i))return e;return null}function L(e,t){let i=t;for(;i;){if(i===e)return!0;i=i.parentElement}return!1}var D=i(21335);(0,d.ug)(g),(0,d.ug)(p),(0,d.ug)(f),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:(new f).desc.id,title:(0,c.kg)("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:u.M$.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:u.M$.has("isInDiffEditor")},order:11,group:"1_diff",when:u.M$.and(l.R.diffEditorRenderSideBySideInlineBreakpointReached,u.M$.has("isInDiffEditor"))}),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:(new p).desc.id,title:(0,c.kg)("showMoves","Show Moved Code Blocks"),icon:n.W.move,toggled:u.f1.create("config.diffEditor.experimental.showMoves",!0),precondition:u.M$.has("isInDiffEditor")},order:10,group:"1_diff",when:u.M$.has("isInDiffEditor")}),(0,d.ug)(C);for(const e of[{icon:n.W.arrowRight,key:l.R.diffEditorInlineMode.toNegated()},{icon:n.W.discard,key:l.R.diffEditorInlineMode}])d.ZG.appendMenuItem(d.D8.DiffEditorHunkToolbar,{command:{id:(new C).desc.id,title:(0,c.kg)("revertHunk","Revert Block"),icon:e.icon},when:u.M$.and(l.R.diffEditorModifiedWritable,e.key),order:5,group:"primary"}),d.ZG.appendMenuItem(d.D8.DiffEditorSelectionToolbar,{command:{id:(new C).desc.id,title:(0,c.kg)("revertSelection","Revert Selection"),icon:e.icon},when:u.M$.and(l.R.diffEditorModifiedWritable,e.key),order:5,group:"primary"});(0,d.ug)(_),(0,d.ug)(v),(0,d.ug)(b),(0,d.ug)(w),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:S.id,title:(0,c.kg)("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:u.M$.has("isInDiffEditor")},order:10,group:"2_diff",when:u.M$.and(l.R.accessibleDiffViewerVisible.negate(),u.M$.has("isInDiffEditor"))}),D.w.registerCommandAlias("editor.action.diffReview.next",S.id),(0,d.ug)(S),D.w.registerCommandAlias("editor.action.diffReview.prev",k.id),(0,d.ug)(k)},68831:function(e,t,i){"use strict";i.d(t,{T:function(){return Mt}});var n=i(84201),s=i(64429),o=i(20187),r=i(80670),a=i(35114),l=i(73755),c=i(98018),d=i(52694),h=i(72777),u=i(61554),g=i(16827),p=i(38945),f=i(98099),m=i(5390),_=i(30981),v=i(97358),b=i(93231),w=i(56613),C=i(43193),y=i(72540),S=i(3520),k=i(80487),x=i(28376),L=i(62993),D=i(40393),E=i(17191),N=i(41750),I=i(44425),M=i(73055),T=i(68316),R=i(14374),P=i(54673),A=i(63619),O=i(51310),F=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},B=function(e,t){return function(i,n){t(i,n,e)}};const W=(0,O.pU)("diff-review-insert",b.W.add,(0,R.kg)("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),H=(0,O.pU)("diff-review-remove",b.W.remove,(0,R.kg)("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),V=(0,O.pU)("diff-review-close",b.W.close,(0,R.kg)("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let z=class extends a.jG{static{this._ttPolicy=(0,p.H)("diffReview",{createHTML:e=>e})}constructor(e,t,i,n,s,o,r,a,c){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=o,this._diffs=r,this._models=a,this._instantiationService=c,this._state=(0,l.rm)(this,((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(U,this._diffs,this._models,this._setVisible,this._canClose));return{model:n,view:t.add(this._instantiationService.createInstance(Z,this._parentNode,n,this._width,this._height,this._models))}})).recomputeInitiallyAndOnChange(this._store)}next(){(0,l.Rn)((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)}))}prev(){(0,l.Rn)((e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)}))}close(){(0,l.Rn)((e=>{this._setVisible(!1,e)}))}};z=F([B(8,A._Y)],z);let U=class extends a.jG{constructor(e,t,i,n,s){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=s,this._groups=(0,l.FY)(this,[]),this._currentGroupIdx=(0,l.FY)(this,0),this._currentElementIdx=(0,l.FY)(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>this.currentGroup.read(t)?.lines[e])),this._register((0,l.fm)((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=function(e,t,i){const n=[];for(const s of(0,v.n)(e,((e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<2*j))){const e=[];e.push(new $);const o=new k.M(Math.max(1,s[0].original.startLineNumber-j),Math.min(s[s.length-1].original.endLineNumberExclusive+j,t+1)),r=new k.M(Math.max(1,s[0].modified.startLineNumber-j),Math.min(s[s.length-1].modified.endLineNumberExclusive+j,i+1));(0,v.pN)(s,((t,i)=>{const n=new k.M(t?t.original.endLineNumberExclusive:o.startLineNumber,i?i.original.startLineNumber:o.endLineNumberExclusive),s=new k.M(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new Y(t,s.startLineNumber+(t-n.startLineNumber)))})),i&&(i.original.forEach((t=>{e.push(new G(i,t))})),i.modified.forEach((t=>{e.push(new Q(i,t))})))}));const a=s[0].modified.join(s[s.length-1].modified),l=s[0].original.join(s[s.length-1].original);n.push(new K(new E.WL(a,l),e))}return n}(t,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());(0,l.Rn)((e=>{const t=this._models.getModifiedPosition();if(t){const n=i.findIndex((e=>t?.lineNumber{const t=this.currentElement.read(e);t?.type===q.Deleted?this._accessibilitySignalService.playSignal(P.Rh.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):t?.type===q.Added&&this._accessibilitySignalService.playSignal(P.Rh.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register((0,l.fm)((e=>{const t=this.currentElement.read(e);if(t&&t.type!==q.Header){const e=t.modifiedLineNumber??t.diff.modified.startLineNumber;this._models.modifiedSetSelection(D.Q.fromPositions(new L.y(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||(0,l.PO)(t,(t=>{this._currentGroupIdx.set(x.L.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||(0,l.Rn)((i=>{this._currentElementIdx.set(x.L.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);-1!==i&&(0,l.Rn)((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===q.Deleted?this._models.originalReveal(D.Q.fromPositions(new L.y(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==q.Header?D.Q.fromPositions(new L.y(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};U=F([B(4,P.Nt)],U);const j=3;var q;!function(e){e[e.Header=0]="Header",e[e.Unchanged=1]="Unchanged",e[e.Deleted=2]="Deleted",e[e.Added=3]="Added"}(q||(q={}));class K{constructor(e,t){this.range=e,this.lines=t}}class ${constructor(){this.type=q.Header}}class G{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=q.Deleted,this.modifiedLineNumber=void 0}}class Q{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=q.Added,this.originalLineNumber=void 0}}class Y{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=q.Unchanged}}let Z=class extends a.jG{constructor(e,t,i,s,o,r){super(),this._element=e,this._model=t,this._width=i,this._height=s,this._models=o,this._languageService=r,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const c=document.createElement("div");c.className="diff-review-actions",this._actionBar=this._register(new f.E(c)),this._register((0,l.fm)((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new _.rc("diffreview.close",(0,R.kg)("label.close","Close"),"close-diff-review "+w.L.asClassName(V),!0,(async()=>t.close())),{label:!1,icon:!0})}))),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new m.MU(this._content,{})),(0,n.Ln)(this.domNode,this._scrollbar.getDomNode(),c),this._register((0,l.fm)((e=>{this._height.read(e),this._width.read(e),this._scrollbar.scanDomNode()}))),this._register((0,a.s)((()=>{(0,n.Ln)(this.domNode)}))),this._register((0,y.AV)(this.domNode,{width:this._width,height:this._height})),this._register((0,y.AV)(this._content,{width:this._width,height:this._height})),this._register((0,l.yC)(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register((0,n.b2)(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),s=document.createElement("div");s.className="diff-review-table",s.setAttribute("role","list"),s.setAttribute("aria-label",(0,R.kg)("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),(0,C.M)(s,i.get(50)),(0,n.Ln)(this._content,s);const o=this._models.getOriginalModel(),r=this._models.getModifiedModel();if(!o||!r)return;const a=o.getOptions(),c=r.getOptions(),d=i.get(67),h=this._model.currentGroup.get();for(const u of h?.lines||[]){if(!h)break;let g;if(u.type===q.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=h.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,s=e=>0===e?(0,R.kg)("no_lines_changed","no lines changed"):1===e?(0,R.kg)("one_line_changed","1 line changed"):(0,R.kg)("more_lines_changed","{0} lines changed",e),o=s(t.original.length),r=s(t.modified.length);e.setAttribute("aria-label",(0,R.kg)({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,o,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),g=e}else g=this._createRow(u,d,this._width.get(),t,o,a,i,r,c);s.appendChild(g);const p=(0,l.un)((e=>this._model.currentElement.read(e)===u));e.add((0,l.fm)((e=>{const t=p.read(e);g.tabIndex=t?0:-1,t&&g.focus()}))),e.add((0,n.ko)(g,"focus",(()=>{this._model.goToLine(u)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,o,r,a,l){const c=n.get(146),d=c.glyphMarginWidth+c.lineNumbersWidth,h=r.get(146),u=10+h.glyphMarginWidth+h.lineNumbersWidth;let g="diff-review-row",p="",f=null;switch(e.type){case q.Added:g="diff-review-row line-insert",p=" char-insert",f=W;break;case q.Deleted:g="diff-review-row line-delete",p=" char-delete",f=H}const m=document.createElement("div");m.style.minWidth=i+"px",m.className=g,m.setAttribute("role","listitem"),m.ariaLevel="";const _=document.createElement("div");_.className="diff-review-cell",_.style.height=`${t}px`,m.appendChild(_);const v=document.createElement("span");v.style.width=d+"px",v.style.minWidth=d+"px",v.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?v.appendChild(document.createTextNode(String(e.originalLineNumber))):v.innerText=" ",_.appendChild(v);const b=document.createElement("span");b.style.width=u+"px",b.style.minWidth=u+"px",b.style.paddingRight="10px",b.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?b.appendChild(document.createTextNode(String(e.modifiedLineNumber))):b.innerText=" ",_.appendChild(b);const C=document.createElement("span");if(C.className="diff-review-spacer",f){const e=document.createElement("span");e.className=w.L.asClassName(f),e.innerText="  ",C.appendChild(e)}else C.innerText="  ";let y;if(_.appendChild(C),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);z._ttPolicy&&(t=z._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),y=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(s,n,o.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);z._ttPolicy&&(t=z._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),y=s.getLineContent(e.originalLineNumber)}0===y.length&&(y=(0,R.kg)("blankLine","blank"));let S="";switch(e.type){case q.Unchanged:S=e.originalLineNumber===e.modifiedLineNumber?(0,R.kg)({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",y,e.originalLineNumber):(0,R.kg)("equalLine","{0} original line {1} modified line {2}",y,e.originalLineNumber,e.modifiedLineNumber);break;case q.Added:S=(0,R.kg)("insertLine","+ {0} modified line {1}",y,e.modifiedLineNumber);break;case q.Deleted:S=(0,R.kg)("deleteLine","- {0} original line {1}",y,e.originalLineNumber)}return m.setAttribute("aria-label",S),m}_getLineHtml(e,t,i,n,s){const o=e.getLineContent(n),r=t.get(50),a=I.f.createEmpty(o,s),l=T.qL.isBasicASCII(o,e.mightContainNonBasicASCII()),c=T.qL.containsRTL(o,l,e.mightContainRTL());return(0,M.Md)(new M.zL(r.isMonospace&&!t.get(33),r.canUseHalfwidthRightwardsArrow,o,!1,l,c,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(118),t.get(100),t.get(95),t.get(51)!==S.Bc.OFF,null)).html}};Z=F([B(5,N.L)],Z);class X{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}var J=i(90890),ee=i(24219),te=i(51903),ie=i(76611),ne=i(41006),se=i(64523),oe=i(32720),re=i(96750),ae=i(60824),le=i(76922),ce=i(93066);let de=class extends a.jG{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=(0,l.FY)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,l.FY)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,l.FY)(this,void 0),this.unchangedRegions=(0,l.un)(this,(e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e)?.regions??[]:((0,l.Rn)((e=>{for(const t of this._unchangedRegions.get()?.regions||[])t.collapseAll(e)})),[]))),this.movedTextToCompare=(0,l.FY)(this,void 0),this._activeMovedText=(0,l.FY)(this,void 0),this._hoveredMovedText=(0,l.FY)(this,void 0),this.activeMovedText=(0,l.un)(this,(e=>this.movedTextToCompare.read(e)??this._hoveredMovedText.read(e)??this._activeMovedText.read(e))),this._cancellationTokenSource=new ie.Qi,this._diffProvider=(0,l.un)(this,(e=>{const t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)});return{diffProvider:t,onChangeSignal:(0,l.yQ)("onDidChange",t.onDidChange)}})),this._register((0,a.s)((()=>this._cancellationTokenSource.cancel())));const n=(0,l.Yd)("contentChangedSignal"),s=this._register(new J.uC((()=>n.trigger(void 0)),200));this._register((0,l.fm)((t=>{const i=this._unchangedRegions.read(t);if(!i||i.regions.some((e=>e.isDragged.read(t))))return;const n=i.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),s=i.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),o=i.regions.map(((e,i)=>n[i]&&s[i]?new fe(n[i].startLineNumber,s[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0)).filter(ee.O9),r=[];let a=!1;for(const e of(0,v.n)(o,((e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber)))if(e.length>1){a=!0;const t=e.reduce(((e,t)=>e+t.lineCount),0),i=new fe(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.get(),e[e.length-1].visibleLineCountBottom.get());r.push(i)}else r.push(e[0]);if(a){const t=e.original.deltaDecorations(i.originalDecorationIds,r.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));(0,l.Rn)((e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)}))}})));const o=(t,i,n)=>{const s=fe.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n));let o;const r=this._unchangedRegions.get();if(r){const t=r.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),i=r.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0));let s=(0,y.EK)(r.regions.map(((e,n)=>{if(!t[n]||!i[n])return;const s=t[n].length;return new fe(t[n].startLineNumber,i[n].startLineNumber,s,Math.min(e.visibleLineCountTop.get(),s),Math.min(e.visibleLineCountBottom.get(),s-e.visibleLineCountTop.get()))})).filter(ee.O9),((e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount)).map((e=>new E.WL(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n))));s=E.WL.clip(s,k.M.ofLength(1,e.original.getLineCount()),k.M.ofLength(1,e.modified.getLineCount())),o=E.WL.inverse(s,e.original.getLineCount(),e.modified.getLineCount())}const a=[];if(o)for(const e of s){const t=o.filter((t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange)));a.push(...e.setVisibleRanges(t,i))}else a.push(...s);const l=e.original.deltaDecorations(r?.originalDecorationIds||[],a.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),c=e.modified.deltaDecorations(r?.modifiedDecorationIds||[],a.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:c},i)};this._register(e.modified.onDidChangeContent((t=>{if(this._diff.get()){re.c.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,(0,l.Rn)((e=>{this._diff.set(ge.fromDiffResult(this._lastDiff),e),o(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),s.schedule()}))),this._register(e.original.onDidChangeContent((t=>{if(this._diff.get()){re.c.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,(0,l.Rn)((e=>{this._diff.set(ge.fromDiffResult(this._lastDiff),e),o(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),s.schedule()}))),this._register((0,l.yC)((async(t,i)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),s.cancel(),n.read(t);const r=this._diffProvider.read(t);r.onChangeSignal.read(t),(0,se.b)(oe.D8,t),(0,se.b)(le.NC,t),this._isDiffUpToDate.set(!1,void 0);let a=[];i.add(e.original.onDidChangeContent((e=>{const t=re.c.fromModelContentChanges(e.changes);a=(0,ae.M)(a,t)})));let c=[];i.add(e.modified.onDidChangeContent((e=>{const t=re.c.fromModelContentChanges(e.changes);c=(0,ae.M)(c,t)})));let d=await r.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);var h,u,g;this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(h=d,u=e.original,g=e.modified,d={changes:h.changes.map((e=>new E.wm(e.original,e.modified,e.innerChanges?e.innerChanges.map((e=>function(e,t,i){let n=e.originalRange,s=e.modifiedRange;return 1===n.startColumn&&1===s.startColumn&&(1!==n.endColumn||1!==s.endColumn)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&s.endColumn===i.getLineMaxColumn(s.endLineNumber)&&n.endLineNumber{o(d,e),this._lastDiff=d;const t=ge.fromDiffResult(d);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))}ensureModifiedLineIsVisible(e,t,i){if(0===this.diff.get()?.mappings.length)return;const n=this._unchangedRegions.get()?.regions||[];for(const s of n)if(s.getHiddenModifiedRange(void 0).contains(e))return void s.showModifiedLine(e,t,i)}ensureOriginalLineIsVisible(e,t,i){if(0===this.diff.get()?.mappings.length)return;const n=this._unchangedRegions.get()?.regions||[];for(const s of n)if(s.getHiddenOriginalRange(void 0).contains(e))return void s.showOriginalLine(e,t,i)}async waitForDiff(){await(0,l.oJ)(this.isDiffUpToDate,(e=>e))}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){const t=e.collapsedRegions?.map((e=>k.M.deserialize(e.range))),i=this._unchangedRegions.get();i&&t&&(0,l.Rn)((e=>{for(const n of i.regions)for(const i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}}))}};var he,ue;de=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(he=2,ue=ne.Hg,function(e,t){ue(e,t,he)})],de);class ge{static fromDiffResult(e){return new ge(e.changes.map((e=>new pe(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class pe{constructor(e){this.lineRangeMapping=e}}class fe{static fromDiffs(e,t,i,n,s){const o=E.wm.inverse(e,t,i),r=[];for(const e of o){let o=e.original.startLineNumber,a=e.modified.startLineNumber,l=e.original.length;const c=1===o&&1===a,d=o+l===t+1&&a+l===i+1;(c||d)&&l>=s+n?(c&&!d&&(l-=s),d&&!c&&(o+=s,a+=s,l-=s),r.push(new fe(o,a,l,0,0))):l>=2*s+n&&(o+=s,a+=s,l-=2*s,r.push(new fe(o,a,l,0,0)))}return r}get originalUnchangedRange(){return k.M.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return k.M.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,l.FY)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,l.FY)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,l.un)(this,(e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=(0,l.FY)(this,void 0);const o=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(s,this.lineCount-n),0);(0,ce.V7)(n===o),(0,ce.V7)(s===r),this._visibleLineCountTop.set(o,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){const i=[],n=new k.S(e.map((e=>e.modified))).subtractFrom(this.modifiedUnchangedRange);let s=this.originalLineNumber,o=this.modifiedLineNumber;const r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(const a of n.ranges){const l=e===n.ranges.length-1;e++;const c=(l?r:a.endLineNumberExclusive)-o,d=new fe(s,o,c,0,0);d.setHiddenModifiedRange(a,t),i.push(d),s=d.originalUnchangedRange.endLineNumberExclusive,o=d.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return k.M.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return k.M.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){const n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),s=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n{this._contextMenuService.showContextMenu({domForShadowRoot:u?i.getDomNode()??void 0:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=s.modified.isEmpty;return e.push(new _.rc("diff.clipboard.copyDeletedContent",t?s.original.length>1?(0,R.kg)("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):(0,R.kg)("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):s.original.length>1?(0,R.kg)("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):(0,R.kg)("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(async()=>{const e=this._originalTextModel.getValueInRange(s.original.toExclusiveRange());await this._clipboardService.writeText(e)}))),s.original.length>1&&e.push(new _.rc("diff.clipboard.copyDeletedLineContent",t?(0,R.kg)("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",s.original.startLineNumber+h):(0,R.kg)("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",s.original.startLineNumber+h),void 0,!0,(async()=>{let e=this._originalTextModel.getLineContent(s.original.startLineNumber+h);""===e&&(e=0===this._originalTextModel.getEndOfLineSequence()?"\n":"\r\n"),await this._clipboardService.writeText(e)}))),i.getOption(92)||e.push(new _.rc("diff.inline.revertChange",(0,R.kg)("diff.inline.revertChange.label","Revert this change"),void 0,!0,(async()=>{this._editor.revert(this._diff)}))),e},autoSelectFirstItem:!0})};this._register((0,n.b2)(this._diffActions,"mousedown",(e=>{if(!e.leftButton)return;const{top:t,height:i}=(0,n.BK)(this._diffActions),s=Math.floor(d/3);e.preventDefault(),g(e.posx,t+i+s)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{!e.event.leftButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._getViewZoneId()&&(e.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),g(e.event.posx,e.event.posy+d))})))}_updateLightBulbPosition(e,t,i){const{top:s}=(0,n.BK)(e),o=t-s,r=Math.floor(o/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let e=0;for(let t=0;te});function Ce(e,t,i,n){(0,C.M)(n,t.fontInfo);const s=i.length>0,o=new ve.fe(1e4);let r=0,a=0;const l=[];for(let n=0;n');const l=t.getLineContent(),c=T.qL.isBasicASCII(l,s),d=T.qL.containsRTL(l,c,o),h=(0,M.UW)(new M.zL(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,d,0,t,i,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==S.Bc.OFF,null),a);return a.appendString(""),h.characterMapping.getHorizontalOffset(h.characterMapping.length)}var xe=i(42558),Le=i(14280),De=function(e,t){return function(i,n){t(i,n,e)}};let Ee=class extends a.jG{constructor(e,t,i,s,o,r,c,d,h,u){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=s,this._diffEditorWidget=o,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=c,this._modViewZonesToIgnore=d,this._clipboardService=h,this._contextMenuService=u,this._originalTopPadding=(0,l.FY)(this,0),this._originalScrollOffset=(0,l.FY)(this,0),this._originalScrollOffsetAnimated=(0,y.Nu)(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,l.FY)(this,0),this._modifiedScrollOffset=(0,l.FY)(this,0),this._modifiedScrollOffsetAnimated=(0,y.Nu)(this._targetWindow,this._modifiedScrollOffset,this._store);const g=(0,l.FY)("invalidateAlignmentsState",0),p=this._register(new J.uC((()=>{g.set(g.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(147)||e.hasChanged(67))&&p.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(147)||e.hasChanged(67))&&p.schedule()})));const f=this._diffModel.map((e=>e?(0,l.y0)(this,e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>e?.read(t))),m=(0,l.un)((e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!t||!i)return null;g.read(e);const n=this._options.renderSideBySide.read(e);return Ne(this._editors.original,this._editors.modified,i.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,n)})),_=(0,l.un)((e=>{const t=this._diffModel.read(e)?.movedTextToCompare.read(e);if(!t)return null;g.read(e);const i=t.changes.map((e=>new pe(e)));return Ne(this._editors.original,this._editors.modified,i,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)}));function v(){const e=document.createElement("div");return e.className="diagonal-fill",e}const S=this._register(new a.Cm);this.viewZones=(0,l.rm)(this,((e,t)=>{S.clear();const i=m.read(e)||[],s=[],r=[],a=this._modifiedTopPadding.read(e);a>0&&r.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:a,showInHiddenAreas:!0,suppressMouseDown:!0});const l=this._originalTopPadding.read(e);l>0&&s.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:l,showInHiddenAreas:!0,suppressMouseDown:!0});const c=this._options.renderSideBySide.read(e),d=c?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer();if(d){const L=this._editors.original.getModel();for(const D of i)if(D.diff)for(let E=D.originalRange.startLineNumber;EL.getLineCount())return{orig:s,mod:r};d?.addRequest(L.getLineContent(E),null,null)}}const h=d?.finalize()??[];let u=0;const g=this._editors.modified.getOption(67),p=this._diffModel.read(e)?.movedTextToCompare.read(e),y=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,k=this._editors.original.getModel()?.mightContainRTL()??!1,x=Se.fromEditor(this._editors.modified);for(const N of i)if(!N.diff||c||this._options.useTrueInlineDiffRendering.read(e)&&Me(N.diff)){const I=N.modifiedHeightInPx-N.originalHeightInPx;if(I>0){if(p?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(N.originalRange.endLineNumberExclusive-1))continue;s.push({afterLineNumber:N.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:I,showInHiddenAreas:!0,suppressMouseDown:!0})}else{if(p?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(N.modifiedRange.endLineNumberExclusive-1))continue;function M(){const e=document.createElement("div");return e.className="arrow-revert-change "+w.L.asClassName(b.W.arrowRight),t.add((0,n.ko)(e,"mousedown",(e=>e.stopPropagation()))),t.add((0,n.ko)(e,"click",(e=>{e.stopPropagation(),o.revert(N.diff)}))),(0,n.$)("div",{},e)}let R;N.diff&&N.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(e)&&(R=M()),r.push({afterLineNumber:N.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-I,marginDomNode:R,showInHiddenAreas:!0,suppressMouseDown:!0})}}else{if(!N.originalRange.isEmpty){f.read(e);const A=document.createElement("div");A.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const O=this._editors.original.getModel();if(N.originalRange.endLineNumberExclusive-1>O.getLineCount())return{orig:s,mod:r};const F=new ye(N.originalRange.mapToLineArray((e=>O.tokenization.getLineTokens(e))),N.originalRange.mapToLineArray((e=>h[u++])),y,k),B=[];for(const z of N.diff.innerChanges||[])B.push(new T.kI(z.originalRange.delta(-(N.diff.original.startLineNumber-1)),te.Zb.className,0));const W=Ce(F,x,B,A),H=document.createElement("div");if(H.className="inline-deleted-margin-view-zone",(0,C.M)(H,x.fontInfo),this._options.renderIndicators.read(e))for(let U=0;U(0,ee.eU)(V)),H,this._editors.modified,N.diff,this._diffEditorWidget,W.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let q=0;q1&&s.push({afterLineNumber:N.originalRange.startLineNumber+q,domNode:v(),heightInPx:(K-1)*g,showInHiddenAreas:!0,suppressMouseDown:!0})}r.push({afterLineNumber:N.modifiedRange.startLineNumber-1,domNode:A,heightInPx:W.heightInLines*g,minWidthInPx:W.minWidthInPx,marginDomNode:H,setZoneId(e){V=e},showInHiddenAreas:!0,suppressMouseDown:!0})}const P=document.createElement("div");P.className="gutter-delete",s.push({afterLineNumber:N.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:N.modifiedHeightInPx,marginDomNode:P,showInHiddenAreas:!0,suppressMouseDown:!0})}for(const $ of _.read(e)??[]){if(!p?.lineRangeMapping.original.intersect($.originalRange)||!p?.lineRangeMapping.modified.intersect($.modifiedRange))continue;const G=$.modifiedHeightInPx-$.originalHeightInPx;G>0?s.push({afterLineNumber:$.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:G,showInHiddenAreas:!0,suppressMouseDown:!0}):r.push({afterLineNumber:$.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-G,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:s,mod:r}}));let k=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!k&&(k=!0,this._editors.modified.setScrollLeft(e.scrollLeft),k=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!k&&(k=!0,this._editors.original.setScrollLeft(e.scrollLeft),k=!1)}))),this._originalScrollTop=(0,l.y0)(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.y0)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register((0,l.fm)((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register((0,l.fm)((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register((0,l.fm)((e=>{const t=this._diffModel.read(e)?.movedTextToCompare.read(e);let i=0;if(t){const e=this._editors.original.getTopForLineNumber(t.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();i=this._editors.modified.getTopForLineNumber(t.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-e}i>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(i,void 0)):i<0?(this._modifiedTopPadding.set(-i,void 0),this._originalTopPadding.set(0,void 0)):setTimeout((()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)}),400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-i,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+i,void 0,!0)})))}};function Ne(e,t,i,n,s,o){const r=new v.j3(Ie(e,n)),a=new v.j3(Ie(t,s)),l=e.getOption(67),c=t.getOption(67),d=[];let h=0,u=0;function g(e,t){for(;;){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const s=i?i.lineNumber-h:Number.MAX_VALUE,o=n?n.lineNumber-u:Number.MAX_VALUE;so?(a.dequeue(),i={lineNumber:n.lineNumber-u+h,heightInPx:0}):(r.dequeue(),a.dequeue()),d.push({originalRange:k.M.ofLength(i.lineNumber,1),modifiedRange:k.M.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:c+n.heightInPx,diff:void 0})}}for(const p of i){const f=p.lineRangeMapping;g(f.original.startLineNumber,f.modified.startLineNumber);let m=!0,_=f.modified.startLineNumber,b=f.original.startLineNumber;function w(e,t,i=!1){if(et.lineNumbere+t.heightInPx),0)??0,h=a.takeWhile((e=>e.lineNumbere+t.heightInPx),0)??0;d.push({originalRange:n,modifiedRange:s,originalHeightInPx:n.length*l+o,modifiedHeightInPx:s.length*c+h,diff:p.lineRangeMapping}),b=e,_=t}if(o)for(const C of f.innerChanges||[]){C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&w(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber);const y=e.getModel(),S=C.originalRange.endLineNumber<=y.getLineCount()?y.getLineMaxColumn(C.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;C.originalRange.endColumn1&&n.push({lineNumber:t,heightInPx:r*(e-1)})}for(const n of e.getWhitespaces()){if(t.has(n.id))continue;const e=0===n.afterLineNumber?0:o.convertViewPositionToModelPosition(new L.y(n.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:n.height})}return(0,y.Am)(i,n,(e=>e.lineNumber),((e,t)=>({lineNumber:e.lineNumber,heightInPx:e.heightInPx+t.heightInPx})))}function Me(e){return!!e.innerChanges&&e.innerChanges.every((e=>Te(e.modifiedRange)&&Te(e.originalRange)||e.originalRange.equalsRange(new D.Q(1,1,1,1))))}function Te(e){return e.startLineNumber===e.endLineNumber}Ee=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([De(8,xe.h),De(9,Le.Z)],Ee);class Re extends a.jG{static{this.movedCodeBlockPadding=4}constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=(0,l.y0)(this,this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.y0)(this,this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=(0,l.yQ)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,l.FY)(this,0),this._modifiedViewZonesChangedSignal=(0,l.yQ)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,l.yQ)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,l.rm)(this,((e,t)=>{this._element.replaceChildren();const i=this._diffModel.read(e),n=i?.diff.read(e)?.movedTexts;if(!n||0===n.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const s=this._originalEditorLayoutInfo.read(e),o=this._modifiedEditorLayoutInfo.read(e);if(!s||!o)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const r=n.map((t=>{function i(e,t){return(t.getTopForLineNumber(e.startLineNumber,!0)+t.getTopForLineNumber(e.endLineNumberExclusive,!0))/2}const n=i(t.lineRangeMapping.original,this._editors.original),s=this._originalScrollTop.read(e),o=i(t.lineRangeMapping.modified,this._editors.modified),r=n-s,a=o-this._modifiedScrollTop.read(e),l=Math.min(n,o),c=Math.max(n,o);return{range:new x.L(l,c),from:r,to:a,fromWithoutScroll:n,toWithoutScroll:o,move:t}}));r.sort((0,v.nH)((0,v.VE)((e=>e.fromWithoutScroll>e.toWithoutScroll),v.TS),(0,v.VE)((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),v.U9)));const a=Pe.compute(r.map((e=>e.range))),c=s.verticalScrollbarWidth,d=10*(a.getTrackCount()-1)+20,h=c+d+(o.contentLeft-Re.movedCodeBlockPadding);let u=0;for(const e of r){const n=c+10+10*a.getTrack(u),s=15,r=15,d=h,g=o.glyphMarginWidth+o.lineNumbersWidth,p=18,f=document.createElementNS("http://www.w3.org/2000/svg","rect");f.classList.add("arrow-rectangle"),f.setAttribute("x",""+(d-g)),f.setAttribute("y",""+(e.to-p/2)),f.setAttribute("width",`${g}`),f.setAttribute("height",`${p}`),this._element.appendChild(f);const m=document.createElementNS("http://www.w3.org/2000/svg","g"),_=document.createElementNS("http://www.w3.org/2000/svg","path");_.setAttribute("d",`M 0 ${e.from} L ${n} ${e.from} L ${n} ${e.to} L ${d-r} ${e.to}`),_.setAttribute("fill","none"),m.appendChild(_);const v=document.createElementNS("http://www.w3.org/2000/svg","polygon");v.classList.add("arrow"),t.add((0,l.fm)((t=>{_.classList.toggle("currentMove",e.move===i.activeMovedText.read(t)),v.classList.toggle("currentMove",e.move===i.activeMovedText.read(t))}))),v.setAttribute("points",`${d-r},${e.to-s/2} ${d},${e.to} ${d-r},${e.to+s/2}`),m.appendChild(v),this._element.appendChild(m),u++}this.width.set(d,void 0)})),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,a.s)((()=>this._element.remove()))),this._register((0,l.fm)((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-Re.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register((0,l.OI)(this._state));const o=(0,l.un)((e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new y.D1((0,l.lk)(e.lineRangeMapping.original.startLineNumber-1),18),modified:new y.D1((0,l.lk)(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register((0,y.Vs)(this._editors.original,o.map((e=>e.map((e=>e.original)))))),this._register((0,y.Vs)(this._editors.modified,o.map((e=>e.map((e=>e.modified)))))),this._register((0,l.yC)(((e,t)=>{const i=o.read(e);for(const e of i)t.add(new Ae(this._editors.original,e.original,e.move,"original",this._diffModel.get())),t.add(new Ae(this._editors.modified,e.modified,e.move,"modified",this._diffModel.get()))})));const r=(0,l.yQ)("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),c=(0,l.yQ)("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let d="modified";this._register((0,l.Y)({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(r)&&(d="original"),e.didChange(c)&&(d="modified"),!0)},(e=>{r.read(e),c.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===d){const t=this._editors.originalCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===d){const t=this._editors.modifiedCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}class Pe{static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=(0,s.TM)(t,(0,v.VE)((e=>e.intersectWithRangeLength(n)),v.U9)):(e=t.length,t.push(new x.h))}t[e].addRange(n),i.push(e)}return new Pe(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class Ae extends y.uN{constructor(e,t,i,s,o){const r=(0,n.h)("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=s,this._diffModel=o,this._nodes=(0,n.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,n.h)("div.text-content@textContent"),(0,n.h)("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);const a=(0,l.y0)(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let c;this._register((0,y.AV)(this._nodes.root,{paddingRight:a.map((e=>e.verticalScrollbarWidth))})),c=i.changes.length>0?"original"===this._kind?(0,R.kg)("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,R.kg)("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?(0,R.kg)("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,R.kg)("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const d=this._register(new f.E(this._nodes.actionBar,{highlightToggledItems:!0})),h=new _.rc("",c,"",!1);d.push(h,{icon:!1,label:!0});const u=new _.rc("","Compare",w.L.asClassName(b.W.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register((0,l.fm)((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;u.checked=t}))),d.push(u,{icon:!1,label:!0})}}class Oe extends a.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),s=this._options.renderIndicators.read(e),o=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const n of i.mappings)if(n.lineRangeMapping.original.isEmpty||r.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:s?te.Ob:te.XT}),n.lineRangeMapping.modified.isEmpty||a.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:s?te.Kl:te.Zw}),n.lineRangeMapping.modified.isEmpty||n.lineRangeMapping.original.isEmpty)n.lineRangeMapping.original.isEmpty||r.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:te.KL}),n.lineRangeMapping.modified.isEmpty||a.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:te.Ou});else{const i=this._options.useTrueInlineDiffRendering.read(e)&&Me(n.lineRangeMapping);for(const e of n.lineRangeMapping.innerChanges||[])if(n.lineRangeMapping.original.contains(e.originalRange.startLineNumber)&&r.push({range:e.originalRange,options:e.originalRange.isEmpty()&&o?te.wp:te.Zb}),n.lineRangeMapping.modified.contains(e.modifiedRange.startLineNumber)&&a.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()&&o&&!i?te.GM:te.bk}),i){const i=t.model.original.getValueInRange(e.originalRange);a.push({range:e.modifiedRange,options:{description:"deleted-text",before:{content:i,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(n)for(const e of n.changes){const t=e.original.toInclusiveRange();t&&r.push({range:t,options:s?te.Ob:te.XT});const i=e.modified.toInclusiveRange();i&&a.push({range:i,options:s?te.Kl:te.Zw});for(const t of e.innerChanges||[])r.push({range:t.originalRange,options:te.Zb}),a.push({range:t.modifiedRange,options:te.bk})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const e of i.movedTexts)r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(e===l?" currentMove":""),blockPadding:[Re.movedCodeBlockPadding,0,Re.movedCodeBlockPadding,Re.movedCodeBlockPadding]}}),a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(e===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register((0,y.pY)(this._editors.original,this._decorations.map((e=>e?.originalDecorations||[])))),this._register((0,y.pY)(this._editors.modified,this._decorations.map((e=>e?.modifiedDecorations||[]))))}}var Fe=i(38175);class Be{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=(0,c.dQ)(this,(e=>{const t=this._sashRatio.read(e)??this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(t,e)}),((e,t)=>{const i=this.dimensions.width.get();this._sashRatio.set(e/i,t)})),this._sashRatio=(0,l.FY)(this,void 0)}_computeSashLeft(e,t){const i=this.dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,o=100;return i<=200?n:si-o?i-o:s}}class We extends a.jG{constructor(e,t,i,n,s,o){super(),this._domNode=e,this._dimensions=t,this._enabled=i,this._boundarySashes=n,this.sashLeft=s,this._resetSash=o,this._sash=this._register(new Fe.m(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()}))),this._register(this._sash.onDidChange((e=>{this.sashLeft.set(this._startSashPosition+(e.currentX-e.startX),void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._resetSash()))),this._register((0,l.fm)((e=>{const t=this._boundarySashes.read(e);t&&(this._sash.orthogonalEndSash=t.bottom)}))),this._register((0,l.fm)((e=>{const t=this._enabled.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()})))}}class He extends a.jG{constructor(e,t,i){super(),this._editor=e,this._domNode=t,this.itemProvider=i,this.scrollTop=(0,l.y0)(this,this._editor.onDidScrollChange,(e=>this._editor.getScrollTop())),this.isScrollTopZero=this.scrollTop.map((e=>0===e)),this.modelAttached=(0,l.y0)(this,this._editor.onDidChangeModel,(e=>this._editor.hasModel())),this.editorOnDidChangeViewZones=(0,l.yQ)("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=(0,l.yQ)("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=(0,l.Yd)("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const s=this._domNode.appendChild((0,n.h)("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),o=new ResizeObserver((()=>{(0,l.Rn)((e=>{this.domNodeSizeChanged.trigger(e)}))}));o.observe(this._domNode),this._register((0,a.s)((()=>o.disconnect()))),this._register((0,l.fm)((e=>{s.className=this.isScrollTopZero.read(e)?"":"scroll-decoration"}))),this._register((0,l.fm)((e=>this.render(e))))}dispose(){super.dispose(),(0,n.Ln)(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const t=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),n=new Set(this.views.keys()),s=x.L.ofStartAndLength(0,this._domNode.clientHeight);if(!s.isEmpty)for(const o of i){const i=new k.M(o.startLineNumber,o.endLineNumber+1),r=this.itemProvider.getIntersectingGutterItems(i,e);(0,l.Rn)((e=>{for(const o of r){if(!o.range.intersect(i))continue;n.delete(o.id);let r=this.views.get(o.id);if(r)r.item.set(o,e);else{const e=document.createElement("div");this._domNode.appendChild(e);const t=(0,l.FY)("item",o),i=this.itemProvider.createView(t,e);r=new Ve(t,i,e),this.views.set(o.id,r)}const a=o.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(o.range.startLineNumber,!0)-t:this._editor.getBottomForLineNumber(o.range.startLineNumber-1,!1)-t,c=(1===o.range.endLineNumberExclusive?Math.max(a,this._editor.getTopForLineNumber(o.range.startLineNumber,!1)-t):Math.max(a,this._editor.getBottomForLineNumber(o.range.endLineNumberExclusive-1,!0)-t))-a;r.domNode.style.top=`${a}px`,r.domNode.style.height=`${c}px`,r.gutterItemView.layout(x.L.ofStartAndLength(a,c),s)}}))}for(const e of n){const t=this.views.get(e);t.gutterItemView.dispose(),t.domNode.remove(),this.views.delete(e)}}}class Ve{constructor(e,t,i){this.item=e,this.gutterItemView=t,this.domNode=i}}var ze=i(41667),Ue=i(30479),je=i(13233);class qe extends Ue.CO{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){const e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new je.W(e-1,t)}}var Ke=i(86051),$e=i(93223),Ge=i(97848),Qe=i(74856),Ye=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ze=function(e,t){return function(i,n){t(i,n,e)}};const Xe=[];let Je=class extends a.jG{constructor(e,t,i,s,o,r,a,d,h){super(),this._diffModel=t,this._editors=i,this._options=s,this._sashLayout=o,this._boundarySashes=r,this._instantiationService=a,this._contextKeyService=d,this._menuService=h,this._menu=this._register(this._menuService.createMenu($e.D8.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=(0,l.y0)(this,this._menu.onDidChange,(()=>this._menu.getActions())),this._hasActions=this._actions.map((e=>e.length>0)),this._showSash=(0,l.un)(this,(e=>this._options.renderSideBySide.read(e)&&this._hasActions.read(e))),this.width=(0,l.un)(this,(e=>this._hasActions.read(e)?35:0)),this.elements=(0,n.h)("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:"35px"}},[]),this._currentDiff=(0,l.un)(this,(e=>{const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e)?.mappings,n=this._editors.modifiedCursor.read(e);return n?i?.find((e=>e.lineRangeMapping.modified.contains(n.lineNumber))):void 0})),this._selectedDiffs=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return Xe;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return Xe;const s=new k.S(n.map((e=>k.M.fromRangeInclusive(e)))),o=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&s.intersects(e.lineRangeMapping.modified))).map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>D.Q.areIntersecting(e.modifiedRange,t)))))})));return 0===o.length||o.every((e=>0===e.rangeMappings.length))?Xe:o})),this._register((0,y.$y)(e,this.elements.root)),this._register((0,n.ko)(this.elements.root,"click",(()=>{this._editors.modified.focus()}))),this._register((0,y.AV)(this.elements.root,{display:this._hasActions.map((e=>e?"block":"none"))})),(0,c.a0)(this,(t=>this._showSash.read(t)?new We(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,(0,c.dQ)(this,(e=>this._sashLayout.sashLeft.read(e)-35),((e,t)=>this._sashLayout.sashLeft.set(e+35,t))),(()=>this._sashLayout.resetSash())):void 0)).recomputeInitiallyAndOnChange(this._store),this._register(new He(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(e,t)=>{const i=this._diffModel.read(t);if(!i)return[];const n=i.diff.read(t);if(!n)return[];const s=this._selectedDiffs.read(t);if(s.length>0){const e=E.wm.fromRangeMappings(s.flatMap((e=>e.rangeMappings)));return[new et(e,!0,$e.D8.DiffEditorSelectionToolbar,void 0,i.model.original.uri,i.model.modified.uri)]}const o=this._currentDiff.read(t);return n.mappings.map((e=>new et(e.lineRangeMapping.withInnerChangesFromLineRanges(),e.lineRangeMapping===o?.lineRangeMapping,$e.D8.DiffEditorHunkToolbar,void 0,i.model.original.uri,i.model.modified.uri)))},createView:(e,t)=>this._instantiationService.createInstance(tt,e,t,this)})),this._register((0,n.ko)(this.elements.gutter,n.Bx.MOUSE_WHEEL,(e=>{this._editors.modified.getOption(104).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1}))}computeStagedValue(e){const t=e.innerChanges??[],i=new qe(this._editors.modifiedModel.get()),n=new qe(this._editors.original.getModel()),s=new Ue.mF(t.map((e=>e.toTextEdit(i))));return s.apply(n)}layout(e){this.elements.gutter.style.left=e+"px"}};Je=Ye([Ze(6,A._Y),Ze(7,Ge.fN),Ze(8,$e.ez)],Je);class et{constructor(e,t,i,n,s,o){this.mapping=e,this.showAlways=t,this.menuId=i,this.rangeOverride=n,this.originalUri=s,this.modifiedUri=o}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let tt=class extends a.jG{constructor(e,t,i,s){super(),this._item=e,this._elements=(0,n.h)("div.gutterItem",{style:{height:"20px",width:"34px"}},[(0,n.h)("div.background@background",{},[]),(0,n.h)("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,(e=>e.showAlways)),this._menuId=this._item.map(this,(e=>e.menuId)),this._isSmall=(0,l.FY)(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const o=this._register(s.createInstance(Qe.fO,"element",!0,{position:{hoverPosition:1}}));this._register((0,y.rX)(t,this._elements.root)),this._register((0,l.fm)((e=>{const t=this._showAlways.read(e);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",t),setTimeout((()=>{this._elements.root.classList.toggle("noTransition",!1)}),0)}))),this._register((0,l.yC)(((e,t)=>{this._elements.buttons.replaceChildren();const n=t.add(s.createInstance(Ke.m,this._elements.buttons,this._menuId.read(e),{orientation:1,hoverDelegate:o,toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(e)?1:3},hiddenItemStrategy:0,actionRunner:new ze.I((()=>{const e=this._item.get(),t=e.mapping;return{mapping:t,originalWithModifiedChanges:i.computeStagedValue(t),originalUri:e.originalUri,modifiedUri:e.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));t.add(n.onDidChangeMenuItems((()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)})))})))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let i=this._elements.buttons.clientHeight;this._isSmall.set(1===this._item.get().mapping.original.startLineNumber&&e.length<30,void 0),i=this._elements.buttons.clientHeight;const n=e.length/2-i/2,s=i;let o=e.start+n;const r=x.L.tryCreate(s,t.endExclusive-s-i),a=x.L.tryCreate(e.start+s,e.endExclusive-i-s);a&&r&&a.startthis._themeService.getColorTheme())),d=(0,l.un)((e=>{const t=c.read(e);return{insertColor:t.getColor(at.ld8)||(t.getColor(at.Gj6)||at.EY1).transparent(2),removeColor:t.getColor(at.$BZ)||(t.getColor(at.GNm)||at.ZEf).transparent(2)}})),h=(0,st.Z)(document.createElement("div"));h.setClassName("diffViewport"),h.setPosition("absolute");const u=(0,n.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:it.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register((0,y.rX)(u,h.domNode)),this._register((0,n.b2)(u,n.Bx.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),this._register((0,n.ko)(u,n.Bx.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),this._register((0,y.rX)(this._rootElement,u)),this._register((0,l.yC)(((e,t)=>{const i=this._diffModel.read(e),n=this._editors.original.createOverviewRuler("original diffOverviewRuler");n&&(t.add(n),t.add((0,y.rX)(u,n.getDomNode())));const s=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(s&&(t.add(s),t.add((0,y.rX)(u,s.getDomNode()))),!n||!s)return;const o=(0,l.yQ)("viewZoneChanged",this._editors.original.onDidChangeViewZones),r=(0,l.yQ)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),a=(0,l.yQ)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),c=(0,l.yQ)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add((0,l.fm)((e=>{o.read(e),r.read(e),a.read(e),c.read(e);const t=d.read(e),l=i?.diff.read(e)?.mappings;function h(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new L.y(e.startLineNumber,1)),s=n.coordinatesConverter.convertModelPositionToViewPosition(new L.y(e.endLineNumberExclusive,1)),o=s.lineNumber-i.lineNumber;return new rt.iE(i.lineNumber,s.lineNumber,o,t.toString())})):[]}const u=h((l||[]).map((e=>e.lineRangeMapping.original)),t.removeColor,this._editors.original),g=h((l||[]).map((e=>e.lineRangeMapping.modified)),t.insertColor,this._editors.modified);n?.setZones(u),s?.setZones(g)}))),t.add((0,l.fm)((e=>{const t=this._rootHeight.read(e),i=this._rootWidth.read(e),o=this._modifiedEditorLayoutInfo.read(e);if(o){const i=it.ENTIRE_DIFF_OVERVIEW_WIDTH-2*it.ONE_OVERVIEW_WIDTH;n.setLayout({top:0,height:t,right:i+it.ONE_OVERVIEW_WIDTH,width:it.ONE_OVERVIEW_WIDTH}),s.setLayout({top:0,height:t,right:0,width:it.ONE_OVERVIEW_WIDTH});const r=this._editors.modifiedScrollTop.read(e),a=this._editors.modifiedScrollHeight.read(e),l=this._editors.modified.getOption(104),c=new ot.m(l.verticalHasArrows?l.arrowSize:0,l.verticalScrollbarSize,0,o.height,a,r);h.setTop(c.getSliderPosition()),h.setHeight(c.getSliderSize())}else h.setTop(0),h.setHeight(0);u.style.height=t+"px",u.style.left=i-it.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",h.setWidth(it.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))}};ct=it=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,lt.Gy)],ct);var dt=i(43014),ht=i(62067);const ut=[];class gt extends a.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return ut;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return ut;const s=new k.S(n.map((e=>k.M.fromRangeInclusive(e)))),o=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&s.intersects(e.lineRangeMapping.modified))).map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>D.Q.areIntersecting(e.modifiedRange,t)))))})));return 0===o.length||o.every((e=>0===e.rangeMappings.length))?ut:o})),this._register((0,l.yC)(((e,t)=>{if(!this._options.shouldRenderOldRevertArrows.read(e))return;const i=this._diffModel.read(e),n=i?.diff.read(e);if(!i||!n)return;if(i.movedTextToCompare.read(e))return;const s=[],o=this._selectedDiffs.read(e),r=new Set(o.map((e=>e.mapping)));if(o.length>0){const i=this._editors.modifiedSelections.read(e),n=t.add(new pt(i[i.length-1].positionLineNumber,this._widget,o.flatMap((e=>e.rangeMappings)),!0));this._editors.modified.addGlyphMarginWidget(n),s.push(n)}for(const e of n.mappings)if(!r.has(e)&&!e.lineRangeMapping.modified.isEmpty&&e.lineRangeMapping.innerChanges){const i=t.add(new pt(e.lineRangeMapping.modified.startLineNumber,this._widget,e.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(i),s.push(i)}t.add((0,a.s)((()=>{for(const e of s)this._editors.modified.removeGlyphMarginWidget(e)})))})))}}class pt extends a.jG{static{this.counter=0}getId(){return this._id}constructor(e,t,i,s){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=s,this._id="revertButton"+pt.counter++,this._domNode=(0,n.h)("div.revertButton",{title:this._revertSelection?(0,R.kg)("revertSelectedChanges","Revert Selected Changes"):(0,R.kg)("revertChange","Revert Change")},[(0,dt.s)(b.W.arrowRight)]).root,this._register((0,n.ko)(this._domNode,n.Bx.MOUSE_DOWN,(e=>{2!==e.button&&(e.stopPropagation(),e.preventDefault())}))),this._register((0,n.ko)(this._domNode,n.Bx.MOUSE_UP,(e=>{e.stopPropagation(),e.preventDefault()}))),this._register((0,n.ko)(this._domNode,n.Bx.CLICK,(e=>{this._diffs instanceof E.WL?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),e.stopPropagation(),e.preventDefault()})))}getDomNode(){return this._domNode}getPosition(){return{lane:ht.ZS.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}var ft=i(74827),mt=i(48872),_t=i(49678),vt=i(24813),bt=i(86171),wt=i(90072),Ct=i(87163),yt=function(e,t){return function(i,n){t(i,n,e)}};let St=class extends a.jG{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,s,o,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._argCodeEditorWidgetOptions=n,this._createInnerEditor=s,this._instantiationService=o,this._keybindingService=a,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new r.vl),this.modifiedScrollTop=(0,l.y0)(this,this.modified.onDidScrollChange,(()=>this.modified.getScrollTop())),this.modifiedScrollHeight=(0,l.y0)(this,this.modified.onDidScrollChange,(()=>this.modified.getScrollHeight())),this.modifiedObs=(0,wt.Ud)(this.modified),this.originalObs=(0,wt.Ud)(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=(0,l.y0)(this,this.modified.onDidChangeCursorSelection,(()=>this.modified.getSelections()??[])),this.modifiedCursor=(0,l.C)({owner:this,equalsFn:L.y.equals},(e=>this.modifiedSelections.read(e)[0]?.getPosition()??new L.y(1,1))),this.originalCursor=(0,l.y0)(this,this.original.onDidChangeCursorPosition,(()=>this.original.getPosition()??new L.y(1,1))),this._argCodeEditorWidgetOptions=null,this._register((0,l.Y)({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+ct.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),s}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=S.qB.revealHorizontalRightPadding.defaultValue+ct.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");const t=(0,R.kg)("diff-aria-navigation-tip"," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};St=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yt(5,A._Y),yt(6,Ct.b)],St);class kt extends a.jG{constructor(){super(...arguments),this._id=++kt.idCounter,this._onDidDispose=this._register(new r.vl),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}var xt=i(84230),Lt=i(42415),Dt=i(68745);let Et=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=(0,l.FY)(this,0),this._screenReaderMode=(0,l.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this.couldShowInlineViewBecauseOfSize=(0,l.un)(this,(e=>this._options.read(e).renderSideBySide&&this._diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=(0,l.un)(this,(e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=(0,l.un)(this,(e=>(!this.compactMode.read(e)||!this.shouldRenderInlineViewInSmartMode.read(e))&&this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)&&!this._screenReaderMode.read(e)))),this.readOnly=(0,l.un)(this,(e=>this._options.read(e).readOnly)),this.shouldRenderOldRevertArrows=(0,l.un)(this,(e=>!(!this._options.read(e).renderMarginRevertIcon||!this.renderSideBySide.read(e)||this.readOnly.read(e)||this.shouldRenderGutterMenu.read(e)))),this.shouldRenderGutterMenu=(0,l.un)(this,(e=>this._options.read(e).renderGutterMenu)),this.renderIndicators=(0,l.un)(this,(e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=(0,l.un)(this,(e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=(0,l.un)(this,(e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=(0,l.un)(this,(e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=(0,l.un)(this,(e=>this._options.read(e).maxComputationTime)),this.showMoves=(0,l.un)(this,(e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=(0,l.un)(this,(e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=(0,l.un)(this,(e=>this._options.read(e).diffWordWrap)),this.originalEditable=(0,l.un)(this,(e=>this._options.read(e).originalEditable)),this.diffCodeLens=(0,l.un)(this,(e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=(0,l.un)(this,(e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=(0,l.un)(this,(e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=(0,l.un)(this,(e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=(0,l.un)(this,(e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.compactMode=(0,l.un)(this,(e=>this._options.read(e).compactMode)),this.trueInlineDiffRenderingEnabled=(0,l.un)(this,(e=>this._options.read(e).experimental.useTrueInlineView)),this.useTrueInlineDiffRendering=(0,l.un)(this,(e=>!this.renderSideBySide.read(e)&&this.trueInlineDiffRenderingEnabled.read(e))),this.hideUnchangedRegions=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsMinimumLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.minimumLineCount)),this._model=(0,l.FY)(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,(e=>(0,xt.t)(this,(t=>{const i=e?.diff.read(t);return i?(n=i,s=this.trueInlineDiffRenderingEnabled.read(t),n.mappings.every((e=>0===e.lineRangeMapping.original.length||0===e.lineRangeMapping.modified.length||s&&Me(e.lineRangeMapping)))):void 0;var n,s})))).flatten().map(this,(e=>!!e)),this.inlineViewHideOriginalLineNumbers=this.compactMode;const i={...e,...Nt(e,Lt.q)};this._options=(0,l.FY)(this,i)}updateOptions(e){const t=Nt(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};function Nt(e,t){return{enableSplitViewResizing:(0,S.zM)(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:(0,S.ls)(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,S.zM)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,S.zM)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,S.wA)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,S.wA)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,S.zM)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,S.zM)(e.renderIndicators,t.renderIndicators),originalEditable:(0,S.zM)(e.originalEditable,t.originalEditable),diffCodeLens:(0,S.zM)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,S.zM)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(0,S.O4)(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,S.O4)(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,S.zM)(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:(0,S.zM)(e.experimental?.showMoves,t.experimental.showMoves),showEmptyDecorations:(0,S.zM)(e.experimental?.showEmptyDecorations,t.experimental.showEmptyDecorations),useTrueInlineView:(0,S.zM)(e.experimental?.useTrueInlineView,t.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:(0,S.zM)(e.hideUnchangedRegions?.enabled??e.experimental?.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:(0,S.wA)(e.hideUnchangedRegions?.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,S.wA)(e.hideUnchangedRegions?.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,S.wA)(e.hideUnchangedRegions?.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,S.zM)(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,S.zM)(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,S.wA)(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,S.zM)(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited),renderGutterMenu:(0,S.zM)(e.renderGutterMenu,t.renderGutterMenu),compactMode:(0,S.zM)(e.compactMode,t.compactMode)}}Et=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,Dt.j)],Et);var It=function(e,t){return function(i,n){t(i,n,e)}};let Mt=class extends kt{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,s,d,h,g,p){super(),this._domElement=e,this._parentContextKeyService=s,this._parentInstantiationService=d,this._accessibilitySignalService=g,this._editorProgressService=p,this.elements=(0,n.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,n.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register((0,l.X2)(this,void 0)),this._diffModel=(0,l.un)(this,(e=>this._diffModelSrc.read(e)?.object)),this.onDidChangeModel=r.Jh.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new vt.a([Ge.fN,this._contextKeyService]))),this._boundarySashes=(0,l.FY)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,l.FY)(this,!1),this._accessibleDiffViewerVisible=(0,l.un)(this,(e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this._movedBlocksLinesPart=(0,l.FY)(this,void 0),this._layoutInfo=(0,l.un)(this,(e=>{const t=this._rootSizeObserver.width.read(e),i=this._rootSizeObserver.height.read(e);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=i+"px";const n=this._sash.read(e),s=this._gutter.read(e),o=s?.width.read(e)??0,r=this._overviewRulerPart.read(e)?.width??0;let a,l,c,d,h;if(n){const i=n.sashLeft.read(e);a=0,l=i-o-(this._movedBlocksLinesPart.read(e)?.width.read(e)??0),h=i-o,c=i,d=t-c-r}else h=0,a=o,l=this._options.inlineViewHideOriginalLineNumbers.read(e)?0:Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(e)),c=o+l,d=t-c-r;return this.elements.original.style.left=a+"px",this.elements.original.style.width=l+"px",this._editors.original.layout({width:l,height:i},!0),s?.layout(h),this.elements.modified.style.left=c+"px",this.elements.modified.style.width=d+"px",this._editors.modified.layout({width:d,height:i},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>e?.diff.read(t))),this.onDidUpdateDiff=r.Jh.fromObservableLight(this._diffValue),h.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,a.s)((()=>this.elements.root.remove()))),this._rootSizeObserver=this._register(new y.pN(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(Et,t),this._register((0,l.fm)((e=>{this._options.setWidth(this._rootSizeObserver.width.read(e))}))),this._contextKeyService.createKey(_t.R.isEmbeddedDiffEditor.key,!1),this._register((0,ft.w)(_t.R.isEmbeddedDiffEditor,this._contextKeyService,(e=>this._options.isInEmbeddedEditor.read(e)))),this._register((0,ft.w)(_t.R.comparingMovedCode,this._contextKeyService,(e=>!!this._diffModel.read(e)?.movedTextToCompare.read(e)))),this._register((0,ft.w)(_t.R.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,(e=>this._options.couldShowInlineViewBecauseOfSize.read(e)))),this._register((0,ft.w)(_t.R.diffEditorInlineMode,this._contextKeyService,(e=>!this._options.renderSideBySide.read(e)))),this._register((0,ft.w)(_t.R.hasChanges,this._contextKeyService,(e=>(this._diffModel.read(e)?.diff.read(e)?.mappings.length??0)>0))),this._editors=this._register(this._instantiationService.createInstance(St,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._register((0,ft.w)(_t.R.diffEditorOriginalWritable,this._contextKeyService,(e=>this._options.originalEditable.read(e)))),this._register((0,ft.w)(_t.R.diffEditorModifiedWritable,this._contextKeyService,(e=>!this._options.readOnly.read(e)))),this._register((0,ft.w)(_t.R.diffEditorOriginalUri,this._contextKeyService,(e=>this._diffModel.read(e)?.model.original.uri.toString()??""))),this._register((0,ft.w)(_t.R.diffEditorModifiedUri,this._contextKeyService,(e=>this._diffModel.read(e)?.model.modified.uri.toString()??""))),this._overviewRulerPart=(0,c.a0)(this,(e=>this._options.renderOverviewRuler.read(e)?this._instantiationService.createInstance((0,se.b)(ct,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor))):void 0)).recomputeInitiallyAndOnChange(this._store);const f={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>e-(this._overviewRulerPart.read(t)?.width??0)))};this._sashLayout=new Be(this._options,f),this._sash=(0,c.a0)(this,(e=>{const t=this._options.renderSideBySide.read(e);return this.elements.root.classList.toggle("side-by-side",t),t?new We(this.elements.root,f,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,(()=>this._sashLayout.resetSash())):void 0})).recomputeInitiallyAndOnChange(this._store);const m=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(nt.N,e),this._editors,this._diffModel,this._options))).recomputeInitiallyAndOnChange(this._store);(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(Oe,e),this._editors,this._diffModel,this._options,this))).recomputeInitiallyAndOnChange(this._store);const _=new Set,v=new Set;let b=!1;const w=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(Ee,e),(0,n.zk)(this._domElement),this._editors,this._diffModel,this._options,this,(()=>b||m.get().isUpdatingHiddenAreas),_,v))).recomputeInitiallyAndOnChange(this._store),C=(0,l.un)(this,(e=>{const t=w.read(e).viewZones.read(e).orig,i=m.read(e).viewZones.read(e).origViewZones;return t.concat(i)})),S=(0,l.un)(this,(e=>{const t=w.read(e).viewZones.read(e).mod,i=m.read(e).viewZones.read(e).modViewZones;return t.concat(i)}));let k;this._register((0,y.Vs)(this._editors.original,C,(e=>{b=e}),_)),this._register((0,y.Vs)(this._editors.modified,S,(e=>{b=e,b?k=u.D.capture(this._editors.modified):(k?.restore(this._editors.modified),k=void 0)}),v)),this._accessibleDiffViewer=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(z,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>e?.diff.read(t)?.mappings.map((e=>e.lineRangeMapping)))),new X(this._editors)))).recomputeInitiallyAndOnChange(this._store);const x=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register((0,y.AV)(this.elements.modified,{visibility:x})),this._register((0,y.AV)(this.elements.original,{visibility:x})),this._createDiffEditorContributions(),h.addDiffEditor(this),this._gutter=(0,c.a0)(this,(e=>this._options.shouldRenderGutterMenu.read(e)?this._instantiationService.createInstance((0,se.b)(Je,e),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0)),this._register((0,l.OI)(this._layoutInfo)),(0,c.a0)(this,(e=>new((0,se.b)(Re,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors))).recomputeInitiallyAndOnChange(this._store,(e=>{this._movedBlocksLinesPart.set(e,void 0)})),this._register(r.Jh.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!0)))),this._register(r.Jh.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!1))));const L=this._diffModel.map(this,((e,t)=>{if(e)return void 0===e.diff.read(t)&&!e.isDiffUpToDate.read(t)}));this._register((0,l.yC)(((e,t)=>{if(!0===L.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add((0,a.s)((()=>e.done())))}}))),this._register((0,l.yC)(((e,t)=>{t.add(new((0,se.b)(gt,e))(this._editors,this._diffModel,this._options,this))}))),this._register((0,l.yC)(((e,t)=>{const i=this._diffModel.read(e);if(i)for(const e of[i.model.original,i.model.modified])t.add(e.onWillDispose((e=>{(0,o.dz)(new o.D7("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)})))}))),this._register((0,l.fm)((e=>{this._options.setModel(this._diffModel.read(e))})))}_createInnerEditor(e,t,i,n){return e.createInstance(g.x,t,i,n)}_createDiffEditorContributions(){const e=d.dS.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(e){(0,o.dz)(e)}}get _targetEditor(){return this._editors.modified}getEditorType(){return mt._.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){return{original:this._editors.original.saveViewState(),modified:this._editors.modified.saveViewState(),modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._editors.original.restoreViewState(t.original),this._editors.modified.restoreViewState(t.modified),t.modelState&&this._diffModel.get()?.restoreSerializedState(t.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(de,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){const t=e?"model"in e?y.O8.create(e).createNewRef(this):y.O8.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){const i=this._diffModel.get();!e&&i&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&(0,l.PO)(t,(t=>{const i=e?.object;l.y0.batchEventsGlobally(t,(()=>{this._editors.original.setModel(i?i.model.original:null),this._editors.modified.setModel(i?i.model.modified:null)}));const n=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),t),setTimeout((()=>{n?.dispose()}),0)}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){const e=this._diffModel.get()?.diff.get();return e?e.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,s,o,r=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,r=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,o=0,r=void 0):(s=t.modified.startLineNumber,o=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:o,charChanges:r?.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}})):null}revert(e){const t=this._diffModel.get();t&&t.isDiffUpToDate.get()&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map((e=>({range:e.modifiedRange,text:t.model.original.getValueInRange(e.originalRange)})));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new L.y(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){const t=this._diffModel.get()?.diff.get()?.mappings;if(!t||0===t.length)return;const i=this._editors.modified.getPosition().lineNumber;let n;n="next"===e?t.find((e=>e.lineRangeMapping.modified.startLineNumber>i))??t[0]:(0,s.Uk)(t,(e=>e.lineRangeMapping.modified.startLineNumber{const t=e.diff.get()?.mappings;t&&0!==t.length&&this._goTo(t[0])}))}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){const e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,i=e?this._editors.original:this._editors.modified;let n;const s=t.getSelection();if(s){const t=this._diffModel.get()?.diff.get()?.mappings.map((t=>e?t.lineRangeMapping.flip():t.lineRangeMapping));if(t){const e=(0,y.Mu)(s.getStartPosition(),t),i=(0,y.Mu)(s.getEndPosition(),t);n=D.Q.plusRange(e,i)}}return{destination:i,destinationSelection:n}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&(0,l.Rn)((t=>{for(const i of e)i.collapseAll(t)}))}showAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&(0,l.Rn)((t=>{for(const i of e)i.showAll(t)}))}_handleCursorPositionChange(e,t){if(3===e?.reason){const i=this._diffModel.get()?.diff.get()?.mappings.find((i=>t?i.lineRangeMapping.modified.contains(e.position.lineNumber):i.lineRangeMapping.original.contains(e.position.lineNumber)));i?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(P.Rh.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):i?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(P.Rh.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):i&&this._accessibilitySignalService.playSignal(P.Rh.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};Mt=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([It(3,Ge.fN),It(4,A._Y),It(5,h.T),It(6,P.Nt),It(7,bt.N8)],Mt)},41006:function(e,t,i){"use strict";i.d(t,{Hg:function(){return p}});var n,s=i(48682),o=i(63619),r=i(80670),a=i(43857),l=i(80487),c=i(17191),d=i(56812),h=i(2727),u=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};const p=(0,o.u1)("diffProviderFactoryService");let f=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(m,e)}};f=u([g(0,o._Y)],f),(0,s.v)(p,f,1);let m=class{static{n=this}static{this.diffCache=new Map}constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new r.vl,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,i,s){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,s);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new c.wm(new l.M(1,2),new l.M(1,t.getLineCount()+1),[new c.q6(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const o=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),d=n.diffCache.get(o);if(d&&d.context===r)return d.result;const h=a.W.create(),u=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),g=h.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:g,timedOut:u?.quitEarly??!0,detectedMoves:i.computeMoves?u?.moves.length??0:-1}),s.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!u)throw new Error("no diff result available");return n.diffCache.size>10&&n.diffCache.delete(n.diffCache.keys().next().value),n.diffCache.set(o,{result:u,context:r}),u}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),t=!0),t&&this.onDidChangeEventEmitter.fire()}};m=n=u([g(1,d.IEditorWorkerService),g(2,h.k)],m)},78537:function(e,t,i){"use strict";i.d(t,{N:function(){return C}});var n,s=i(84201),o=i(43014),r=i(93231),a=i(85584),l=i(35114),c=i(73755),d=i(98018),h=i(56613),u=i(24219),g=i(90072),p=i(72540),f=i(80487),m=i(62993),_=i(40393),v=i(35720),b=i(14374),w=i(63619);let C=class extends l.jG{static{n=this}static{this._breadcrumbsSourceFactory=(0,c.FY)(n,(()=>({dispose(){},getBreadcrumbItems(e,t){return[]}})))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,s){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=s,this._modifiedOutlineSource=(0,d.a0)(this,(e=>{const t=this._editors.modifiedModel.read(e),i=n._breadcrumbsSourceFactory.read(e);return t&&i?i(t,this._instantiationService):void 0})),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();(0,c.Rn)((e=>{for(const i of this._editors.original.getSelections()||[])t?.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,0,e)}))}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();(0,c.Rn)((e=>{for(const i of this._editors.modified.getSelections()||[])t?.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,0,e)}))})));const o=this._diffModel.map(((e,t)=>{const i=e?.unchangedRegions.read(t)??[];return 1===i.length&&1===i[0].modifiedLineNumber&&i[0].lineCount===this._editors.modifiedModel.read(t)?.getLineCount()?[]:i}));this.viewZones=(0,c.rm)(this,((e,t)=>{const i=this._modifiedOutlineSource.read(e);if(!i)return{origViewZones:[],modViewZones:[]};const n=[],s=[],r=this._options.renderSideBySide.read(e),a=this._options.compactMode.read(e),l=o.read(e);for(let o=0;od.getHiddenOriginalRange(e).startLineNumber-1)),i=new p.D1(e,12);n.push(i),t.add(new k(this._editors.original,i,d,!r))}{const e=(0,c.un)(this,(e=>d.getHiddenModifiedRange(e).startLineNumber-1)),i=new p.D1(e,12);s.push(i),t.add(new k(this._editors.modified,i,d))}}else{{const e=(0,c.un)(this,(e=>d.getHiddenOriginalRange(e).startLineNumber-1)),s=new p.D1(e,24);n.push(s),t.add(new x(this._editors.original,s,d,d.originalUnchangedRange,!r,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}{const e=(0,c.un)(this,(e=>d.getHiddenModifiedRange(e).startLineNumber-1)),n=new p.D1(e,24);s.push(n),t.add(new x(this._editors.modified,n,d,d.modifiedUnchangedRange,!1,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}}}return{origViewZones:n,modViewZones:s}}));const l={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},g={description:"Fold Unchanged",glyphMarginHoverMessage:new a.Bc(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,b.kg)("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+h.L.asClassName(r.W.fold),zIndex:10001};this._register((0,p.pY)(this._editors.original,(0,c.un)(this,(e=>{const t=o.read(e),i=t.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:_.Q.fromPositions(new m.y(n.originalLineNumber,1)),options:g});return i})))),this._register((0,p.pY)(this._editors.modified,(0,c.un)(this,(e=>{const t=o.read(e),i=t.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:f.M.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:g});return i})))),this._register((0,c.fm)((e=>{const t=o.read(e);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(u.O9)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(u.O9))}finally{this._isUpdatingHiddenAreas=!1}}))),this._register(this._editors.modified.onMouseUp((e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};var y,S;C=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(y=3,S=w._Y,function(e,t){S(e,t,y)})],C);class k extends p.uN{constructor(e,t,i,n=!1){const o=(0,s.h)("div.diff-hidden-lines-widget");super(e,t,o.root),this._unchangedRegion=i,this._hide=n,this._nodes=(0,s.h)("div.diff-hidden-lines-compact",[(0,s.h)("div.line-left",[]),(0,s.h)("div.text@text",[]),(0,s.h)("div.line-right",[])]),o.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register((0,c.fm)((e=>{if(!this._hide){const t=this._unchangedRegion.getHiddenModifiedRange(e).length,i=(0,b.kg)("hiddenLines","{0} hidden lines",t);this._nodes.text.innerText=i}})))}}class x extends p.uN{constructor(e,t,i,n,a,l,d,h){const u=(0,s.h)("div.diff-hidden-lines-widget");super(e,t,u.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=a,this._modifiedOutlineSource=l,this._revealModifiedHiddenLine=d,this._options=h,this._nodes=(0,s.h)("div.diff-hidden-lines",[(0,s.h)("div.top@top",{title:(0,b.kg)("diff.hiddenLines.top","Click or drag to show more above")}),(0,s.h)("div.center@content",{style:{display:"flex"}},[(0,s.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,s.$)("a",{title:(0,b.kg)("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,o.n)("$(unfold)"))]),(0,s.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,s.h)("div.bottom@bottom",{title:(0,b.kg)("diff.bottom","Click or drag to show more below"),role:"button"})]),u.root.appendChild(this._nodes.root),this._hide?(0,s.Ln)(this._nodes.first):this._register((0,p.AV)(this._nodes.first,{width:(0,g.Ud)(this._editor).layoutInfoContentLeft})),this._register((0,c.fm)((e=>{const t=this._unchangedRegion.visibleLineCountTop.read(e)+this._unchangedRegion.visibleLineCountBottom.read(e)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!t),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),this._nodes.top.classList.toggle("canMoveBottom",!t);const i=this._unchangedRegion.isDragged.read(e),n=this._editor.getDomNode();n&&(n.classList.toggle("draggingUnchangedRegion",!!i),"top"===i?(n.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),n.classList.toggle("canMoveBottom",!t)):"bottom"===i?(n.classList.toggle("canMoveTop",!t),n.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0)):(n.classList.toggle("canMoveTop",!1),n.classList.toggle("canMoveBottom",!1)))})));const f=this._editor;this._register((0,s.ko)(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const o=(0,s.zk)(this._nodes.top),r=(0,s.ko)(o,"mousemove",(e=>{const s=e.clientY-t;i=i||Math.abs(s)>2;const o=Math.round(s/f.getOption(67)),r=Math.max(0,Math.min(n+o,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(r,void 0)})),a=(0,s.ko)(o,"mouseup",(e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),r.dispose(),a.dispose()}))}))),this._register((0,s.ko)(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const o=(0,s.zk)(this._nodes.bottom),r=(0,s.ko)(o,"mousemove",(e=>{const s=e.clientY-t;i=i||Math.abs(s)>2;const o=Math.round(s/f.getOption(67)),r=Math.max(0,Math.min(n-o,this._unchangedRegion.getMaxVisibleLineCountBottom())),a=this._unchangedRegionRange.endLineNumberExclusive>f.getModel().getLineCount()?f.getContentHeight():f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(r,void 0);const l=this._unchangedRegionRange.endLineNumberExclusive>f.getModel().getLineCount()?f.getContentHeight():f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);f.setScrollTop(f.getScrollTop()+(l-a))})),a=(0,s.ko)(o,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!i){const e=f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);f.setScrollTop(f.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),r.dispose(),a.dispose()}))}))),this._register((0,c.fm)((e=>{const t=[];if(!this._hide){const n=i.getHiddenModifiedRange(e).length,a=(0,b.kg)("hiddenLines","{0} hidden lines",n),l=(0,s.$)("span",{title:(0,b.kg)("diff.hiddenLines.expandAll","Double click to unfold")},a);l.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))})),t.push(l);const c=this._unchangedRegion.getHiddenModifiedRange(e),d=this._modifiedOutlineSource.getBreadcrumbItems(c,e);if(d.length>0){t.push((0,s.$)("span",void 0,"  |  "));for(let e=0;e{this._revealModifiedHiddenLine(i.startLineNumber)}}}}(0,s.Ln)(this._nodes.others,...t)})))}}},51903:function(e,t,i){"use strict";i.d(t,{GM:function(){return _},KL:function(){return b},Kl:function(){return h},Ob:function(){return u},Ou:function(){return m},XT:function(){return p},Zb:function(){return v},Zw:function(){return g},bk:function(){return f},dv:function(){return d},wp:function(){return w}});var n=i(93231),s=i(56613),o=i(49079),r=i(14374),a=i(4195),l=i(51310);(0,a.x1A)("diffEditor.move.border","#8b8b8b9c",(0,r.kg)("diffEditor.move.border","The border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.moveActive.border","#FFA500",(0,r.kg)("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},(0,r.kg)("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));const c=(0,l.pU)("diff-insert",n.W.add,(0,r.kg)("diffInsertIcon","Line decoration for inserts in the diff editor.")),d=(0,l.pU)("diff-remove",n.W.remove,(0,r.kg)("diffRemoveIcon","Line decoration for removals in the diff editor.")),h=o.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+s.L.asClassName(c),marginClassName:"gutter-insert"}),u=o.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+s.L.asClassName(d),marginClassName:"gutter-delete"}),g=o.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),p=o.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),f=o.kI.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),m=o.kI.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),_=o.kI.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),v=o.kI.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),b=o.kI.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),w=o.kI.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})},72540:function(e,t,i){"use strict";i.d(t,{$y:function(){return p},AV:function(){return w},Am:function(){return h},D1:function(){return v},EK:function(){return k},MZ:function(){return y},Mu:function(){return S},Nu:function(){return m},O8:function(){return x},Vs:function(){return C},pN:function(){return f},pY:function(){return u},rX:function(){return g},uN:function(){return _}});var n=i(64429),s=i(76611),o=i(35114),r=i(73755),a=i(75083),l=i(62993),c=i(40393),d=i(13233);function h(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const s=[];let o=0,r=0;for(;od?(s.push(l),r++):(s.push(n(a,l)),o++,r++)}for(;o`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function g(e,t){return e.appendChild(t),(0,o.s)((()=>{t.remove()}))}function p(e,t){return e.prepend(t),(0,o.s)((()=>{t.remove()}))}class f extends o.jG{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new a.u(e,t)),this._width=(0,r.FY)(this,this.elementSizeObserver.getWidth()),this._height=(0,r.FY)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>(0,r.Rn)((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function m(e,t,i){let n=t.get(),s=n,o=n;const a=(0,r.FY)("animatedValue",n);let l,c=-1;function d(){const t=Date.now()-c;var i,r,h;o=Math.floor((r=s,h=n-s,(i=t)===300?r+h:h*(1-Math.pow(2,-10*i/300))+r)),t<300?l=e.requestAnimationFrame(d):o=n,a.set(o,void 0)}return i.add((0,r.Y)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(e,i)=>(e.didChange(t)&&(i.animate=i.animate||e.change),!0)},((i,r)=>{void 0!==l&&(e.cancelAnimationFrame(l),l=void 0),s=o,n=t.read(i),c=Date.now()-(r.animate?0:300),d()}))),a}class _ extends o.jG{constructor(e,t,i){super(),this._register(new b(e,i)),this._register(w(i,{height:t.actualHeight,top:t.actualTop}))}}class v{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=(0,r.FY)(this,void 0),this._actualHeight=(0,r.FY)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class b{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+b._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function w(e,t){return(0,r.fm)((i=>{for(let[n,s]of Object.entries(t))s&&"object"==typeof s&&"read"in s&&(s=s.read(i)),"number"==typeof s&&(s=`${s}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=s}))}function C(e,t,i,n){const s=new o.Cm,a=[];return s.add((0,r.yC)(((s,o)=>{const l=t.read(s),c=new Map,d=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of a)e.removeZone(t),n?.delete(t);a.length=0;for(const t of l){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),a.push(i),n?.add(i),c.set(t,i)}})),i&&i(!1),o.add((0,r.Y)({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(e,t){const i=d.get(e.changedObservable);return void 0!==i&&t.zoneIds.push(i),!0}},((t,n)=>{for(const e of l)e.onChange&&(d.set(e.onChange,c.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n.zoneIds)e.layoutZone(t)})),i&&i(!1)})))}))),s.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of a)e.removeZone(t)})),n?.clear(),i&&i(!1)}}),s}class y extends s.Qi{dispose(){super.dispose(!0)}}function S(e,t){const i=(0,n.Uk)(t,(t=>t.original.startLineNumber<=e.lineNumber));if(!i)return c.Q.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){const t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return c.Q.fromPositions(new l.y(t,e.column))}if(!i.innerChanges)return c.Q.fromPositions(new l.y(i.modified.startLineNumber,1));const s=(0,n.Uk)(i.innerChanges,(t=>t.originalRange.getStartPosition().isBeforeOrEqual(e)));if(!s){const t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return c.Q.fromPositions(new l.y(t,e.column))}if(s.originalRange.containsPosition(e))return s.modifiedRange;{const t=(o=s.originalRange.getEndPosition(),r=e,o.lineNumber===r.lineNumber?new d.W(0,r.column-o.column):new d.W(r.lineNumber-o.lineNumber,r.column-1));return c.Q.fromPositions(t.addToPosition(s.modifiedRange.getEndPosition()))}var o,r}function k(e,t){let i;return e.filter((e=>{const n=t(e,i);return i=e,n}))}class x{static create(e,t=void 0){return new L(e,e,t)}static createWithDisposable(e,t,i=void 0){const n=new o.Cm;return n.add(t),n.add(e),new L(e,n,i)}}class L extends x{constructor(e,t,i){super(),this.object=e,this._disposable=t,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new D(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,0===this._refCount&&this._disposable.dispose(),e){const t=this._owners.indexOf(e);-1!==t&&this._owners.splice(t,1)}}}class D extends x{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}},69498:function(e,t,i){"use strict";i.d(t,{T:function(){return f},i:function(){return m}});var n,s=i(96710),o=i(38945),r=i(20187),a=i(80670),l=i(35114),c=i(43193),d=i(41750),h=i(11521),u=i(55878),g=i(95607),p=function(e,t){return function(i,n){t(i,n,e)}};let f=class{static{n=this}static{this._ttpTokenizer=(0,o.H)("tokenizeToString",{createHTML(e){return e}})}constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new a.vl,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new l.Cm,o=n.add((0,s.Gc)(e,{...this._getRenderOptions(e,n),...t},i));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(e,t)=>{let i;e?i=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(i=this._options.editor.getModel()?.getLanguageId()),i||(i=h.vH);const s=await(0,u.Yj)(this._languageService,t,i),o=document.createElement("span");if(o.innerHTML=n._ttpTokenizer?.createHTML(s)??s,this._options.editor){const e=this._options.editor.getOption(50);(0,c.M)(o,e)}else this._options.codeBlockFontFamily&&(o.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(o.style.fontSize=this._options.codeBlockFontSize),o},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>m(this._openerService,t,e.isTrusted),disposables:t}}}};async function m(e,t,i){try{return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:_(i)})}catch(e){return(0,r.dz)(e),!1}}function _(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}f=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([p(1,d.L),p(2,g.C)],f)},41667:function(e,t,i){"use strict";i.d(t,{I:function(){return s}});var n=i(30981);class s extends n.LN{constructor(e){super(),this._getContext=e}runAction(e,t){const i=this._getContext();return super.runAction(e,i)}}},24608:function(e,t,i){"use strict";i.d(t,{iP:function(){return a},iu:function(){return s},q2:function(){return r},tA:function(){return o},ui:function(){return l}});var n=i(56218);class s{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.L.fromPositions(i.getEndPosition())}}class o{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.L.fromRange(i,0)}}class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.L.fromPositions(i.getStartPosition())}}class a{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.L.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},97988:function(e,t,i){"use strict";i.d(t,{Y:function(){return u}});var n,s=i(43920),o=i(39841),r=i(40393),a=i(56218),l=i(7326),c=i(8494);const d=Object.create(null);function h(e,t){if(t<=0)return"";d[e]||(d[e]=["",e]);const i=d[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let u=n=class{static unshiftIndent(e,t,i,n,s){const r=o.A.visibleColumnFromColumn(e,t,i);if(s){const e=h(" ",n);return h(e,o.A.prevIndentTabStop(r,n)/n)}return h("\t",o.A.prevRenderTabStop(r,i)/i)}static shiftIndent(e,t,i,n,s){const r=o.A.visibleColumnFromColumn(e,t,i);if(s){const e=h(" ",n);return h(e,o.A.nextIndentTabStop(r,n)/n)}return h("\t",o.A.nextRenderTabStop(r,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let a=this._selection.endLineNumber;1===this._selection.endColumn&&i!==a&&(a-=1);const{tabSize:c,indentSize:d,insertSpaces:u}=this._opts,g=i===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let h=0,p=0;for(let f=i;f<=a;f++,h=p){p=0;const a=e.getLineContent(f);let m,_=s.HG(a);if((!this._opts.isUnshift||0!==a.length&&0!==_)&&(g||this._opts.isUnshift||0!==a.length)){if(-1===_&&(_=a.length),f>1&&o.A.visibleColumnFromColumn(a,_+1,c)%d!=0&&e.tokenization.isCheapToTokenize(f-1)){const t=(0,l.h)(this._opts.autoIndent,e,new r.Q(f-1,e.getLineMaxColumn(f-1),f-1,e.getLineMaxColumn(f-1)),this._languageConfigurationService);if(t){if(p=h,t.appendText)for(let e=0,i=t.appendText.length;e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(g=2,p=c.JZ,function(e,t){p(e,t,g)})],u)},88808:function(e,t,i){"use strict";i.d(t,{i:function(){return o},y:function(){return r}});var n=i(40393),s=i(56218);class o{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new n.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new s.L(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class r{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new s.L(i.endLineNumber,i.startColumn,i.endLineNumber,i.endColumn-this._charAfter.length)}}},42415:function(e,t,i){"use strict";i.d(t,{q:function(){return n}});const n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}},38047:function(e,t,i){"use strict";i.d(t,{Gn:function(){return f},JJ:function(){return c},vf:function(){return p}});var n=i(42415),s=i(3520),o=i(31634),r=i(14374),a=i(16434),l=i(56419);const c=Object.freeze({id:"editor",order:5,type:"object",title:r.kg("editorConfigurationTitle","Editor"),scope:5}),d={...c,properties:{"editor.tabSize":{type:"number",default:o.R.tabSize,minimum:1,markdownDescription:r.kg("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:r.kg("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:o.R.insertSpaces,markdownDescription:r.kg("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:o.R.detectIndentation,markdownDescription:r.kg("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:o.R.trimAutoWhitespace,description:r.kg("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:o.R.largeFileOptimizations,description:r.kg("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[r.kg("wordBasedSuggestions.off","Turn off Word Based Suggestions."),r.kg("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),r.kg("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),r.kg("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:r.kg("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[r.kg("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),r.kg("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),r.kg("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:r.kg("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r.kg("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r.kg("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:r.kg("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:r.kg("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:r.kg("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:r.kg("editor.experimental.treeSitterTelemetry","Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `editor.experimental.preferTreeSitter` for specific languages will take precedence."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:r.kg("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:r.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:r.kg("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:r.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:n.q.maxComputationTime,description:r.kg("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:n.q.maxFileSize,description:r.kg("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:n.q.renderSideBySide,description:r.kg("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:n.q.renderSideBySideInlineBreakpoint,description:r.kg("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:n.q.useInlineViewWhenSpaceIsLimited,description:r.kg("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:n.q.renderMarginRevertIcon,description:r.kg("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:n.q.renderGutterMenu,description:r.kg("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:n.q.ignoreTrimWhitespace,description:r.kg("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:n.q.renderIndicators,description:r.kg("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:n.q.diffCodeLens,description:r.kg("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:n.q.diffWordWrap,markdownEnumDescriptions:[r.kg("wordWrap.off","Lines will never wrap."),r.kg("wordWrap.on","Lines will wrap at the viewport width."),r.kg("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:n.q.diffAlgorithm,markdownEnumDescriptions:[r.kg("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),r.kg("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:n.q.hideUnchangedRegions.enabled,markdownDescription:r.kg("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:n.q.hideUnchangedRegions.revealLineCount,markdownDescription:r.kg("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:n.q.hideUnchangedRegions.minimumLineCount,markdownDescription:r.kg("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:n.q.hideUnchangedRegions.contextLineCount,markdownDescription:r.kg("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:n.q.experimental.showMoves,markdownDescription:r.kg("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:n.q.experimental.showEmptyDecorations,description:r.kg("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:n.q.experimental.useTrueInlineView,description:r.kg("useTrueInlineView","If enabled and the editor uses the inline view, word changes are rendered inline.")}}};for(const e of s.BE){const t=e.schema;if(void 0!==t)if(void 0!==(h=t).type||void 0!==h.anyOf)d.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(d.properties[e]=t[e])}var h;let u=null;function g(){return null===u&&(u=Object.create(null),Object.keys(d.properties).forEach((e=>{u[e]=!0}))),u}function p(e){return g()[`editor.${e}`]||!1}function f(e){return g()[`diffEditor.${e}`]||!1}l.O.as(a.Fd.Configuration).registerConfiguration(d)},3520:function(e,t,i){"use strict";i.d(t,{$C:function(){return R},BE:function(){return W},Bc:function(){return N},O4:function(){return k},Of:function(){return O},XR:function(){return A},hZ:function(){return g},jT:function(){return E},jU:function(){return B},ls:function(){return C},lw:function(){return d},m9:function(){return D},n0:function(){return h},qB:function(){return V},r_:function(){return I},wA:function(){return b},xZ:function(){return T},xq:function(){return c},zM:function(){return _}});var n=i(97358),s=i(49134),o=i(79783),r=i(31634),a=i(86506),l=i(14374);const c=8;class d{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class h{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}compute(e,t,i){return i}}class g{constructor(e,t){this.newValue=e,this.didChange=t}}function p(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new g(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&n.aI(e,t);return new g(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const s=p(e[n],t[n]);s.didChange&&(e[n]=s.newValue,i=!0)}return new g(e,i)}class f{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return p(e,t)}validate(e){return this.defaultValue}}class m{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function _(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class v extends m{constructor(e,t,i,n=void 0){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _(e,this.defaultValue)}}function b(e,t,i,n){if(void 0===e)return t;let s=parseInt(e,10);return isNaN(s)?t:(s=Math.max(i,s),s=Math.min(n,s),0|s)}class w extends m{static clampedInt(e,t,i,n){return b(e,t,i,n)}constructor(e,t,i,n,s,o=void 0){void 0!==o&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=s),super(e,t,i,o),this.minimum=n,this.maximum=s}validate(e){return w.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function C(e,t,i,n){if(void 0===e)return t;const s=y.float(e,t);return y.clamp(s,i,n)}class y extends m{static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){void 0!==s&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(y.float(e,this.defaultValue))}}class S extends m{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return S.string(e,this.defaultValue)}}function k(e,t,i,n){return"string"!=typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class x extends m{constructor(e,t,i,n,s=void 0){void 0!==s&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return k(e,this.defaultValue,this._allowedValues)}}class L extends u{constructor(e,t,i,n,s,o,r=void 0){void 0!==r&&(r.type="string",r.enum=s,r.default=n),super(e,t,i,r),this._allowedValues=s,this._convert=o}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var D,E;!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"}(D||(D={}));class N extends u{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(51,"fontLigatures",N.OFF,{anyOf:[{type:"boolean",description:l.kg("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:l.kg("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:l.kg("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e||0===e.length?N.OFF:"true"===e?N.ON:e:Boolean(e)?N.ON:N.OFF}}class I extends u{static{this.OFF="normal"}static{this.TRANSLATE="translate"}constructor(){super(54,"fontVariations",I.OFF,{anyOf:[{type:"boolean",description:l.kg("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:l.kg("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:l.kg("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?I.OFF:"true"===e?I.TRANSLATE:e:Boolean(e)?I.TRANSLATE:I.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}class M extends u{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(53,"fontWeight",B.fontWeight,{anyOf:[{type:"number",minimum:M.MINIMUM_VALUE,maximum:M.MAXIMUM_VALUE,errorMessage:l.kg("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:M.SUGGESTION_VALUES}],default:B.fontWeight,description:l.kg("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(w.clampedInt(e,B.fontWeight,M.MINIMUM_VALUE,M.MAXIMUM_VALUE))}}class T extends f{constructor(){super(146)}compute(e,t,i){return T.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:Math.floor(e.viewLineCount/s)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const o=t.stableMinimapLayoutInput,r=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.paddingTop===o.paddingTop&&e.paddingBottom===o.paddingBottom&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,f=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,w=h?2:3;let C=Math.floor(s*n);const y=C/s;let S=!1,k=!1,x=w*u,L=u/s,D=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:o,extraLinesBeyondLastLine:l,desiredRatio:c,minimapLineCount:h}=T.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:s});if(_/h>1)S=!0,k=!0,u=1,x=1,L=u/s;else{let n=!1,d=u+1;if("fit"===p){const e=Math.ceil((o+_+l)*x);b&&r&&v<=t.stableFitRemainingWidth?(n=!0,d=t.stableFitMaxMinimapScale):n=e>C}if("fill"===p||n){S=!0;const n=u;x=Math.min(a*s,Math.max(1,Math.floor(1/c))),b&&r&&v<=t.stableFitRemainingWidth&&(d=t.stableFitMaxMinimapScale),u=Math.min(d,Math.max(1,Math.floor(x/w))),u>n&&(D=Math.min(2,u/n)),L=u/s/D,C=Math.ceil(Math.max(i,o+_+l)*x),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const E=Math.floor(g*L),N=Math.min(E,Math.max(0,Math.floor((v-m-2)*L/(l+L)))+c);let I=Math.floor(s*N);const M=I/s;return I=Math.floor(I*D),{renderMinimap:h?1:2,minimapLeft:"left"===f?0:i-N-m,minimapWidth:N,minimapHeightIsEditorHeight:S,minimapIsSampling:k,minimapScale:u,minimapLineHeight:x,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:C,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:y}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,s=0|t.lineHeight,o=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(138),u="inherit"===d?e.get(137):d,g="inherit"===u?e.get(133):u,p=e.get(136),f=t.isDominatedByLongLines,m=e.get(57),_=0!==e.get(68).renderType,v=e.get(69),b=e.get(106),w=e.get(84),C=e.get(73),y=e.get(104),S=y.verticalScrollbarSize,k=y.verticalHasArrows,x=y.arrowSize,L=y.horizontalScrollbarSize,D=e.get(43),E="never"!==e.get(111);let N=e.get(66);D&&E&&(N+=16);let I=0;if(_){const e=Math.max(o,v);I=Math.round(e*a)}let M=0;m&&(M=s*t.glyphMarginDecorationLaneCount);let R=0,P=R+M,A=P+I,O=A+N;const F=i-M-I-N;let B=!1,W=!1,H=-1;"inherit"===u&&f?(B=!0,W=!0):"on"===g||"bounded"===g?W=!0:"wordWrapColumn"===g&&(H=p);const V=T._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,paddingTop:w.top,paddingBottom:w.bottom,minimap:C,verticalScrollbarWidth:S,viewLineCount:c,remainingWidth:F,isViewportWrapping:W},t.memory||new h);0!==V.renderMinimap&&0===V.minimapLeft&&(R+=V.minimapWidth,P+=V.minimapWidth,A+=V.minimapWidth,O+=V.minimapWidth);const z=F-V.minimapWidth,U=Math.max(1,Math.floor((z-S-2)/r)),j=k?x:0;return W&&(H=Math.max(1,U),"bounded"===g&&(H=Math.min(H,p))),{width:i,height:n,glyphMarginLeft:R,glyphMarginWidth:M,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:P,lineNumbersWidth:I,decorationsLeft:A,decorationsWidth:N,contentLeft:O,contentWidth:z,minimap:V,viewportColumn:U,isWordWrapMinified:B,isViewportWrapping:W,wrappingColumn:H,verticalScrollbarWidth:S,horizontalScrollbarHeight:L,overviewRuler:{top:j,width:S,height:n-2*j,right:0}}}}function R(e){const t=e.get(99);return"editable"===t?e.get(92):"on"!==t}function P(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}!function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(E||(E={}));const A="inUntrustedWorkspace",O={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};function F(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const B={fontFamily:o.zx?"Menlo, Monaco, 'Courier New', monospace":o.j9?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:o.zx?12:14,lineHeight:0,letterSpacing:0},W=[];function H(e){return W[e.id]=e,e}const V={acceptSuggestionOnCommitCharacter:H(new v(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:l.kg("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:H(new x(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",l.kg("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:l.kg("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:H(new class extends u{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[l.kg("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),l.kg("accessibilitySupport.on","Optimize for usage with a Screen Reader."),l.kg("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:l.kg("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:H(new w(3,"accessibilityPageSize",10,1,1073741824,{description:l.kg("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:H(new S(4,"ariaLabel",l.kg("editorViewAccessibleLabel","Editor content"))),ariaRequired:H(new v(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:H(new v(8,"screenReaderAnnounceInlineSuggestion",!0,{description:l.kg("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:H(new x(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),l.kg("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:H(new x(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),l.kg("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:H(new x(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",l.kg("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:l.kg("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:H(new x(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",l.kg("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:l.kg("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:H(new x(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),l.kg("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:H(new L(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[l.kg("editor.autoIndent.none","The editor will not insert indentation automatically."),l.kg("editor.autoIndent.keep","The editor will keep the current line's indentation."),l.kg("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),l.kg("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),l.kg("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:l.kg("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:H(new v(13,"automaticLayout",!1)),autoSurround:H(new x(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[l.kg("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),l.kg("editor.autoSurround.quotes","Surround with quotes but not brackets."),l.kg("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:l.kg("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:H(new class extends u{constructor(){const e={enabled:r.R.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:r.R.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:l.kg("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:_(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}),bracketPairGuides:H(new class extends u{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.kg("editor.guides.bracketPairs.true","Enables bracket pair guides."),l.kg("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),l.kg("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:l.kg("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.kg("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),l.kg("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),l.kg("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:l.kg("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:l.kg("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:l.kg("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[l.kg("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),l.kg("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),l.kg("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:l.kg("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:F(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:F(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:F(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}),stickyTabStops:H(new v(117,"stickyTabStops",!1,{description:l.kg("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:H(new v(17,"codeLens",!0,{description:l.kg("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:H(new S(18,"codeLensFontFamily","",{description:l.kg("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:H(new w(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:l.kg("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:H(new v(20,"colorDecorators",!0,{description:l.kg("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:H(new x(149,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[l.kg("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),l.kg("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),l.kg("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:l.kg("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:H(new w(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:l.kg("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:H(new v(22,"columnSelection",!1,{description:l.kg("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:H(new class extends u{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:l.kg("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:l.kg("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:_(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:H(new v(24,"contextmenu",!0)),copyWithSyntaxHighlighting:H(new v(25,"copyWithSyntaxHighlighting",!0,{description:l.kg("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:H(new L(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:l.kg("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:H(new x(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[l.kg("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),l.kg("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),l.kg("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:l.kg("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:H(new L(28,"cursorStyle",D.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return D.Line;case"block":return D.Block;case"underline":return D.Underline;case"line-thin":return D.LineThin;case"block-outline":return D.BlockOutline;case"underline-thin":return D.UnderlineThin}}),{description:l.kg("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:H(new w(29,"cursorSurroundingLines",0,0,1073741824,{description:l.kg("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:H(new x(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[l.kg("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),l.kg("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:l.kg("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:H(new w(31,"cursorWidth",0,0,1073741824,{markdownDescription:l.kg("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:H(new v(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:H(new v(33,"disableMonospaceOptimizations",!1)),domReadOnly:H(new v(34,"domReadOnly",!1)),dragAndDrop:H(new v(35,"dragAndDrop",!0,{description:l.kg("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:H(new class extends v{constructor(){super(37,"emptySelectionClipboard",!0,{description:l.kg("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:H(new class extends u{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:l.kg("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[l.kg("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),l.kg("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showDropSelector:k(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}),stickyScroll:H(new class extends u{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:l.kg("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:l.kg("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:l.kg("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:l.kg("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),maxLineCount:w.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:k(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:_(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}),experimentalWhitespaceRendering:H(new x(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[l.kg("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),l.kg("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),l.kg("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:l.kg("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:H(new S(39,"extraEditorClassName","")),fastScrollSensitivity:H(new y(40,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:l.kg("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:H(new class extends u{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:l.kg("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[l.kg("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),l.kg("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),l.kg("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:l.kg("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[l.kg("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),l.kg("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),l.kg("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:l.kg("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:l.kg("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:o.zx},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:l.kg("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:l.kg("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":k(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":k(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:H(new v(42,"fixedOverflowWidgets",!1)),folding:H(new v(43,"folding",!0,{description:l.kg("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:H(new x(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[l.kg("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),l.kg("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:l.kg("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:H(new v(45,"foldingHighlight",!0,{description:l.kg("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:H(new v(46,"foldingImportsByDefault",!1,{description:l.kg("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:H(new w(47,"foldingMaximumRegions",5e3,10,65e3,{description:l.kg("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:H(new v(48,"unfoldOnClickAfterEndOfLine",!1,{description:l.kg("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:H(new S(49,"fontFamily",B.fontFamily,{description:l.kg("fontFamily","Controls the font family.")})),fontInfo:H(new class extends f{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:H(new N),fontSize:H(new class extends m{constructor(){super(52,"fontSize",B.fontSize,{type:"number",minimum:6,maximum:100,default:B.fontSize,description:l.kg("fontSize","Controls the font size in pixels.")})}validate(e){const t=y.float(e,this.defaultValue);return 0===t?B.fontSize:y.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:H(new M),fontVariations:H(new I),formatOnPaste:H(new v(55,"formatOnPaste",!1,{description:l.kg("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:H(new v(56,"formatOnType",!1,{description:l.kg("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:H(new v(57,"glyphMargin",!0,{description:l.kg("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:H(new class extends u{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[l.kg("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),l.kg("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),l.kg("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:l.kg("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:l.kg("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:l.kg("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:l.kg("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:l.kg("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:l.kg("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:l.kg("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:l.kg("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:l.kg("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:l.kg("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:l.kg("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{multiple:k(t.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:t.multipleDefinitions??k(t.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:t.multipleTypeDefinitions??k(t.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:t.multipleDeclarations??k(t.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:t.multipleImplementations??k(t.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:t.multipleReferences??k(t.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:t.multipleTests??k(t.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:S.string(t.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:S.string(t.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:S.string(t.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:S.string(t.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:S.string(t.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:S.string(t.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}}),hideCursorInOverviewRuler:H(new v(59,"hideCursorInOverviewRuler",!1,{description:l.kg("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:H(new class extends u{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:l.kg("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:l.kg("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:l.kg("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:l.kg("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:l.kg("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),delay:w.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_(t.sticky,this.defaultValue.sticky),hidingDelay:w.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:_(t.above,this.defaultValue.above)}}}),inDiffEditor:H(new v(61,"inDiffEditor",!1)),letterSpacing:H(new y(64,"letterSpacing",B.letterSpacing,(e=>y.clamp(e,-5,20)),{description:l.kg("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:H(new class extends u{constructor(){const e={enabled:E.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[E.Off,E.OnCode,E.On],default:e.enabled,enumDescriptions:[l.kg("editor.lightbulb.enabled.off","Disable the code action menu."),l.kg("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),l.kg("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:l.kg("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:k(e.enabled,this.defaultValue.enabled,[E.Off,E.OnCode,E.On])}:this.defaultValue}}),lineDecorationsWidth:H(new class extends u{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return"string"==typeof e&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):w.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?w.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}),lineHeight:H(new class extends y{constructor(){super(67,"lineHeight",B.lineHeight,(e=>y.clamp(e,0,150)),{markdownDescription:l.kg("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:H(new class extends u{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[l.kg("lineNumbers.off","Line numbers are not rendered."),l.kg("lineNumbers.on","Line numbers are rendered as absolute number."),l.kg("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),l.kg("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:l.kg("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:H(new w(69,"lineNumbersMinChars",5,1,300)),linkedEditing:H(new v(70,"linkedEditing",!1,{description:l.kg("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:H(new v(71,"links",!0,{description:l.kg("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:H(new x(72,"matchBrackets","always",["always","near","never"],{description:l.kg("matchBrackets","Highlight matching brackets.")})),minimap:H(new class extends u{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:l.kg("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:l.kg("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[l.kg("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),l.kg("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),l.kg("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:l.kg("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:l.kg("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:l.kg("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:l.kg("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:l.kg("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:l.kg("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:l.kg("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:l.kg("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:l.kg("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:l.kg("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),autohide:_(t.autohide,this.defaultValue.autohide),size:k(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:k(t.side,this.defaultValue.side,["right","left"]),showSlider:k(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_(t.renderCharacters,this.defaultValue.renderCharacters),scale:w.clampedInt(t.scale,1,1,3),maxColumn:w.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:_(t.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:_(t.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:y.clamp(t.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:y.clamp(t.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}),mouseStyle:H(new x(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:H(new y(75,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:l.kg("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:H(new v(76,"mouseWheelZoom",!1,{markdownDescription:o.zx?l.kg("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):l.kg("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:H(new v(77,"multiCursorMergeOverlapping",!0,{description:l.kg("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:H(new L(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?o.zx?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[l.kg("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),l.kg("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:l.kg({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:H(new x(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[l.kg("multiCursorPaste.spread","Each cursor pastes a single line of the text."),l.kg("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:l.kg("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:H(new w(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:l.kg("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:H(new x(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[l.kg("occurrencesHighlight.off","Does not highlight occurrences."),l.kg("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),l.kg("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:l.kg("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:H(new v(82,"overviewRulerBorder",!0,{description:l.kg("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:H(new w(83,"overviewRulerLanes",3,0,3)),padding:H(new class extends u{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:l.kg("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:l.kg("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:w.clampedInt(t.top,0,0,1e3),bottom:w.clampedInt(t.bottom,0,0,1e3)}}}),pasteAs:H(new class extends u{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:l.kg("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[l.kg("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),l.kg("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showPasteSelector:k(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}),parameterHints:H(new class extends u{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:l.kg("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:l.kg("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),cycle:_(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:H(new x(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[l.kg("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),l.kg("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:l.kg("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),placeholder:H(new class extends u{constructor(){super(88,"placeholder",void 0)}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?e:this.defaultValue}}),definitionLinkOpensInPeek:H(new v(89,"definitionLinkOpensInPeek",!1,{description:l.kg("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:H(new class extends u{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[l.kg("on","Quick suggestions show inside the suggest widget"),l.kg("inline","Quick suggestions show as ghost text"),l.kg("off","Quick suggestions are disabled")]}];super(90,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:l.kg("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:l.kg("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:l.kg("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:l.kg("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.","`#editor.suggestOnTriggerCharacters#`")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let o,r,a;return o="boolean"==typeof t?t?"on":"off":k(t,this.defaultValue.other,s),r="boolean"==typeof i?i?"on":"off":k(i,this.defaultValue.comments,s),a="boolean"==typeof n?n?"on":"off":k(n,this.defaultValue.strings,s),{other:o,comments:r,strings:a}}}),quickSuggestionsDelay:H(new w(91,"quickSuggestionsDelay",10,0,1073741824,{description:l.kg("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:H(new v(92,"readOnly",!1)),readOnlyMessage:H(new class extends u{constructor(){super(93,"readOnlyMessage",void 0)}validate(e){return e&&"object"==typeof e?e:this.defaultValue}}),renameOnType:H(new v(94,"renameOnType",!1,{description:l.kg("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:l.kg("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:H(new v(95,"renderControlCharacters",!0,{description:l.kg("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:H(new x(96,"renderFinalNewline",o.j9?"dimmed":"on",["off","on","dimmed"],{description:l.kg("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:H(new x(97,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",l.kg("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:l.kg("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:H(new v(98,"renderLineHighlightOnlyWhenFocus",!1,{description:l.kg("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:H(new x(99,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:H(new x(100,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",l.kg("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),l.kg("renderWhitespace.selection","Render whitespace characters only on selected text."),l.kg("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:l.kg("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:H(new w(101,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:H(new v(102,"roundedSelection",!0,{description:l.kg("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:H(new class extends u{constructor(){const e=[],t={type:"number",description:l.kg("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(103,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:l.kg("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:l.kg("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"==typeof i)t.push({column:w.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:w.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:H(new class extends u{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(104,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.kg("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),l.kg("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),l.kg("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:l.kg("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.kg("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),l.kg("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),l.kg("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:l.kg("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:l.kg("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:l.kg("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:l.kg("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:l.kg("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=w.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=w.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:w.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:P(t.vertical,this.defaultValue.vertical),horizontal:P(t.horizontal,this.defaultValue.horizontal),useShadows:_(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:w.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:w.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:_(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}}),scrollBeyondLastColumn:H(new w(105,"scrollBeyondLastColumn",4,0,1073741824,{description:l.kg("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:H(new v(106,"scrollBeyondLastLine",!0,{description:l.kg("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:H(new v(107,"scrollPredominantAxis",!0,{description:l.kg("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:H(new v(108,"selectionClipboard",!0,{description:l.kg("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:o.j9})),selectionHighlight:H(new v(109,"selectionHighlight",!0,{description:l.kg("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:H(new v(110,"selectOnLineNumbers",!0)),showFoldingControls:H(new x(111,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[l.kg("showFoldingControls.always","Always show the folding controls."),l.kg("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),l.kg("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:l.kg("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:H(new v(112,"showUnused",!0,{description:l.kg("showUnused","Controls fading out of unused code.")})),showDeprecated:H(new v(141,"showDeprecated",!0,{description:l.kg("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:H(new class extends u{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:l.kg("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[l.kg("editor.inlayHints.on","Inlay hints are enabled"),l.kg("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",o.zx?"Ctrl+Option":"Ctrl+Alt"),l.kg("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",o.zx?"Ctrl+Option":"Ctrl+Alt"),l.kg("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:l.kg("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:l.kg("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:l.kg("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return"boolean"==typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:k(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:w.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),padding:_(t.padding,this.defaultValue.padding)}}}),snippetSuggestions:H(new x(113,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[l.kg("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),l.kg("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),l.kg("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),l.kg("snippetSuggestions.none","Do not show snippet suggestions.")],description:l.kg("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:H(new class extends u{constructor(){super(114,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:l.kg("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:l.kg("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:_(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:_(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}),smoothScrolling:H(new v(115,"smoothScrolling",!1,{description:l.kg("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:H(new w(118,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:H(new class extends u{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(119,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[l.kg("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),l.kg("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:l.kg("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:l.kg("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:l.kg("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:l.kg("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[l.kg("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),l.kg("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),l.kg("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),l.kg("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:l.kg("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions ({0} and {1}) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:l.kg("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:l.kg("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:l.kg("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:l.kg("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:l.kg("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:l.kg("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:l.kg("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:k(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:k(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:_(t.showIcons,this.defaultValue.showIcons),showStatusBar:_(t.showStatusBar,this.defaultValue.showStatusBar),preview:_(t.preview,this.defaultValue.preview),previewMode:k(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_(t.showMethods,this.defaultValue.showMethods),showFunctions:_(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:_(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:_(t.showFields,this.defaultValue.showFields),showVariables:_(t.showVariables,this.defaultValue.showVariables),showClasses:_(t.showClasses,this.defaultValue.showClasses),showStructs:_(t.showStructs,this.defaultValue.showStructs),showInterfaces:_(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_(t.showModules,this.defaultValue.showModules),showProperties:_(t.showProperties,this.defaultValue.showProperties),showEvents:_(t.showEvents,this.defaultValue.showEvents),showOperators:_(t.showOperators,this.defaultValue.showOperators),showUnits:_(t.showUnits,this.defaultValue.showUnits),showValues:_(t.showValues,this.defaultValue.showValues),showConstants:_(t.showConstants,this.defaultValue.showConstants),showEnums:_(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_(t.showKeywords,this.defaultValue.showKeywords),showWords:_(t.showWords,this.defaultValue.showWords),showColors:_(t.showColors,this.defaultValue.showColors),showFiles:_(t.showFiles,this.defaultValue.showFiles),showReferences:_(t.showReferences,this.defaultValue.showReferences),showFolders:_(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_(t.showSnippets,this.defaultValue.showSnippets),showUsers:_(t.showUsers,this.defaultValue.showUsers),showIssues:_(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:H(new class extends u{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:l.kg("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.kg("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),l.kg("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),l.kg("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:l.kg("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:l.kg("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:l.kg("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),mode:k(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:k(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:_(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily)}}}),inlineEdit:H(new class extends u{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:l.kg("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.kg("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),l.kg("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),l.kg("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:l.kg("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:l.kg("inlineEdit.fontFamily","Controls the font family of the inline edit.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showToolbar:k(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}),inlineCompletionsAccessibilityVerbose:H(new v(150,"inlineCompletionsAccessibilityVerbose",!1,{description:l.kg("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:H(new w(120,"suggestFontSize",0,0,1e3,{markdownDescription:l.kg("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:H(new w(121,"suggestLineHeight",0,0,1e3,{markdownDescription:l.kg("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:H(new v(122,"suggestOnTriggerCharacters",!0,{description:l.kg("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:H(new x(123,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[l.kg("suggestSelection.first","Always select the first suggestion."),l.kg("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),l.kg("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:l.kg("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:H(new x(124,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[l.kg("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),l.kg("tabCompletion.off","Disable tab completions."),l.kg("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:l.kg("tabCompletion","Enables tab completions.")})),tabIndex:H(new w(125,"tabIndex",0,-1,1073741824)),unicodeHighlight:H(new class extends u{constructor(){const e={nonBasicASCII:A,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:A,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(126,"unicodeHighlight",e,{[O.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.nonBasicASCII,description:l.kg("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[O.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:l.kg("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[O.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:l.kg("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[O.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeComments,description:l.kg("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[O.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeStrings,description:l.kg("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[O.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:l.kg("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[O.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:l.kg("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(s.aI(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(s.aI(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new g(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:F(t.nonBasicASCII,A,[!0,!1,A]),invisibleCharacters:_(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:F(t.includeComments,A,[!0,!1,A]),includeStrings:F(t.includeStrings,A,[!0,!1,A]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:H(new x(127,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[l.kg("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),l.kg("unusualLineTerminators.off","Unusual line terminators are ignored."),l.kg("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:l.kg("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:H(new v(128,"useShadowDOM",!0)),useTabStops:H(new v(129,"useTabStops",!0,{description:l.kg("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:H(new x(130,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[l.kg("wordBreak.normal","Use the default line break rule."),l.kg("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:l.kg("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:H(new class extends u{constructor(){super(131,"wordSegmenterLocales",[],{anyOf:[{description:l.kg("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:l.kg("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){const t=[];for(const i of e)if("string"==typeof i)try{Intl.Segmenter.supportedLocalesOf(i).length>0&&t.push(i)}catch{}return t}return this.defaultValue}}),wordSeparators:H(new S(132,"wordSeparators",a.J3,{description:l.kg("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:H(new x(133,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[l.kg("wordWrap.off","Lines will never wrap."),l.kg("wordWrap.on","Lines will wrap at the viewport width."),l.kg({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),l.kg({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:l.kg({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:H(new S(134,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:H(new S(135,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:H(new w(136,"wordWrapColumn",80,1,1073741824,{markdownDescription:l.kg({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:H(new x(137,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:H(new x(138,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:H(new class extends f{constructor(){super(143)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(74)?n.push("mouse-default"):"copy"===t.get(74)&&n.push("mouse-copy"),t.get(112)&&n.push("showUnused"),t.get(141)&&n.push("showDeprecated"),n.join(" ")}}),defaultColorDecorators:H(new v(148,"defaultColorDecorators",!1,{markdownDescription:l.kg("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:H(new class extends f{constructor(){super(144)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:H(new v(145,"tabFocusMode",!1,{markdownDescription:l.kg("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:H(new T),wrappingInfo:H(new class extends f{constructor(){super(147)}compute(e,t,i){const n=t.get(146);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}),wrappingIndent:H(new class extends u{constructor(){super(139,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[l.kg("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),l.kg("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),l.kg("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),l.kg("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:l.kg("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return 2===t.get(2)?0:i}}),wrappingStrategy:H(new class extends u{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[l.kg("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),l.kg("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:l.kg("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return k(e,"simple",["simple","advanced"])}compute(e,t,i){return 2===t.get(2)?"advanced":i}})}},76543:function(e,t,i){"use strict";i.d(t,{D:function(){return s}});var n=i(80670);const s=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},78336:function(e,t,i){"use strict";i.d(t,{YJ:function(){return l},_8:function(){return a}});var n=i(79783),s=i(3520),o=i(76543);const r=n.zx?1.5:1.35;class a{static createFromValidatedSettings(e,t,i){const n=e.get(49),s=e.get(53),o=e.get(52),r=e.get(51),l=e.get(54),c=e.get(67),d=e.get(64);return a._create(n,s,o,r,l,c,d,t,i)}static _create(e,t,i,n,l,c,d,h,u){0===c?c=r*i:c<8&&(c*=i),(c=Math.round(c))<8&&(c=8);const g=1+(u?0:.1*o.D.getZoomLevel());return i*=g,c*=g,l===s.r_.TRANSLATE&&("normal"===t||"bold"===t?l=s.r_.OFF:(l=`'wght' ${parseInt(t,10)}`,t="normal")),new a({pixelRatio:h,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,fontVariationSettings:l,lineHeight:c,letterSpacing:d})}constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.fontVariationSettings=e.fontVariationSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const e=s.jU.fontFamily,t=a._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class l extends a{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=2,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},82282:function(e,t,i){"use strict";i.d(t,{V:function(){return s},y:function(){return o}});var n=i(18116);class s{constructor(e){const t=(0,n.W)(e);this._defaultValue=t,this._asciiMap=s._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=(0,n.W)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class o{constructor(){this._actual=new s(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},39841:function(e,t,i){"use strict";i.d(t,{A:function(){return s}});var n=i(43920);class s{static _nextVisibleColumn(e,t,i){return 9===e?s.nextRenderTabStop(t,i):n.ne(e)||n.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const s=Math.min(t-1,e.length),o=e.substring(0,s),r=new n.km(o);let a=0;for(;!r.eol();){const e=n.Z5(o,s,r.offset);r.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const s=e.length,o=new n.km(e);let r=0,a=1;for(;!o.eol();){const l=n.Z5(e,s,o.offset);o.nextGraphemeLength();const c=this._nextVisibleColumn(l,r,i),d=o.offset+1;if(c>=t)return c-t{const i=e.getColor(o.YtV),n=e.getColor(a),s=n&&!n.isTransparent()?n:i;s&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${s}; }`)}))},64266:function(e,t,i){"use strict";function n(e){let t=0,i=0,n=0,s=0;for(let o=0,r=e.length;ot)throw new n.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=(0,r.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,r.lx)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let i=0,n=0,s=null;for(;i=o.startLineNumber?s=new a(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(t.push(s),s=o)}return null!==s&&t.push(s),new l(t)}subtractFrom(e){const t=(0,r.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return new l([e]);const n=[];let s=e.startLineNumber;for(let e=t;es&&n.push(new a(s,t.startLineNumber)),s=t.endLineNumberExclusive}return se.toString())).join(", ")}getIntersection(e){const t=[];let i=0,n=0;for(;it.delta(e))))}}},28376:function(e,t,i){"use strict";i.d(t,{L:function(){return s},h:function(){return o}});var n=i(20187);class s{static addRange(e,t){let i=0;for(;it))return new s(e,t)}static ofLength(e){return new s(0,e)}static ofStartAndLength(e,t){return new s(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new n.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new s(this.start+e,this.endExclusive+e)}deltaStart(e){return new s(this.start+e,this.endExclusive)}deltaEnd(e){return new s(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString())).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length),0)}}},62993:function(e,t,i){"use strict";i.d(t,{y:function(){return n}});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumberi||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return s.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return s.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return s.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return s.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return s.plusRange(this,e)}static plusRange(e,t){let i,n,o,r;return t.startLineNumbere.endLineNumber?(o=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,r=e.endColumn),new s(i,n,o,r)}intersectRanges(e){return s.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn;return ic?(o=c,r=d):o===c&&(r=Math.min(r,d)),i>o||i===o&&n>r?null:new s(i,n,o,r)}equalsRange(e){return s.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return s.getEndPosition(this)}static getEndPosition(e){return new n.y(e.endLineNumber,e.endColumn)}getStartPosition(){return s.getStartPosition(this)}static getStartPosition(e){return new n.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new s(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new s(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return s.collapseToStart(this)}static collapseToStart(e){return new s(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return s.collapseToEnd(this)}static collapseToEnd(e){return new s(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new s(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},56218:function(e,t,i){"use strict";i.d(t,{L:function(){return o}});var n=i(62993),s=i(40393);class o extends s.Q{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return o.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new o(this.startLineNumber,this.startColumn,e,t):new o(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new o(e,t,this.endLineNumber,this.endColumn):new o(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new o(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new o(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i0&&(65279===n[0]||65534===n[0])?function(e,t,i){const n=[];let s=0;for(let r=0;r=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i(0,n.Xo)(e,((e,t)=>e.range.getEndPosition().isBeforeOrEqual(t.range.getStartPosition())))))}apply(e){let t="",i=new o.y(1,1);for(const n of this.edits){const s=n.range,o=s.getStartPosition(),r=s.getEndPosition(),a=u(i,o);a.isEmpty()||(t+=e.getValueOfRange(a)),t+=n.text,i=r}const n=u(i,e.endPositionExclusive);return n.isEmpty()||(t+=e.getValueOfRange(n)),t}applyToString(e){const t=new p(e);return this.apply(t)}getNewRanges(){const e=[];let t=0,i=0,n=0;for(const s of this.edits){const r=a.W.ofText(s.text),l=o.y.lift({lineNumber:s.range.startLineNumber+i,column:s.range.startColumn+(s.range.startLineNumber===t?n:0)}),c=r.createRange(l);e.push(c),i=c.endLineNumber-s.range.endLineNumber,n=c.endColumn-s.range.endColumn,t=s.range.endLineNumber}return e}}class h{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}function u(e,t){if(e.lineNumber===t.lineNumber&&e.column===Number.MAX_SAFE_INTEGER)return c.Q.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new s.D7("start must be before end");return new c.Q(e.lineNumber,e.column,t.lineNumber,t.column)}class g{get endPositionExclusive(){return this.length.addToPosition(new o.y(1,1))}}class p extends g{constructor(e){super(),this.value=e,this._t=new l(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}},13233:function(e,t,i){"use strict";i.d(t,{W:function(){return o}});var n=i(62993),s=i(40393);class o{static{this.zero=new o(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new o(0,t.column-e.column):new o(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return o.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,i=0;for(const n of e)"\n"===n?(t++,i=0):i++;return new o(t,i)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new s.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new s.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new n.y(e.lineNumber,e.column+this.columnCount):new n.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},31634:function(e,t,i){"use strict";i.d(t,{R:function(){return n}});const n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}},59810:function(e,t,i){"use strict";i.d(t,{i:function(){return a}});var n=i(52732),s=i(82282);class o extends s.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let t=0,i=e.length;tt)break;i=n}return i}findNextIntlWordAtOrAfterOffset(e,t){for(const i of this._getIntlSegmenterWordsOnLine(e))if(!(i.index/?",r=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of o)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function a(e){let t=r;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const l=new s.w;function c(e,t,i,s,o){if(t=a(t),o||(o=n.f.first(l)),i.length>o.maxLen){let n=e-o.maxLen/2;return n<0?n=0:s+=n,c(e,t,i=i.substring(n,e+o.maxLen/2),s,o)}const r=Date.now(),h=e-1-s;let u=-1,g=null;for(let e=1;!(Date.now()-r>=o.timeBudget);e++){const n=h-o.windowSize*e;t.lastIndex=Math.max(0,n);const s=d(t,i,h,u);if(!s&&g)break;if(g=s,n<=0)break;u=n}if(g){const e={word:g[0],startColumn:s+1+g.index,endColumn:s+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function d(e,t,i,n){let s;for(;s=e.exec(t);){const t=s.index||0;if(t<=i&&e.lastIndex>=i)return s;if(n>0&&t>n)return null}return null}l.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},26397:function(e,t,i){"use strict";i.d(t,{s:function(){return s}});var n=i(39841);class s{static whitespaceVisibleColumn(e,t,i){const s=e.length;let o=0,r=-1,a=-1;for(let l=0;l=h.length+1)return!1;const u=h.charAt(d.column-2),g=n.get(u);if(!g)return!1;if((0,o.vG)(u)){if("never"===i)return!1}else if("never"===t)return!1;const p=h.charAt(d.column-1);let f=!1;for(const e of g)e.open===u&&e.close===p&&(f=!0);if(!f)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){const e=t.getLineContent(s.lineNumber),o=n.HG(e),a=-1===o?e.length+1:o+1;if(s.column<=a){const e=i.visibleColumnFromColumn(t,s),n=r.A.prevIndentTabStop(e,i.indentSize),o=i.columnFromVisibleColumn(t,s.lineNumber,n);return new l.Q(s.lineNumber,o,s.lineNumber,s.column)}}return l.Q.fromPositions(d.getPositionAfterDeleteLeft(s,t),s)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.Wd(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new c.y(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let r=null;i.sort(((e,t)=>c.y.compare(e.getStartPosition(),t.getEndPosition())));for(let o=0,a=i.length;o1&&r?.endLineNumber!==e.lineNumber?(i=e.lineNumber-1,c=t.getLineMaxColumn(e.lineNumber-1),d=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,c=1,d=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber));const u=new l.Q(i,c,d,h);r=u,u.isEmpty()?n[o]=null:n[o]=new s.iu(u,"")}else n[o]=null;else n[o]=new s.iu(a,"")}return new o.vY(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},66092:function(e,t,i){"use strict";i.d(t,{S:function(){return n},c:function(){return d}});var n,s=i(24219),o=i(30699),r=i(71792),a=i(40469),l=i(62993),c=i(40393);class d{static addCursorDown(e,t,i){const n=[];let s=0;for(let a=0,l=t.length;at&&(i=t,n=e.model.getLineMaxColumn(i)),o.MF.fromModelState(new o.mG(new c.Q(r.lineNumber,1,i,n),2,0,new l.y(i,n),0))}const d=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberd){const i=e.getLineCount();let n=a.lineNumber+1,s=1;return n>i&&(n=i,s=e.getLineMaxColumn(n)),o.MF.fromViewState(t.viewState.move(!0,n,s,0))}{const e=t.modelState.selectionStart.getEndPosition();return o.MF.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return o.MF.fromModelState(a.z.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new o.MF(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return o.MF.fromViewState(new o.mG(new c.Q(i,n,i,n),0,0,new l.y(i,n),0))}static moveTo(e,t,i,n,s){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,s)}const r=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new l.y(s.lineNumber,s.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return o.MF.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,s,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return 2===a?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return 2===a?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return 2===a?t.map((t=>o.MF.fromViewState(r.I.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>o.MF.fromModelState(r.I.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>o.MF.fromViewState(r.I.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>o.MF.fromModelState(r.I.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,s){const o=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 14:{const i=[];for(let s=0,r=t.length;si.endLineNumber-1?i.endLineNumber-1:so.MF.fromViewState(r.I.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let s=0,a=t.length;so.MF.fromViewState(r.I.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let s=0,a=t.length;se.getLineMinColumn(t.lineNumber))return t.delta(void 0,-n.MV(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new o.y(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),r=a.s.atomicPosition(s,t.column-1,i,0);if(-1!==r&&r+1>=n)return new o.y(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,i,e.tabSize):d.leftPosition(t,i);return new c(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let o,r;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(s-1)),a=t.normalizePosition(d.clipPositionColumn(n,t),0),l=d.left(e,t,a);o=l.lineNumber,r=l.column}return i.move(n,o,r,0)}static clipPositionColumn(e,t){return new o.y(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return iu?(i=u,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,h),r=f?0:h-s.A.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==d){const e=new o.y(i,n),s=t.normalizePosition(e,d);r+=n-s.column,i=s.lineNumber,n=s.column}return new c(i,n,r)}static down(e,t,i,n,s,o,r){return this.vertical(e,t,i,n,s,i+o,r,4)}static moveDown(e,t,i,n,s){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l,c=0;do{if(l=d.down(e,t,r+c,a,i.leftoverVisibleColumns,s,!0),t.normalizePosition(new o.y(l.lineNumber,l.column),2).lineNumber>r)break}while(c++<10&&r+c1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){const s=t.getLineCount();let o=i.position.lineNumber;for(;oB(e,t),unshiftIndent:t=>W(e,t)},e.languageConfigurationService);if(null===s)return null;const o=(0,g.Cw)(t,i.startLineNumber,i.startColumn);return s===e.normalizeIndentation(o)?null:s}static _getIndentationAndAutoClosingPairEdits(e,t,i,n,s){const o=i.map((({selection:i,indentation:o})=>{if(null!==s){const r=this._getEditFromIndentationAndSelection(e,t,o,i,n,!1);return new M(r,i,n,s)}{const s=this._getEditFromIndentationAndSelection(e,t,o,i,n,!0);return F(s.range,s.text,!1)}}));return new l.vY(4,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _getEditFromIndentationAndSelection(e,t,i,n,s,o=!0){const r=n.startLineNumber,a=t.getLineFirstNonWhitespaceColumn(r);let l=e.normalizeIndentation(i);return 0!==a&&(l+=t.getLineContent(r).substring(a-1,n.startColumn-1)),l+=o?s:"",{range:new d.Q(r,1,n.endLineNumber,n.endColumn),text:l}}}class v{static getEdits(e,t,i,n,s,o){if(O(t,i,n,s,o))return this._runAutoClosingOvertype(e,n,o)}static _runAutoClosingOvertype(e,t,i){const n=[];for(let e=0,s=t.length;enew o.iu(new d.Q(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new l.vY(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}}class w{static getEdits(e,t,i,n,s,o){if(!o){const o=this.getAutoClosingPairClose(e,t,i,n,s);if(null!==o)return this._runAutoClosingOpenCharType(i,n,s,o)}}static _runAutoClosingOpenCharType(e,t,i,n){const s=[];for(let o=0,r=e.length;o{const t=e.getPosition();return s?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),r=this._findAutoClosingPairOpen(e,t,o.map((e=>new h.y(e.lineNumber,e.beforeColumn))),n);if(!r)return null;let a,d;if((0,l.vG)(n)?(a=e.autoClosingQuotes,d=e.shouldAutoCloseBefore.quote):e.blockCommentStartToken&&r.open.includes(e.blockCommentStartToken)?(a=e.autoClosingComments,d=e.shouldAutoCloseBefore.comment):(a=e.autoClosingBrackets,d=e.shouldAutoCloseBefore.bracket),"never"===a)return null;const u=this._findContainedAutoClosingPair(e,r),g=u?u.close:"";let f=!0;for(const i of o){const{lineNumber:s,beforeColumn:o,afterColumn:l}=i,h=t.getLineContent(s),u=h.substring(0,o-1),m=h.substring(l-1);if(m.startsWith(g)||(f=!1),m.length>0){const t=m.charAt(0);if(!this._isBeforeClosingBrace(e,m)&&!d(t))return null}if(1===r.open.length&&("'"===n||'"'===n)&&"always"!==a){const t=(0,c.i)(e.wordSeparators,[]);if(u.length>0){const e=u.charCodeAt(u.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(s))return null;t.tokenization.forceTokenization(s);const _=t.tokenization.getLineTokens(s),v=(0,p.BQ)(_,o-1);if(!r.shouldAutoClose(v,o-v.firstCharOffset))return null;const b=r.findNeutralCharacter();if(b){const e=t.tokenization.getTokenTypeIfInsertingCharacter(s,o,b);if(!r.isOK(e))return null}}return f?r.close.substring(0,r.close.length-g.length):r.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!s||e.open.length>s.open.length)&&(s=e);return s}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(const e of s)if(null===o||e.open.length>o.open.length){let s=!0;for(const o of i)if(t.getValueInRange(new d.Q(o.lineNumber,o.column-e.open.length+1,o.lineNumber,o.column))+n!==e.open){s=!1;break}s&&(o=e)}return o}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],o=n.some((e=>t.startsWith(e.open))),r=s.some((e=>t.startsWith(e.close)));return!o&&r}}class C{static getEdits(e,t,i,n,s){if(!s&&this._isSurroundSelectionType(e,t,i,n))return this._runSurroundSelectionType(e,i,n)}static _runSurroundSelectionType(e,t,i){const n=[];for(let s=0,o=t.length;s=4){const r=(0,f.MU)(e.autoIndent,t,n,{unshiftIndent:t=>W(e,t),shiftIndent:t=>B(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition());const l=n.endColumn,c=t.getLineContent(n.endLineNumber),d=s.HG(c);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new o.q2(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new o.iP(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return F(n,"\n"+e.normalizeIndentation(l),i)}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];const n=[];for(let s=0,r=i.length;sthis._compositionType(i,e,s,o,r,a)));return new l.vY(4,c,{shouldPushStackElementBefore:R(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),h=new d.Q(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(h)===i&&0===r?null:new o.iP(h,i,0,r)}}class D{static getEdits(e,t,i){const n=[];for(let e=0,s=t.length;e1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(s.lT(e)>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),a=(0,m.h)(e.autoIndent,t,new d.Q(n,r,n,r),e.languageConfigurationService);a&&(o=a.indentation+a.appendText)}return n&&(n===u.l.Indent&&(o=B(e,o)),n===u.l.Outdent&&(o=W(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const r=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,r),n=e.indentSize,o=n-i%n;for(let e=0;e2?c.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t=0;o--){const i=e.charCodeAt(o),r=t.get(i);if(s&&o===s.index)return this._createIntlWord(s,r);if(0===r){if(2===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const s=t.findNextIntlWordAtOrAfterOffset(e,n),o=e.length;for(let r=n;r=0;o--){const n=e.charCodeAt(o),r=t.get(n);if(s&&o===s.index)return o;if(1===r)return o+1;if(1===i&&2===r)return o+1;if(2===i&&0===r)return o+1}return 0}static moveWordLeft(e,t,i,n,s){let o=i.lineNumber,r=i.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let l=c._findPreviousWordOnLine(e,t,new a.y(o,r));if(0===n)return new a.y(o,l?l.start+1:1);if(1===n)return!s&&l&&2===l.wordType&&l.end-l.start==1&&0===l.nextCharClass&&(l=c._findPreviousWordOnLine(e,t,new a.y(o,l.start+1))),new a.y(o,l?l.start+1:1);if(3===n){for(;l&&2===l.wordType;)l=c._findPreviousWordOnLine(e,t,new a.y(o,l.start+1));return new a.y(o,l?l.start+1:1)}return l&&r<=l.end+1&&(l=c._findPreviousWordOnLine(e,t,new a.y(o,l.start+1))),new a.y(o,l?l.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,s=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.y(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=o.charCodeAt(e-2),r=o.charCodeAt(e-1);if(95===t&&95!==r)return new a.y(i,e);if(45===t&&45!==r)return new a.y(i,e);if((n.Lv(t)||n.DB(t))&&n.Wv(r))return new a.y(i,e);if(n.Wv(t)&&n.Wv(r)&&e+1=l.start+1&&(l=c._findNextWordOnLine(e,t,new a.y(s,l.end+1))),o=l?l.start+1:t.getLineMaxColumn(s);return new a.y(s,o)}static _moveWordPartRight(e,t){const i=t.lineNumber,s=e.getLineMaxColumn(i);if(t.column===s)return i1?u=1:(h--,u=n.getLineMaxColumn(h)):(g&&u<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new a.y(h,g.start+1))),g?u=g.end+1:u>1?u=1:(h--,u=n.getLineMaxColumn(h))),new l.Q(h,u,d.lineNumber,d.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.y(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,s))return null;let o=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,o))return null;for(;s>0&&this._charAtIsWhitespace(i,s-1);)s--;for(;o+11?new l.Q(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.Q(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,o=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},d=c._findPreviousWordOnLine(e,t,i);if(d&&o(d))return a(d);const h=c._findNextWordOnLine(e,t,i);return h&&o(h)?a(h):d&&h?r(d.end+1,h.start+1):d?r(d.start+1,d.end+1):h?r(h.start+1,h.end+1):r(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new l.Q(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=p.start+1&&(p=c._findNextWordOnLine(i,n,new a.y(d,p.end+1))),p?h=p.start+1:hBoolean(e)))}},30699:function(e,t,i){"use strict";i.d(t,{MF:function(){return g},d$:function(){return u},mG:function(){return m},vG:function(){return v},vY:function(){return _}});var n=i(62993),s=i(40393),o=i(56218),r=i(38364),a=i(39841),l=i(6947);const c=()=>!0,d=()=>!1,h=e=>" "===e||"\t"===e;class u{static shouldRecreate(e){return e.hasChanged(146)||e.hasChanged(132)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(129)||e.hasChanged(50)||e.hasChanged(92)||e.hasChanged(131)}constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const s=i.options,o=s.get(146),r=s.get(50);this.readOnly=s.get(92),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(117),this.lineHeight=r.lineHeight,this.typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=s.get(129),this.wordSeparators=s.get(132),this.emptySelectionClipboard=s.get(37),this.copyWithSyntaxHighlighting=s.get(25),this.multiCursorMergeOverlapping=s.get(77),this.multiCursorPaste=s.get(79),this.multiCursorLimit=s.get(80),this.autoClosingBrackets=s.get(6),this.autoClosingComments=s.get(7),this.autoClosingQuotes=s.get(11),this.autoClosingDelete=s.get(9),this.autoClosingOvertype=s.get(10),this.autoSurround=s.get(14),this.autoIndent=s.get(12),this.wordSegmenterLocales=s.get(131),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const a=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(a)for(const e of a)this.surroundingPairs[e.open]=e.close;const l=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=l?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};const e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=(0,r.BQ)(t,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.P)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return h;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return c;case"never":return d}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return a.A.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=a.A.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),s=e.getLineMinColumn(t);if(no?o:n}}class g{static fromModelState(e){return new p(e)}static fromViewState(e){return new f(e)}static fromModelSelection(e){const t=o.L.liftSelection(e),i=new m(s.Q.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i{i.push(a.fromOffsetPairs(e?e.getEndExclusives():l.zero,n?n.getStarts():new l(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),i}static fromOffsetPairs(e,t){return new a(new o.L(e.offset1,t.offset1),new o.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const i of e){if(t&&!(t.seq1Range.endExclusive<=i.seq1Range.start&&t.seq2Range.endExclusive<=i.seq2Range.start))throw new s.D7("Sequence diffs must be sorted");t=i}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new a(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new a(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new a(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new a(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new a(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(t&&i)return new a(t,i)}getStarts(){return new l(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new l(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class l{static{this.zero=new l(0,0)}static{this.max=new l(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new l(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class c{static{this.instance=new c}isValid(){return!0}}class d{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new s.D7("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&c>0&&3===o.get(r-1,c-1)&&(u+=a.get(r-1,c-1)),u+=n?n(r,c):1):u=-1;const g=Math.max(d,h,u);if(g===u){const e=r>0&&c>0?a.get(r-1,c-1):0;a.set(r,c,e+1),o.set(r,c,3)}else g===d?(a.set(r,c,0),o.set(r,c,1)):g===h&&(a.set(r,c,0),o.set(r,c,2));s.set(r,c,g)}const d=[];let h=e.length,u=t.length;function g(e,t){e+1===h&&t+1===u||d.push(new l.$8(new r.L(e+1,h),new r.L(t+1,u))),h=e,u=t}let p=e.length-1,f=t.length-1;for(;p>=0&&f>=0;)3===o.get(p,f)?(g(p,f),p--,f--):1===o.get(p,f)?p--:f--;return g(-1,-1),d.reverse(),new l.SL(d,!1)}}class g{compute(e,t,i=l.uY.instance){if(0===e.length||0===t.length)return l.SL.trivial(e,t);const n=e,s=t;function o(e,t){for(;en.length||u>s.length)continue;const g=o(l,u);c.set(h,g);const f=l===r?d.get(h+1):d.get(h-1);if(d.set(h,g!==l?new p(f,l,u,g-l):f),c.get(h)===n.length&&c.get(h)-h===s.length)break e}}let u=d.get(h);const g=[];let _=n.length,v=s.length;for(;;){const e=u?u.x+u.length:0,t=u?u.y+u.length:0;if(e===_&&t===v||g.push(new l.$8(new r.L(e,_),new r.L(t,v))),!u)break;_=u.x,v=u.y,u=u.prev}return g.reverse(),new l.SL(g,!1)}}class p{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class f{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class m{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var _=i(17191),v=i(64429),b=i(52732),w=i(62993);class C{constructor(e,t,i){this.lines=e,this.range=t,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let n=e[t-1],s=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(s=this.range.startColumn-1,n=n.substring(s)),this.lineStartOffsets.push(s);let o=0;if(!i){const e=n.trimStart();o=n.length-e.length,n=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const r=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-s-o,n.length):n.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=x(e>0?this.elements[e-1]:-1),i=x(et<=e)),n=e-this.firstElementOffsetByLineIdx[i];return new w.y(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+n+(0===n&&"left"===t?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const t=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(t)?a.Q.fromPositions(i,i):a.Q.fromPositions(t,i)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!y(this.elements[e]))return;let t=e;for(;t>0&&y(this.elements[t-1]);)t--;let i=e;for(;it<=e.start))??0,i=(0,v.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new r.L(t,i)}}function y(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const S={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function k(e){return S[e]}function x(e){return 10===e?8:13===e?7:d(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function L(e,t,i){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const n=(new g).compute(new C([e],new a.Q(1,1,1,e.length),!1),new C([t],new a.Q(1,1,1,t.length),!1),i);let s=0;const o=l.$8.invert(n.diffs,e.length);for(const t of o)t.seq1Range.forEach((t=>{d(e.charCodeAt(t))||s++}));const r=function(t){let i=0;for(let n=0;nt.length?e:t);return s/r>.6&&r>10}var D=i(76922);class E{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:N(this.lines[e-1]))+(e===this.lines.length?0:N(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function N(e){let t=0;for(;te===t)))return new I.p([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new I.p([new _.wm(new o.M(1,e.length+1),new o.M(1,t.length+1),[new _.q6(new a.Q(1,1,e.length,e[e.length-1].length+1),new a.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const c=0===i.maxComputationTimeMs?l.uY.instance:new l.aY(i.maxComputationTimeMs),d=!i.ignoreTrimWhitespace,h=new Map;function u(e){let t=h.get(e);return void 0===t&&(t=h.size,h.set(e,t)),t}const g=e.map((e=>u(e.trim()))),p=t.map((e=>u(e.trim()))),f=new E(g,e),m=new E(p,t),v=(()=>f.length+m.length<1700?this.dynamicProgrammingDiffing.compute(f,m,c,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(f,m,c))();let b=v.diffs,w=v.hitTimeout;b=(0,D.NC)(f,m,b),b=(0,D.X5)(f,m,b);const C=[],y=i=>{if(d)for(let n=0;ni.seq1Range.start-S==i.seq2Range.start-k)),y(i.seq1Range.start-S),S=i.seq1Range.endExclusive,k=i.seq2Range.endExclusive;const n=this.refineDiff(e,t,i,c,d);n.hitTimeout&&(w=!0);for(const e of n.mappings)C.push(e)}y(e.length-S);const x=T(C,e,t);let L=[];return i.computeMoves&&(L=this.computeMoves(x,e,t,g,p,c,d)),(0,s.Ft)((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const s of x){if(!s.innerChanges)return!1;for(const n of s.innerChanges)if(!(i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e)))return!1;if(!n(s.modified,t)||!n(s.original,e))return!1}return!0})),new I.p(x,L,w)}computeMoves(e,t,i,s,r,a,c){return function(e,t,i,s,r,a){let{moves:l,excludedChanges:c}=function(e,t,i,n){const s=[],o=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new h(e.original,t,e))),r=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new h(e.modified,i,e)))),a=new Set;for(const e of o){let t,i=-1;for(const n of r){const s=e.computeSimilarity(n);s>i&&(i=s,t=n)}if(i>.9&&t&&(r.delete(t),s.push(new _.WL(e.range,t.range)),a.add(e.source),a.add(t.source)),!n.isValid())return{moves:s,excludedChanges:a}}return{moves:s,excludedChanges:a}}(e,t,i,a);if(!a.isValid())return[];const d=function(e,t,i,s,r,a){const l=[],c=new b.db;for(const i of e)for(let e=i.original.startLineNumber;ee.modified.startLineNumber),n.U9));for(const t of e){let e=[];for(let n=t.modified.startLineNumber;n{for(const i of e)if(i.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&i.modifiedLineRange.endLineNumberExclusive+1===s.endLineNumberExclusive)return i.originalLineRange=new o.M(i.originalLineRange.startLineNumber,t.endLineNumberExclusive),i.modifiedLineRange=new o.M(i.modifiedLineRange.startLineNumber,s.endLineNumberExclusive),void r.push(i);const i={modifiedLineRange:s,originalLineRange:t};d.push(i),r.push(i)})),e=r}if(!a.isValid())return[]}d.sort((0,n.Hw)((0,n.VE)((e=>e.modifiedLineRange.length),n.U9)));const h=new o.S,u=new o.S;for(const e of d){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,i=h.subtractFrom(e.modifiedLineRange),n=u.subtractFrom(e.originalLineRange).getWithDelta(t),s=i.getIntersection(n);for(const e of s.ranges){if(e.length<3)continue;const i=e,n=e.delta(-t);l.push(new _.WL(n,i)),h.addRange(i),u.addRange(n)}}l.sort((0,n.VE)((e=>e.original.startLineNumber),n.U9));const g=new v.vJ(e);for(let t=0;te.original.startLineNumber<=i.original.startLineNumber)),c=(0,v.lx)(e,(e=>e.modified.startLineNumber<=i.modified.startLineNumber)),d=Math.max(i.original.startLineNumber-n.original.startLineNumber,i.modified.startLineNumber-c.modified.startLineNumber),p=g.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbers.length||t>r.length)break;if(h.contains(t)||u.contains(e))break;if(!L(s[e-1],r[t-1],a))break}for(b>0&&(u.addRange(new o.M(i.original.startLineNumber-b,i.original.startLineNumber)),h.addRange(new o.M(i.modified.startLineNumber-b,i.modified.startLineNumber))),w=0;ws.length||t>r.length)break;if(h.contains(t)||u.contains(e))break;if(!L(s[e-1],r[t-1],a))break}w>0&&(u.addRange(new o.M(i.original.endLineNumberExclusive,i.original.endLineNumberExclusive+w)),h.addRange(new o.M(i.modified.endLineNumberExclusive,i.modified.endLineNumberExclusive+w))),(b>0||w>0)&&(l[t]=new _.WL(new o.M(i.original.startLineNumber-b,i.original.endLineNumberExclusive+w),new o.M(i.modified.startLineNumber-b,i.modified.endLineNumberExclusive+w)))}return l}(e.filter((e=>!c.has(e))),s,r,t,i,a);return(0,n.E4)(l,d),l=function(e){if(0===e.length)return e;e.sort((0,n.VE)((e=>e.original.startLineNumber),n.U9));const t=[e[0]];for(let i=1;i=0&&r>=0&&o+r<=2?t[t.length-1]=n.join(s):t.push(s)}return t}(l),l=l.filter((e=>{const i=e.original.toOffsetRange().slice(t).map((e=>e.trim()));return i.join("\n").length>=15&&function(e){let t=0;for(const i of e)i.length>=2&&t++;return t}(i)>=2})),l=function(e,t){const i=new v.vJ(e);return t.filter((t=>(i.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber{const n=T(this.refineDiff(t,i,new l.$8(e.original.toOffsetRange(),e.modified.toOffsetRange()),a,c).mappings,t,i,!0);return new I.t(e,n)}))}refineDiff(e,t,i,n,s){var r;const a=(r=i,new _.WL(new o.M(r.seq1Range.start+1,r.seq1Range.endExclusive+1),new o.M(r.seq2Range.start+1,r.seq2Range.endExclusive+1))).toRangeMapping2(e,t),l=new C(e,a.originalRange,s),c=new C(t,a.modifiedRange,s),d=l.length+c.length<500?this.dynamicProgrammingDiffing.compute(l,c,n):this.myersDiffingAlgorithm.compute(l,c,n);let h=d.diffs;h=(0,D.NC)(l,c,h),h=(0,D.Lk)(l,c,h),h=(0,D.sq)(l,c,h),h=(0,D.Rl)(l,c,h);return{mappings:h.map((e=>new _.q6(l.translateRange(e.seq1Range),c.translateRange(e.seq2Range)))),hitTimeout:d.hitTimeout}}}function T(e,t,i,r=!1){const a=[];for(const s of(0,n.n)(e.map((e=>function(e,t,i){let n=0,s=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+n<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+n<=e.modifiedRange.endLineNumber&&(s=-1),e.modifiedRange.startColumn-1>=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+s&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+s&&(n=1);const r=new o.M(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+s),a=new o.M(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+s);return new _.wm(r,a,[e])}(e,t,i))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=s[0],t=s[s.length-1];a.push(new _.wm(e.original.join(t.original),e.modified.join(t.modified),s.map((e=>e.innerChanges[0]))))}return(0,s.Ft)((()=>{if(!r&&a.length>0){if(a[0].modified.startLineNumber!==a[0].original.startLineNumber)return!1;if(i.length-a[a.length-1].modified.endLineNumberExclusive!=t.length-a[a.length-1].original.endLineNumberExclusive)return!1}return(0,s.Xo)(a,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive0?i[n-1]:void 0,r=i[n],a=n+10&&(l=l.delta(c))}r.push(l)}return n.length>0&&r.push(n[n.length-1]),r}function l(e,t,i,n,s){let o=1;for(;e.seq1Range.start-o>=n.start&&e.seq2Range.start-o>=s.start&&i.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let r=0;for(;e.seq1Range.start+rl&&(l=c,a=n)}return e.delta(a)}function c(e,t,i){const n=[];for(const e of i){const t=n[n.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?n[n.length-1]=new o.$8(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):n.push(e)}return n}function d(e,t,i){const n=o.$8.invert(i,e.length),s=[];let r=new o._3(0,0);function a(i,a){if(i.offset10;){const i=n[0];if(!i.seq1Range.intersects(d.seq1Range)&&!i.seq2Range.intersects(d.seq2Range))break;const s=e.findWordContaining(i.seq1Range.start),r=t.findWordContaining(i.seq2Range.start),a=new o.$8(s,r),l=a.intersect(i);if(u+=l.seq1Range.length,g+=l.seq2Range.length,d=d.join(a),!(d.seq1Range.endExclusive>=i.seq1Range.endExclusive))break;n.shift()}u+g<2*(d.seq1Range.length+d.seq2Range.length)/3&&s.push(d),r=d.getEndExclusives()}for(;n.length>0;){const e=n.shift();e.seq1Range.isEmpty||(a(e.getStarts(),e),a(e.getEndExclusives().delta(-1),e))}return function(e,t){const i=[];for(;e.length>0||t.length>0;){const n=e[0],s=t[0];let o;o=n&&(!s||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=o.seq1Range.start?i[i.length-1]=i[i.length-1].join(o):i.push(o)}return i}(i,s)}function h(e,t,i){let n=i;if(0===n.length)return n;let o,r=0;do{o=!1;const a=[n[0]];for(let l=1;l5||i.seq1Range.length+i.seq2Range.length>5)}h(d,c)?(o=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(r++<10&&o);return n}function u(e,t,i){let r=i;if(0===r.length)return r;let a,l=0;do{a=!1;const d=[r[0]];for(let h=1;h5||o.length>500)return!1;const r=e.getText(o).trim();if(r.length>20||r.split(/\r\n|\r|\n/).length>1)return!1;const a=e.countLinesIn(i.seq1Range),l=i.seq1Range.length,c=t.countLinesIn(i.seq2Range),d=i.seq2Range.length,h=e.countLinesIn(n.seq1Range),p=n.seq1Range.length,f=t.countLinesIn(n.seq2Range),m=n.seq2Range.length;function _(e){return Math.min(e,130)}return Math.pow(Math.pow(_(40*a+l),1.5)+Math.pow(_(40*c+d),1.5),1.5)+Math.pow(Math.pow(_(40*h+p),1.5)+Math.pow(_(40*f+m),1.5),1.5)>74184.96480721243}p(g,u)?(a=!0,d[d.length-1]=d[d.length-1].join(u)):d.push(u)}r=d}while(l++<10&&a);const c=[];return(0,n.kj)(r,((t,i,n)=>{let r=i;function a(e){return e.length>0&&e.trim().length<=3&&i.seq1Range.length+i.seq2Range.length>100}const l=e.extendToFullLines(i.seq1Range),d=e.getText(new s.L(l.start,i.seq1Range.start));a(d)&&(r=r.deltaStart(-d.length));const h=e.getText(new s.L(i.seq1Range.endExclusive,l.endExclusive));a(h)&&(r=r.deltaEnd(h.length));const u=o.$8.fromOffsetPairs(t?t.getEndExclusives():o._3.zero,n?n.getStarts():o._3.max),g=r.intersect(u);c.length>0&&g.getStarts().equals(c[c.length-1].getEndExclusives())?c[c.length-1]=c[c.length-1].join(g):c.push(g)})),c}},52049:function(e,t,i){"use strict";i.d(t,{p:function(){return n},t:function(){return s}});class n{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class s{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}},17191:function(e,t,i){"use strict";i.d(t,{WL:function(){return l},q6:function(){return u},wm:function(){return h}});var n=i(20187),s=i(80487),o=i(62993),r=i(40393),a=i(30479);class l{static inverse(e,t,i){const n=[];let o=1,r=1;for(const t of e){const e=new l(new s.M(o,t.original.startLineNumber),new s.M(r,t.modified.startLineNumber));e.modified.isEmpty||n.push(e),o=t.original.endLineNumberExclusive,r=t.modified.endLineNumberExclusive}const a=new l(new s.M(o,t+1),new s.M(r,i+1));return a.modified.isEmpty||n.push(a),n}static clip(e,t,i){const n=[];for(const s of e){const e=s.original.intersect(t),o=s.modified.intersect(i);e&&!e.isEmpty&&o&&!o.isEmpty&&n.push(new l(e,o))}return n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new l(this.modified,this.original)}join(e){return new l(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new u(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new n.D7("not a valid diff");return new u(new r.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new r.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new u(new r.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new r.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(d(this.original.endLineNumberExclusive,e)&&d(this.modified.endLineNumberExclusive,t))return new u(new r.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new r.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new u(r.Q.fromPositions(new o.y(this.original.startLineNumber,1),c(new o.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),r.Q.fromPositions(new o.y(this.modified.startLineNumber,1),c(new o.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new u(r.Q.fromPositions(c(new o.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),c(new o.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),r.Q.fromPositions(c(new o.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),c(new o.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new n.D7}}function c(e,t){if(e.lineNumber<1)return new o.y(1,1);if(e.lineNumber>t.length)return new o.y(t.length,t[t.length-1].length+1);const i=t[e.lineNumber-1];return e.column>i.length+1?new o.y(e.lineNumber,i.length+1):e}function d(e,t){return e>=1&&e<=t.length}class h extends l{static fromRangeMappings(e){const t=s.M.join(e.map((e=>s.M.fromRangeInclusive(e.originalRange)))),i=s.M.join(e.map((e=>s.M.fromRangeInclusive(e.modifiedRange))));return new h(t,i,e)}constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){return new h(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new h(this.original,this.modified,[this.toRangeMapping()])}}class u{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new u(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new a.WR(this.originalRange,t)}}},19527:function(e,t,i){"use strict";i.d(t,{f:function(){return n}});class n{constructor(e,t,i,n,s,o,r){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=s,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}},48872:function(e,t,i){"use strict";i.d(t,{_:function(){return n}});const n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},49678:function(e,t,i){"use strict";i.d(t,{R:function(){return n}});var n,s=i(14374),o=i(97848);!function(e){e.editorSimpleInput=new o.N1("editorSimpleInput",!1,!0),e.editorTextFocus=new o.N1("editorTextFocus",!1,s.kg("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new o.N1("editorFocus",!1,s.kg("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new o.N1("textInputFocus",!1,s.kg("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new o.N1("editorReadonly",!1,s.kg("editorReadonly","Whether the editor is read-only")),e.inDiffEditor=new o.N1("inDiffEditor",!1,s.kg("inDiffEditor","Whether the context is a diff editor")),e.isEmbeddedDiffEditor=new o.N1("isEmbeddedDiffEditor",!1,s.kg("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),e.inMultiDiffEditor=new o.N1("inMultiDiffEditor",!1,s.kg("inMultiDiffEditor","Whether the context is a multi diff editor")),e.multiDiffEditorAllCollapsed=new o.N1("multiDiffEditorAllCollapsed",void 0,s.kg("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),e.hasChanges=new o.N1("diffEditorHasChanges",!1,s.kg("diffEditorHasChanges","Whether the diff editor has changes")),e.comparingMovedCode=new o.N1("comparingMovedCode",!1,s.kg("comparingMovedCode","Whether a moved code block is selected for comparison")),e.accessibleDiffViewerVisible=new o.N1("accessibleDiffViewerVisible",!1,s.kg("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),e.diffEditorRenderSideBySideInlineBreakpointReached=new o.N1("diffEditorRenderSideBySideInlineBreakpointReached",!1,s.kg("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),e.diffEditorInlineMode=new o.N1("diffEditorInlineMode",!1,s.kg("diffEditorInlineMode","Whether inline mode is active")),e.diffEditorOriginalWritable=new o.N1("diffEditorOriginalWritable",!1,s.kg("diffEditorOriginalWritable","Whether modified is writable in the diff editor")),e.diffEditorModifiedWritable=new o.N1("diffEditorModifiedWritable",!1,s.kg("diffEditorModifiedWritable","Whether modified is writable in the diff editor")),e.diffEditorOriginalUri=new o.N1("diffEditorOriginalUri","",s.kg("diffEditorOriginalUri","The uri of the original document")),e.diffEditorModifiedUri=new o.N1("diffEditorModifiedUri","",s.kg("diffEditorModifiedUri","The uri of the modified document")),e.columnSelection=new o.N1("editorColumnSelection",!1,s.kg("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new o.N1("editorHasSelection",!1,s.kg("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new o.N1("editorHasMultipleSelections",!1,s.kg("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new o.N1("editorTabMovesFocus",!1,s.kg("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new o.N1("isInEmbeddedEditor",!1,!0),e.canUndo=new o.N1("canUndo",!1,!0),e.canRedo=new o.N1("canRedo",!1,!0),e.hoverVisible=new o.N1("editorHoverVisible",!1,s.kg("editorHoverVisible","Whether the editor hover is visible")),e.hoverFocused=new o.N1("editorHoverFocused",!1,s.kg("editorHoverFocused","Whether the editor hover is focused")),e.stickyScrollFocused=new o.N1("stickyScrollFocused",!1,s.kg("stickyScrollFocused","Whether the sticky scroll is focused")),e.stickyScrollVisible=new o.N1("stickyScrollVisible",!1,s.kg("stickyScrollVisible","Whether the sticky scroll is visible")),e.standaloneColorPickerVisible=new o.N1("standaloneColorPickerVisible",!1,s.kg("standaloneColorPickerVisible","Whether the standalone color picker is visible")),e.standaloneColorPickerFocused=new o.N1("standaloneColorPickerFocused",!1,s.kg("standaloneColorPickerFocused","Whether the standalone color picker is focused")),e.inCompositeEditor=new o.N1("inCompositeEditor",void 0,s.kg("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new o.N1("editorLangId","",s.kg("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new o.N1("editorHasCompletionItemProvider",!1,s.kg("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new o.N1("editorHasCodeActionsProvider",!1,s.kg("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new o.N1("editorHasCodeLensProvider",!1,s.kg("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new o.N1("editorHasDefinitionProvider",!1,s.kg("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new o.N1("editorHasDeclarationProvider",!1,s.kg("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new o.N1("editorHasImplementationProvider",!1,s.kg("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new o.N1("editorHasTypeDefinitionProvider",!1,s.kg("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new o.N1("editorHasHoverProvider",!1,s.kg("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new o.N1("editorHasDocumentHighlightProvider",!1,s.kg("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new o.N1("editorHasDocumentSymbolProvider",!1,s.kg("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new o.N1("editorHasReferenceProvider",!1,s.kg("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new o.N1("editorHasRenameProvider",!1,s.kg("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new o.N1("editorHasSignatureHelpProvider",!1,s.kg("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new o.N1("editorHasInlayHintsProvider",!1,s.kg("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new o.N1("editorHasDocumentFormattingProvider",!1,s.kg("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new o.N1("editorHasDocumentSelectionFormattingProvider",!1,s.kg("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new o.N1("editorHasMultipleDocumentFormattingProvider",!1,s.kg("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new o.N1("editorHasMultipleDocumentSelectionFormattingProvider",!1,s.kg("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},23534:function(e,t,i){"use strict";i.d(t,{T:function(){return o},x:function(){return s}});const n=[];function s(e){n.push(e)}function o(){return n.slice(0)}},36138:function(e,t,i){"use strict";i.d(t,{x:function(){return n}});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;1&n&&(s+="font-style: italic;"),2&n&&(s+="font-weight: bold;");let o="";return 4&n&&(o+=" underline"),8&n&&(o+=" line-through"),o&&(s+=`text-decoration:${o};`),s}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}},71543:function(e,t,i){"use strict";i.d(t,{f:function(){return o}});var n=i(90562),s=i(68847);function o(e,t,i,r,a,l){if(Array.isArray(e)){let n=0;for(const s of e){const e=o(s,t,i,r,a,l);if(10===e)return e;e>n&&(n=e)}return n}if("string"==typeof e)return r?"*"===e?5:e===i?10:0:0;if(e){const{language:o,pattern:c,scheme:d,hasAccessToAllModels:h,notebookType:u}=e;if(!r&&!h)return 0;u&&a&&(t=a);let g=0;if(d)if(d===t.scheme)g=10;else{if("*"!==d)return 0;g=5}if(o)if(o===i)g=10;else{if("*"!==o)return 0;g=Math.max(g,5)}if(u)if(u===l)g=10;else{if("*"!==u||void 0===l)return 0;g=Math.max(g,5)}if(c){let e;if(e="string"==typeof c?c:{...c,base:(0,s.S8)(c.base)},e!==t.fsPath&&!(0,n.YW)(e,t.fsPath))return 0;g=10}return g}return 0}},35720:function(e,t,i){"use strict";i.d(t,{uB:function(){return D},HC:function(){return h},Kb:function(){return f},FX:function(){return g},rY:function(){return b},lO:function(){return N},M$:function(){return d},r4:function(){return E},qw:function(){return u},sm:function(){return R},v_:function(){return I},OV:function(){return x},YT:function(){return L},GE:function(){return w},WA:function(){return p},gP:function(){return k},ou:function(){return _},dG:function(){return M},$M:function(){return v},OB:function(){return T},PK:function(){return S},Iu:function(){return C}});var n=i(93231),s=i(54244),o=i(40393),r=i(80670),a=i(35114);class l{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,a.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const i=new c(this,e,t);return this._factories.set(e,i),(0,a.s)((()=>{const t=this._factories.get(e);t&&t===i&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class c extends a.jG{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var d,h,u,g,p,f,m=i(14374);class _{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class v{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class b{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}!function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(d||(d={})),function(e){const t=new Map;t.set(0,n.W.symbolMethod),t.set(1,n.W.symbolFunction),t.set(2,n.W.symbolConstructor),t.set(3,n.W.symbolField),t.set(4,n.W.symbolVariable),t.set(5,n.W.symbolClass),t.set(6,n.W.symbolStruct),t.set(7,n.W.symbolInterface),t.set(8,n.W.symbolModule),t.set(9,n.W.symbolProperty),t.set(10,n.W.symbolEvent),t.set(11,n.W.symbolOperator),t.set(12,n.W.symbolUnit),t.set(13,n.W.symbolValue),t.set(15,n.W.symbolEnum),t.set(14,n.W.symbolConstant),t.set(15,n.W.symbolEnum),t.set(16,n.W.symbolEnumMember),t.set(17,n.W.symbolKeyword),t.set(27,n.W.symbolSnippet),t.set(18,n.W.symbolText),t.set(19,n.W.symbolColor),t.set(20,n.W.symbolFile),t.set(21,n.W.symbolReference),t.set(22,n.W.symbolCustomColor),t.set(23,n.W.symbolFolder),t.set(24,n.W.symbolTypeParameter),t.set(25,n.W.account),t.set(26,n.W.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=n.W.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(h||(h={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(u||(u={}));class w{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return o.Q.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}function C(e){return e&&s.r.isUri(e.uri)&&o.Q.isIRange(e.range)&&(o.Q.isIRange(e.originSelectionRange)||o.Q.isIRange(e.targetSelectionRange))}!function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"}(g||(g={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(p||(p={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(f||(f={}));const y={17:(0,m.kg)("Array","array"),16:(0,m.kg)("Boolean","boolean"),4:(0,m.kg)("Class","class"),13:(0,m.kg)("Constant","constant"),8:(0,m.kg)("Constructor","constructor"),9:(0,m.kg)("Enum","enumeration"),21:(0,m.kg)("EnumMember","enumeration member"),23:(0,m.kg)("Event","event"),7:(0,m.kg)("Field","field"),0:(0,m.kg)("File","file"),11:(0,m.kg)("Function","function"),10:(0,m.kg)("Interface","interface"),19:(0,m.kg)("Key","key"),5:(0,m.kg)("Method","method"),1:(0,m.kg)("Module","module"),2:(0,m.kg)("Namespace","namespace"),20:(0,m.kg)("Null","null"),15:(0,m.kg)("Number","number"),18:(0,m.kg)("Object","object"),24:(0,m.kg)("Operator","operator"),3:(0,m.kg)("Package","package"),6:(0,m.kg)("Property","property"),14:(0,m.kg)("String","string"),22:(0,m.kg)("Struct","struct"),25:(0,m.kg)("TypeParameter","type parameter"),12:(0,m.kg)("Variable","variable")};function S(e,t){return(0,m.kg)("symbolAriaLabel","{0} ({1})",e,y[t])}var k,x,L,D,E;!function(e){const t=new Map;t.set(0,n.W.symbolFile),t.set(1,n.W.symbolModule),t.set(2,n.W.symbolNamespace),t.set(3,n.W.symbolPackage),t.set(4,n.W.symbolClass),t.set(5,n.W.symbolMethod),t.set(6,n.W.symbolProperty),t.set(7,n.W.symbolField),t.set(8,n.W.symbolConstructor),t.set(9,n.W.symbolEnum),t.set(10,n.W.symbolInterface),t.set(11,n.W.symbolFunction),t.set(12,n.W.symbolVariable),t.set(13,n.W.symbolConstant),t.set(14,n.W.symbolString),t.set(15,n.W.symbolNumber),t.set(16,n.W.symbolBoolean),t.set(17,n.W.symbolArray),t.set(18,n.W.symbolObject),t.set(19,n.W.symbolKey),t.set(20,n.W.symbolNull),t.set(21,n.W.symbolEnumMember),t.set(22,n.W.symbolStruct),t.set(23,n.W.symbolEvent),t.set(24,n.W.symbolOperator),t.set(25,n.W.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=n.W.symbolProperty),i}}(k||(k={}));class N{static{this.Comment=new N("comment")}static{this.Imports=new N("imports")}static{this.Region=new N("region")}static fromValue(e){switch(e){case"comment":return N.Comment;case"imports":return N.Imports;case"region":return N.Region}return new N(e)}constructor(e){this.value=e}}!function(e){e[e.AIGenerated=1]="AIGenerated"}(x||(x={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(L||(L={})),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(D||(D={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(E||(E={}));class I{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then((e=>{e&&e.dispose()}))}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const M=new l,T=new l;var R;!function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(R||(R={}))},78265:function(e,t,i){"use strict";i.d(t,{$f:function(){return a},MU:function(){return l},Yb:function(){return d},_t:function(){return c},vn:function(){return r}});var n=i(43920),s=i(30618),o=i(38884);function r(e,t,i,r=!0,a){if(e<4)return null;const l=a.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!l)return null;const c=new o.no(t,l,a);if(i<=1)return{indentation:"",action:null};for(let e=i-1;e>0&&""===t.getLineContent(e);e--)if(1===e)return{indentation:"",action:null};const d=function(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let s,o=-1;for(s=t-1;s>=1;s--){if(e.tokenization.getLanguageIdAtPosition(s,0)!==n)return o;const t=e.getLineContent(s);if(!i.shouldIgnore(s)&&!/^\s+$/.test(t)&&""!==t)return s;o=s}}return-1}(t,i,c);if(d<0)return null;if(d<1)return{indentation:"",action:null};if(c.shouldIncrease(d)||c.shouldIndentNextLine(d)){const e=t.getLineContent(d);return{indentation:n.UU(e),action:s.l.Indent,line:d}}if(c.shouldDecrease(d)){const e=t.getLineContent(d);return{indentation:n.UU(e),action:null,line:d}}{if(1===d)return{indentation:n.UU(t.getLineContent(d)),action:null,line:d};const e=d-1,i=l.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let t=e-1;t>0;t--)if(!c.shouldIndentNextLine(t)){i=t;break}return{indentation:n.UU(t.getLineContent(i+1)),action:null,line:i+1}}if(r)return{indentation:n.UU(t.getLineContent(d)),action:null,line:d};for(let e=d;e>0;e--){if(c.shouldIncrease(e))return{indentation:n.UU(t.getLineContent(e)),action:s.l.Indent,line:e};if(c.shouldIndentNextLine(e)){let i=0;for(let t=e-1;t>0;t--)if(!c.shouldIndentNextLine(e)){i=t;break}return{indentation:n.UU(t.getLineContent(i+1)),action:null,line:i+1}}if(c.shouldDecrease(e))return{indentation:n.UU(t.getLineContent(e)),action:null,line:e}}return{indentation:n.UU(t.getLineContent(1)),action:null,line:1}}}function a(e,t,i,a,l,c){if(e<4)return null;const d=c.getLanguageConfiguration(i);if(!d)return null;const h=c.getLanguageConfiguration(i).indentRulesSupport;if(!h)return null;const u=new o.no(t,h,c),g=r(e,t,a,void 0,c);if(g){const i=g.line;if(void 0!==i){let o=!0;for(let e=i;en===t?i:e.tokenization.getLineTokens(n),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:n=>n===t?i.getLineContent():e.getLineContent(n)}}(t,i.startLineNumber,g),m=(0,o.WR)(t,i.getStartPosition()),_=t.getLineContent(i.startLineNumber),v=n.UU(_),b=r(e,f,i.startLineNumber+1,void 0,l);if(!b){const e=m?v:p;return{beforeEnter:e,afterEnter:e}}let w=m?v:b.indentation;return b.action===s.l.Indent&&(w=a.shiftIndent(w)),d.shouldDecrease(u.getLineContent())&&(w=a.unshiftIndent(w)),{beforeEnter:m?v:p,afterEnter:w}}function c(e,t,i,a,l,c){const d=e.autoIndent;if(d<4)return null;if((0,o.WR)(t,i.getStartPosition()))return null;const h=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),u=c.getLanguageConfiguration(h).indentRulesSupport;if(!u)return null;const g=new o.V(t,c).getProcessedTokenContextAroundRange(i),p=g.beforeRangeProcessedTokens.getLineContent(),f=g.afterRangeProcessedTokens.getLineContent(),m=p+f,_=p+a+f;if(!u.shouldDecrease(m)&&u.shouldDecrease(_)){const e=r(d,t,i.startLineNumber,!1,c);if(!e)return null;let n=e.indentation;return e.action!==s.l.Indent&&(n=l.unshiftIndent(n)),n}const v=i.startLineNumber-1;if(v>0){const s=t.getLineContent(v);if(u.shouldIndentNextLine(s)&&u.shouldIncrease(_)){const s=r(d,t,i.startLineNumber,!1,c),o=s?.indentation;if(void 0!==o){const s=t.getLineContent(i.startLineNumber),r=n.UU(s),c=l.shiftIndent(o)===r,d=/^\s*$/.test(m),h=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(a),u=h&&h.length>0;if(c&&u&&d)return o}}}return null}function d(e,t,i){const n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}},7326:function(e,t,i){"use strict";i.d(t,{h:function(){return r}});var n=i(30618),s=i(8494),o=i(38884);function r(e,t,i,r){t.tokenization.forceTokenization(i.startLineNumber);const a=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),l=r.getLanguageConfiguration(a);if(!l)return null;const c=new o.V(t,r).getProcessedTokenContextAroundRange(i),d=c.previousLineProcessedTokens.getLineContent(),h=c.beforeRangeProcessedTokens.getLineContent(),u=c.afterRangeProcessedTokens.getLineContent(),g=l.onEnter(e,d,h,u);if(!g)return null;const p=g.indentAction;let f=g.appendText;const m=g.removeText||0;f?p===n.l.Indent&&(f="\t"+f):f=p===n.l.Indent||p===n.l.IndentOutdent?"\t":"";let _=(0,s.Cw)(t,i.startLineNumber,i.startColumn);return m&&(_=_.substring(0,_.length-m)),{indentAction:p,appendText:f,removeText:m,indentation:_}}},41750:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=(0,i(63619).u1)("languageService")},30618:function(e,t,i){"use strict";var n;i.d(t,{GB:function(){return o},i3:function(){return s},l:function(){return n}}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class s{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.i3(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.i3({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.i3({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}var c=i(97358),d=i(38364),h=i(82848);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return(0,c.dM)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,d.Yo)(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,r=h.Fu.findPrevBracketInRange(s,1,o,0,o.length);if(!r)return null;const a=o.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var f=i(20187);class m{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=m._createOpenBracketRegExp(e[0]),i=m._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,s=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return s.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e{const t=new Set;return{info:new L(this,e,t),closing:t}})),s=new y.VV((e=>{const t=new Set,i=new Set;return{info:new D(this,e,t,i),opening:t,openingColorized:i}}));for(const[e,t]of i){const i=n.get(e),o=s.get(t);i.closing.add(o.info),o.opening.add(i.info)}const o=t.colorizedBracketPairs?k(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of o){const i=n.get(e),o=s.get(t);i.closing.add(o.info),o.openingColorized.add(i.info),o.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...s.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return(0,h.xb)(t,e)}}function k(e){return e.filter((([e,t])=>""!==e&&""!==t))}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class L extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class D extends x{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var E=function(e,t){return function(i,n){t(i,n,e)}};class N{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const I=(0,_.u1)("languageConfigurationService");let M=class extends s.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new W),this.onDidChangeEmitter=this._register(new n.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(T));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new N(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new N(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new N(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let s=t.getLanguageConfiguration(e);if(!s){if(!n.isRegisteredLanguageId(e))return new H(e,{});s=new H(e,{})}const o=function(e,t){const i=t.getValue(T.brackets,{overrideIdentifier:e}),n=t.getValue(T.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:R(i),colorizedBracketPairs:R(n)}}(s.languageId,i),r=O([s.underlyingConfig,o]);return new H(s.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([E(0,v.pG),E(1,b.L)],M);const T={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function R(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function P(e,t,i){const n=e.getLineContent(t);let s=o.UU(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}class A{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new F(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,s.s)((()=>{for(let e=0;ee.configuration))))}}function O(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class F{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class B{constructor(e){this.languageId=e}}class W extends s.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(C.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new A(e),this._entries.set(e,n));const o=n.register(t,i);return this._onDidChange.fire(new B(e)),(0,s.s)((()=>{o.dispose(),this._onDidChange.fire(new B(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class H{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new m(this.underlyingConfig):null,this.comments=H._handleComments(this.underlyingConfig),this.characterPair=new l(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new h.az(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.GB(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,w.v)(I,M,1)},11521:function(e,t,i){"use strict";i.d(t,{W6:function(){return l},vH:function(){return c}});var n=i(14374),s=i(80670),o=i(56419),r=i(5940),a=i(16434);const l=new class{constructor(){this._onDidChangeLanguages=new s.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t>>0,new n.rY(i,null===t?s:t)}},38364:function(e,t,i){"use strict";function n(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n);let r=n;for(;r+10&&e.getLanguageId(a-1)===o;)a--;return new s(e,o,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{BQ:function(){return n},Yo:function(){return o}});class s{constructor(e,t,i,n,s,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=o,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function o(e){return!!(3&e)}},38884:function(e,t,i){"use strict";i.d(t,{V:function(){return a},WR:function(){return c},no:function(){return r}});var n=i(43920),s=i(38364),o=i(44425);class r{constructor(e,t,i){this._indentRulesSupport=t,this._indentationLineProcessor=new l(e,i)}shouldIncrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(i)}shouldDecrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(i)}shouldIgnore(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(i)}shouldIndentNextLine(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(i)}}class a{constructor(e,t){this.model=e,this.indentationLineProcessor=new l(e,t)}getProcessedTokenContextAroundRange(e){return{beforeRangeProcessedTokens:this._getProcessedTokensBeforeRange(e),afterRangeProcessedTokens:this._getProcessedTokensAfterRange(e),previousLineProcessedTokens:this._getProcessedPreviousLineTokens(e)}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);const t=this.model.tokenization.getLineTokens(e.startLineNumber),i=(0,s.BQ)(t,e.startColumn-1);let n;if(c(this.model,e.getStartPosition())){const s=e.startColumn-1-i.firstCharOffset,o=i.firstCharOffset,r=o+s;n=t.sliceAndInflate(o,r,0)}else{const i=e.startColumn-1;n=t.sliceAndInflate(0,i,0)}return this.indentationLineProcessor.getProcessedTokens(n)}_getProcessedTokensAfterRange(e){const t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);const i=this.model.tokenization.getLineTokens(t.lineNumber),n=(0,s.BQ)(i,t.column-1),o=t.column-1-n.firstCharOffset,r=n.firstCharOffset+o,a=n.firstCharOffset+n.getLineLength(),l=i.sliceAndInflate(r,a,0);return this.indentationLineProcessor.getProcessedTokens(l)}_getProcessedPreviousLineTokens(e){this.model.tokenization.forceTokenization(e.startLineNumber);const t=this.model.tokenization.getLineTokens(e.startLineNumber),i=(0,s.BQ)(t,e.startColumn-1),n=o.f.createEmpty("",i.languageIdCodec),r=e.startLineNumber-1;if(0===r)return n;if(0!==i.firstCharOffset)return n;const a=(e=>{this.model.tokenization.forceTokenization(e);const t=this.model.tokenization.getLineTokens(e),i=this.model.getLineMaxColumn(e)-1;return(0,s.BQ)(t,i)})(r);if(i.languageId!==a.languageId)return n;const l=a.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(l)}}class l{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){this.model.tokenization.forceTokenization?.(e);const i=this.model.tokenization.getLineTokens(e);let s=this.getProcessedTokens(i).getLineContent();return void 0!==t&&(s=((e,t)=>{const i=n.UU(e);return t+e.substring(i.length)})(s,t)),s}getProcessedTokens(e){const t=e.getLanguageId(0),i=this.languageConfigurationService.getLanguageConfiguration(t).bracketsNew.getBracketRegExp({global:!0}),n=[];return e.forEach((t=>{const s=e.getStandardTokenType(t);let o=e.getTokenText(t);(e=>2===e||3===e||1===e)(s)&&(o=o.replace(i,""));const r=e.getMetadata(t);n.push({text:o,metadata:r})})),o.f.createFromTextAndMetadata(n,e.languageIdCodec)}}function c(e,t){e.tokenization.forceTokenization(t.lineNumber);const i=e.tokenization.getLineTokens(t.lineNumber),n=(0,s.BQ)(i,t.column-1),o=0===n.firstCharOffset,r=i.getLanguageId(0)===n.languageId;return!o&&!r}},82848:function(e,t,i){"use strict";i.d(t,{Fu:function(){return p},az:function(){return a},xb:function(){return u}});var n=i(43920),s=i(52192),o=i(40393);class r{constructor(e,t,i,n,s,o){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=o,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[s,o]=t;return i===s||i===o||n===s||n===o},s=(e,n)=>{const s=Math.min(e,n),o=Math.max(e,n);for(let e=0;e0&&o.push({open:s,close:r})}return o}(t);this.brackets=i.map(((t,n)=>new r(e,n,t.open,t.close,function(e,t,i,n){let s=[];s=s.concat(e),s=s.concat(t);for(let e=0,t=s.length;e=0&&n.push(t);for(const t of o.close)t.indexOf(e)>=0&&n.push(t)}}function c(e,t){return e.length-t.length}function d(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function h(e){const t=/^[\w ]+$/.test(e);return e=n.bm(e),t?`\\b${e}\\b`:e}function u(e,t){const i=`(${e.map(h).join(")|(")})`;return n.OS(i,!0,t)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return s.b7().decode(t)}(e)),t}}();class p{static _findPrevBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=i.length-(s.index||0),a=s[0].length,l=n+r;return new o.Q(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const o=g(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,o,n)}static findNextBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=s.index||0,a=s[0].length;if(0===a)return null;const l=n+r;return new o.Q(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}},55878:function(e,t,i){"use strict";i.d(t,{Yj:function(){return l},s0:function(){return c}});var n=i(43920),s=i(44425),o=i(35720),r=i(5032);const a={getInitialState:()=>r.r3,tokenizeEncoded:(e,t,i)=>(0,r.Lh)(0,i)};async function l(e,t,i){if(!i)return d(t,e.languageIdCodec,a);const n=await o.dG.getOrCreate(i);return d(t,e.languageIdCodec,n||a)}function c(e,t,i,n,s,o,r){let a="
    ",l=n,c=0,d=!0;for(let h=0,u=t.getCount();h0;)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,u>s||l>=s)break}return a+="
    ",a}function d(e,t,i){let o='
    ';const r=n.uz(e);let a=i.getInitialState();for(let e=0,l=r.length;e0&&(o+="
    ");const c=i.tokenizeEncoded(l,!0,a);s.f.convertToEndOffset(c.tokens,l.length);const d=new s.f(c.tokens,l,t).inflate();let h=0;for(let e=0,t=d.getCount();e${n.ih(l.substring(h,i))}`,h=i}a=c.endState}return o+="
    ",o}},62067:function(e,t,i){"use strict";i.d(t,{A5:function(){return n},Dg:function(){return l},F4:function(){return u},L5:function(){return h},VW:function(){return o},Wo:function(){return d},X2:function(){return a},ZS:function(){return s},nk:function(){return c},vd:function(){return g}});var n,s,o,r=i(49134);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(s||(s={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(o||(o={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,r.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"==typeof e.read}class d{constructor(e,t,i,n,s,o){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=o}}class h{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class u{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},14799:function(e,t,i){"use strict";i.d(t,{Gc:function(){return v},Nn:function(){return l},Xw:function(){return c},rh:function(){return _},yF:function(){return m}});var n=i(20187),s=i(39841),o=i(91727),r=i(24536);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,o.QB)(n,t.length)),i&&(n=(0,o.QB)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.gV.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,s){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,o.QB)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class c extends a{static create23(e,t,i,n=!1){let s=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(s=(0,o.QB)(s,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");s=(0,o.QB)(s,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new h(s,e.listHeight+1,e,t,i,r):new d(s,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(o.Vp,0,[],r.gV.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new n.D7;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n{const t=n.Q.lift(e.range);return new o((0,s.VL)(t.getStartPosition()),(0,s.VL)(t.getEndPosition()),(0,s.rR)(e.text))})).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${(0,s.l4)(this.startOffset)}...${(0,s.l4)(this.endOffset)}) -> ${(0,s.l4)(this.newLength)}`}}class r{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>a.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:(0,s.MS)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,s.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,s.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=(0,s.l4)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,s.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,s.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdxfunction(e){let t=(0,n.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class c{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},60824:function(e,t,i){"use strict";i.d(t,{M:function(){return r}});var n=i(97358),s=i(96750),o=i(91727);function r(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new n.j3(l(e)),r=l(t);r.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let c=i.dequeue();function d(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return c&&e.unshift(c),e}const t=[];for(;c&&!(0,o.Vh)(e);){const[n,s]=c.splitAt(e);t.push(n),e=(0,o.MS)(n.lengthAfter,e),c=s??i.dequeue()}return(0,o.Vh)(e)||t.push(new a(!1,e,e)),t}const h=[];function u(e,t,i){if(h.length>0&&(0,o.wP)(h[h.length-1].endOffset,e)){const e=h[h.length-1];h[h.length-1]=new s.c(e.startOffset,t,(0,o.QB)(e.newLength,i))}else h.push({startOffset:e,endOffset:t,newLength:i})}let g=o.Vp;for(const e of r){const t=d(e.lengthBefore);if(e.modified){const i=(0,o.pW)(t,(e=>e.lengthBefore)),n=(0,o.QB)(g,i);u(g,n,e.lengthAfter),g=n}else for(const e of t){const t=g;g=(0,o.QB)(g,e.lengthBefore),e.modified&&u(t,g,e.lengthAfter)}}return h}class a{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=(0,o.MS)(e,this.lengthAfter);return(0,o.wP)(t,o.Vp)?[this,void 0]:this.modified?[new a(this.modified,this.lengthBefore,e),new a(this.modified,o.Vp,t)]:[new a(this.modified,e,e),new a(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${(0,o.l4)(this.lengthBefore)} -> ${(0,o.l4)(this.lengthAfter)}`}}function l(e){const t=[];let i=o.Vp;for(const n of e){const e=(0,o.MS)(i,n.startOffset);(0,o.Vh)(e)||t.push(new a(!1,e,e));const s=(0,o.MS)(n.startOffset,n.endOffset);t.push(new a(!0,s,n.newLength)),i=n.endOffset}return t}},91727:function(e,t,i){"use strict";i.d(t,{C7:function(){return r},MS:function(){return _},QB:function(){return p},Qx:function(){return y},VL:function(){return C},Vh:function(){return l},Vp:function(){return a},eu:function(){return u},l4:function(){return h},o0:function(){return w},pW:function(){return f},qe:function(){return d},rR:function(){return S},sS:function(){return g},vr:function(){return b},wP:function(){return m},zG:function(){return v}});var n=i(43920),s=i(40393),o=i(13233);function r(e,t,i,n){return e!==i?d(i-e,n):d(0,n-t)}const a=0;function l(e){return 0===e}const c=2**26;function d(e,t){return e*c+t}function h(e){const t=e,i=Math.floor(t/c),n=t-i*c;return new o.W(i,n)}function u(e){return Math.floor(e/c)}function g(e){return e}function p(e,t){let i=e+t;return t>=c&&(i-=e%c),i}function f(e,t){return e.reduce(((e,i)=>p(e,t(i))),a)}function m(e,t){return e===t}function _(e,t){const i=e,n=t;if(n-i<=0)return a;const s=Math.floor(i/c),o=Math.floor(n/c),r=n-o*c;return s===o?d(0,r-(i-s*c)):d(o-s,r)}function v(e,t){return e=t}function C(e){return d(e.lineNumber-1,e.column-1)}function y(e,t){const i=e,n=Math.floor(i/c),o=i-n*c,r=t,a=Math.floor(r/c),l=r-a*c;return new s.Q(n+1,o+1,a+1,l+1)}function S(e){const t=(0,n.uz)(e);return d(t.length-1,t[t.length-1].length)}},4138:function(e,t,i){"use strict";i.d(t,{T:function(){return g}});var n=i(14799),s=i(96750),o=i(24536),r=i(91727);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const s=i>>1;for(let o=0;o=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function c(e,t){return e.listHeight===t.listHeight?n.Xw.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const s=[];let o;for(;;){if(t.listHeight===i.listHeight){o=t;break}if(4!==i.kind)throw new Error("unexpected");s.push(i),i=i.makeLastElementMutable()}for(let e=s.length-1;e>=0;e--){const t=s[e];o?t.childrenLength>=3?o=n.Xw.create23(t.unappendChild(),o,null,!1):(t.appendChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?n.Xw.create23(e,o,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const s=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");s.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=s.length-1;e>=0;e--){const t=s[e];o?t.childrenLength>=3?o=n.Xw.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?n.Xw.create23(o,e,null,!1):e}(t,e)}class d{constructor(e){this.lastOffset=r.Vp,this.nextNodes=[e],this.offsets=[r.Vp],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.zG)(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=u(this.nextNodes);if(!i)return;const n=u(this.offsets);if((0,r.zG)(e,n))return;if((0,r.zG)(n,e))if((0,r.QB)(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=h(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=h(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=u(this.offsets),t=u(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=u(this.nextNodes),n=h(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.QB)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function h(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function u(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){return new p(e,t,i,n).parseDocument()}class p{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new d(i):void 0,this.positionMapper=new s.W(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(o.gV.getEmpty(),0);return e||(e=n.Xw.getEmpty()),e}parseList(e,t){const i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),s=i();if(!s)return n;for(let e=i();e;e=i())l(n,s)<=l(s,e)?(n=c(n,s),s=e):s=c(s,e);return c(n,s)}(i):a(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.Vh)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!(null!==t&&!(0,r.zG)(i.length,t))&&i.canBeReused(e)));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new n.Gc(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new n.yF(i.length);const s=e.merge(i.bracketIds),o=this.parseList(s,t+1),r=this.tokenizer.peek();return r&&2===r.kind&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),n.Nn.create(i.astNode,o,r.astNode)):n.Nn.create(i.astNode,o,null)}default:throw new Error("unexpected")}}}},24536:function(e,t,i){"use strict";i.d(t,{FD:function(){return o},Mg:function(){return r},gV:function(){return s}});const n=[];class s{static{this.cache=new Array(129)}static create(e,t){if(e<=128&&0===t.length){let i=s.cache[e];return i||(i=new s(e,t),s.cache[e]=i),i}return new s(e,t)}static{this.empty=s.create(0,n)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,o=n.getCount();let a=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(0,r.C7)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.gV.getEmpty(),new o.yF(n))}}class h{constructor(e,t){this.text=e,this._offset=r.Vp,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,s=[];let c,d=0,h=0,u=0,g=0;const p=[];for(let e=0;e<60;e++)p.push(new l((0,r.qe)(0,e),0,-1,a.gV.getEmpty(),new o.yF((0,r.qe)(0,e))));const f=[];for(let e=0;e<60;e++)f.push(new l((0,r.qe)(1,e),0,-1,a.gV.getEmpty(),new o.yF((0,r.qe)(1,e))));if(n)for(n.lastIndex=0;null!==(c=n.exec(e));){const e=c.index,i=c[0];if("\n"===i)d++,h=e+1;else{if(u!==e){let t;if(g===d){const i=e-u;if(i0&&(this.changes=(0,a.x)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.Sw(e,t?t.length:0,i),i+=4,t)for(const n of t)l.Sw(e,n.selectionStartLineNumber,i),i+=4,l.Sw(e,n.selectionStartColumn,i),i+=4,l.Sw(e,n.positionLineNumber,i),i+=4,l.Sw(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.bb(e,t);t+=4;for(let s=0;se.toString())).join(", ")}matchesResource(e){return(r.r.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof h}append(e,t,i,n,s){this._data instanceof h&&this._data.append(e,t,i,n,s)}close(){this._data instanceof h&&(this._data=this._data.serialize())}open(){this._data instanceof h||(this._data=h.deserialize(this._data))}undo(){if(r.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof h&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=d(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=d(e);return this._editStackElementsMap.has(t)}setModel(e){const t=d(r.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=d(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,s){const o=d(e.uri);this._editStackElementsMap.get(o).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=d(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,c.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){return"\n"===e.getEOL()?0:1}function f(e){return!!e&&(e instanceof u||e instanceof g)}class m{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(f(i)&&i.canAppend(this._model))return i;const s=new u(n.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(s,t),s}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const s=this._getOrCreateEditStackElement(e,n),o=this._model.applyEdits(t,!0),r=m._computeCursorState(i,o),a=o.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),s.append(this._model,a.map((e=>e.textChange)),p(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,s.dz)(e),null}}}},49374:function(e,t,i){"use strict";i.d(t,{P:function(){return h},k:function(){return u}});var n=i(64429),s=i(43920),o=i(39841),r=i(40393),a=i(97997),l=i(43573),c=i(79007),d=i(20187);class h extends a._{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.G)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new d.D7("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide);let r=-2,a=-1,l=-2,c=-1;const h=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let u=-2,g=-1,p=-2,f=-1;const m=e=>{if(-2===u){u=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){u=t,g=e;break}}}if(-1!==p&&(-2===p||p=0){p=t,f=e;break}}}};let _=0,v=!0,b=0,w=!0,C=0,y=0;for(let s=0;v||w;s++){const r=e-s,d=e+s;s>1&&(r<1||r1&&(d>n||d>i)&&(w=!1),s>5e4&&(v=!1,w=!1);let p=-1;if(v&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,c=e,p=Math.ceil(e/this.textModel.getOptions().indentSize)):(h(r),p=this._getIndentLevelForWhitespaceLine(o,a,c))}let S=-1;if(w&&d<=n){const e=this._computeIndentLevel(d-1);e>=0?(u=d-1,g=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(d),S=this._getIndentLevelForWhitespaceLine(o,g,f))}if(0!==s){if(1===s){if(d<=n&&S>=0&&y+1===S){v=!1,_=d,b=d,C=S;continue}if(r>=1&&p>=0&&p-1===y){w=!1,_=r,b=r,C=p;continue}if(_=e,b=e,C=y,0===C)return{startLineNumber:_,endLineNumber:b,indent:C}}v&&(p>=C?_=r:v=!1),w&&(S>=C?b=d:w=!1)}else y=p}return{startLineNumber:_,endLineNumber:b,indent:C}}getLinesBracketGuides(e,t,i,o){const a=[];for(let i=e;i<=t;i++)a.push([]);const l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let d;if(i&&l.length>0){const s=(e<=i.lineNumber&&i.lineNumber<=t?l:this.textModel.bracketPairs.getBracketPairsInRange(r.Q.fromPositions(i)).toArray()).filter((e=>r.Q.strictContainsPosition(e.range,i)));d=(0,n.Uk)(s,(e=>true))?.range}const h=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,g=new u;for(const i of l){if(!i.closingBracketRange)continue;const n=d&&i.range.equalsRange(d);if(!n&&!o.includeInactive)continue;const r=g.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,h)+(o.highlightActive&&n?" "+g.activeClassName:""),l=i.openingBracketRange.getStartPosition(),u=i.closingBracketRange.getStartPosition(),p=o.horizontalGuides===c.N6.Enabled||o.horizontalGuides===c.N6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){p&&a[i.range.startLineNumber-e].push(new c.TH(-1,i.openingBracketRange.getEndPosition().column,r,new c.pv(!1,u.column),-1,-1));continue}const f=this.getVisibleColumnFromPosition(u),m=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),_=Math.min(m,f,i.minVisibleColumnIndentation+1);let v=!1;s.HG(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))=e&&m>_&&a[l.lineNumber-e].push(new c.TH(_,-1,r,new c.pv(!1,l.column),-1,-1)),u.lineNumber<=t&&f>_&&a[u.lineNumber-e].push(new c.TH(_,-1,r,new c.pv(!v,u.column),-1,-1)))}for(const e of a)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return a}getVisibleColumnFromPosition(e){return o.A.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide),r=new Array(t-e+1);let a=-2,l=-1,c=-2,d=-1;for(let s=e;s<=t;s++){const t=s-e,h=this._computeIndentLevel(s-1);if(h>=0)a=s-1,l=h,r[t]=Math.ceil(h/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=s-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,l,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,s.j)(e),t=(0,s.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,s.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,s=0,o=0;for(;t<=i;)if(n=t+(i-t)/2|0,s=this.prefixSum[n],o=s-this.values[n],e=s))break;t=n+1}return new a(n,e-o)}}class r{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.nK)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;nnew k.c((0,L.qe)(e.fromLineNumber-1,0),(0,L.qe)(e.toLineNumber,0),(0,L.qe)(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=k.c.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=(0,I.M)(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,I.M)(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new N.tk(this.textModel,this.brackets);return(0,D.T)(s,e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=(0,L.qe)(e.startLineNumber-1,e.startColumn-1),s=(0,L.qe)(e.endLineNumber-1,e.endColumn-1);return new n.c1((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens;P(n,L.Vp,n.length,i,s,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=(0,L.VL)(e.getStartPosition()),s=(0,L.VL)(e.getEndPosition());return new n.c1((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens,o=new A(e,t,this.textModel);O(n,L.Vp,n.length,i,s,o,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return R(t,L.Vp,t.length,(0,L.VL)(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return T(t,L.Vp,t.length,(0,L.VL)(e))}}function T(e,t,i,n){if(4===e.kind||2===e.kind){const s=[];for(const n of e.children)i=(0,L.QB)(t,n.length),s.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=s.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:o}=s[t];if((0,L.zG)(i,n)){const s=T(e.children[t],i,o,n);if(s)return s}}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,L.Qx)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function R(e,t,i,n){if(4===e.kind||2===e.kind){for(const s of e.children){if(i=(0,L.QB)(t,s.length),(0,L.zG)(n,i)){const e=R(s,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,L.Qx)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function P(e,t,i,n,s,o,r,a,l,c,d=!1){if(r>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let d=0;d200)return!0;let l=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const d=(0,L.QB)(t,e.openingBracket.length);let h=-1;if(o.includeMinIndentation&&(h=e.computeMinIndentation(t,o.textModel)),l=o.push(new S((0,L.Qx)(t,i),(0,L.Qx)(t,d),e.closingBracket?(0,L.Qx)((0,L.QB)(d,e.child?.length||L.Vp),i):void 0,r,c,e,h)),t=d,l&&e.child){const c=e.child;if(i=(0,L.QB)(t,c.length),(0,L.vr)(t,s)&&(0,L.o0)(i,n)&&(l=O(c,t,i,n,s,o,r+1,a),!l))return!1}a?.set(e.openingBracket.text,c)}else{let i=t;for(const t of e.children){const e=i;if(i=(0,L.QB)(i,t.length),(0,L.vr)(e,s)&&(0,L.vr)(n,i)&&(l=O(t,e,i,n,s,o,r,a),!l))return!1}}return l}class F extends a.jG{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.HE),this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const i=new a.Cm;this.bracketPairsTree.value=(e=i.add(new M(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>t?.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||n.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||n.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||n.c1.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(g.Q.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),o=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!o)return null;const r=o.textIsBracket[t];return r?H(this._findMatchingBracketUp(r,n,B(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(g.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,n.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),g.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=B(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),o=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if((0,b.Yo)(t.getStandardTokenType(e))||t.getLanguageId(e)!==o){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,b.Yo)(t.getStandardTokenType(e))||t.getLanguageId(e)!==o){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(o)).brackets;if(r&&!(0,b.Yo)(n.getStandardTokenType(o))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,o),c=null;for(;;){const n=w.Fu.findNextBracketInRange(r.forwardRegex,i,s,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=s.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof W)return null;c=i}}a=n.endColumn-1}if(c)return c}if(o>0&&n.getStartOffset(o)===e.column-1){const r=o-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!(0,b.Yo)(n.getStandardTokenType(r))){const{searchStartOffset:o,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),c=w.Fu.findPrevBracketInRange(a.reversedRegex,i,s,o,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=s.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),i=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof W?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof W?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let o=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return W.INSTANCE;const c=w.Fu.findPrevBracketInRange(s,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.tokenization.getLineTokens(e),s=i.getCount(),o=this.textModel.getLineContent(e);let r=s-1,l=o.length,c=o.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!(0,b.Yo)(i.getStandardTokenType(r));if(t)d?l=i.getStartOffset(r):(l=i.getStartOffset(r),c=i.getEndOffset(r));else if(d&&l!==c){const t=a(e,o,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,o,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let o=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return W.INSTANCE;const c=w.Fu.findNextBracketInRange(s,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.tokenization.getLineTokens(e),s=i.getCount(),o=this.textModel.getLineContent(e);let r=0,l=0,c=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r=1;e--){const o=this.textModel.tokenization.getLineTokens(e),r=o.getCount(),a=this.textModel.getLineContent(e);let l=r-1,c=a.length,d=a.length;if(e===t.lineNumber){l=o.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1;const e=o.getLanguageId(l);i!==e&&(i=e,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let h=!0;for(;l>=0;l--){const t=o.getLanguageId(l);if(i!==t){if(n&&s&&h&&c!==d){const t=w.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(s,t);h=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const r=!!n&&!(0,b.Yo)(o.getStandardTokenType(l));if(r)h?c=o.getStartOffset(l):(c=o.getStartOffset(l),d=o.getEndOffset(l));else if(s&&n&&h&&c!==d){const t=w.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(s,t)}h=r}if(s&&n&&h&&c!==d){const t=w.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(s,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const i=this.textModel.getLineCount();let n=null,s=null,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this.textModel.tokenization.getLineTokens(e),r=i.getCount(),a=this.textModel.getLineContent(e);let l=0,c=0,d=0;if(e===t.lineNumber){l=i.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1;const e=i.getLanguageId(l);n!==e&&(n=e,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let h=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=B(t),s=this.textModel.getLineCount(),o=new Map;let r=[];const a=(e,t)=>{if(!o.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(n&&++l%100==0&&!n())return W.INSTANCE;const a=w.Fu.findNextBracketInRange(e.forwardRegex,t,i,s,o);if(!a)break;const c=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?r[d.index]++:d.isClose(c)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,n);s=a.endColumn-1}return null};let d=null,h=null;for(let e=i.lineNumber;e<=s;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),s=this.textModel.getLineContent(e);let o=0,r=0,l=0;if(e===i.lineNumber){o=t.findTokenIndexAtOffset(i.column-1),r=i.column-1,l=i.column-1;const e=t.getLanguageId(o);d!==e&&(d=e,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,h))}let u=!0;for(;o!0;{const t=Date.now();return()=>Date.now()-t<=e}}class W{static{this.INSTANCE=new W}constructor(){this._searchCanceledBrand=void 0}}function H(e){return e instanceof W?null:e}var V=i(99851),z=i(40616);class U extends a.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new j,this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){return n||void 0===t?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray():[]}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new g.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class j{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,z.zy)(((e,t)=>{const i=[V.sN,V.lQ,V.ss,V.l5,V.sH,V.zp],n=new j;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(V.s7)}; }`);const s=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));var q=i(38428),K=i(49374);class ${constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function G(e,t,i,n,s){let o;for(s.spacesDiff=0,s.looksLikeAlignment=!1,o=0;o0&&a>0)return;if(l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(r-l);if(0===d)return s.spacesDiff=h,void(h>0&&0<=l-1&&l-10?s++:f>1&&o++,G(r,a,h,p,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;const _=d.spacesDiff;_<=8&&c[_]++,r=h,a=p}let h=i;s!==o&&(h=s{const i=c[t];i>e&&(e=i,u=t)})),4===u&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function Y(e){return(1&e.metadata)>>>0}function Z(e,t){e.metadata=254&e.metadata|t}function X(e){return(2&e.metadata)>>>1==1}function J(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function ee(e){return(4&e.metadata)>>>2==1}function te(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function ie(e){return(64&e.metadata)>>>6==1}function ne(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function se(e,t){e.metadata=231&e.metadata|t<<3}function oe(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class re{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Z(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,te(this,!1),ne(this,!1),se(this,1),oe(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,J(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;te(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),ne(this,null!==this.options.glyphMarginClassName),se(this,this.options.stickiness),oe(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const ae=new re(null,0,0);ae.parent=ae,ae.left=ae,ae.right=ae,Z(ae,0);class le{constructor(){this.root=ae,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,o){return this.root===ae?[]:function(e,t,i,n,s,o,r){let a=e.root,l=0,c=0,d=0,h=0;const u=[];let g=0;for(;a!==ae;)if(X(a))J(a.left,!1),J(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!X(a.left)){if(c=l+a.maxEnd,ci)J(a,!0);else{if(h=l+a.end,h>=t){a.setCachedOffsets(d,h,o);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),s&&ee(a)&&(e=!1),r&&!ie(a)&&(e=!1),e&&(u[g++]=a)}J(a,!0),a.right===ae||X(a.right)||(l+=a.delta,a=a.right)}}return J(e.root,!1),u}(this,e,t,i,n,s,o)}search(e,t,i,n){return this.root===ae?[]:function(e,t,i,n,s){let o=e.root,r=0,a=0,l=0;const c=[];let d=0;for(;o!==ae;){if(X(o)){J(o.left,!1),J(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==ae&&!X(o.left)){o=o.left;continue}a=r+o.start,l=r+o.end,o.setCachedOffsets(a,l,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&ee(o)&&(e=!1),s&&!ie(o)&&(e=!1),e&&(c[d++]=o),J(o,!0),o.right===ae||X(o.right)||(r+=o.delta,o=o.right)}return J(e.root,!1),c}(this,e,t,i,n)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let s=0;for(;i!==ae;)X(i)?(J(i.left,!1),J(i.right,!1),i=i.parent):i.left===ae||X(i.left)?(i.ownerId===t&&(n[s++]=i),J(i,!0),i.right===ae||X(i.right)||(i=i.right)):i=i.left;return J(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==ae;)X(t)?(J(t.left,!1),J(t.right,!1),t=t.parent):t.left===ae||X(t.left)?t.right===ae||X(t.right)?(i[n++]=t,J(t,!0)):t=t.right:t=t.left;return J(e.root,!1),i}(this)}insert(e){he(this,e),this._normalizeDeltaIfNecessary()}delete(e){ue(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,o=i.end+n;i.setCachedOffsets(s,o,t)}acceptReplace(e,t,i,n){const s=function(e,t,i){let n=e.root,s=0,o=0,r=0,a=0;const l=[];let c=0;for(;n!==ae;)if(X(n))J(n.left,!1),J(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;else{if(!X(n.left)){if(o=s+n.maxEnd,oi?J(n,!0):(a=s+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[c++]=n),J(n,!0),n.right===ae||X(n.right)||(s+=n.delta,n=n.right))}return J(e.root,!1),l}(this,e,e+t);for(let e=0,t=s.length;ei?(s.start+=l,s.end+=l,s.delta+=l,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0),J(s,!0)):(J(s,!0),s.right===ae||X(s.right)||(o+=s.delta,s=s.right))}J(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let o=0,r=s.length;oi)&&1!==n&&(2===n||t)}function de(e,t,i,n,s){const o=function(e){return(24&e.metadata)>>>3}(e),r=0===o||2===o,a=1===o||2===o,l=i-t,c=n,d=Math.min(l,c),h=e.start;let u=!1;const g=e.end;let p=!1;t<=h&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=s?1:l>0?2:0;!u&&ce(h,r,t,e)&&(u=!0),!p&&ce(g,a,t,e)&&(p=!0)}if(d>0&&!s){const e=l>c?2:0;!u&&ce(h,r,t+d,e)&&(u=!0),!p&&ce(g,a,t+d,e)&&(p=!0)}{const n=s?1:0;!u&&ce(h,r,i,n)&&(e.start=t+c,u=!0),!p&&ce(g,a,i,n)&&(e.end=t+c,p=!0)}const f=c-l;u||(e.start=Math.max(0,h+f)),p||(e.end=Math.max(0,g+f)),e.start>e.end&&(e.end=e.start)}function he(e,t){if(e.root===ae)return t.parent=ae,t.left=ae,t.right=ae,Z(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const s=t.start,o=t.end;for(;;)if(r=s,a=o,l=n.start+i,c=n.end+i,(r===l?a-c:r-l)<0){if(n.left===ae){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===ae){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var r,a,l,c;t.parent=n,t.left=ae,t.right=ae,Z(t,1)}(e,t),ve(t.parent);let i=t;for(;i!==e.root&&1===Y(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===Y(t)?(Z(i.parent,0),Z(t,0),Z(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,pe(e,i)),Z(i.parent,0),Z(i.parent.parent,1),fe(e,i.parent.parent))}else{const t=i.parent.parent.left;1===Y(t)?(Z(i.parent,0),Z(t,0),Z(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,fe(e,i)),Z(i.parent,0),Z(i.parent.parent,1),pe(e,i.parent.parent))}return Z(e.root,0),t}function ue(e,t){let i,n;if(t.left===ae?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===ae?(i=t.left,n=t):(n=function(e){for(;e.left!==ae;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,Z(i,0),t.detach(),ge(),_e(i),void(e.root.parent=ae);const s=1===Y(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,Z(n,Y(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==ae&&(n.left.parent=n),n.right!==ae&&(n.right.parent=n)),t.detach(),s)return ve(i.parent),n!==t&&(ve(n),ve(n.parent)),void ge();let o;for(ve(i),ve(i.parent),n!==t&&(ve(n),ve(n.parent));i!==e.root&&0===Y(i);)i===i.parent.left?(o=i.parent.right,1===Y(o)&&(Z(o,0),Z(i.parent,1),pe(e,i.parent),o=i.parent.right),0===Y(o.left)&&0===Y(o.right)?(Z(o,1),i=i.parent):(0===Y(o.right)&&(Z(o.left,0),Z(o,1),fe(e,o),o=i.parent.right),Z(o,Y(i.parent)),Z(i.parent,0),Z(o.right,0),pe(e,i.parent),i=e.root)):(o=i.parent.left,1===Y(o)&&(Z(o,0),Z(i.parent,1),fe(e,i.parent),o=i.parent.left),0===Y(o.left)&&0===Y(o.right)?(Z(o,1),i=i.parent):(0===Y(o.left)&&(Z(o.right,0),Z(o,1),pe(e,o),o=i.parent.left),Z(o,Y(i.parent)),Z(i.parent,0),Z(o.left,0),fe(e,i.parent),i=e.root));Z(i,0),ge()}function ge(){ae.parent=ae,ae.delta=0,ae.start=0,ae.end=0}function pe(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==ae&&(i.left.parent=t),i.parent=t.parent,t.parent===ae?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,_e(t),_e(i)}function fe(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==ae&&(i.right.parent=t),i.parent=t.parent,t.parent===ae?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,_e(t),_e(i)}function me(e){let t=e.end;if(e.left!==ae){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==ae){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function _e(e){e.maxEnd=me(e)}function ve(e){for(;e!==ae;){const t=me(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class be{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==we)return Ce(this.right);let e=this;for(;e.parent!==we&&e.parent.left!==e;)e=e.parent;return e.parent===we?we:e.parent}prev(){if(this.left!==we)return ye(this.left);let e=this;for(;e.parent!==we&&e.parent.right!==e;)e=e.parent;return e.parent===we?we:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const we=new be(null,0);function Ce(e){for(;e.left!==we;)e=e.left;return e}function ye(e){for(;e.right!==we;)e=e.right;return e}function Se(e){return e===we?0:e.size_left+e.piece.length+Se(e.right)}function ke(e){return e===we?0:e.lf_left+e.piece.lineFeedCnt+ke(e.right)}function xe(){we.parent=we}function Le(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==we&&(i.left.parent=t),i.parent=t.parent,t.parent===we?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function De(e,t){const i=t.left;t.left=i.right,i.right!==we&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===we?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Ee(e,t){let i,n;if(t.left===we?(n=t,i=n.right):t.right===we?(n=t,i=n.left):(n=Ce(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),xe(),void(e.root.parent=we);const s=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Me(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Me(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==we&&(n.left.parent=n),n.right!==we&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Me(e,n)),t.detach(),i.parent.left===i){const t=Se(i),n=ke(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const s=t-i.parent.size_left,o=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,Ie(e,i.parent,s,o)}}if(Me(e,i.parent),s)return void xe();let o;for(;i!==e.root&&0===i.color;)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,Le(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,De(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,Le(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,De(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,Le(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,De(e,i.parent),i=e.root));i.color=0,xe()}function Ne(e,t){for(Me(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Le(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,De(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&De(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Le(e,t.parent.parent))}e.root.color=0}function Ie(e,t,i,n){for(;t!==e.root&&t!==we;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Me(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=Se((t=t.parent).left)-t.size_left,n=ke(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}we.parent=we,we.left=we,we.right=we,we.color=0;var Te=i(58980);const Re=65535;function Pe(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Ae{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function Oe(e,t=!0){const i=[0];let n=1;for(let t=0,s=e.length;t(e!==we&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class He{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class Ve{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Be("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=we,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=Oe(e[t].buffer));const i=new Fe(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new He(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",s=0;const o=[];if(this.iterate(this.root,(r=>{const a=this.getNodeContent(r),l=a.length;if(s<=t||s+l0){const t=n.replace(/\r\n|\r|\n/g,e);o.push(new Be(t,Oe(t)))}this.create(o,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new We(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==we;)if(n.left!==we&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==we;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){const e=n-this.getOffsetAt(i+1,1);return new u.y(i+1,e+1)}return new u.y(i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===we){const t=n-e-this.getOffsetAt(i+1,1);return new u.y(i+1,t+1)}t=t.right}return new u.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(s+e.remainder,s+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let o=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==we;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){o+=e.substring(n,n+t.remainder);break}o+=e.substr(n,i.piece.length),i=i.next()}return o}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(s=>{if(s===we)return!0;const o=s.piece;let r=o.length;if(0===r)return!0;const a=this._buffers[o.bufferIndex].buffer,l=this._buffers[o.bufferIndex].lineStarts,c=o.start.line,d=o.end.line;let h=l[c]+o.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(c===d)return this._EOLNormalized||13!==a.charCodeAt(h+r-1)?i+=a.substr(h,r):(n=!0,i+=a.substr(h,r-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[c+1]-this._EOLLength)):a.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+p,t.reset(0)):(v=h.buffer,b=e=>e,t.reset(p));do{if(m=t.next(v),m){if(b(m.index)>=f)return c;this.positionInBuffer(e,b(m.index)-u,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,s,_),o=_.line===s.line?_.column-s.column+n:_.column+1,r=o+m[0].length;if(d[c++]=(0,Te.dr)(new g.Q(i+t,o,i+t,r),m,a),b(m.index)+m[0].length>=f)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,i,n){const s=[];let o=0;const r=new Te.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,c,d,t,i,n,o,s),s;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[c.line+l],p=h===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(u,r,h,p,c,this.positionInBuffer(u,g-d),t,i,n,o,s),o>=n)return s;h+=l}const d=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(d,e.endColumn-1);return o=this._findMatchesInLine(t,r,a,e.endLineNumber,d,o,s,i,n),s}if(o=this._findMatchesInLine(t,r,this.getLineContent(h).substr(d),h,d,o,s,i,n),o>=n)return s;h++,a=this.nodeAt2(h,1),u=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){const a=h===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(h).substring(a,e.endColumn-1);return o=this._findMatchesInLine(t,r,l,e.endLineNumber,a,o,s,i,n),s}const g=h===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(l.node,r,h,g,c,d,t,i,n,o,s),s}_findMatchesInLine(e,t,i,n,s,o,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let h=-a;for(;-1!==(h=i.indexOf(t,h+a));)if((!c||(0,Te.wC)(c,i,d,h,a))&&(r[o++]=new v.Dg(new g.Q(n,h+1+s,n,h+1+a+s),null),o>=l))return o;return o}let d;t.reset(0);do{if(d=t.next(i),d&&(r[o++]=(0,Te.dr)(new g.Q(n,d.index+1+s,n,d.index+1+d[0].length+s),d,a),o>=l))return o}while(d);return o}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==we){const{node:i,remainder:n,nodeStartOffset:s}=this.nodeAt(e),o=i.piece,r=o.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&s+o.length===e&&t.lengthe){const e=[];let s=new Fe(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),this.offsetInBuffer(r,o.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){const e={line:s.start.line+1,column:0};s=new Fe(s.bufferIndex,e,s.end,this.getLineFeedCnt(s.bufferIndex,e,s.end),s.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){const s=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,s),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);s.length>0&&this.rbInsertRight(i,s);let c=i;for(let e=0;e=0;e--)s=this.rbInsertLeft(s,n[e]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let e=1;e=d))break;a=c+1}return i?(i.line=c,i.column=r-h,null):{line:c,column:r-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],o=n[i.line]+i.column;if(s>o+1)return i.line-t.line;const r=o-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tRe){const t=[];for(;e.length>Re;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,Re),e=e.substring(Re));const s=Oe(n);t.push(new Fe(this._buffers.length,{line:0,column:0},{line:s.length-1,column:n.length-s[s.length-1]},s.length-1,n.length)),this._buffers.push(new Be(n,s))}const i=Oe(e);return t.push(new Fe(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new Be(e,i)),t}let t=this._buffers[0].buffer.length;const i=Oe(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return s+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:s,nodeStartLineNumber:o-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),s=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=s.substring(o+t,o+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,s+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==we;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(o,o+s-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==we;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==s)return{index:t,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),o=t,r=this.offsetInBuffer(i.bufferIndex,o),a=this.getLineFeedCnt(i.bufferIndex,i.start,o),l=a-n,c=r-s,d=i.length+c;e.piece=new Fe(i.bufferIndex,i.start,o,a,d),Ie(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),o=t,r=this.getLineFeedCnt(i.bufferIndex,o,i.end),a=r-n,l=s-this.offsetInBuffer(i.bufferIndex,o),c=i.length+l;e.piece=new Fe(i.bufferIndex,o,i.end,r,c),Ie(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,s=n.start,o=n.end,r=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new Fe(n.bufferIndex,n.start,l,c,d),Ie(this,e,d-r,c-a);const h=new Fe(n.bufferIndex,i,o,this.getLineFeedCnt(n.bufferIndex,i,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=Oe(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==we;)if(i.left!==we&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),o=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,o),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==we;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===we||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n!==i.length-1&&(!(i[n+1]>s+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(s))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==we&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;s=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new Fe(e.piece.bufferIndex,e.piece.start,s,r,o),Ie(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Fe(t.piece.bufferIndex,a,t.piece.end,c,l),Ie(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const p=this._doApplyEdits(a);let f=null;if(t&&u.length>0){u.sort(((e,t)=>t.lineNumber-e.lineNumber)),f=[];for(let e=0,t=u.length;e0&&u[e-1].lineNumber===t)continue;const i=u[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.HG(n)&&f.push(t)}}return this._onDidChangeContent.fire(),new v.F4(g,p,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new g.Q(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,r=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),o=s.endLineNumber,r=s.endColumn}const l=a.join(""),[c,h,u]=(0,d.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Ue._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;c=1===e?new g.Q(a,l,a,l+r.firstLineLength):new g.Q(a,l,a+e-1,r.lastLineLength+1)}else c=new g.Q(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),s=r}return t}static _sortOpsAscending(e,t){const i=g.Q.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=g.Q.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class je{constructor(e,t,i,n,s,o,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,s=0,o=0,r=!0;for(let a=0,l=t.length;a126)&&(r=!1)}const a=new Ae(Pe(e),n,s,o,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new Be(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=l.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.$X(e)))}finish(e=!0){return this._finish(),new je(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Oe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Ke=i(80487),$e=i(86506),Ge=i(35720),Qe=i(97997),Ye=i(90890),Ze=i(79783),Xe=i(43857),Je=i(28376),et=i(5032);class tt{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),s=this._store.slice(e+t),o=function(e,t){const i=[];for(let n=0;n=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new it(e,[t]))}finalize(){return this._tokens}}var st=i(44425);class ot{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new at(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class rt extends ot{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();for(;;){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const s=this._textModel.getLineContent(n.lineNumber),o=dt(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n.startState);e.add(n.lineNumber,o.tokens),this.store.setEndState(n.lineNumber,o.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),o=s.substring(0,e.column-1)+t+s.substring(e.column-1),r=dt(this._languageIdCodec,n,this.tokenizationSupport,o,!0,i),a=new st.f(r.tokens,o,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,s=e.column,o=this.getStartState(n);if(!o)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,s-1)+i+r.substring(s-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),c=dt(this._languageIdCodec,l,this.tokenizationSupport,a,!0,o);return new st.f(c.tokens,a,this._languageIdCodec)}hasAccurateTokensForLine(e){return e1&&s>=1;s--){const e=this._textModel.getLineFirstNonWhitespaceColumn(s);if(0!==e&&e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class ct{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Je.L(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new Je.L(i.start,e):this._ranges.splice(t,1,new Je.L(i.start,e),new Je.L(e+1,i.endExclusive))}}addRange(e){Je.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function dt(e,t,i,n,s,r){let a=null;if(i)try{a=i.tokenizeEncoded(n,s,r.clone())}catch(e){(0,o.dz)(e)}return a||(a=(0,et.Lh)(e.encodeLanguageId(t),r)),st.f.convertToEndOffset(a.tokens,n.length),a}class ht{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,Ye.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Ke.M(e,t))}}class ut{constructor(){this._onDidChangeVisibleRanges=new r.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new gt((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class gt{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new Ke.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}class pt extends a.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Ye.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,n.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class ft extends a.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,i){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=i,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new r.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class mt extends ft{constructor(e,t,i,n){super(t,i,n),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=Ge.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const i=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(i)return new st.f(i,t,this._languageIdCodec)}return st.f.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,i){return 0}tokenizeLineWithEdit(e,t,i){return null}get hasTokens(){return void 0!==this._treeSitterService.getParseResult(this._textModel)}}var _t=i(10948);const vt=new Uint32Array(0).buffer;class bt{static deleteBeginning(e,t){return null===e||e===vt?e:bt.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===vt)return e;const i=wt(e),n=i[i.length-2];return bt.delete(e,t,n)}static delete(e,t,i){if(null===e||e===vt||t===i)return e;const n=wt(e),s=n.length>>>1;if(0===t&&n[n.length-2]===i)return vt;const o=st.f.findIndexInTokensArray(n,t),r=o>0?n[o-1<<1]:0;if(il&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const d=new Uint32Array(a);return d.set(n.subarray(0,a),0),d.buffer}static append(e,t){if(t===vt)return e;if(e===vt)return t;if(null===e)return e;if(null===t)return null;const i=wt(e),n=wt(t),s=n.length>>>1,o=new Uint32Array(i.length+n.length);o.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e>>1;let o=st.f.findIndexInTokensArray(n,t);o>0&&n[o-1<<1]===t&&o--;for(let e=o;e0}getTokens(e,t,i){let n=null;if(t1&&(t=Ct.x.getLanguageId(n[1])!==e),!t)return vt}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=St(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=bt.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=bt.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=bt.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=bt.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=bt.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,s=e.length;n>>0}class kt{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),s=t[t.length-1].getRange();if(!n||!s)return e;i=e.plusRange(n).plusRange(s)}let s=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){s=s||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){s=s||{index:e};continue}const[o,r]=n.split(i);o.isEmpty()?s=s||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,o,r),e++,t++,s=s||{index:e})}return s=s||{index:this._pieces.length},t.length>0&&(this._pieces=n.nK(this._pieces,s.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=i[kt._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const s=t.getCount(),o=n.getCount();let r=0;const a=[];let l=0,c=0;const d=(e,t)=>{e!==c&&(c=e,a[l++]=e,a[l++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;rt)){for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}n=s-1}}return i}acceptEdit(e,t,i,n,s){for(const o of this._pieces)o.acceptEdit(e,t,i,n,s)}}var xt,Lt=function(e,t){return function(i,n){t(i,n,e)}};let Dt=xt=class extends Qe._{constructor(e,t,i,n,s,o,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=i,this._attachedViews=n,this._languageService=s,this._languageConfigurationService=o,this._treeSitterService=l,this._semanticTokens=new kt(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new r.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new a.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(r.Jh.filter(Ge.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new Et(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new mt(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){Ge.OB.get(this._languageId)?this._tokens instanceof mt||this.createTokens(!0):this._tokens instanceof Et||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=(0,d.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new o.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this._tokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[o,r]=xt._findLanguageBoundaries(n,s),a=(0,$e.Th)(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(s>0&&o===t.column-1){const[o,r]=xt._findLanguageBoundaries(n,s-1),a=(0,$e.Th)(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let s=t;s>=0&&e.getLanguageId(s)===i;s--)n=e.getStartOffset(s);let s=e.getLineContent().length;for(let n=t,o=e.getCount();n=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Lt(4,m.L),Lt(5,_.JZ),Lt(6,_t.ITreeSitterParserService)],Dt);class Et extends ft{constructor(e,t,i,n){super(e,t,i),this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new a.HE),this._tokens=new yt(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new a.HE),this._attachedViewStates=this._register(new a.$w),this._register(Ge.dG.onDidChange((e=>{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new pt((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new at(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[t,i]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Ge.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,o.dz)(e),[null,null]}return[e,t]})();if(this._tokenizer=t&&i?new rt(this._textModel.getLineCount(),t,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{2!==this._backgroundTokenizationState&&(this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire())},setEndState:(e,t)=>{if(!this._tokenizer)return;const i=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==i&&e>=i&&this._tokenizer?.store.setEndState(e,t)}};t&&t.createBackgroundTokenizer&&!t.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=t.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new ht(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),t?.backgroundTokenizerShouldOnlyVerifyTokens&&t.createBackgroundTokenizer?(this._debugBackgroundTokens=new yt(this._languageIdCodec),this._debugBackgroundStates=new at(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=t.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,i]=(0,d.W)(t.text);this._tokens.acceptEdit(t.range,e,i),this._debugBackgroundTokens?.acceptEdit(t.range,e,i)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Ke.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const i=new nt,{heuristicTokens:n}=this._tokenizer.tokenizeHeuristically(i,e,t),s=this.setTokens(i.finalize());if(n)for(const e of s.changes)this._backgroundTokenizer.value?.requestTokens(e.fromLineNumber,e.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new nt;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const n=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!i.equals(n)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return i}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new u.y(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}var Nt,It=i(40699),Mt=i(63619),Tt=i(79911),Rt=function(e,t){return function(i,n){t(i,n,e)}};function Pt(e,t){let i;return i="string"==typeof e?function(e){const t=new qe;return t.acceptChunk(e),t.finish()}(e):v.nk(e)?function(e){const t=new qe;let i;for(;"string"==typeof(i=e.read());)t.acceptChunk(i);return t.finish()}(e):e,i.create(t)}let At=0;class Ot{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Ft=()=>{throw new Error("Invalid change accessor")};let Bt=class extends a.jG{static{Nt=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:f.R.tabSize,indentSize:f.R.indentSize,insertSpaces:f.R.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:f.R.trimAutoWhitespace,largeFileOptimizations:f.R.largeFileOptimizations,bracketPairColorizationOptions:f.R.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const i=Q(e,t.tabSize,t.insertSpaces);return new v.X2({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new v.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,a.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,s,o,d,h){super(),this._undoRedoService=s,this._languageService=o,this._languageConfigurationService=d,this.instantiationService=h,this._onWillDispose=this._register(new r.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Zt((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new r.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new r.vl),this._eventEmitter=this._register(new Xt),this._languageSelectionListener=this._register(new a.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new ut,At++,this.id="$model"+At,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource=null==n?c.r.parse("inmemory://model/"+At):n,this._attachedEditorCount=0;const{textBuffer:u,disposable:p}=Pt(e,i.defaultEOL);this._buffer=u,this._bufferDisposable=p,this._options=Nt.resolveOptions(this._buffer,i);const f="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new F(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new K.P(this,this._languageConfigurationService)),this._decorationProvider=this._register(new U(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(Dt,this,this._bracketPairs,f,this._attachedViews);const m=this._buffer.getLineCount(),_=this._buffer.getValueLengthInRange(new g.Q(1,1,m,this._buffer.getLineLength(m)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=_>Nt.LARGE_FILE_SIZE_THRESHOLD||m>Nt.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=_>Nt.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=_>Nt._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.tk(At),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Vt,this._commandManager=new q.z8(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new Ue([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new o.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new It.Ic(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw(0,o.Qg)();const{textBuffer:t,disposable:i}=Pt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,o,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Vt,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new It.HP([new It.Wn],this._versionId,!1,!1),this._createContentChanged2(new g.Q(1,1,s,o),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new It.HP([new It.mS],this._versionId,!1,!1),this._createContentChanged2(new g.Q(1,1,s,o),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,s=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new v.X2({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:o});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=Q(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,h.P)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new o.D7("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Ot(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new o.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor("number"!=typeof i||isNaN(i)?1:i),o=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(s<1)s=1,o=1;else if(s>t)s=t,o=this.getLineMaxColumn(s);else if(o<=1)o=1;else{const e=this.getLineMaxColumn(s);o>=e&&(o=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===s&&n===o&&r===l&&a===c&&e instanceof g.Q&&!(e instanceof p.L)?e:new g.Q(s,o,l,c)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(l.pc(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),s=Math.floor("number"!=typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(n<1)return new u.y(1,1);if(n>o)return new u.y(o,this.getLineMaxColumn(o));if(s<=1)return new u.y(n,1);const r=this.getLineMaxColumn(n);if(s>=r)return new u.y(n,r);if(1===i){const e=this._buffer.getLineCharCode(n,s-2);if(l.pc(e))return new u.y(n,s-1)}return new u.y(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof u.y&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(s,o,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,r=l.pc(e),a=l.pc(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof g.Q&&!(e instanceof p.L)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,s=t.column,o=i.lineNumber,r=i.column;{const e=s>1?this._buffer.getLineCharCode(n,s-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,i=l.pc(e),a=l.pc(t);return i||a?n===o&&s===r?new g.Q(n,s-1,o,r-1):i&&a?new g.Q(n,s-1,o,r+1):i?new g.Q(n,s-1,o,r):new g.Q(n,s,o,r+1):new g.Q(n,s,o,r)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new g.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,o,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>g.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>g.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new Te.lt(e,i,n,s).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,o,r)}else c=t=>Te.hB.findMatches(this,new Te.lt(e,i,n,s),t,o,r);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new Te.lt(e,i,n,s).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new g.Q(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,o,1);return Te.hB.findNextMatch(this,new Te.lt(e,i,n,s),r,o),c.length>0?c[0]:(l=new g.Q(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),c=this.findMatchesLineByLine(l,t,o,1),c.length>0?c[0]:null)}return Te.hB.findNextMatch(this,new Te.lt(e,i,n,s),r,o)}findPreviousMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);return Te.hB.findPreviousMatch(this,new Te.lt(e,i,n,s),r,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof v.Wo?e:new v.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,s=e.length;ts.endLineNumber,r=s.startLineNumber>t.endLineNumber;if(!n&&!r){o=!0;break}}if(!o){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===s&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){o=!1;break}}if(o){const e=new g.Q(n,1,n,s);t.push(new v.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const s=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new g.Q(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new g.Q(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),s=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),r=s.changes;if(this._trimAutoWhitespaceLines=s.trimAutoWhitespaceLineNumbers,0!==r.length){for(let e=0,t=r.length;e=0;t--){const i=l+t,n=m+t;C.takeFromEndWhile((e=>e.lineNumber>n));const s=C.takeFromEndWhile((e=>e.lineNumber===n));e.push(new It.U0(i,this.getLineContent(n),s))}if(pe.lineNumbere.lineNumber===t))}e.push(new It.bg(s+1,l+g,d,c))}t+=f}this._emitContentChangedEvent(new It.HP(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===s.reverseEdits?void 0:s.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new It.U0(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new It.vn(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Yt(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){(0,o.dz)(e)}return i.addDecoration=Ft,i.changeDecoration=Ft,i.changeDecorationOptions=Ft,i.removeDecoration=Ft,i.deltaDecorations=Ft,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,o.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Qt[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),r=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,r,s),n.setOptions(Qt[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,s=!1,o=!1){const r=this.getLineCount(),a=Math.min(r,Math.max(1,e)),l=Math.min(r,Math.max(1,t)),c=this.getLineMaxColumn(l),d=new g.Q(a,1,l,c),h=this._getDecorationsInRange(d,i,s,o);return(0,n.E4)(h,this._decorationProvider.getDecorationsInRange(d,i,s)),h}getDecorationsInRange(e,t=0,i=!1,s=!1,o=!1){const r=this.validateRange(e),a=this._getDecorationsInRange(r,t,i,o);return(0,n.E4)(a,this._decorationProvider.getDecorationsInRange(r,t,i,s)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return It.uK.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const s=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,s,o,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),o=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),s=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const o=n!==s,r=function(e){return!!e.after||!!e.before}(t)!==Ht(i);o||r?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const s=this.getVersionId(),o=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(a);for(;rthis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function Wt(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Ht(e){return!!e.options.after||!!e.options.before}Bt=Nt=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Rt(4,Tt.$D),Rt(5,m.L),Rt(6,_.JZ),Rt(7,Mt._Y)],Bt);class Vt{constructor(){this._decorationsTree0=new le,this._decorationsTree1=new le,this._injectedTextDecorationsTree=new le}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s,o){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,s,r,o);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,s,o){const r=this._decorationsTree0.intervalSearch(e,t,i,n,s,o),a=this._decorationsTree1.intervalSearch(e,t,i,n,s,o),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s,o);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),o=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,s,!1);return this._ensureNodesHaveRanges(e,o).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,s){const o=e.getVersionId(),r=this._search(t,i,n,o,s);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,s){if(i)return this._decorationsTree1.search(e,t,n,s);{const i=this._decorationsTree0.search(e,t,n,s),o=this._decorationsTree1.search(e,t,n,s),r=this._injectedTextDecorationsTree.search(e,t,n,s);return i.concat(o).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){Ht(e)?this._injectedTextDecorationsTree.insert(e):Wt(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Ht(e)?this._injectedTextDecorationsTree.delete(e):Wt(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Ht(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Wt(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function zt(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Ut{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class jt extends Ut{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:v.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class qt{constructor(e){this.position=e?.position??v.ZS.Center,this.persistLane=e?.persistLane}}class Kt extends Ut{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?s.Q1.fromHex(e):t.getColor(e.id)}}class $t{static from(e){return e instanceof $t?e:new $t(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Gt{static register(e){return new Gt(e)}static createDynamic(e){return new Gt(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?zt(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?zt(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new jt(e.overviewRuler):null,this.minimap=e.minimap?new Kt(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new qt(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?zt(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?zt(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?zt(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?l.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?zt(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?zt(e.marginClassName):null,this.inlineClassName=e.inlineClassName?zt(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?zt(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?zt(e.afterContentClassName):null,this.after=e.after?$t.from(e.after):null,this.before=e.before?$t.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}Gt.EMPTY=Gt.register({description:"empty"});const Qt=[Gt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Gt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Gt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Gt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Yt(e){return e instanceof Gt?e:Gt.createDynamic(e)}class Zt extends a.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new r.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Xt extends a.jG{constructor(){super(),this._fastEmitter=this._register(new r.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new r.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},97997:function(e,t,i){"use strict";i.d(t,{_:function(){return s}});var n=i(35114);class s extends n.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}},58980:function(e,t,i){"use strict";i.d(t,{W5:function(){return g},dr:function(){return c},hB:function(){return h},lt:function(){return l},wC:function(){return u}});var n=i(43920),s=i(59810),o=i(62993),r=i(40393),a=i(62067);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.L5(t,this.wordSeparators?(0,s.i)(this.wordSeparators,[]):null,i?this.searchString:null)}}function c(e,t,i){if(!i)return new a.Dg(e,null);const n=[];for(let e=0,i=t.length;e=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class h{static findMatches(e,t,i,n,s){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new g(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let a,l,c=0;if(n?(c=n.findLineFeedCountBeforeOffset(s),a=t+s+c):a=t+s,n){const e=n.findLineFeedCountBeforeOffset(s+o.length)-c;l=a+o.length+e}else l=a+o.length;const d=e.getPositionAt(a),h=e.getPositionAt(l);return new r.Q(d.lineNumber,d.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,s){const o=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new d(r):null,l=[];let h,u=0;for(i.reset(0);h=i.next(r);)if(l[u++]=c(this._getMultilineMatchRange(e,o,r,a,h.index,h[0]),h,n),u>=s)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,s){const o=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s),o}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s);for(let a=t.startLineNumber+1;a=d))return s;return s}const p=new g(e.wordSeparators,e.regex);let f;p.reset(0);do{if(f=p.next(t),f&&(o[s++]=c(new r.Q(i,f.index+1+n,i,f.index+1+f[0].length+n),f,l),s>=d))return s}while(f);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new g(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){const s=new o.y(t.lineNumber,1),a=e.getOffsetAt(s),l=e.getLineCount(),h=e.getValueInRange(new r.Q(s.lineNumber,s.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new d(h):null;i.reset(t.column-1);const g=i.next(h);return g?c(this._getMultilineMatchRange(e,a,h,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.y(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o),a=this._findFirstMatchInLine(i,r,o,t.column,n);if(a)return a;for(let t=1;t<=s;t++){const r=(o+t-1)%s,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const o=e.next(t);return o?c(new r.Q(i,o.index+1,i,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new g(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),i,n,9990);if(s.length>0)return s[s.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.y(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,o,n);if(a)return a;for(let t=1;t<=s;t++){const r=(s+o-t-1)%s,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let s,o=null;for(e.reset(0);s=e.next(t);)o=c(new r.Q(i,s.index+1,i,s.index+1+s[0].length),s,n);return o}}function u(e,t,i,n,s){return function(e,t,i,n,s){if(0===n)return!0;const o=t.charCodeAt(n-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,s)&&function(e,t,i,n,s){if(n+s===i)return!0;const o=t.charCodeAt(n+s);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n+s-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,s)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const s=i.index,o=i[0].length;if(s===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){n.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=o,!this._wordSeparators||u(this._wordSeparators,e,t,s,o))return i}while(i);return null}}},43573:function(e,t,i){"use strict";function n(e,t){let i=0,n=0;const s=e.length;for(;nt&&(t=o),s>i&&(i=s),r>i&&(i=r)}t++,i++;const n=new r(i,t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let l=null,c=null;class d{static _createLink(e,t,i,n,s){let o=s-1;do{const i=t.charCodeAt(o);if(2!==e.get(i))break;o--}while(o>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(o);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&o--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:o+2},url:t.substring(n,o+1)}}static computeLinks(e,t=function(){return null===l&&(l=new a([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),l}()){const i=function(){if(null===c){c=new o.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}var u=i(32919),g=i(8482),p=i(43857),f=i(18827),m=i(52049),_=i(17191),v=i(43920),b=i(93066),w=i(80487);class C{computeDiff(e,t,i){const n=new D(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let r=null;for(const e of n.changes){let t,i;t=0===e.originalEndLineNumber?new w.M(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new w.M(e.originalStartLineNumber,e.originalEndLineNumber+1),i=0===e.modifiedEndLineNumber?new w.M(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new w.M(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let n=new _.wm(t,i,e.charChanges?.map((e=>new _.q6(new s.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new s.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));r&&(r.modified.endLineNumberExclusive!==n.modified.startLineNumber&&r.original.endLineNumberExclusive!==n.original.startLineNumber||(n=new _.wm(r.original.join(n.original),r.modified.join(n.modified),r.innerChanges&&n.innerChanges?r.innerChanges.concat(n.innerChanges):void 0),o.pop())),o.push(n),r=n}return(0,b.Ft)((()=>(0,b.Xo)(o,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class x{constructor(e,t,i,n,s,o,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),o=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new x(n,s,o,r,a,l,c,d)}}class L{constructor(e,t,i,n,s){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=s}static createFromDiffResult(e,t,i,n,s,o,r){let a,l,c,d,h;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=n.getStartLineNumber(t.modifiedStart)-1,d=0):(c=n.getStartLineNumber(t.modifiedStart),d=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),o&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const o=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(o.getElements().length>0&&a.getElements().length>0){let e=y(o,a,s,!0).changes;r&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,s=e.length;n1&&r>1&&e.charCodeAt(i-2)===t.charCodeAt(r-2);)i--,r--;(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,i,o+1,1,r)}{let i=N(e,1),r=N(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-t[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,i){const o=this._getModel(e);if(!o)return t;const r=[];let a;t=t.slice(0).sort(((e,t)=>e.range&&t.range?s.Q.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));let l=0;for(let e=1;eq._diffLimit){r.push({range:e,text:l});continue}const d=(0,n.F1)(t,l,i),h=o.offsetAt(s.Q.lift(e).getStartPosition());for(const e of d){const t=o.positionAt(h+e.originalStart),i=o.positionAt(h+e.originalStart+e.originalLength),n={text:l.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};o.getValueInRange(n.range)!==n.text&&r.push(n)}}return"number"==typeof a&&r.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?d.computeLinks(e):[]}(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],i=V(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),s=i[1],o=i[2];if(!o)continue;let r;if("rgb"===s){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=W(F(e,n),V(o,t),!1)}else if("rgba"===s){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=W(F(e,n),V(o,t),!0)}else if("hsl"===s){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=H(F(e,n),V(o,t),!1)}else if("hsla"===s){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=H(F(e,n),V(o,t),!0)}else"#"===s&&(r=B(F(e,n),s+o));r&&t.push(r)}return t}(e):[]}(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,i,n){const s=new p.W,o=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(o))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>q._suggestionsLimit))break e}return{words:Array.from(r),duration:s.elapsed()}}async $computeWordRanges(e,t,i,n){const s=this._getModel(e);if(!s)return Object.create(null);const o=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;ethis._host.$fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve((0,T.V0)(this._foreignModule))):new Promise(((n,o)=>{const r=e=>{this._foreignModule=e.create(s,t),n((0,T.V0)(this._foreignModule))};{const t=R.zl.asBrowserUri(`${e}.js`).toString(!0);i(52048)(`${t}`).then(r).catch(o)}}))}$fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}function K(e){return new q(g.EditorWorkerHost.getChannel(e),null)}"function"==typeof importScripts&&(globalThis.monaco=(0,u.createMonacoBaseAPI)())},56812:function(e,t,i){"use strict";i.r(t),i.d(t,{IEditorWorkerService:function(){return n}});const n=(0,i(63619).u1)("editorWorkerService")},8482:function(e,t,i){"use strict";i.r(t),i.d(t,{EditorWorkerHost:function(){return n}});class n{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(n.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(n.CHANNEL_NAME,t)}}},43359:function(e,t,i){"use strict";i.r(t),i.d(t,{findSectionHeaders:function(){return o}});const n=new RegExp("\\bMARK:\\s*(.*)$","d"),s=/^-+|-+$/g;function o(e,t){let i=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const n=function(e,t){const i=[],n=e.getLineCount();for(let s=1;s<=n;s++){const n=e.getLineContent(s),o=n.match(t.foldingRules.markers.start);if(o){const e={startLineNumber:s,startColumn:o[0].length+1,endLineNumber:s,endColumn:n.length+1};if(e.endColumn>e.startColumn){const t={range:e,...a(n.substring(o[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&i.push(t)}}}return i}(e,t);i=i.concat(n)}if(t.findMarkSectionHeaders){const t=function(e){const t=[],i=e.getLineCount();for(let n=1;n<=i;n++)r(e.getLineContent(n),n,t);return t}(e);i=i.concat(t)}return i}function r(e,t,i){n.lastIndex=0;const s=n.exec(e);if(s){const e={startLineNumber:t,startColumn:s.indices[1][0]+1,endLineNumber:t,endColumn:s.indices[1][1]+1};if(e.endColumn>e.startColumn){const t={range:e,...a(s[1]),shouldBeInComments:!0};(t.text||t.hasSeparatorLine)&&i.push(t)}}}function a(e){const t=(e=e.trim()).startsWith("-");return{text:e=e.replace(s,""),hasSeparatorLine:t}}},32352:function(e,t,i){"use strict";i.r(t),i.d(t,{getIconClasses:function(){return d}});var n=i(84756),s=i(59951),o=i(54244),r=i(11521),a=i(65127),l=i(56613);const c=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,i,d,u){if(l.L.isThemeIcon(u))return[`codicon-${u.id}`,"predefined-file-icon"];if(o.r.isUri(u))return[];const g=d===a.p.ROOT_FOLDER?["rootfolder-icon"]:d===a.p.FOLDER?["folder-icon"]:["file-icon"];if(i){let o;if(i.scheme===n.ny.data)o=s.B6.parseMetaData(i).get(s.B6.META_DATA_LABEL);else{const e=i.path.match(c);e?(o=h(e[2].toLowerCase()),e[1]&&g.push(`${h(e[1].toLowerCase())}-name-dir-icon`)):o=h(i.authority.toLowerCase())}if(d===a.p.ROOT_FOLDER)g.push(`${o}-root-name-folder-icon`);else if(d===a.p.FOLDER)g.push(`${o}-name-folder-icon`);else{if(o){if(g.push(`${o}-name-file-icon`),g.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t(0,n.sN)(g.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?(0,o.qE)(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new o.mu(6),this._cache.set(i,n));const s=(0,o.qE)(n.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new o.Uq;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return(0,o.qE)(e,this._min,this._max)}}let m=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){const n=i?.min??50,s=i?.max??n**2,o=i?.key??void 0,r=`${g.of(e)},${n}${o?","+o:""}`;let a=this._data.get(r);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new p(1.5*n)):a=new f(this._logService,t,e,0|this._overallAverage()||1.5*n,n,s),this._data.set(r,a)),a}_overallAverage(){const e=new o.Uq;for(const t of this._data.values())e.update(t.default());return e.value}};m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([h(0,c.rr),h(1,r.k)],m),(0,a.v)(u,m,1)},69122:function(e,t,i){"use strict";i.r(t),i.d(t,{ILanguageFeaturesService:function(){return n}});const n=(0,i(63619).u1)("ILanguageFeaturesService")},18289:function(e,t,i){"use strict";i.r(t),i.d(t,{LanguageFeaturesService:function(){return g}});var n=i(80670),s=i(35114),o=i(62067),r=i(71543);function a(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(a):!!e.exclusive)}class l{constructor(e,t,i,n,s){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n,this.recursive=s}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class c{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new n.vl,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,s.s)((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e,t=!1){const i=[];return this._orderedForEach(e,t,(e=>i.push(e.provider))),i}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,!1,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t,i){this._updateScores(e,t);for(const e of this._entries)e._score>0&&i(e)}_updateScores(e,t){const i=this._notebookInfoResolver?.(e.uri),n=i?new l(e.uri,e.getLanguageId(),i.uri,i.type,t):new l(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(n)){this._lastCandidate=n;for(const i of this._entries)if(i._score=(0,r.f)(i.selector,n.uri,n.languageId,(0,o.vd)(e),n.notebookUri,n.notebookType),a(i.selector)&&i._score>0){if(!t){for(const e of this._entries)e._score=0;i._score=1e3;break}i._score=0}this._entries.sort(c._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._timet._time?-1:0}}function d(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var h=i(69122),u=i(48682);class g{constructor(){this.referenceProvider=new c(this._score.bind(this)),this.renameProvider=new c(this._score.bind(this)),this.newSymbolNamesProvider=new c(this._score.bind(this)),this.codeActionProvider=new c(this._score.bind(this)),this.definitionProvider=new c(this._score.bind(this)),this.typeDefinitionProvider=new c(this._score.bind(this)),this.declarationProvider=new c(this._score.bind(this)),this.implementationProvider=new c(this._score.bind(this)),this.documentSymbolProvider=new c(this._score.bind(this)),this.inlayHintsProvider=new c(this._score.bind(this)),this.colorProvider=new c(this._score.bind(this)),this.codeLensProvider=new c(this._score.bind(this)),this.documentFormattingEditProvider=new c(this._score.bind(this)),this.documentRangeFormattingEditProvider=new c(this._score.bind(this)),this.onTypeFormattingEditProvider=new c(this._score.bind(this)),this.signatureHelpProvider=new c(this._score.bind(this)),this.hoverProvider=new c(this._score.bind(this)),this.documentHighlightProvider=new c(this._score.bind(this)),this.multiDocumentHighlightProvider=new c(this._score.bind(this)),this.selectionRangeProvider=new c(this._score.bind(this)),this.foldingRangeProvider=new c(this._score.bind(this)),this.linkProvider=new c(this._score.bind(this)),this.inlineCompletionsProvider=new c(this._score.bind(this)),this.inlineEditProvider=new c(this._score.bind(this)),this.completionProvider=new c(this._score.bind(this)),this.linkedEditingRangeProvider=new c(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new c(this._score.bind(this)),this.documentSemanticTokensProvider=new c(this._score.bind(this)),this.documentDropEditProvider=new c(this._score.bind(this)),this.documentPasteEditProvider=new c(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,u.v)(h.ILanguageFeaturesService,g,1)},31806:function(e,t,i){"use strict";i.r(t),i.d(t,{LanguageService:function(){return d}});var n=i(80670),s=i(35114),o=i(839),r=i(97358),a=i(35720),l=i(11521),c=i(73755);class d extends s.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new n.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new n.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new n.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,d.instanceCount++,this._registry=this._register(new o.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){d.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,r.Fy)(i,null)}createById(e){return new h(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new h(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class h{constructor(e,t){this._value=(0,c.y0)(this,e,(()=>t())),this.onDidChange=n.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},13640:function(e,t,i){"use strict";i.r(t),i.d(t,{clearPlatformLanguageAssociations:function(){return p},getLanguageIds:function(){return f},registerPlatformLanguageAssociation:function(){return g}});var n=i(90562),s=i(5940),o=i(84756),r=i(68847),a=i(59951),l=i(43920),c=i(11521);let d=[],h=[],u=[];function g(e,t=!1){!function(e,t,i){const s=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,n.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(r.SA.sep)>=0}}(e);d.push(s),s.userConfigured?u.push(s):h.push(s),i&&!s.userConfigured&&d.forEach((e=>{e.mime===s.mime||e.userConfigured||(s.extension&&e.extension===s.extension&&console.warn(`Overwriting extension <<${s.extension}>> to now point to mime <<${s.mime}>>`),s.filename&&e.filename===s.filename&&console.warn(`Overwriting filename <<${s.filename}>> to now point to mime <<${s.mime}>>`),s.filepattern&&e.filepattern===s.filepattern&&console.warn(`Overwriting filepattern <<${s.filepattern}>> to now point to mime <<${s.mime}>>`),s.firstline&&e.firstline===s.firstline&&console.warn(`Overwriting firstline <<${s.firstline}>> to now point to mime <<${s.mime}>>`))}))}(e,0,t)}function p(){d=d.filter((e=>e.userConfigured)),h=[]}function f(e,t){return function(e,t){let i;if(e)switch(e.scheme){case o.ny.file:i=e.fsPath;break;case o.ny.data:i=a.B6.parseMetaData(e).get(a.B6.META_DATA_LABEL);break;case o.ny.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:s.K.unknown}];i=i.toLowerCase();const n=(0,r.P8)(i),g=m(i,n,u);if(g)return[g,{id:c.vH,mime:s.K.text}];const p=m(i,n,h);if(p)return[p,{id:c.vH,mime:s.K.text}];if(t){const e=function(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=d.length-1;t>=0;t--){const i=d[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}}(t);if(e)return[e,{id:c.vH,mime:s.K.text}]}return[{id:"unknown",mime:s.K.unknown}]}(e,t).map((e=>e.id))}function m(e,t,i){let n,s,o;for(let r=i.length-1;r>=0;r--){const a=i[r];if(t===a.filenameLowercase){n=a;break}if(a.filepattern&&(!s||a.filepattern.length>s.filepattern.length)){const i=a.filepatternOnPath?e:t;a.filepatternLowercase?.(i)&&(s=a)}a.extension&&(!o||a.extension.length>o.extension.length)&&t.endsWith(a.extensionLowercase)&&(o=a)}return n||s||o||void 0}},839:function(e,t,i){"use strict";i.r(t),i.d(t,{LanguageIdCodec:function(){return u},LanguagesRegistry:function(){return g}});var n=i(80670),s=i(35114),o=i(43920),r=i(13640),a=i(11521),l=i(16434),c=i(56419);const d=Object.prototype.hasOwnProperty,h="vs.editor.nullLanguage";class u{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(h,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||h}}class g extends s.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new u,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,r.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),c.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;d.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const s of t.filenames)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,filename:s},this._warnOnOverwrite),e.filenames.push(s);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,o.eY)(t)||(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(i){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,i)}}e.aliases.push(i);let s=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(s=0===t.aliases.length?[null]:t.aliases),null!==s)for(const t of s)t&&0!==t.length&&e.aliases.push(t);const a=null!==s&&s.length>0;if(a&&null===s[0]);else{const t=(a?s[0]:null)||i;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&d.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return d.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&d.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,r.getLanguageIds)(e,t):[]}}},12098:function(e,t,i){"use strict";i.r(t),i.d(t,{IMarkerDecorationsService:function(){return n}});const n=(0,i(63619).u1)("markerDecorationsService")},92903:function(e,t,i){"use strict";i.r(t),i.d(t,{MarkerDecorationsService:function(){return m}});var n=i(84119),s=i(35114),o=i(62067),r=i(40616),a=i(99851),l=i(59266),c=i(40393),d=i(84756),h=i(80670),u=i(4195),g=i(52732),p=i(34027),f=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new h.vl),this._markerDecorations=new g.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new _(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==d.ny.inMemory&&e.uri.scheme!==d.ny.internal&&e.uri.scheme!==d.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([f(0,l.IModelService),f(1,n.DR)],m);class _ extends s.jG{constructor(e){super(),this.model=e,this._map=new g.cO,this._register((0,s.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:i}=(0,p.Z)(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===i.length)return!1;const n=i.map((e=>this._map.get(e))),s=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),o=this.model.deltaDecorations(n,s);for(const e of i)this._map.delete(e);for(let e=0;e=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new c.Q(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}}},59266:function(e,t,i){"use strict";i.r(t),i.d(t,{IModelService:function(){return n}});const n=(0,i(63619).u1)("modelService")},76583:function(e,t,i){"use strict";i.r(t),i.d(t,{DefaultModelSHA1Computer:function(){return k},ModelService:function(){return S}});var n,s=i(80670),o=i(35114),r=i(79783),a=i(49079),l=i(31634),c=i(11521),d=i(17492),h=i(47901),u=i(79911),g=i(65260),p=i(38428),f=i(84756),m=i(49134),_=i(63619),v=function(e,t){return function(i,n){t(i,n,e)}};function b(e){return e.toString()}class w{constructor(e,t,i){this.model=e,this._modelEventListeners=new o.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const C=r.j9||r.zx?1:2;class y{constructor(e,t,i,n,s,o,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=o,this.versionId=r,this.alternativeVersionId=a}}let S=class extends o.jG{static{n=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,i,n){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._instantiationService=n,this._onModelAdded=this._register(new s.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new s.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new s.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let i=l.R.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=Math.max(t,1))}let s=l.R.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let o=C;const r=e.eol;"\r\n"===r?o=2:"\n"===r&&(o=1);let a=l.R.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=l.R.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=l.R.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=l.R.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"==typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:s,detectIndentation:c,defaultEOL:o,trimAutoWhitespace:a,largeFileOptimizations:d,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,i){const s="string"==typeof e?e:e.languageId;let o=this._modelCreationOptionsByLanguageAndResource[s+t];if(!o){const e=this._configurationService.getValue("editor",{overrideIdentifier:s,resource:t}),r=this._getEOL(t,s);o=n._readModelOptions({editor:e,eol:r},i),this._modelCreationOptionsByLanguageAndResource[s+t]=o}return o}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let s=0,o=i.length;se){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),o=this._instantiationService.createInstance(a.Bz,e,t,s,i);if(i&&this._disposedModels.has(b(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=this._getSHA1Computer(),s=!!n.canComputeSHA1(o)&&n.computeSHA1(o)===e.sha1;if(s||e.sharesUndoRedoStack){for(const e of t.past)(0,p.Th)(e)&&e.matchesResource(i)&&e.setModel(o);for(const e of t.future)(0,p.Th)(e)&&e.matchesResource(i)&&e.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,p.Th)(e)&&e.matchesResource(i))),s&&(o._overwriteVersionId(e.versionId),o._overwriteAlternativeVersionId(e.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=b(o.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const l=new w(o,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=l,l}createModel(e,t,i,n=!1){let s;return s=t?this._createModelData(e,t,i,n):this._createModelData(e,c.vH,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||t.future.length>0){for(const i of t.past)(0,p.Th)(i)&&i.matchesResource(e.uri)&&(o=!0,r+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)(0,p.Th)(i)&&i.matchesResource(e.uri)&&(o=!0,r+=i.heapSize(e.uri),i.setModel(e.uri))}}const a=n.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(o)if(s||!(r>a)&&l.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>(0,p.Th)(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new y(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),s,r,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!s){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,s=e.getLanguageId(),o=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(s,e.uri,e.isForSimpleWidget);n._setModelOptionsForModel(e,r,o),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new k}};S=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([v(0,h.pG),v(1,d.ITextResourcePropertiesService),v(2,u.$D),v(3,_._Y)],S);class k{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=k.MAX_MODEL_SIZE}computeSHA1(e){const t=new g.v7,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}}},20878:function(e,t,i){"use strict";i.r(t),i.d(t,{ITextModelService:function(){return n}});const n=(0,i(63619).u1)("textModelService")},85124:function(e,t,i){"use strict";i.r(t),i.d(t,{encodeSemanticTokensDto:function(){return o}});var n=i(28198),s=i(79783);function o(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return s.cm()||function(e){for(let t=0,i=e.length;t0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new o.y(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(0===t&&0===i)return;const o=e.lineNumber-this._startLineNumber;o<0?this._startLineNumber+=t:o>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(o,e.column-1,t,i,n,s)}}class c{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let s=n;for(;s>t&&this._getDeltaLine(s-1)===e;)s--;let o=n;for(;oe||d===e&&u>=t)&&(de||c===e&&g>=t){if(cs?p-=s-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>s)){c=!0;continue}p-=s-i}else if(us)){c=!0;continue}u=t,g=i,p=g+(p-s)}else if(u>n){if(0===a&&!c){l=r;break}u-=a}else{if(!(u===n&&g>=s))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=s-i,p-=s-i}const m=4*l;o[m]=u,o[m+1]=g,o[m+2]=p,o[m+3]=f,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,s,o){const r=0===i&&1===n&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),a=this._tokens,l=this._tokenCount;for(let o=0;o0&&t>=1;const n=this._themeService.getColorTheme().getTokenStyleMetadata(s,r,i);void 0===n?o=2147483647:(o=0,void 0!==n.italic&&(o|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(o|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(o|=4|(n.underline?4:0)<<11),void 0!==n.strikethrough&&(o|=8|(n.strikethrough?8:0)<<11),n.foreground&&(o|=16|n.foreground<<15),0===o&&(o=2147483647))}else o=2147483647,s="not-in-legend";this._hashTable.add(e,t,n,o)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};function p(e,t,i){const n=e.data,s=e.data.length/5|0,o=Math.max(Math.ceil(s/1024),400),r=[];let a=0,c=1,d=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=h;for(;e+1l)t.warnOverlappingSemanticTokens(r,l+1);else{const e=t.getMetadata(_,v,i);2147483647!==e&&(0===p&&(p=r),u[g]=r-p,u[g+1]=l,u[g+2]=h,u[g+3]=e,g+=4,f=r,m=h)}c=r,d=l,a++}g!==u.length&&(u=u.subarray(0,g));const _=l.create(p,u);r.push(_)}return r}g=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([u(1,n.Gy),u(2,h.L),u(3,s.rr)],g);class f{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class m{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=m._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=m._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};h=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([d(0,o.Gy),d(1,r.rr),d(2,s.L)],h),(0,c.v)(l.ISemanticTokensStylingService,h,1)},45148:function(e,t,i){"use strict";i.r(t),i.d(t,{MirrorModel:function(){return f},STOP_SYNC_MODEL_DELTA_TIME_MS:function(){return u},WorkerTextModelSyncClient:function(){return g},WorkerTextModelSyncServer:function(){return p}});var n=i(90890),s=i(35114),o=i(54244),r=i(62993),a=i(40393),l=i(86506),c=i(43920),d=i(45354);class h{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new r.y(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;nthis._checkStopModelSync()),Math.round(u/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,s.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>u&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.$acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const o=new s.Cm;o.add(i.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(n.toString(),e)}))),o.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),o.add((0,s.s)((()=>{this._proxy.$acceptRemovedModel(n)}))),this._syncedModels[n]=o}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,s.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new f(o.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class f extends h{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}},17492:function(e,t,i){"use strict";i.r(t),i.d(t,{ITextResourceConfigurationService:function(){return s},ITextResourcePropertiesService:function(){return o}});var n=i(63619);const s=(0,n.u1)("textResourceConfigurationService"),o=(0,n.u1)("textResourcePropertiesService")},10948:function(e,t,i){"use strict";i.r(t),i.d(t,{ITreeSitterParserService:function(){return n}});const n=(0,i(63619).u1)("treeSitterParserService")},73559:function(e,t,i){"use strict";i.r(t),i.d(t,{DraggedTreeItemsIdentifier:function(){return s},TreeViewsDnDService:function(){return n}});class n{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class s{constructor(e){this.identifier=e}}},61152:function(e,t,i){"use strict";i.r(t),i.d(t,{ITreeViewsDnDService:function(){return r}});var n=i(48682),s=i(63619),o=i(73559);const r=(0,s.u1)("treeViewsDndService");(0,n.v)(r,o.TreeViewsDnDService,1)},18827:function(e,t,i){"use strict";i.r(t),i.d(t,{UnicodeTextModelHighlighter:function(){return l}});var n=i(40393),s=i(58980),o=i(43920),r=i(93066),a=i(86506);class l{static computeUnicodeHighlights(e,t,i){const l=i?i.startLineNumber:1,d=i?i.endLineNumber:e.getLineCount(),h=new c(t),u=h.getCandidateCodePoints();let g;var p;g="allNonBasicAscii"===u?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp((p=Array.from(u),`[${o.bm(p.map((e=>String.fromCodePoint(e))).join(""))}]`),"g");const f=new s.W5(null,g),m=[];let _,v=!1,b=0,w=0,C=0;e:for(let t=l,i=d;t<=i;t++){const i=e.getLineContent(t),s=i.length;f.reset(0);do{if(_=f.next(i),_){let e=_.index,l=_.index+_[0].length;if(e>0){const t=i.charCodeAt(e-1);o.pc(t)&&e--}if(l+1=i){v=!0;break e}m.push(new n.Q(t,e+1,t,l+1))}}}while(_)}return{ranges:m,hasMore:v,ambiguousCharacterCount:b,invisibleCharacterCount:w,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(e,t){const i=new c(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),s=i.ambiguousCharacters.getPrimaryConfusable(n),r=o.tl.getLocales().filter((e=>!o.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}class c{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=o.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of o.y_.codePoints)d(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,s=!1;if(t)for(const e of t){const t=e.codePointAt(0),i=o.aC(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||o.y_.isInvisibleCharacter(t)||(s=!0)}return!n&&s?0:this.options.invisibleCharacters&&!d(e)&&o.y_.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function d(e){return" "===e||"\n"===e||"\t"===e}},52048:function(e,t,i){var n={"./editorBaseApi":[32919],"./editorBaseApi.js":[32919],"./editorSimpleWorker":[79075],"./editorSimpleWorker.js":[79075],"./editorWorker":[56812],"./editorWorker.js":[56812],"./editorWorkerHost":[8482],"./editorWorkerHost.js":[8482],"./findSectionHeaders":[43359],"./findSectionHeaders.js":[43359],"./getIconClasses":[32352],"./getIconClasses.js":[32352],"./languageFeatureDebounce":[82688],"./languageFeatureDebounce.js":[82688],"./languageFeatures":[69122],"./languageFeatures.js":[69122],"./languageFeaturesService":[18289],"./languageFeaturesService.js":[18289],"./languageService":[31806],"./languageService.js":[31806],"./languagesAssociations":[13640],"./languagesAssociations.js":[13640],"./languagesRegistry":[839],"./languagesRegistry.js":[839],"./markerDecorations":[12098],"./markerDecorations.js":[12098],"./markerDecorationsService":[92903],"./markerDecorationsService.js":[92903],"./model":[59266],"./model.js":[59266],"./modelService":[76583],"./modelService.js":[76583],"./resolverService":[20878],"./resolverService.js":[20878],"./semanticTokensDto":[85124],"./semanticTokensDto.js":[85124],"./semanticTokensProviderStyling":[38620],"./semanticTokensProviderStyling.js":[38620],"./semanticTokensStyling":[17239],"./semanticTokensStyling.js":[17239],"./semanticTokensStylingService":[54560],"./semanticTokensStylingService.js":[54560],"./textModelSync/textModelSync.impl":[45148],"./textModelSync/textModelSync.impl.js":[45148],"./textModelSync/textModelSync.protocol":[19400,9400],"./textModelSync/textModelSync.protocol.js":[19400,9400],"./textResourceConfiguration":[17492],"./textResourceConfiguration.js":[17492],"./treeSitterParserService":[10948],"./treeSitterParserService.js":[10948],"./treeViewsDnd":[73559],"./treeViewsDnd.js":[73559],"./treeViewsDndService":[61152],"./treeViewsDndService.js":[61152],"./unicodeTextModelHighlighter":[18827],"./unicodeTextModelHighlighter.js":[18827]};function s(e){if(!i.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],s=t[0];return Promise.all(t.slice(1).map(i.e)).then((function(){return i(s)}))}s.keys=function(){return Object.keys(n)},s.id=52048,e.exports=s},36035:function(e,t,i){"use strict";var n,s,o,r,a,l,c,d,h,u,g,p,f,m,_,v,b,w,C,y,S,k,x,L,D,E,N,I,M,T,R,P,A,O,F,B,W,H,V,z,U,j,q,K,$,G;i.d(t,{A5:function(){return R},Ah:function(){return P},DD:function(){return k},DO:function(){return O},Gn:function(){return n},H_:function(){return j},Ic:function(){return A},Io:function(){return r},Kb:function(){return u},M$:function(){return v},OV:function(){return I},QP:function(){return a},Qj:function(){return c},R3:function(){return D},SB:function(){return H},U7:function(){return q},VW:function(){return w},VX:function(){return E},WA:function(){return z},WU:function(){return m},XR:function(){return W},YT:function(){return M},ZS:function(){return _},_E:function(){return o},cj:function(){return x},dE:function(){return T},d_:function(){return L},e0:function(){return g},h5:function(){return d},hS:function(){return N},hW:function(){return F},jT:function(){return V},kK:function(){return $},kf:function(){return f},l:function(){return b},m9:function(){return K},of:function(){return h},ok:function(){return s},ov:function(){return B},p2:function(){return p},qw:function(){return y},r4:function(){return C},sm:function(){return S},t7:function(){return l},tJ:function(){return G},v0:function(){return U}}),function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(n||(n={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(s||(s={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(o||(o={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(r||(r={})),function(e){e[e.Deprecated=1]="Deprecated"}(a||(a={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(l||(l={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(c||(c={})),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"}(d||(d={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(h||(h={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(u||(u={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(g||(g={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"}(p||(p={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(f||(f={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(m||(m={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(_||(_={})),function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(v||(v={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(b||(b={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(w||(w={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(C||(C={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(y||(y={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(S||(S={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(k||(k={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(x||(x={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(L||(L={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(D||(D={})),function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"}(E||(E={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(N||(N={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(I||(I={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(M||(M={})),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"}(T||(T={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(R||(R={})),function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"}(P||(P={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}(A||(A={})),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"}(O||(O={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(F||(F={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(B||(B={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(W||(W={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(H||(H={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(V||(V={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(z||(z={})),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"}(U||(U={})),function(e){e[e.Deprecated=1]="Deprecated"}(j||(j={})),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"}(q||(q={})),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={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}($||($={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(G||(G={}))},47025:function(e,t,i){"use strict";i.d(t,{E6:function(){return c},Hw:function(){return s},YN:function(){return n},gf:function(){return r},n9:function(){return a},oq:function(){return o},tu:function(){return d},vp:function(){return l}});var n,s,o,r,a,l,c,d,h=i(14374);!function(e){e.inspectTokensAction=h.kg("inspectTokens","Developer: Inspect Tokens")}(n||(n={})),function(e){e.gotoLineActionLabel=h.kg("gotoLineActionLabel","Go to Line/Column...")}(s||(s={})),function(e){e.helpQuickAccessActionLabel=h.kg("helpQuickAccess","Show all Quick Access Providers")}(o||(o={})),function(e){e.quickCommandActionLabel=h.kg("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=h.kg("quickCommandActionHelp","Show And Run Commands")}(r||(r={})),function(e){e.quickOutlineActionLabel=h.kg("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=h.kg("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(a||(a={})),function(e){e.editorViewAccessibleLabel=h.kg("editorViewAccessibleLabel","Editor content")}(l||(l={})),function(e){e.toggleHighContrast=h.kg("toggleHighContrast","Toggle High Contrast Theme")}(c||(c={})),function(e){e.bulkEditServiceSummary=h.kg("bulkEditServiceSummary","Made {0} edits in {1} files")}(d||(d={}))},40699:function(e,t,i){"use strict";i.d(t,{E$:function(){return r},HP:function(){return c},Ic:function(){return h},U0:function(){return o},Wn:function(){return n},bg:function(){return a},mS:function(){return l},uK:function(){return s},vn:function(){return d}});class n{constructor(){this.changeType=1}}class s{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new s(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new s(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}}class o{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class r{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class c{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t>>1,this._text=t,this.languageIdCodec=i}equals(e){return e instanceof s&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.x.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return n.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return s.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new o(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=s)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const o=new Array;let r=0;for(;;){const s=tr){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];o.push(n.length,e),r=a.offset}n+=a.text,o.push(n.length,a.tokenMetadata),i++}}return new s(new Uint32Array(o),n,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),i=this.getEndOffset(e);return this._text.substring(t,i)}forEach(e){const t=this.getCount();for(let i=0;i=i);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof o&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,i=this._source.getStartOffset(t),n=this._source.getEndOffset(t);let s=this._source.getTokenText(t);return ithis._endOffset&&(s=s.substring(0,s.length-(n-this._endOffset))),s}forEach(e){for(let t=0;t=o||(a[l++]=new s(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];const o=[];let r=0;for(let a=0,l=e.length;at)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const d=c.startLineNumber===t?c.startColumn:i,h=c.endLineNumber===t?c.endColumn:n;o[r++]=new s(d,h,l.inlineClassName,l.type)}return o}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=s._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];const i=[],s=new r;let o=0;for(let r=0,a=t.length;r1){const t=e.charCodeAt(l-2);n.pc(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);n.pc(t)&&c--}const u=l-1,g=c-2;o=s.consumeLowerThan(u,o,i),0===s.count&&(o=u),s.insert(g,d,h)}return s.consumeLowerThan(1073741824,o,i),i}}},73055:function(e,t,i){"use strict";i.d(t,{wZ:function(){return d},MT:function(){return l},zL:function(){return c},UW:function(){return g},Md:function(){return f}});var n=i(14374),s=i(43920),o=i(52192),r=i(10621);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class l{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class c{constructor(e,t,i,n,s,o,a,l,c,d,h,u,g,p,f,m,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(r.d.compare),this.tabSize=d,this.startVisibleColumn=h,this.spaceWidth=u,this.stopRenderingLineAfter=f,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const s=(t<<16|i)>>>0;this._data[e-1]=s,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=h.getPartIndex(t),n=h.getCharIndex(t);return new d(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i)>>>0;let s=0,o=this.length-1;for(;s+1>>1,t=this._data[e];if(t===n)return e;t>n?o=e:s=e}if(s===o)return s;const r=this._data[s],a=this._data[o];if(r===n)return s;if(a===n)return o;const l=h.getPartIndex(r),c=h.getCharIndex(r);let d;return d=l!==h.getPartIndex(a)?t:h.getCharIndex(a),i-c<=d-i?s:o}}class u{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("");let i=0,n=0,s=0;for(const o of e.lineDecorations)1!==o.type&&2!==o.type||(t.appendString(''),1===o.type&&(s|=1,i++),2===o.type&&(s|=2,n++));t.appendString("");const o=new h(1,i+n);return o.setColumnInfo(1,i,0,0),new u(o,!1,s)}return t.appendString(""),new u(new h(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,a=e.lineContent,l=e.len,c=e.isOverflowing,d=e.overflowingCharCount,g=e.parts,p=e.fauxIndentLength,f=e.tabSize,m=e.startVisibleColumn,v=e.containsRTL,b=e.spaceWidth,w=e.renderSpaceCharCode,C=e.renderWhitespace,y=e.renderControlCharacters,S=new h(l+1,g.length);let k=!1,x=0,L=m,D=0,E=0,N=0;v?t.appendString(''):t.appendString("");for(let e=0,n=g.length;e=p&&(t+=n)}}for(m&&(t.appendString(' style="width:'),t.appendString(String(b*i)),t.appendString('px"')),t.appendASCIICharCode(62);x1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=n;e++)t.appendCharCode(160)}else i=2,n=1,t.appendCharCode(w),t.appendCharCode(8204);D+=i,E+=n,x>=p&&(L+=n)}}else for(t.appendASCIICharCode(62);x=p&&(L+=o)}v?N++:N=0,x>=l&&!k&&n.isPseudoAfter()&&(k=!0,S.setColumnInfo(x+1,e,D,E)),t.appendString("")}return k||S.setColumnInfo(l+1,g.length-1,D,E),c&&(t.appendString(''),t.appendString(n.kg("showMore","Show more ({0})",function(e){return e<1024?n.kg("overflow.chars","{0} chars",e):e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}(d))),t.appendString("")),t.appendString(""),new u(S,v,r)}(function(e){const t=e.lineContent;let i,n,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(r[l++]=new a(n,"",0,!1));let c=n;for(let d=0,h=i.getCount();d=o){const i=!!t&&s.E_(e.substring(c,o));r[l++]=new a(o,u,0,i);break}const g=!!t&&s.E_(e.substring(c,h));r[l++]=new a(h,u,0,g),c=h}return r}(t,e.containsRTL,e.lineTokens,e.fauxIndentLength,o);e.renderControlCharacters&&!e.isBasicASCII&&(l=function(e,t){const i=[];let n=new a(0,"",0,!1),s=0;for(const o of t){const t=o.endIndex;for(;sn.endIndex&&(n=new a(s,o.type,o.metadata,o.containsRTL),i.push(n)),n=new a(s+1,"mtkcontrol",o.metadata,!1),i.push(n));s>n.endIndex&&(n=new a(t,o.type,o.metadata,o.containsRTL),i.push(n))}return i}(t,l)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(l=function(e,t,i,n){const o=e.continuesWithWrappedLine,r=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,d=e.useMonospaceOptimizations,h=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth,f=[];let m=0,_=0,v=n[_].type,b=n[_].containsRTL,w=n[_].endIndex;const C=n.length;let y,S=!1,k=s.HG(t);-1===k?(S=!0,k=i,y=i):y=s.lT(t);let x=!1,L=0,D=h&&h[L],E=c%l;for(let e=r;e=D.endOffset&&(L++,D=h&&h[L]),ey)c=!0;else if(9===o)c=!0;else if(32===o)if(u)if(x)c=!0;else{const n=e+1e),c&&g&&(c=S||e>y),c&&b&&e>=k&&e<=y&&(c=!1),x){if(!c||!d&&E>=l){if(p)for(let t=(m>0?f[m-1].endIndex:r)+1;t<=e;t++)f[m++]=new a(t,"mtkw",1,!1);else f[m++]=new a(e,"mtkw",1,!1);E%=l}}else(e===w||c&&e>r)&&(f[m++]=new a(e,v,0,b),E%=l);for(9===o?E=l:s.ne(o)?E+=2:E++,x=c;e===w&&(_++,_0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(N=!0)}else N=!0;if(N)if(p)for(let e=(m>0?f[m-1].endIndex:r)+1;e<=i;e++)f[m++]=new a(e,"mtkw",1,!1);else f[m++]=new a(i,"mtkw",1,!1);else f[m++]=new a(i,v,0,b);return f}(e,t,o,l));let c=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;th&&(h=e.startOffset,c[d++]=new a(h,r,u,g)),!(e.endOffset+1<=n)){h=n,c[d++]=new a(h,r+" "+e.className,u|e.metadata,g);break}h=e.endOffset+1,c[d++]=new a(h,r+" "+e.className,u|e.metadata,g),l++}n>h&&(h=n,c[d++]=new a(h,r,u,g))}const u=i[i.length-1].endIndex;if(l=50&&(s[o++]=new a(d+1,t,i,c),h=d+1,d=-1);h!==l&&(s[o++]=new a(l,t,i,c))}else s[o++]=r;n=l}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,c=i.containsRTL,d=Math.ceil(l/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},68316:function(e,t,i){"use strict";i.d(t,{GP:function(){return l},LM:function(){return r},Uv:function(){return g},kI:function(){return d},nt:function(){return a},or:function(){return h},qL:function(){return c},vo:function(){return u}});var n=i(97358),s=i(43920),o=i(40393);class r{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class a{constructor(e,t){this.tabSize=e,this.data=t}}class l{constructor(e,t,i,n,s,o,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=r}}class c{constructor(e,t,i,n,s,o,r,a,l,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=c.isBasicASCII(i,o),this.containsRTL=c.containsRTL(i,this.isBasicASCII,s),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||s.aC(e)}static containsRTL(e,t,i){return!(t||!i)&&s.E_(e)}}class d{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class h{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new d(new o.Q(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class u{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class g{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&n.aI(e.data,t.data)}static equalsArr(e,t){return n.aI(e,t,g.equals)}}},81655:function(e,t,i){"use strict";i.d(t,{iE:function(){return s},rW:function(){return o}});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class s{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(g=i-p);const f=l.color;let m=this._color2Id[f];m||(m=++this._lastAssignedId,this._color2Id[f]=m,this._id2Color[m]=f);const _=new n(g-p,g+p,m);l.setColorZone(_),r.push(_)}return this._colorZonesInvalid=!1,r.sort(n.compare),r}}},77002:function(e,t,i){"use strict";i.d(t,{GN:function(){return l},UB:function(){return a},a6:function(){return c},wc:function(){return d}});var n=i(62993),s=i(40393),o=i(68316),r=i(3520);class a{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const r=e.range,a=e.options;let l;if(a.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.y(r.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.y(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);l=new s.Q(e.lineNumber,e.column,t.lineNumber,t.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(r,1);i=new o.vo(l,a),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new s.Q(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,r.$C)(this.configuration.options),t,i),a=e.startLineNumber,c=e.endLineNumber,d=[];let h=0;const u=[];for(let e=a;e<=c;e++)u[e-a]=[];for(let e=0,t=n.length;e1===e))}function d(e,t){return h(e,t.range,(e=>2===e))}function h(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const s=e.tokenization.getLineTokens(n),o=n===t.startLineNumber,r=n===t.endLineNumber;let a=o?s.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1);){if(!i(s.getStandardTokenType(a)))return!1;a++}}return!0}},97078:function(e,t,i){"use strict";var n,s=i(15075),o=i(85584),r=i(62167),a=i(52694),l=i(56218),c=i(49678),d=i(14374),h=i(97848);const u=new h.N1("selectionAnchorSet",!1);let g=class{static{n=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(n.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=u.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations((t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(l.L.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new o.Bc).appendText((0,d.kg)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,s.xE)((0,d.kg)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(l.L.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations((t=>{t.removeDecoration(e),this.decorationId=void 0})),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var p,f;g=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(p=1,f=h.fN,function(e,t){f(e,t,p)})],g);class m extends a.ks{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,d.kg)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:(0,r.m5)(2089,2080),weight:100}})}async run(e,t){g.get(t)?.setSelectionAnchor()}}class _ extends a.ks{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,d.kg)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:u})}async run(e,t){g.get(t)?.goToSelectionAnchor()}}class v extends a.ks{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,d.kg)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:u,kbOpts:{kbExpr:c.R.editorTextFocus,primary:(0,r.m5)(2089,2089),weight:100}})}async run(e,t){g.get(t)?.selectFromAnchorToCursor()}}class b extends a.ks{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,d.kg)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:u,kbOpts:{kbExpr:c.R.editorTextFocus,primary:9,weight:100}})}async run(e,t){g.get(t)?.cancelSelectionAnchor()}}(0,a.HW)(g.ID,g,4),(0,a.Fl)(m),(0,a.Fl)(_),(0,a.Fl)(v),(0,a.Fl)(b)},53732:function(e,t,i){"use strict";var n=i(90890),s=i(35114),o=i(52694),r=i(62993),a=i(40393),l=i(56218),c=i(49678),d=i(62067),h=i(49079),u=i(14374),g=i(93223),p=i(4195),f=i(40616);const m=(0,p.x1A)("editorOverviewRuler.bracketMatchForeground","#A0A0A0",u.kg("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class _ extends o.ks{constructor(){super({id:"editor.action.jumpToBracket",label:u.kg("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3165,weight:100}})}run(e,t){C.get(t)?.jumpToBracket()}}class v extends o.ks{constructor(){super({id:"editor.action.selectToBracket",label:u.kg("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:u.aS("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let n=!0;i&&!1===i.selectBrackets&&(n=!1),C.get(t)?.selectToBracket(n)}}class b extends o.ks{constructor(){super({id:"editor.action.removeBrackets",label:u.kg("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:2561,weight:100}})}run(e,t){C.get(t)?.removeBrackets(this.id)}}class w{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class C extends s.jG{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(C.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.uC((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let s=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?s=n[1].getStartPosition():n[1].containsPosition(i)&&(s=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)s=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(s=t.range.getStartPosition())}}return s?new l.L(s.lineNumber,s.column,s.lineNumber,s.column):new l.L(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const s=n.getStartPosition();let o=t.bracketPairs.matchBracket(s);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(s),!o)){const e=t.bracketPairs.findNextBracket(s);e&&e.range&&(o=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,c=null;if(o){o.sort(a.Q.compareRangesUsingStarts);const[t,i]=o;if(r=e?t.getStartPosition():t.getEndPosition(),c=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(s)){const e=r;r=c,c=e}}r&&c&&i.push(new l.L(r.lineNumber,r.column,c.lineNumber,c.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach((i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())}))}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=h.kI.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,f.Yf)(m),position:d.A5.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=h.kI.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let o=0;for(let t=0,i=e.length;t1&&s.sort(r.y.compare);const a=[];let l=0,c=0;const d=n.length;for(let e=0,i=s.length;e0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Fl)(c)},50568:function(e,t,i){"use strict";var n=i(75969),s=i(84201),o=i(79783),r=i(55036),a=i(52694),l=i(72777),c=i(49678),d=i(22117),h=i(14374),u=i(93223),g=i(42558),p=i(97848);const f="9_cutcopypaste",m=o.ib||document.queryCommandSupported("cut"),_=o.ib||document.queryCommandSupported("copy"),v=void 0!==navigator.clipboard&&!n.gm||document.queryCommandSupported("paste");function b(e){return e.register(),e}const w=m?b(new a.fE({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:o.ib?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:u.D8.MenubarEditMenu,group:"2_ccp",title:h.kg({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:u.D8.EditorContext,group:f,title:h.kg("actions.clipboard.cutLabel","Cut"),when:c.R.writable,order:1},{menuId:u.D8.CommandPalette,group:"",title:h.kg("actions.clipboard.cutLabel","Cut"),order:1},{menuId:u.D8.SimpleEditorContext,group:f,title:h.kg("actions.clipboard.cutLabel","Cut"),when:c.R.writable,order:1}]})):void 0,C=_?b(new a.fE({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:o.ib?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:u.D8.MenubarEditMenu,group:"2_ccp",title:h.kg({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:u.D8.EditorContext,group:f,title:h.kg("actions.clipboard.copyLabel","Copy"),order:2},{menuId:u.D8.CommandPalette,group:"",title:h.kg("actions.clipboard.copyLabel","Copy"),order:1},{menuId:u.D8.SimpleEditorContext,group:f,title:h.kg("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;u.ZG.appendMenuItem(u.D8.MenubarEditMenu,{submenu:u.D8.MenubarCopy,title:h.aS("copy as","Copy As"),group:"2_ccp",order:3}),u.ZG.appendMenuItem(u.D8.EditorContext,{submenu:u.D8.EditorContextCopy,title:h.aS("copy as","Copy As"),group:f,order:3}),u.ZG.appendMenuItem(u.D8.EditorContext,{submenu:u.D8.EditorContextShare,title:h.aS("share","Share"),group:"11_share",order:-1,when:p.M$.and(p.M$.notEquals("resourceScheme","output"),c.R.editorTextFocus)}),u.ZG.appendMenuItem(u.D8.ExplorerContext,{submenu:u.D8.ExplorerContextShare,title:h.aS("share","Share"),group:"11_share",order:-1});const y=v?b(new a.fE({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:o.ib?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:u.D8.MenubarEditMenu,group:"2_ccp",title:h.kg({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:u.D8.EditorContext,group:f,title:h.kg("actions.clipboard.pasteLabel","Paste"),when:c.R.writable,order:4},{menuId:u.D8.CommandPalette,group:"",title:h.kg("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:u.D8.SimpleEditorContext,group:f,title:h.kg("actions.clipboard.pasteLabel","Paste"),when:c.R.writable,order:4}]})):void 0;class S extends a.ks{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:h.kg("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:c.R.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(37)&&t.getSelection().isEmpty()||(r.Eq.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),r.Eq.forceCopyWithSyntaxHighlighting=!1))}}function k(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(l.T).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(37),i=n.getSelection();return i&&i.isEmpty()&&!e||n.getContainerDomNode().ownerDocument.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>((0,s.a)().execCommand(t),!0))))}k(w,"cut"),k(C,"copy"),y&&(y.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.T),n=e.get(g.h),s=i.getFocusedCodeEditor();return!(!s||!s.hasTextFocus())&&(s.getContainerDomNode().ownerDocument.execCommand("paste")?d.Rj.get(s)?.finishedPaste()??Promise.resolve():!o.HZ||(async()=>{const e=await n.readText();if(""!==e){const t=r.bs.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=s.getOption(37)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),s.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}})())})),y.addImplementation(0,"generic-dom",((e,t)=>((0,s.a)().execCommand("paste"),!0)))),_&&(0,a.Fl)(S)},7126:function(e,t,i){"use strict";i.d(t,{C9:function(){return x},Qp:function(){return T},Rw:function(){return D},Uy:function(){return L},W4:function(){return R},Xj:function(){return k},dU:function(){return I},k_:function(){return C},pQ:function(){return y},pR:function(){return S}});var n=i(97358),s=i(76611),o=i(20187),r=i(35114),a=i(54244),l=i(98325),c=i(40393),d=i(56218),h=i(69122),u=i(59266),g=i(765),p=i(14374),f=i(21335),m=i(31835),_=i(86171),v=i(2727),b=i(78875),w=i(74159);const C="editor.action.codeAction",y="editor.action.quickFix",S="editor.action.autoFix",k="editor.action.refactor",x="editor.action.sourceAction",L="editor.action.organizeImports",D="editor.action.fixAll";class E extends r.jG{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:(0,n.EI)(e.diagnostics)?(0,n.EI)(t.diagnostics)?E.codeActionsPreferredComparator(e,t):-1:(0,n.EI)(t.diagnostics)?1:E.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(E.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&b.gB.QuickFix.contains(new w.k(e.kind))&&!!e.isPreferred))}get hasAIFix(){return this.validActions.some((({action:e})=>!!e.isAI))}get allAIFixes(){return this.validActions.every((({action:e})=>!!e.isAI))}}const N={actions:[],documentation:void 0};async function I(e,t,i,s,a,l){const c=s.filter||{},d={...c,excludes:[...c.excludes||[],b.gB.Notebook]},h={only:c.include?.value,trigger:s.type},u=new g.ER(t,l),p=2===s.type,f=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,b.uJ)(i,new w.k(e))))))}(e,t,p?d:c),m=new r.Cm,_=f.map((async e=>{try{a.report(e);const n=await e.provideCodeActions(t,i,h,u.token);if(n&&m.add(n),u.token.isCancellationRequested)return N;const s=(n?.actions||[]).filter((e=>e&&(0,b.aF)(c,e))),o=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new w.k(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return e?.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new w.k(e.kind)))return t.command}(e,s,c.include);return{actions:s.map((t=>new b.Vi(t,e))),documentation:o}}catch(e){if((0,o.MB)(e))throw e;return(0,o.M_)(e),N}})),v=e.onDidChange((()=>{const i=e.all(t);(0,n.aI)(i,f)||u.cancel()}));try{const i=await Promise.all(_),o=i.map((e=>e.actions)).flat(),r=[...(0,n.Yc)(i.map((e=>e.documentation))),...M(e,t,s,o)];return new E(o,r,m)}finally{v.dispose(),u.dispose()}}function*M(e,t,i,n){if(t&&n.length)for(const s of e.all(t))s._getAdditionalMenuItems&&(yield*s._getAdditionalMenuItems?.({trigger:i.type,only:i.filter?.include?.value},n.map((e=>e.action))))}var T;async function R(e,t,i,n,o=s.XO.None){const r=e.get(l.nu),a=e.get(f.d),c=e.get(v.k),d=e.get(m.Ot);if(c.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),await t.resolve(o),!o.isCancellationRequested){if(t.action.edit?.edits.length&&!(await r.apply(t.action.edit,{editor:n?.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==T.OnSave,showPreview:n?.preview})).isApplied)return;if(t.action.command)try{await a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);d.error("string"==typeof t?t:p.kg("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}}!function(e){e.OnSave="onSave",e.FromProblemsView="fromProblemsView",e.FromCodeActions="fromCodeActions",e.FromAILightbulb="fromAILightbulb"}(T||(T={})),f.w.registerCommand("_executeCodeActionProvider",(async function(e,t,i,n,r){if(!(t instanceof a.r))throw(0,o.Qg)();const{codeActionProvider:l}=e.get(h.ILanguageFeaturesService),g=e.get(u.IModelService).getModel(t);if(!g)throw(0,o.Qg)();const p=d.L.isISelection(i)?d.L.liftSelection(i):c.Q.isIRange(i)?g.validateRange(i):void 0;if(!p)throw(0,o.Qg)();const f="string"==typeof n?new w.k(n):void 0,m=await I(l,g,p,{type:1,triggerAction:b.fo.Default,filter:{includeSourceActions:!0,include:f}},_.ke.None,s.XO.None),v=[],C=Math.min(m.validActions.length,"number"==typeof r?r:0);for(let e=0;ee.action))}finally{setTimeout((()=>m.dispose()),100)}}))},62082:function(e,t,i){"use strict";var n=i(52694),s=i(38047),o=i(74159),r=i(43920),a=i(49678),l=i(7126),c=i(14374),d=i(97848),h=i(78875),u=i(97810),g=i(95133);function p(e){return d.M$.regex(g.D_.keys()[0],new RegExp("(\\s|^)"+(0,r.bm)(e.value)+"\\b"))}const f={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:c.kg("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:c.kg("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[c.kg("args.schema.apply.first","Always apply the first returned code action."),c.kg("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),c.kg("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:c.kg("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function m(e,t,i,n,s=h.fo.Default){if(e.hasModel()){const o=u.C.get(e);o?.manualTriggerAtCurrentPosition(t,s,i,n)}}class _ extends n.ks{constructor(){super({id:l.pQ,label:c.kg("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),kbOpts:{kbExpr:a.R.textInputFocus,primary:2137,weight:100}})}run(e,t){return m(t,c.kg("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,h.fo.QuickFix)}}class v extends n.DX{constructor(){super({id:l.k_,precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:f}]}})}runEditorCommand(e,t,i){const n=h.QA.fromUser(i,{kind:o.k.Empty,apply:"ifSingle"});return m(t,"string"==typeof i?.kind?n.preferred?c.kg("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):c.kg("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?c.kg("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):c.kg("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class b extends n.ks{constructor(){super({id:l.Xj,label:c.kg("refactor.label","Refactor..."),alias:"Refactor...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),kbOpts:{kbExpr:a.R.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:d.M$.and(a.R.writable,p(h.gB.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:f}]}})}run(e,t,i){const n=h.QA.fromUser(i,{kind:h.gB.Refactor,apply:"never"});return m(t,"string"==typeof i?.kind?n.preferred?c.kg("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):c.kg("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?c.kg("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):c.kg("editor.action.refactor.noneMessage","No refactorings available"),{include:h.gB.Refactor.contains(n.kind)?n.kind:o.k.None,onlyIncludePreferredActions:n.preferred},n.apply,h.fo.Refactor)}}class w extends n.ks{constructor(){super({id:l.C9,label:c.kg("source.label","Source Action..."),alias:"Source Action...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:d.M$.and(a.R.writable,p(h.gB.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:f}]}})}run(e,t,i){const n=h.QA.fromUser(i,{kind:h.gB.Source,apply:"never"});return m(t,"string"==typeof i?.kind?n.preferred?c.kg("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):c.kg("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?c.kg("editor.action.source.noneMessage.preferred","No preferred source actions available"):c.kg("editor.action.source.noneMessage","No source actions available"),{include:h.gB.Source.contains(n.kind)?n.kind:o.k.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,h.fo.SourceAction)}}class C extends n.ks{constructor(){super({id:l.Uy,label:c.kg("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:d.M$.and(a.R.writable,p(h.gB.SourceOrganizeImports)),kbOpts:{kbExpr:a.R.textInputFocus,primary:1581,weight:100}})}run(e,t){return m(t,c.kg("editor.action.organize.noneMessage","No organize imports action available"),{include:h.gB.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",h.fo.OrganizeImports)}}class y extends n.ks{constructor(){super({id:l.Rw,label:c.kg("fixAll.label","Fix All"),alias:"Fix All",precondition:d.M$.and(a.R.writable,p(h.gB.SourceFixAll))})}run(e,t){return m(t,c.kg("fixAll.noneMessage","No fix all action available"),{include:h.gB.SourceFixAll,includeSourceActions:!0},"ifSingle",h.fo.FixAll)}}class S extends n.ks{constructor(){super({id:l.pR,label:c.kg("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:d.M$.and(a.R.writable,p(h.gB.QuickFix)),kbOpts:{kbExpr:a.R.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return m(t,c.kg("editor.action.autoFix.noneMessage","No auto fixes available"),{include:h.gB.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",h.fo.AutoFix)}}var k=i(81422),x=i(16434),L=i(56419);(0,n.HW)(u.C.ID,u.C,3),(0,n.HW)(k.E.ID,k.E,4),(0,n.Fl)(_),(0,n.Fl)(b),(0,n.Fl)(w),(0,n.Fl)(C),(0,n.Fl)(S),(0,n.Fl)(y),(0,n.E_)(new v),L.O.as(x.Fd.Configuration).registerConfiguration({...s.JJ,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:c.kg("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}),L.O.as(x.Fd.Configuration).registerConfiguration({...s.JJ,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:c.kg("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}}),L.O.as(x.Fd.Configuration).registerConfiguration({...s.JJ,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:5,markdownDescription:c.kg("triggerOnFocusChange","Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}})},97810:function(e,t,i){"use strict";i.d(t,{C:function(){return de}});var n,s=i(84201),o=i(15075),r=i(20187),a=i(72582),l=i(35114),c=i(62993),d=i(49079),h=i(69122),u=i(7126),g=i(74159),p=i(78875),f=i(87163);let m=class{static{n=this}static{this.codeActionCommands=[u.Xj,u.k_,u.C9,u.Uy,u.Rw]}constructor(e){this.keybindingService=e}getResolver(){const e=new a.d((()=>this.keybindingService.getKeybindings().filter((e=>n.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===u.Uy?t={kind:p.gB.SourceOrganizeImports.value}:e.command===u.Rw&&(t={kind:p.gB.SourceFixAll.value}),{resolvedKeybinding:e.resolvedKeybinding,...p.QA.fromUser(t,{kind:g.k.None,apply:"never"})}}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i?.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new g.k(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};var _,v;m=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(_=0,v=f.b,function(e,t){v(e,t,_)})],m);var b=i(93231),w=(i(83172),i(14374));const C=Object.freeze({kind:g.k.Empty,title:(0,w.kg)("codeAction.widget.id.more","More Actions...")}),y=Object.freeze([{kind:p.gB.QuickFix,title:(0,w.kg)("codeAction.widget.id.quickfix","Quick Fix")},{kind:p.gB.RefactorExtract,title:(0,w.kg)("codeAction.widget.id.extract","Extract"),icon:b.W.wrench},{kind:p.gB.RefactorInline,title:(0,w.kg)("codeAction.widget.id.inline","Inline"),icon:b.W.wrench},{kind:p.gB.RefactorRewrite,title:(0,w.kg)("codeAction.widget.id.convert","Rewrite"),icon:b.W.wrench},{kind:p.gB.RefactorMove,title:(0,w.kg)("codeAction.widget.id.move","Move"),icon:b.W.wrench},{kind:p.gB.SurroundWith,title:(0,w.kg)("codeAction.widget.id.surround","Surround With"),icon:b.W.surroundWith},{kind:p.gB.Source,title:(0,w.kg)("codeAction.widget.id.source","Source Action"),icon:b.W.symbolFile},C]);var S=i(81422),k=i(7588),x=i(98099),L=i(15339),D=i(67334),E=i(76611),N=i(79783),I=i(56613),M=i(14280),T=i(52010),R=i(4195),P=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};const O="acceptSelectedCodeAction",F="previewSelectedCodeAction";class B{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??""}disposeTemplate(e){}}let W=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");return i.className="title",e.append(i),{container:e,icon:t,text:i,keybinding:new L.x(e,N.OS)}}renderElement(e,t,i){if(e.group?.icon?(i.icon.className=I.L.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=(0,R.GuP)(e.group.icon.color.id))):(i.icon.className=I.L.asClassName(b.W.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=j(e.label),i.keybinding.set(e.keybinding),s.bo(!!e.keybinding,i.keybinding.element);const n=this._keybindingService.lookupKeybinding(O)?.getLabel(),o=this._keybindingService.lookupKeybinding(F)?.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:n&&o?this._supportsPreview&&e.canPreview?i.container.title=(0,w.kg)({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",n,o):i.container.title=(0,w.kg)({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",n):i.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};W=P([A(1,f.b)],W);class H extends UIEvent{constructor(){super("acceptSelectedAction")}}class V extends UIEvent{constructor(){super("previewSelectedAction")}}function z(e){if("action"===e.kind)return e.label}let U=class extends l.jG{constructor(e,t,i,n,s,o){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=o,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new E.Qi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new D.B8(e,this.domNode,r,[new W(t,this._keybindingService),new B],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:z},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?j(e?.label):"";return e.disabled&&(t=(0,w.kg)({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>(0,w.kg)({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(T.IN),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this.onFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);let n=e;if(this._allMenuItems.length>=50)n=380;else{const t=this._allMenuItems.map(((e,t)=>{const i=this.domNode.ownerDocument.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0}));n=Math.max(...t,e)}const s=Math.min(i,.7*this.domNode.ownerDocument.body.clientHeight);return this._list.layout(s,n),this.domNode.style.height=`${s}px`,this._list.domFocus(),n}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new V:new H;this._list.setSelection([i],s)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof V):this._list.setSelection([])}onFocus(){const e=this._list.getFocus();if(0===e.length)return;const t=e[0],i=this._list.element(t);this._delegate.onFocus?.(i.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&"action"===t.kind){const e=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=e?e.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus("number"==typeof e.index?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function j(e){return e.replace(/\r\n|\r|\n/g," ")}U=P([A(4,M.l),A(5,f.b)],U);var q=i(93223),K=i(97848),$=i(48682),G=i(63619),Q=function(e,t){return function(i,n){t(i,n,e)}};(0,R.x1A)("actionBar.toggledBackground",R.c1f,(0,w.kg)("actionBar.toggledBackground","Background color for toggled action items in action bar."));const Y={Visible:new K.N1("codeActionMenuVisible",!1,(0,w.kg)("codeActionMenuVisible","Whether the action widget list is visible"))},Z=(0,G.u1)("actionWidgetService");let X=class extends l.jG{get isVisible(){return Y.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new l.HE)}show(e,t,i,n,s,o,r){const a=Y.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(U,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:e=>(a.set(!0),this._renderWidget(e,l,r??[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},o,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,i){const n=document.createElement("div");if(n.classList.add("action-widget"),e.appendChild(n),this._list.value=t,!this._list.value)throw new Error("List has no value");n.appendChild(this._list.value.domNode);const o=new l.Cm,r=document.createElement("div"),a=e.appendChild(r);a.classList.add("context-view-block"),o.add(s.ko(a,s.Bx.MOUSE_DOWN,(e=>e.stopPropagation())));const c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),o.add(s.ko(d,s.Bx.POINTER_MOVE,(()=>d.remove()))),o.add(s.ko(d,s.Bx.MOUSE_DOWN,(()=>d.remove())));let h=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(n.appendChild(e.getContainer().parentElement),o.add(e),h=e.getContainer().offsetWidth)}const u=this._list.value?.layout(h);n.style.width=`${u}px`;const g=o.add(s.w5(e));return o.add(g.onDidBlur((()=>this.hide(!0)))),o}_createActionBar(e,t){if(!t.length)return;const i=s.$(e),n=new x.E(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){this._list.value?.hide(e)}};X=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Q(0,M.l),Q(1,K.fN),Q(2,G._Y)],X),(0,$.v)(Z,X,1);const J=1100;(0,q.ug)(class extends q.L{constructor(){super({id:"hideCodeActionWidget",title:(0,w.aS)("hideCodeActionWidget.title","Hide action widget"),precondition:Y.Visible,keybinding:{weight:J,primary:9,secondary:[1033]}})}run(e){e.get(Z).hide(!0)}}),(0,q.ug)(class extends q.L{constructor(){super({id:"selectPrevCodeAction",title:(0,w.aS)("selectPrevCodeAction.title","Select previous action"),precondition:Y.Visible,keybinding:{weight:J,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(Z);t instanceof X&&t.focusPrevious()}}),(0,q.ug)(class extends q.L{constructor(){super({id:"selectNextCodeAction",title:(0,w.aS)("selectNextCodeAction.title","Select next action"),precondition:Y.Visible,keybinding:{weight:J,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(Z);t instanceof X&&t.focusNext()}}),(0,q.ug)(class extends q.L{constructor(){super({id:O,title:(0,w.aS)("acceptSelected.title","Accept selected action"),precondition:Y.Visible,keybinding:{weight:J,primary:3,secondary:[2137]}})}run(e){const t=e.get(Z);t instanceof X&&t.acceptSelected()}}),(0,q.ug)(class extends q.L{constructor(){super({id:F,title:(0,w.aS)("previewSelected.title","Preview selected action"),precondition:Y.Visible,keybinding:{weight:J,primary:2051}})}run(e){const t=e.get(Z);t instanceof X&&t.acceptSelected(!0)}});var ee,te=i(21335),ie=i(47901),ne=i(84119),se=i(86171),oe=i(39679),re=i(40616),ae=i(95133),le=i(2727),ce=function(e,t){return function(i,n){t(i,n,e)}};let de=class extends l.jG{static{ee=this}static{this.ID="editor.contrib.codeActionController"}static get(e){return e.getContribution(ee.ID)}constructor(e,t,i,n,s,o,r,c,d,h,u){super(),this._commandService=r,this._configurationService=c,this._actionWidgetService=d,this._instantiationService=h,this._telemetryService=u,this._activeCodeActions=this._register(new l.HE),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new ae.Dc(this._editor,s.codeActionProvider,t,i,o,c,this._telemetryService)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new a.d((()=>{const e=this._editor.getContribution(S.E.ID);return e&&this._register(e.onClick((e=>this.showCodeActionsFromLightbulb(e.actions,e)))),e})),this._resolver=n.createInstance(m),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&1===e.validActions.length){const t=e.validActions[0],i=t.action.command;return i&&"inlineChat.start"===i.id&&i.arguments&&i.arguments.length>=1&&(i.arguments[0]={...i.arguments[0],autoSend:!1}),void await this._applyCodeAction(t,!1,!1,u.Qp.FromAILightbulb)}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){if(!this._editor.hasModel())return;k.k.get(this._editor)?.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,i,n){try{await this._instantiationService.invokeFunction(u.W4,e,n,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:p.fo.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(1!==e.type)return void this.hideLightBulbWidget();let t;try{t=await e.actions}catch(e){return void(0,r.dz)(e)}if(this._disposed)return;const i=this._editor.getSelection();if(i?.startLineNumber===e.position.lineNumber)if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),1===e.trigger.type){if(e.trigger.filter?.include){const i=this.tryGetValidActionToApply(e.trigger,t);if(i){try{this.hideLightBulbWidget(),await this._applyCodeAction(i,!1,!1,u.Qp.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){const i=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(i&&i.action.disabled)return k.k.get(this._editor)?.showMessage(i.action.disabled,e.trigger.context.position),void t.dispose()}}const i=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!i&&!t.validActions.length))return k.k.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,void t.dispose();this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:i,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}static{this.DECORATION=d.kI.register({description:"quickfix-highlight",className:"quickfix-edit-highlight"})}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const r=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!r.length)return;const a=c.y.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(e,t)=>{this._applyCodeAction(e,!0,!!t,i.fromLightbulb?u.Qp.FromAILightbulb:u.Qp.FromCodeActions),this._actionWidgetService.hide(!1),n.clear()},onHide:e=>{this._editor?.focus(),n.clear()},onHover:async(e,t)=>{if(t.isCancellationRequested)return;let i=!1;const n=e.action.kind;if(n){const e=new g.k(n);i=[p.gB.RefactorExtract,p.gB.RefactorInline,p.gB.RefactorRewrite,p.gB.RefactorMove,p.gB.Source].some((t=>t.contains(e)))}return{canPreview:i||!!e.action.edit?.edits.length}},onFocus:e=>{if(e&&e.action){const t=e.action.ranges,i=e.action.diagnostics;if(n.clear(),t&&t.length>0){const e=i&&i?.length>1?i.map((e=>({range:e,options:ee.DECORATION}))):t.map((e=>({range:e,options:ee.DECORATION})));n.set(e)}else if(i&&i.length>0){const e=i.map((e=>({range:e,options:ee.DECORATION})));n.set(e);const t=i[0];if(t.startLineNumber&&t.startColumn){const e=this._editor.getModel()?.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn})?.word;o.h5((0,w.kg)("editingNewSelection","Context: {0} at line {1} and column {2}.",e,t.startLineNumber,t.startColumn))}}}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,function(e,t,i){if(!t)return e.map((e=>({kind:"action",item:e,group:C,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!e.action.edit?.edits.length})));const n=y.map((e=>({group:e,actions:[]})));for(const t of e){const e=t.action.kind?new g.k(t.action.kind):g.k.None;for(const i of n)if(i.group.kind.contains(e)){i.actions.push(t);break}}const s=[];for(const e of n)if(e.actions.length){s.push({kind:"header",group:e.group});for(const t of e.actions){const n=e.group;s.push({kind:"action",item:t,group:t.action.isAI?{title:n.title,kind:n.kind,icon:b.W.sparkle}:n,label:t.action.title,disabled:!!t.action.disabled,keybinding:i(t.action)})}}return s}(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,s,this._getActionBarActions(e,t,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,s.BK)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){const e=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e?.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>({id:e.id,label:e.title,tooltip:e.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(e.id,...e.arguments??[])})));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:(0,w.kg)("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:(0,w.kg)("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};de=ee=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ce(1,ne.DR),ce(2,K.fN),ce(3,G._Y),ce(4,h.ILanguageFeaturesService),ce(5,se.N8),ce(6,te.d),ce(7,ie.pG),ce(8,Z),ce(9,G._Y),ce(10,le.k)],de),(0,re.zy)(((e,t)=>{var i;(i=e.getColor(R.Ubg))&&t.addRule(`.monaco-editor .quickfix-edit-highlight { background-color: ${i}; }`);const n=e.getColor(R.ECk);n&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,oe.Bb)(e.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)}))},95133:function(e,t,i){"use strict";i.d(t,{D_:function(){return _},Dc:function(){return y}});var n=i(90890),s=i(20187),o=i(80670),r=i(35114),a=i(59951),l=i(3520),c=i(62993),d=i(56218),h=i(97848),u=i(86171),g=i(78875),p=i(7126),f=i(74159),m=i(43857);const _=new h.N1("supportedCodeAction",""),v="_typescript.applyFixAllCodeAction";class b extends r.jG{constructor(e,t,i,s=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=s,this._autoTriggerTimer=this._register(new n.pc),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._tryAutoTrigger())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,a.n4)(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:g.fo.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(1===e.type)return t;const i=this._editor.getOption(65).enabled;if(i!==l.jT.Off){if(i===l.jT.On)return t;if(i===l.jT.OnCode){if(!t.isEmpty())return t;const e=this._editor.getModel(),{lineNumber:i,column:n}=t.getPosition(),s=e.getLineContent(i);if(0===s.length)return;if(1===n){if(/\s/.test(s[0]))return}else if(n===e.getLineMaxColumn(i)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[n-2])&&/\s/.test(s[n-1]))return}return t}}}var w;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if((0,s.MB)(e))return C;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(w||(w={}));const C=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class y extends r.jG{constructor(e,t,i,n,s,a,l){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=a,this._telemetryService=l,this._codeActionOracle=this._register(new r.HE),this._state=w.Empty,this._onDidChangeState=this._register(new o.vl),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=_.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(65)&&this._update()}))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(w.Empty,!0))}_settingEnabledNearbyQuickfixes(){const e=this._editor?.getModel();return!!this._configurationService&&this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e?.uri})}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(w.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(92)){const t=this._registry.all(e).flatMap((e=>e.providedCodeActionKinds??[]));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new b(this._editor,this._markerService,(t=>{if(!t)return void this.setState(w.Empty);const i=t.selection.getStartPosition(),s=(0,n.SS)((async i=>{if(this._settingEnabledNearbyQuickfixes()&&1===t.trigger.type&&(t.trigger.triggerAction===g.fo.QuickFix||t.trigger.filter?.include?.contains(g.gB.QuickFix))){const n=await(0,p.dU)(this._registry,e,t.selection,t.trigger,u.ke.None,i),s=[...n.allActions];if(i.isCancellationRequested)return C;const o=n.validActions?.some((e=>!!e.action.kind&&g.gB.QuickFix.contains(new f.k(e.action.kind)))),r=this._markerService.read({resource:e.uri});if(o){for(const e of n.validActions)e.action.command?.arguments?.some((e=>"string"==typeof e&&e.includes(v)))&&(e.action.diagnostics=[...r.filter((e=>e.relatedInformation))]);return{validActions:n.validActions,allActions:s,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}if(!o&&r.length>0){const o=t.selection.getPosition();let a=o,l=Number.MAX_VALUE;const h=[...n.validActions];for(const f of r){const m=f.endColumn,_=f.endLineNumber,b=f.startLineNumber;if(_===o.lineNumber||b===o.lineNumber){a=new c.y(_,m);const f={type:t.trigger.type,triggerAction:t.trigger.triggerAction,filter:{include:t.trigger.filter?.include?t.trigger.filter?.include:g.gB.QuickFix},autoApply:t.trigger.autoApply,context:{notAvailableMessage:t.trigger.context?.notAvailableMessage||"",position:a}},b=new d.L(a.lineNumber,a.column,a.lineNumber,a.column),w=await(0,p.dU)(this._registry,e,b,f,u.ke.None,i);if(0!==w.validActions.length){for(const e of w.validActions)e.action.command?.arguments?.some((e=>"string"==typeof e&&e.includes(v)))&&(e.action.diagnostics=[...r.filter((e=>e.relatedInformation))]);0===n.allActions.length&&s.push(...w.allActions),Math.abs(o.column-m)i.findIndex((t=>t.action.title===e.action.title))===t));return f.sort(((e,t)=>e.action.isPreferred&&!t.action.isPreferred?-1:!e.action.isPreferred&&t.action.isPreferred||e.action.isAI&&!t.action.isAI?1:!e.action.isAI&&t.action.isAI?-1:0)),{validActions:f,allActions:s,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}}if(1===t.trigger.type){const n=new m.W,s=await(0,p.dU)(this._registry,e,t.selection,t.trigger,u.ke.None,i);return this._telemetryService&&this._telemetryService.publicLog2("codeAction.invokedDurations",{codeActions:s.validActions.length,duration:n.elapsed()}),s}return(0,p.dU)(this._registry,e,t.selection,t.trigger,u.ke.None,i)}));1===t.trigger.type&&this._progressService?.showWhile(s,250);const o=new w.Triggered(t.trigger,i,s);let r=!1;1===this._state.type&&(r=1===this._state.trigger.type&&1===o.type&&2===o.trigger.type&&this._state.position!==o.position),r?setTimeout((()=>{this.setState(o)}),500):this.setState(o)}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:g.fo.Default})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value?.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}},81422:function(e,t,i){"use strict";i.d(t,{E:function(){return k}});var n,s=i(84201),o=i(53510),r=i(93231),a=i(80670),l=i(35114),c=i(56613),d=i(62067),h=i(49079),u=i(43573),g=i(7126),p=i(14374),f=i(87163),m=i(51310),_=i(40393);const v=(0,m.pU)("gutter-lightbulb",r.W.lightBulb,p.kg("gutterLightbulbWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor.")),b=(0,m.pU)("gutter-lightbulb-auto-fix",r.W.lightbulbAutofix,p.kg("gutterLightbulbAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),w=(0,m.pU)("gutter-lightbulb-sparkle",r.W.lightbulbSparkle,p.kg("gutterLightbulbAIFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),C=(0,m.pU)("gutter-lightbulb-aifix-auto-fix",r.W.lightbulbSparkleAutofix,p.kg("gutterLightbulbAIFixAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),y=(0,m.pU)("gutter-lightbulb-sparkle-filled",r.W.sparkleFilled,p.kg("gutterLightbulbSparkleFilledWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var S;!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(S||(S={}));let k=class extends l.jG{static{n=this}static{this.GUTTER_DECORATION=h.kI.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:c.L.asClassName(r.W.lightBulb),glyphMargin:{position:d.ZS.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new a.vl),this.onClick=this._onClick.event,this._state=S.Hidden,this._gutterState=S.Hidden,this._iconClasses=[],this.lightbulbClasses=["codicon-"+v.id,"codicon-"+C.id,"codicon-"+b.id,"codicon-"+w.id,"codicon-"+y.id],this.gutterDecoration=n.GUTTER_DECORATION,this._domNode=s.$("div.lightBulbWidget"),this._domNode.role="listbox",this._register(o.q.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide(),(1!==this.gutterState.type||!t||this.gutterState.editorPosition.lineNumber>=t.getLineCount())&&this.gutterHide()}))),this._register(s.Xc(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=s.BK(this._domNode),n=this._editor.getOption(67);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{1&~e.buttons||this.hide()}))),this._register(a.Jh.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,(()=>{this._preferredKbLabel=this._keybindingService.lookupKeybinding(g.pR)?.getLabel()??void 0,this._quickFixKbLabel=this._keybindingService.lookupKeybinding(g.pQ)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()}))),this._register(this._editor.onMouseDown((async e=>{if(!e.target.element||!this.lightbulbClasses.some((t=>e.target.element&&e.target.element.classList.contains(t))))return;if(1!==this.gutterState.type)return;this._editor.focus();const{top:t,height:i}=s.BK(e.target.element),n=this._editor.getOption(67);let o=Math.floor(n/3);null!==this.gutterState.widgetPosition.position&&this.gutterState.widgetPosition.position.lineNumber22,g=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1),p=this._editor.getLineDecorations(o);let f=!1;if(p)for(const e of p){const t=e.options.glyphMarginClassName;if(t&&!this.lightbulbClasses.some((e=>t.includes(e)))){f=!0;break}}let m=o,_=1;if(!h){const a=e=>{const t=s.getLineContent(e);return/^\s*$|^\s+/.test(t)||t.length<=_};if(o>1&&!g(o-1)){const r=o===s.getLineCount(),l=o>1&&a(o-1),c=!r&&a(o+1),d=a(o),h=!c&&!l;if(!(c||l||f))return this.gutterState=new S.Showing(e,t,i,{position:{lineNumber:m,column:_},preference:n._posPref}),this.renderGutterLightbub(),this.hide();l||r||l&&!d?m-=1:(c||h&&d)&&(m+=1)}else if(1!==o||o!==s.getLineCount()&&(a(o+1)||a(o))){if(o{this._gutterDecorationID=t.addDecoration(new _.Q(e,0,e,0),this.gutterDecoration)}))}_removeGutterDecoration(e){this._editor.changeDecorations((t=>{t.removeDecoration(e),this._gutterDecorationID=void 0}))}_updateGutterDecoration(e,t){this._editor.changeDecorations((i=>{i.changeDecoration(e,new _.Q(t,0,t,0)),i.changeDecorationOptions(e,this.gutterDecoration)}))}_updateLightbulbTitle(e,t){1===this.state.type&&(t?this.title=p.kg("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=p.kg("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=p.kg("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=p.kg("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}};var x,L;k=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(x=1,L=f.b,function(e,t){L(e,t,x)})],k)},78875:function(e,t,i){"use strict";i.d(t,{QA:function(){return d},Vi:function(){return h},aF:function(){return l},fo:function(){return r},gB:function(){return o},uJ:function(){return a}});var n=i(20187),s=i(74159);const o=new class{constructor(){this.QuickFix=new s.k("quickfix"),this.Refactor=new s.k("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new s.k("notebook"),this.Source=new s.k("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var r;function a(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>c(t,i,e.include)))||!e.includeSourceActions&&o.Source.contains(t))}function l(e,t){const i=t.kind?new s.k(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>c(i,t,e.include)))||!e.includeSourceActions&&i&&o.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}function c(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}!function(e){e.Refactor="refactor",e.RefactorPreview="refactor preview",e.Lightbulb="lightbulb",e.Default="other (default)",e.SourceAction="source action",e.QuickFix="quick fix action",e.FixAll="fix all",e.OrganizeImports="organize imports",e.AutoFix="auto fix",e.QuickFixHover="quick fix hover window",e.OnSave="save participants",e.ProblemsView="problems view"}(r||(r={}));class d{static fromUser(e,t){return e&&"object"==typeof e?new d(d.getKindFromUser(e,t.kind),d.getApplyFromUser(e,t.apply),d.getPreferredUser(e)):new d(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new s.k(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class h{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){if(this.provider?.resolveCodeAction&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(e){(0,n.M_)(e)}t&&(this.action.edit=t.edit)}return this}}},21991:function(e,t,i){"use strict";var n=i(90890),s=i(20187),o=i(35114),r=i(61554),a=i(52694),l=i(3520),c=i(49678),d=i(76611),h=i(24219),u=i(54244),g=i(59266),p=i(21335),f=i(69122);class m{constructor(){this.lenses=[],this._disposables=new o.Cm}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function _(e,t,i){const n=e.ordered(t),o=new Map,r=new m,a=n.map((async(e,n)=>{o.set(e,n);try{const n=await Promise.resolve(e.provideCodeLenses(t,i));n&&r.add(n,e)}catch(e){(0,s.M_)(e)}}));return await Promise.all(a),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:o.get(e.provider)o.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),r}p.w.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,h.j)(u.r.isUri(i)),(0,h.j)("number"==typeof n||!n);const{codeLensProvider:r}=e.get(f.ILanguageFeaturesService),a=e.get(g.IModelService).getModel(i);if(!a)throw(0,s.Qg)();const l=[],c=new o.Cm;return _(r,a,d.XO.None).then((e=>{c.add(e);const t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?l.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(a,i.symbol,d.XO.None)).then((e=>l.push(e||i.symbol))));return Promise.all(t)})).then((()=>l)).finally((()=>{setTimeout((()=>c.dispose()),100)}))}));var v=i(80670),b=i(52732),w=i(40393),C=i(48682),y=i(63619),S=i(87332),k=i(95601),x=i(84201);const L=(0,y.u1)("ICodeLensCache");class D{constructor(e,t){this.lineCount=e,this.data=t}}let E=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new b.qK(20,.75),(0,x.U3)(k.G,(()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i);const n=v.Jh.filter(e.onWillSaveState,(e=>e.reason===S.LP.SHUTDOWN));v.Jh.once(n)((i=>{e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>({range:e.symbol.range,command:e.symbol.command&&{id:"",title:e.symbol.command?.title}}))),n=new m;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new D(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new w.Q(e,1,e,11)});const s=new m;s.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new D(i.lineCount,s))}}catch{}}};var N,I;E=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(N=0,I=S.CS,function(e,t){I(e,t,N)})],E),(0,C.v)(L,E,1);var M=i(43014),T=i(49079);class R{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class P{static{this._idPool=0}constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+P._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let t=0;t{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:O},(e=>this._decorationIds[t]=e)),r=r?w.Q.plusRange(r,e.symbol.range):w.Q.lift(e.symbol.range)})),this._viewZone=new R(r.startLineNumber-1,s,o),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new P(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||w.Q.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:O},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;tthis._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(50)||e.hasChanged(19)||e.hasChanged(18))&&this._updateLensStyle(),e.hasChanged(17)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=.9*this._editor.getOption(52)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",l.jU.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&(0,n.EQ)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4,this._localToDispose));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof t.onDidChange){const e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.uC((()=>{const t=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,n.SS)((t=>_(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((n=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=n,this._codeLensCache.put(e,n);const s=this._provideCodeLensDebounce.update(e,Date.now()-t);i.delay=s,this._renderCodeLensSymbols(n),this._resolveCodeLensesInViewportSoon()}),s.dz)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,o.s)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const s=new A;i.forEach((e=>{e.dispose(s,t),this._lenses.splice(this._lenses.indexOf(e),1)})),s.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorText((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidBlurEditorText((()=>{i.cancel()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,o.s)((()=>{if(this._editor.getModel()){const e=r.D.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===t?.tagName&&(t=t.parentElement),"A"===t?.tagName)for(const e of this._lenses){const i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new A;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const s of e.lenses){const e=s.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(s):(n=[s],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=r.D.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new A;let s=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),s++,r++)}for(;sthis._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const t=[],i=[];if(this._lenses.forEach((n=>{const s=n.computeIfNecessary(e);s&&(t.push(s),i.push(n))})),0===t.length)return;const o=Date.now(),r=(0,n.SS)((n=>{const o=t.map(((t,o)=>{const r=new Array(t.length),a=t.map(((t,i)=>t.symbol.command||"function"!=typeof t.provider.resolveCodeLens?(r[i]=t.symbol,Promise.resolve(void 0)):Promise.resolve(t.provider.resolveCodeLens(e,t.symbol,n)).then((e=>{r[i]=e}),s.M_)));return Promise.all(a).then((()=>{n.isCancellationRequested||i[o].isDisposed()||i[o].updateCommands(r)}))}));return Promise.all(o)}));this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then((()=>{const t=this._resolveCodeLensesDebounce.update(e,Date.now()-o);this._resolveCodeLensesScheduler.delay=t,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,s.dz)(e),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};U=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([z(1,f.ILanguageFeaturesService),z(2,V.ILanguageFeatureDebounceService),z(3,p.d),z(4,W.Ot),z(5,L)],U),(0,a.HW)(U.ID,U,1),(0,a.Fl)(class extends a.ks{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:c.R.hasCodeLensProvider,label:(0,B.kg)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(H.GK),n=e.get(p.d),s=e.get(W.Ot),o=t.getSelection().positionLineNumber,r=t.getContribution(U.ID);if(!r)return;const a=await r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===o&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const c=await i.pick(l,{canPickMany:!1,placeHolder:(0,B.kg)("placeHolder","Select a command")});if(!c)return;let d=c.command;if(a.isDisposed){const e=await r.getModel(),t=e?.lenses.find((e=>e.symbol.range.startLineNumber===o&&e.symbol.command?.title===d.title));if(!t||!t.symbol.command)return;d=t.symbol.command}try{await n.executeCommand(d.id,...d.arguments||[])}catch(e){s.error(e)}}})},21274:function(e,t,i){"use strict";i.d(t,{R:function(){return g},j:function(){return u}});var n=i(76611),s=i(20187),o=i(54244),r=i(40393),a=i(59266),l=i(21335),c=i(69122),d=i(2431),h=i(47901);async function u(e,t,i,n=!0){return _(new p,e,t,i,n)}function g(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}class p{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const t of s)n.push({colorInfo:t,provider:e});return Array.isArray(s)}}class f{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const e of s)n.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(s)}}class m{constructor(e){this.colorInfo=e}async compute(e,t,i,s){const o=await e.provideColorPresentations(t,this.colorInfo,n.XO.None);return Array.isArray(o)&&s.push(...o),Array.isArray(o)}}async function _(e,t,i,n,o){let r,a=!1;const l=[],c=t.ordered(i);for(let t=c.length-1;t>=0;t--){const o=c[t];if(o instanceof d.L)r=o;else try{await e.compute(o,i,n,l)&&(a=!0)}catch(e){(0,s.M_)(e)}}return a?l:r&&o?(await e.compute(r,i,n,l),l):[]}function v(e,t){const{colorProvider:i}=e.get(c.ILanguageFeaturesService),n=e.get(a.IModelService).getModel(t);if(!n)throw(0,s.Qg)();return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:e.get(h.pG).getValue("editor.defaultColorDecorators",{resource:t})}}l.w.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof o.r))throw(0,s.Qg)();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=v(e,i);return _(new f,a,r,n.XO.None,l)})),l.w.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,a]=t,{uri:l,range:c}=a;if(!(l instanceof o.r&&Array.isArray(i)&&4===i.length&&r.Q.isIRange(c)))throw(0,s.Qg)();const{model:d,colorProviderRegistry:h,isDefaultColorDecoratorsEnabled:u}=v(e,l),[g,p,f,b]=i;return _(new m({range:c,color:{red:g,green:p,blue:f,alpha:b}}),h,d,n.XO.None,u)}))},55999:function(e,t,i){"use strict";var n=i(35114),s=i(52694),o=i(40393),r=i(76784),a=i(39978),l=i(52209),c=i(51059);class d extends n.jG{static{this.ID="editor.contrib.colorContribution"}constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(149);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==r.nM)return;if(!i.range)return;const n=this._editor.getContribution(l.A.ID);if(n&&!n.isColorPickerVisible){const e=new o.Q(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}(0,s.HW)(d.ID,d,2),c.B2.register(a.BJ)},76784:function(e,t,i){"use strict";i.d(t,{mn:function(){return C},nM:function(){return w}});var n,s=i(90890),o=i(59321),r=i(20187),a=i(80670),l=i(35114),c=i(43857),d=i(43920),h=i(55266),u=i(52694),g=i(40393),p=i(49079),f=i(82688),m=i(69122),_=i(21274),v=i(47901),b=function(e,t){return function(i,n){t(i,n,e)}};const w=Object.create({});let C=class extends l.jG{static{n=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(e,t,i,s){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new l.Cm),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new h.Qn(this._editor),this._decoratorLimitReporter=new y,this._colorDecorationClassRefs=this._register(new l.Cm),this._debounceInformation=s.for(i.colorProvider,"Document Colors",{min:n.RECOMPUTE_TIME}),this._register(e.onDidChangeModel((()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()}))),this._register(e.onDidChangeModelLanguage((()=>this.updateColors()))),this._register(i.colorProvider.onDidChange((()=>this.updateColors()))),this._register(e.onDidChangeConfiguration((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(21),n=e.hasChanged(148);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new s.pc,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}async beginCompute(){this._computePromise=(0,s.SS)((async e=>{const t=this._editor.getModel();if(!t)return[];const i=new c.W(!1),n=await(0,_.j)(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n}));try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){(0,r.dz)(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.kI.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let n=0;nthis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};C=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([b(1,v.pG),b(2,m.ILanguageFeaturesService),b(3,f.ILanguageFeatureDebounceService)],C);class y{constructor(){this._onDidChange=new a.vl,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}(0,u.HW)(C.ID,C,1)},39978:function(e,t,i){"use strict";i.d(t,{BJ:function(){return O},WE:function(){return B}});var n=i(90890),s=i(76611),o=i(59321),r=i(35114),a=i(40393),l=i(21274),c=i(76784),d=i(80670);class h{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new d.vl,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new d.vl,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let e=0;e{this.backgroundColor=e.getColor(b.WfR)||o.Q1.white}))),this._register(g.ko(this._pickedColorNode,g.Bx.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(g.ko(this._originalColorNode,g.Bx.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=o.Q1.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new S(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=o.Q1.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class S extends r.jG{constructor(e){super(),this._onClicked=this._register(new d.vl),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),g.BC(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),g.BC(this._button,t),g.BC(t,C(".button"+_.L.asCSSSelector((0,w.pU)("color-picker-close",m.W.close,(0,v.kg)("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(g.ko(this._button,g.Bx.CLICK,(()=>{this._onClicked.fire()})))}}class k extends r.jG{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=C(".colorpicker-body"),g.BC(e,this._domNode),this._saturationBox=new x(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new D(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new E(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new N(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new o.Q1(new o.$J(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new o.Q1(new o.$J(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new o.Q1(new o.$J(360===i?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class x extends r.jG{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,this._domNode=C(".saturation-wrap"),g.BC(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",g.BC(this._domNode,this._canvas),this.selection=C(".saturation-selection"),g.BC(this._domNode,this.selection),this.layout(),this._register(g.ko(this._domNode,g.Bx.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;this.monitor=this._register(new p._);const t=g.BK(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=g.ko(e.target.ownerDocument,g.Bx.POINTER_UP,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new o.Q1(new o.$J(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=o.Q1.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class L extends r.jG{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=g.BC(e,C(".standalone-strip")),this.overlay=g.BC(this.domNode,C(".standalone-overlay"))):(this.domNode=g.BC(e,C(".strip")),this.overlay=g.BC(this.domNode,C(".overlay"))),this.slider=g.BC(this.domNode,C(".slider")),this.slider.style.top="0px",this._register(g.ko(this.domNode,g.Bx.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._register(new p._),i=g.BK(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=g.ko(e.target.ownerDocument,g.Bx.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class D extends L{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,s=new o.Q1(new o.bU(t,i,n,1)),r=new o.Q1(new o.bU(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class E extends L{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class N extends r.jG{constructor(e){super(),this._onClicked=this._register(new d.vl),this.onClicked=this._onClicked.event,this._button=g.BC(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(g.ko(this._button,g.Bx.CLICK,(()=>{this._onClicked.fire()})))}get button(){return this._button}}class I extends f.x{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(u.c.getInstance(g.zk(e)).onDidChange((()=>this.layout()))),this._domNode=C(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new y(this._domNode,this.model,n,s)),this.body=this._register(new k(this._domNode,this.model,this.pixelRatio,s))}layout(){this.body.layout()}get domNode(){return this._domNode}}var M=i(51059),T=i(40616),R=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},P=function(e,t){return function(i,n){t(i,n,e)}};class A{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let O=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return n.AE.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=c.mn.get(this._editor);if(!n)return[];for(const e of t){if(!n.isColorDecoration(e))continue;const t=n.getColorData(e.range.getStartPosition());if(t)return[await W(this,this._editor.getModel(),t.colorInfo,t.provider)]}return[]}renderHoverParts(e,t){const i=H(this,this._editor,this._themeService,t,e);if(!i)return new M.Ke([]);this._colorPicker=i.colorPicker;const n={hoverPart:i.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){i.disposables.dispose()}};return new M.Ke([n])}handleResize(){this._colorPicker?.layout()}isColorPickerVisible(){return!!this._colorPicker}};O=R([P(1,T.Gy)],O);class F{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let B=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel())return null;if(!c.mn.get(this._editor))return null;const n=await(0,l.j)(i,this._editor.getModel(),s.XO.None);let o=null,r=null;for(const t of n){const i=t.colorInfo;a.Q.containsRange(i.range,e.range)&&(o=i,r=t.provider)}const d=o??e,h=r??t,u=!!o;return{colorHover:await W(this,this._editor.getModel(),d,h),foundInEditor:u}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new a.Q(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await z(this._editor.getModel(),t,this._color,i,e),i=V(this._editor,i,t))}renderHoverParts(e,t){return H(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};async function W(e,t,i,n){const r=t.getValueInRange(i.range),{red:c,green:d,blue:u,alpha:g}=i.color,p=new o.bU(Math.round(255*c),Math.round(255*d),Math.round(255*u),g),f=new o.Q1(p),m=await(0,l.R)(t,i,n,s.XO.None),_=new h(f,[],0);return _.colorPresentations=m||[],_.guessColorPresentation(f,r),e instanceof O?new A(e,a.Q.lift(i.range),_,n):new F(e,a.Q.lift(i.range),_,n)}function H(e,t,i,n,s){if(0===n.length||!t.hasModel())return;if(s.setMinimumDimensions){const e=t.getOption(67)+8;s.setMinimumDimensions(new g.fg(302,e))}const o=new r.Cm,l=n[0],c=t.getModel(),d=l.model,h=o.add(new I(s.fragment,d,t.getOption(144),i,e instanceof B));let u=!1,p=new a.Q(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn);if(e instanceof B){const t=l.model.color;e.color=t,z(c,d,t,p,l),o.add(d.onColorFlushed((t=>{e.color=t})))}else o.add(d.onColorFlushed((async e=>{await z(c,d,e,p,l),u=!0,p=V(t,p,d)})));return o.add(d.onDidChangeColor((e=>{z(c,d,e,p,l)}))),o.add(t.onDidChangeModelContent((e=>{u?u=!1:(s.hide(),t.focus())}))),{hoverPart:l,colorPicker:h,disposables:o}}function V(e,t,i){const n=[],s=i.presentation.textEdit??{range:t,text:i.presentation.label,forceMoveMarkers:!1};n.push(s),i.presentation.additionalTextEdits&&n.push(...i.presentation.additionalTextEdits);const o=a.Q.lift(s.range),r=e.getModel()._setTrackedRange(null,o,3);return e.executeEdits("colorpicker",n),e.pushUndoStop(),e.getModel()._getTrackedRange(r)??o}async function z(e,t,i,n,o){const r=await(0,l.R)(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},o.provider,s.XO.None);t.colorPresentations=r||[]}B=R([P(1,T.Gy)],B)},2431:function(e,t,i){"use strict";i.d(t,{L:function(){return d}});var n=i(59321),s=i(35114),o=i(69122),r=i(23534),a=i(56812),l=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},c=function(e,t){return function(i,n){t(i,n,e)}};let d=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const s=t.range,o=t.color,r=o.alpha,a=new n.Q1(new n.bU(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),r)),l=r?n.Q1.Format.CSS.formatRGB(a):n.Q1.Format.CSS.formatRGBA(a),c=r?n.Q1.Format.CSS.formatHSL(a):n.Q1.Format.CSS.formatHSLA(a),d=r?n.Q1.Format.CSS.formatHex(a):n.Q1.Format.CSS.formatHexA(a),h=[];return h.push({label:l,textEdit:{range:s,text:l}}),h.push({label:c,textEdit:{range:s,text:c}}),h.push({label:d,textEdit:{range:s,text:d}}),h}};d=l([c(0,a.IEditorWorkerService)],d);let h=class extends s.jG{constructor(e,t){super(),this._register(e.colorProvider.register("*",new d(t)))}};h=l([c(0,o.ILanguageFeaturesService),c(1,a.IEditorWorkerService)],h),(0,r.x)(h)},90581:function(e,t,i){"use strict";var n,s,o=i(52694),r=i(14374),a=i(35114),l=i(39978),c=i(63619),d=i(21914),h=i(87163),u=i(80670),g=i(69122),p=i(49678),f=i(97848),m=i(2431),_=i(84201),v=i(56812),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};let C=class extends a.jG{static{n=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(e,t,i){super(),this._editor=e,this._instantiationService=i,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.R.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=p.R.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(y,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(e){return e.getContribution(n.ID)}};C=n=b([w(1,f.fN),w(2,c._Y)],C),(0,o.HW)(C.ID,C,1);let y=class extends a.jG{static{s=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(e,t,i,n,s,o,r){super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._keybindingService=s,this._languageFeaturesService=o,this._editorWorkerService=r,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new u.vl),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(l.WE,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;const a=this._editor.getSelection(),c=a?{startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},d=this._register(_.w5(this._body));this._register(d.onDidBlur((e=>{this.hide()}))),this._register(d.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{const t=e.target.element?.classList;t&&t.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(c),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return s.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new S(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new m.L(this._editorWorkerService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment(),n={fragment:i,statusBar:this._register(new d.L(this._keybindingService)),onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=e;const s=this._standaloneColorPickerParticipant.renderHoverParts(n,[e]);if(!s)return;this._register(s.disposables);const o=s.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),o.layout();const r=o.body,a=r.saturationBox.domNode.clientWidth,l=r.domNode.clientWidth-a-22-8,c=o.body.enterButton;c?.onClicked((()=>{this.updateEditor(),this.hide()}));const h=o.header;h.pickedColorNode.style.width=a+8+"px",h.originalColorNode.style.width=l+"px";const u=o.header.closeButton;u?.onClicked((()=>{this.hide()})),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};y=s=b([w(3,c._Y),w(4,h.b),w(5,g.ILanguageFeaturesService),w(6,v.IEditorWorkerService)],y);class S{constructor(e,t){this.value=e,this.foundInEditor=t}}var k=i(93223);class x extends o.qO{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...(0,r.aS)("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:(0,r.kg)({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:k.D8.CommandPalette}],metadata:{description:(0,r.aS)("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){C.get(t)?.showOrFocus()}}class L extends o.ks{constructor(){super({id:"editor.action.hideColorPicker",label:(0,r.kg)({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:p.R.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:(0,r.aS)("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,t){C.get(t)?.hide()}}class D extends o.ks{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,r.kg)({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:p.R.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:(0,r.aS)("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){C.get(t)?.insertColor()}}(0,o.Fl)(L),(0,o.Fl)(D),(0,k.ug)(x)},77334:function(e,t,i){"use strict";var n=i(62167),s=i(52694),o=i(40393),r=i(49678),a=i(8494),l=i(48905),c=i(62993),d=i(56218);class h{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let s=0;s=65&&n<=90&&n+32===o||o>=65&&o<=90&&o+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=s.getLineContent(a),g=s.getLineContent(c);let p,f=u.lastIndexOf(t,l-1+t.length),m=g.indexOf(i,d-1-i.length);if(-1!==f&&-1!==m)if(a===c)u.substring(f+t.length,m).indexOf(i)>=0&&(f=-1,m=-1);else{const e=u.substring(f+t.length),n=g.substring(0,m);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(f=-1,m=-1)}-1!==f&&-1!==m?(n&&f+t.length0&&32===g.charCodeAt(m-1)&&(i=" "+i,m-=1),p=h._createRemoveBlockCommentOperations(new o.Q(a,f+t.length+1,c,m+1),t,i)):(p=h._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===p.length?i:null);for(const e of p)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return o.Q.isEmpty(e)?n.push(l.k.delete(new o.Q(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.k.delete(new o.Q(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.k.delete(new o.Q(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return o.Q.isEmpty(e)?s.push(l.k.replace(new o.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(l.k.insert(new c.y(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(l.k.insert(new c.y(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),o=this.languageConfigurationService.getLanguageConfiguration(s).comments;o&&o.blockCommentStartToken&&o.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,o.blockCommentStartToken,o.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new d.L(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new d.L(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var u=i(43920);class g{constructor(e,t,i,n,s,o,r){this.languageConfigurationService=e,this._selection=t,this._indentSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),o=n.getLanguageConfiguration(s).comments,r=o?o.lineCommentToken:null;if(!r)return null;const a=[];for(let e=0,n=i-t+1;er?s-1:s}}}var p=i(14374),f=i(93223);class m extends s.ks{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(a.JZ);if(!t.hasModel())return;const n=[],s=t.getModel().getOptions(),r=t.getOption(23),l=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));l.sort(((e,t)=>o.Q.compareRangesUsingStarts(e.selection,t.selection)));let c=l[0];for(let e=1;ethis._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&s.jG(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(24)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.getMenuActions(t,this._contextKeyService,{arg:e.uri});for(const t of n){const[,n]=t;let s=0;for(const t of n)if(t instanceof u.nI){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new r.YH(t.id,t.label,n)),s++)}else i.push(t),s++;s&&i.push(new r.wv)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=s.BK(this._editor.getDomNode()),i=t.left+e.left,o=t.top+e.top+e.height;n={x:i,y:o}}const r=this._editor.getOption(128)&&!l.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new o.Z4(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new o.Z4(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if((0,_.ct)(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(73);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:void 0===e.enabled||e.enabled,checked:e.checked,run:e.run}),s=(e,t,s,o,a)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const l=e=>()=>{this._configurationService.updateValue(s,e)},c=[];for(const e of a)c.push(n({label:e.label,checked:o===e.value,run:l(e.value)}));return((e,t)=>new r.YH("menu-action-"+ ++i,e,t,void 0))(e,c)},o=[];o.push(n({label:h.kg("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),o.push(new r.wv),o.push(n({label:h.kg("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),o.push(s(h.kg("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:h.kg("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:h.kg("context.minimap.size.fill","Fill"),value:"fill"},{label:h.kg("context.minimap.size.fit","Fit"),value:"fit"}])),o.push(s(h.kg("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:h.kg("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:h.kg("context.minimap.slider.always","Always"),value:"always"}]));const a=this._editor.getOption(128)&&!l.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:a?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>o,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};b=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([v(1,p.Z),v(2,p.l),v(3,g.fN),v(4,f.b),v(5,u.ez),v(6,m.pG),v(7,_.VR)],b);class w extends c.ks{constructor(){super({id:"editor.action.showContextMenu",label:h.kg("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:d.R.textInputFocus,primary:1092,weight:100}})}run(e,t){b.get(t)?.showContextMenu()}}(0,c.HW)(b.ID,b,2),(0,c.Fl)(w)},61856:function(e,t,i){"use strict";var n=i(35114),s=i(52694),o=i(49678),r=i(14374);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}class d extends s.ks{constructor(){super({id:"cursorUndo",label:r.kg("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:o.R.textInputFocus,primary:2099,weight:100}})}run(e,t,i){c.get(t)?.cursorUndo()}}class h extends s.ks{constructor(){super({id:"cursorRedo",label:r.kg("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){c.get(t)?.cursorRedo()}}(0,s.HW)(c.ID,c,0),(0,s.Fl)(d),(0,s.Fl)(h)},98068:function(e,t,i){"use strict";var n=i(97358),s=i(73755),o=i(78537),r=i(72540),a=i(69122),l=i(51099),c=i(35114),d=i(80670),h=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends c.jG{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=(0,s.FY)(this,void 0);const n=(0,s.yQ)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),o=(0,s.yQ)("_textModel.onDidChangeContent",d.Jh.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register((0,s.yC)((async(e,t)=>{n.read(e),o.read(e);const i=t.add(new r.MZ),s=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(s,void 0)})))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const s=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return s.sort((0,n.Hw)((0,n.VE)((e=>e.range.endLineNumber-e.range.startLineNumber),n.U9))),s.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};u=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([h(1,a.ILanguageFeaturesService),h(2,l.gW)],u),o.N.setBreadcrumbsSourceFactory(((e,t)=>t.createInstance(u,e)))},52783:function(e,t,i){"use strict";var n=i(35114),s=i(79783),o=i(52694),r=i(62993),a=i(40393),l=i(56218),c=i(49079);class d{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.Q(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.L(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.L(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(h(e)&&(this._modifierPressed=!0),this._mouseDown&&h(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(h(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===u.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(null===this._dragSelection){const e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}h(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new r.y(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:s}=e;i=[new l.L(n,s,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new l.L(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(h(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(u.ID,new d(this._dragSelection,t,h(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=c.kI.register({description:"dnd-target",className:"dnd-target"})}showAt(e){this._dndDecorationIds.set([{range:new a.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:u._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}(0,o.HW)(u.ID,u,2)},40756:function(e,t,i){"use strict";var n=i(76611),s=i(24219),o=i(54244),r=i(20878),a=i(51099);i(21335).w.registerCommand("_executeDocumentSymbolProvider",(async function(e,...t){const[i]=t;(0,s.j)(o.r.isUri(i));const l=e.get(a.gW),c=e.get(r.ITextModelService),d=await c.createModelReference(i);try{return(await l.getOrCreate(d.object.textEditorModel,n.XO.None)).getTopLevelSymbols()}finally{d.dispose()}}))},51099:function(e,t,i){"use strict";i.d(t,{LC:function(){return v},e0:function(){return b},gW:function(){return C},i9:function(){return w}});var n=i(97358),s=i(76611),o=i(20187),r=i(26182),a=i(52732),l=i(62993),c=i(40393),d=i(82688),h=i(63619),u=i(48682),g=i(59266),p=i(35114),f=i(69122),m=function(e,t){return function(i,n){t(i,n,e)}};class _{remove(){this.parent?.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class v extends _{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class b extends _{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class w extends _{static create(e,t,i){const r=new s.Qi(i),a=new w(t.uri),l=e.ordered(t),c=l.map(((e,i)=>{const n=_.findId(`provider_${i}`,a),s=new b(n,a,e.displayName??"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,r.token)).then((e=>{for(const t of e||[])w._makeOutlineElement(t,s);return s}),(e=>((0,o.M_)(e),s))).then((e=>{_.empty(e)?e.remove():a._groups.set(n,e)}))})),d=e.onDidChange((()=>{const i=e.ordered(t);(0,n.aI)(i,l)||r.cancel()}));return Promise.all(c).then((()=>r.token.isCancellationRequested&&!i.isCancellationRequested?w.create(e,t,i):a._compact())).finally((()=>{r.dispose(),d.dispose(),r.dispose()}))}static _makeOutlineElement(e,t){const i=_.findId(e,t),n=new v(i,t,e);if(e.children)for(const t of e.children)w._makeOutlineElement(t,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=r.f.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof v?e.push(t.symbol):e.push(...r.f.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>c.Q.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return w._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>l.y.compare(c.Q.getStartPosition(e.range),c.Q.getStartPosition(t.range))||l.y.compare(c.Q.getEndPosition(t.range),c.Q.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&w._flattenDocumentSymbols(e,n.children,n.name)}}const C=(0,h.u1)("IOutlineModelService");let y=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new p.Cm,this._cache=new a.qK(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,o=i.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!(0,n.aI)(r.provider,o)){const t=new s.Qi;r={versionId:e.getVersionId(),provider:o,promiseCnt:0,source:t,promise:w.create(i,e,t.token),model:void 0},this._cache.set(e.id,r);const n=Date.now();r.promise.then((t=>{r.model=t,this._debounceInformation.update(e,Date.now()-n)})).catch((t=>{this._cache.delete(e.id)}))}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested((()=>{0==--r.promiseCnt&&(r.source.cancel(),this._cache.delete(e.id))}));try{return await r.promise}finally{a.dispose()}}};y=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([m(0,f.ILanguageFeaturesService),m(1,d.ILanguageFeatureDebounceService),m(2,g.IModelService)],y),(0,u.v)(C,y,1)},3191:function(e,t,i){"use strict";var n=i(74159),s=i(52694),o=i(49678),r=i(23534),a=i(22117),l=i(8100),c=i(14374);(0,s.HW)(a.Rj.ID,a.Rj,0),(0,r.x)(l.L9),(0,s.E_)(new class extends s.DX{constructor(){super({id:a.qs,precondition:a.lr,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t){return a.Rj.get(t)?.changePasteType()}}),(0,s.E_)(new class extends s.DX{constructor(){super({id:"editor.hidePasteWidget",precondition:a.lr,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t){a.Rj.get(t)?.clearWidgets()}}),(0,s.Fl)(class e extends s.ks{static{this.argsSchema={type:"object",properties:{kind:{type:"string",description:c.kg("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}}}constructor(){super({id:"editor.action.pasteAs",label:c.kg("pasteAs","Paste As..."),alias:"Paste As...",precondition:o.R.writable,metadata:{description:"Paste as",args:[{name:"args",schema:e.argsSchema}]}})}run(e,t,i){let s="string"==typeof i?.kind?i.kind:void 0;return!s&&i&&(s="string"==typeof i.id?i.id:void 0),a.Rj.get(t)?.pasteAs(s?new n.k(s):void 0)}}),(0,s.Fl)(class extends s.ks{constructor(){super({id:"editor.action.pasteAsText",label:c.kg("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:o.R.writable})}run(e,t){return a.Rj.get(t)?.pasteAs({providerId:l.LR.id})}})},22117:function(e,t,i){"use strict";i.d(t,{Rj:function(){return F},lr:function(){return A},qs:function(){return P}});var n,s=i(84201),o=i(97358),r=i(90890),a=i(76611),l=i(71859),c=i(74159),d=i(35114),h=i(5940),u=i(79783),g=i(20419),p=i(55036),f=i(92559),m=i(98325),_=i(40393),v=i(35720),b=i(69122),w=i(8100),C=i(43009),y=i(765),S=i(57972),k=i(7588),x=i(14374),L=i(42558),D=i(97848),E=i(63619),N=i(86171),I=i(43575),M=i(80307),T=i(20187),R=function(e,t){return function(i,n){t(i,n,e)}};const P="editor.changePasteType",A=new D.N1("pasteWidgetVisible",!1,(0,x.kg)("pasteWidgetVisible","Whether the paste widget is showing")),O="application/vnd.code.copyMetadata";let F=class extends d.jG{static{n=this}static{this.ID="editor.contrib.copyPasteActionController"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,o,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=o,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register((0,s.ko)(l,"copy",(e=>this.handleCopy(e)))),this._register((0,s.ko)(l,"cut",(e=>this.handleCopy(e)))),this._register((0,s.ko)(l,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new S.I("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(M.G,"pasteIntoEditor",e,A,{id:P,label:(0,x.kg)("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},(0,s.a)().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(!this._editor.hasTextFocus())return;if(this._clipboardService.clearInternalState?.(),!e.clipboardData||!this.isPasteAsEnabled())return;const t=this._editor.getModel(),i=this._editor.getSelections();if(!t||!i?.length)return;const s=this._editor.getOption(37);let a=i;const l=1===i.length&&i[0].isEmpty();if(l){if(!s)return;a=[new _.Q(a[0].startLineNumber,1,a[0].startLineNumber,1+t.getLineLength(a[0].startLineNumber))]}const c=this._editor._getViewModel()?.getPlainTextToCopy(i,s,u.uF),d={multicursorText:Array.isArray(c)?c:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e=>!!e.prepareDocumentPaste));if(!h.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});const p=(0,f.q)(e.clipboardData),m=h.flatMap((e=>e.copyMimeTypes??[])),v=(0,g.b)();this.setCopyMetadata(e.clipboardData,{id:v,providerCopyMimeTypes:m,defaultPastePayload:d});const b=(0,r.SS)((async e=>{const i=(0,o.Yc)(await Promise.all(h.map((async i=>{try{return await i.prepareDocumentPaste(t,a,p,e)}catch(e){return void console.error(e)}}))));i.reverse();for(const e of i)for(const[t,i]of e)p.replace(t,i);return p}));n._currentCopyOperation?.dataTransferPromise.cancel(),n._currentCopyOperation={handle:v,dataTransferPromise:b}}async handlePaste(e){if(!e.clipboardData||!this._editor.hasTextFocus())return;k.k.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;const t=this._editor.getModel(),i=this._editor.getSelections();if(!i?.length||!t)return;if(this._editor.getOption(92)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const n=this.fetchCopyMetadata(e),s=(0,f.l)(e.clipboardData);s.delete(O);const o=[...e.clipboardData.types,...n?.providerCopyMimeTypes??[],h.K.uriList],r=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e=>{const t=this._pasteAsActionContext?.preferred;return!(t&&e.providedPasteEditKinds&&!this.providerMatchesPreference(e,t))&&e.pasteMimeTypes?.some((e=>(0,l.Y)(e,o)))}));r.length?(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,r,i,s,n):this.doPasteInline(r,i,s,n,e)):this._pasteAsActionContext?.preferred&&this.showPasteAsNoEditMessage(i,this._pasteAsActionContext.preferred)}showPasteAsNoEditMessage(e,t){k.k.get(this._editor)?.showMessage((0,x.kg)("pasteAsError","No paste edits for '{0}' found",t instanceof c.k?t.value:t.providerId),e[0].getStartPosition())}doPasteInline(e,t,i,n,s){const o=this._editor;if(!o.hasModel())return;const l=new y.gI(o,3,void 0),c=(0,r.SS)((async o=>{const h=this._editor;if(!h.hasModel())return;const u=h.getModel(),g=new d.Cm,p=g.add(new a.Qi(o));g.add(l.token.onCancellationRequested((()=>p.cancel())));const f=p.token;try{if(await this.mergeInDataFromCopy(i,n,f),f.isCancellationRequested)return;const o=e.filter((e=>this.isSupportedPasteProvider(e,i)));if(!o.length||1===o.length&&o[0]instanceof w.LR)return this.applyDefaultPasteHandler(i,n,f,s);const a={triggerKind:v.FX.Automatic},l=await this.getPasteEdits(o,i,u,t,a,f);if(g.add(l),f.isCancellationRequested)return;if(1===l.edits.length&&l.edits[0].provider instanceof w.LR)return this.applyDefaultPasteHandler(i,n,f,s);if(l.edits.length){const e="afterPaste"===h.getOption(85).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:l.edits},e,((e,i)=>new Promise(((n,s)=>{(async()=>{try{const o=e.provider.resolveDocumentPasteEdit?.(e,i),a=new r.Zv,l=o&&await this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,x.kg)("resolveProcess","Resolving paste edit. Click to cancel"),Promise.race([a.p,o]),{cancel:()=>(a.cancel(),s(new T.AL))},0);return l&&(e.additionalEdit=l.additionalEdit),n(e)}catch(e){return s(e)}})()}))),f)}await this.applyDefaultPasteHandler(i,n,f,s)}finally{g.dispose(),this._currentPasteOperation===c&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,x.kg)("pasteIntoEditorProgress","Running paste handlers. Click to cancel and do basic paste"),c,{cancel:async()=>{try{if(c.cancel(),l.token.isCancellationRequested)return;await this.applyDefaultPasteHandler(i,n,l.token,s)}finally{l.dispose()}}}).then((()=>{l.dispose()})),this._currentPasteOperation=c}showPasteAsPick(e,t,i,n,s){const o=(0,r.SS)((async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),h=new d.Cm,u=h.add(new y.gI(a,3,void 0,r));try{if(await this.mergeInDataFromCopy(n,s,u.token),u.token.isCancellationRequested)return;let o=t.filter((t=>this.isSupportedPasteProvider(t,n,e)));e&&(o=o.filter((t=>this.providerMatchesPreference(t,e))));const r={triggerKind:v.FX.PasteAs,only:e&&e instanceof c.k?e:void 0};let a,d=h.add(await this.getPasteEdits(o,n,l,i,r,u.token));if(u.token.isCancellationRequested)return;if(e&&(d={edits:d.edits.filter((t=>e instanceof c.k?e.contains(t.kind):e.providerId===t.provider.id)),dispose:d.dispose}),!d.edits.length)return void(r.only&&this.showPasteAsNoEditMessage(i,r.only));if(e)a=d.edits.at(0);else{const e=await this._quickInputService.pick(d.edits.map((e=>({label:e.title,description:e.kind?.value,edit:e}))),{placeHolder:(0,x.kg)("pasteAsPickerPlaceholder","Select Paste Action")});a=e?.edit}if(!a)return;const g=(0,C.v)(l.uri,i,a);await this._bulkEditService.apply(g,{editor:this._editor})}finally{h.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:(0,x.kg)("pasteAsProgress","Running paste handlers")},(()=>o))}setCopyMetadata(e,t){e.setData(O,JSON.stringify(t))}fetchCopyMetadata(e){if(!e.clipboardData)return;const t=e.clipboardData.getData(O);if(t)try{return JSON.parse(t)}catch{return}const[i,n]=p.Mz.getTextData(e.clipboardData);return n?{defaultPastePayload:{mode:n.mode,multicursorText:n.multicursorText??null,pasteOnNewLine:!!n.isFromEmptySelection}}:void 0}async mergeInDataFromCopy(e,t,i){if(t?.id&&n._currentCopyOperation?.handle===t.id){const t=await n._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(h.K.uriList)){const t=await this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(h.K.uriList,(0,l.gf)(l.jt.create(t)))}}async getPasteEdits(e,t,i,n,s,a){const l=new d.Cm,c=await(0,r.PK)(Promise.all(e.map((async e=>{try{const o=await(e.provideDocumentPasteEdits?.(i,n,t,s,a));return o&&l.add(o),o?.edits?.map((t=>({...t,provider:e})))}catch(e){return void((0,T.MB)(e)||console.error(e))}}))),a),h=(0,o.Yc)(c??[]).flat().filter((e=>!s.only||s.only.contains(e.kind)));return{edits:(0,C.H)(h),dispose:()=>l.dispose()}}async applyDefaultPasteHandler(e,t,i,n){const s=e.get(h.K.text)??e.get("text"),o=await(s?.asString())??"";if(i.isCancellationRequested)return;const r={clipboardEvent:n,text:o,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._editor.trigger("keyboard","paste",r)}isSupportedPasteProvider(e,t,i){return!!e.pasteMimeTypes?.some((e=>t.matches(e)))&&(!i||this.providerMatchesPreference(e,i))}providerMatchesPreference(e,t){return t instanceof c.k?!e.providedPasteEditKinds||e.providedPasteEditKinds.some((e=>t.contains(e))):e.id===t.providerId}};F=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([R(1,E._Y),R(2,m.nu),R(3,L.h),R(4,b.ILanguageFeaturesService),R(5,I.GK),R(6,N.G5)],F)},8100:function(e,t,i){"use strict";i.d(t,{L9:function(){return k},LR:function(){return v},ZR:function(){return S}});var n=i(97358),s=i(71859),o=i(74159),r=i(35114),a=i(5940),l=i(84756),c=i(59951),d=i(54244),h=i(35720),u=i(69122),g=i(14374),p=i(1255),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};class _{async provideDocumentPasteEdits(e,t,i,n,s){const o=await this.getEdit(i,s);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,n){const s=await this.getEdit(i,n);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}}class v extends _{constructor(){super(...arguments),this.kind=v.kind,this.dropMimeTypes=[a.K.text],this.pasteMimeTypes=[a.K.text]}static{this.id="text"}static{this.kind=new o.k("text.plain")}async getEdit(e,t){const i=e.get(a.K.text);if(!i)return;if(e.has(a.K.uriList))return;const n=await i.asString();return{handledMimeType:a.K.text,title:(0,g.kg)("text.label","Insert Plain Text"),insertText:n,kind:this.kind}}}class b extends _{constructor(){super(...arguments),this.kind=new o.k("uri.absolute"),this.dropMimeTypes=[a.K.uriList],this.pasteMimeTypes=[a.K.uriList]}async getEdit(e,t){const i=await y(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map((({uri:e,originalText:t})=>e.scheme===l.ny.file?e.fsPath:(n++,t))).join(" ");let o;return o=n>0?i.length>1?(0,g.kg)("defaultDropProvider.uriList.uris","Insert Uris"):(0,g.kg)("defaultDropProvider.uriList.uri","Insert Uri"):i.length>1?(0,g.kg)("defaultDropProvider.uriList.paths","Insert Paths"):(0,g.kg)("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:a.K.uriList,insertText:s,title:o,kind:this.kind}}}let w=class extends _{constructor(e){super(),this._workspaceContextService=e,this.kind=new o.k("uri.relative"),this.dropMimeTypes=[a.K.uriList],this.pasteMimeTypes=[a.K.uriList]}async getEdit(e,t){const i=await y(e);if(!i.length||t.isCancellationRequested)return;const s=(0,n.Yc)(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?(0,c.iZ)(t.uri,e):void 0})));return s.length?{handledMimeType:a.K.uriList,insertText:s.join(" "),title:i.length>1?(0,g.kg)("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):(0,g.kg)("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}:void 0}};w=f([m(0,p.VR)],w);class C{constructor(){this.kind=new o.k("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:a.K.text}]}async provideDocumentPasteEdits(e,t,i,n,s){if(n.triggerKind!==h.FX.PasteAs&&!n.only?.contains(this.kind))return;const o=i.get("text/html"),r=await(o?.asString());return r&&!s.isCancellationRequested?{dispose(){},edits:[{insertText:r,yieldTo:this._yieldTo,title:(0,g.kg)("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}:void 0}}async function y(e){const t=e.get(a.K.uriList);if(!t)return[];const i=await t.asString(),n=[];for(const e of s.jt.parse(i))try{n.push({uri:d.r.parse(e),originalText:e})}catch{}return n}let S=class extends r.jG{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new v)),this._register(e.documentDropEditProvider.register("*",new b)),this._register(e.documentDropEditProvider.register("*",new w(t)))}};S=f([m(0,u.ILanguageFeaturesService),m(1,p.VR)],S);let k=class extends r.jG{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new v)),this._register(e.documentPasteEditProvider.register("*",new b)),this._register(e.documentPasteEditProvider.register("*",new w(t))),this._register(e.documentPasteEditProvider.register("*",new C))}};k=f([m(0,u.ILanguageFeaturesService),m(1,p.VR)],k)},23623:function(e,t,i){"use strict";var n,s=i(52694),o=i(38047),r=i(23534),a=i(8100),l=i(14374),c=i(16434),d=i(56419),h=i(97358),u=i(90890),g=i(71859),p=i(74159),f=i(35114),m=i(92559),_=i(40393),v=i(69122),b=i(73559),w=i(61152),C=i(765),y=i(57972),S=i(47901),k=i(97848),x=i(19312),L=i(63619),D=i(43009),E=i(80307),N=function(e,t){return function(i,n){t(i,n,e)}};const I="editor.experimental.dropIntoEditor.defaultProvider",M="editor.changeDropType",T=new k.N1("dropWidgetVisible",!1,(0,l.kg)("dropWidgetVisible","Whether the drop widget is showing"));let R=class extends f.jG{static{n=this}static{this.ID="editor.contrib.dropIntoEditorController"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=x.PD.getInstance(),this._dropProgressManager=this._register(t.createInstance(y.I,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(E.G,"dropIntoEditor",e,T,{id:M,label:(0,l.kg)("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){if(!i.dataTransfer||!e.hasModel())return;this._currentOperation?.cancel(),e.focus(),e.setPosition(t);const n=(0,u.SS)((async s=>{const o=new f.Cm,r=o.add(new C.gI(e,1,void 0,s));try{const n=await this.extractDataTransferData(i);if(0===n.size||r.token.isCancellationRequested)return;const a=e.getModel();if(!a)return;const l=this._languageFeaturesService.documentDropEditProvider.ordered(a).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>n.matches(e))))),c=o.add(await this.getDropEdits(l,a,t,n,r));if(r.token.isCancellationRequested)return;if(c.edits.length){const i=this.getInitialActiveEditIndex(a,c.edits),n="afterDrop"===e.getOption(36).showDropSelector;await this._postDropWidgetManager.applyEditAndShowIfNeeded([_.Q.fromPositions(t)],{activeEditIndex:i,allEdits:c.edits},n,(async e=>e),s)}}finally{o.dispose(),this._currentOperation===n&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,(0,l.kg)("dropIntoEditorProgress","Running drop handlers. Click to cancel"),n,{cancel:()=>n.cancel()}),this._currentOperation=n}async getDropEdits(e,t,i,n,s){const o=new f.Cm,r=await(0,u.PK)(Promise.all(e.map((async e=>{try{const r=await e.provideDocumentDropEdits(t,i,n,s.token);return r&&o.add(r),r?.edits.map((t=>({...t,providerId:e.id})))}catch(e){console.error(e)}}))),s.token),a=(0,h.Yc)(r??[]).flat();return{edits:(0,D.H)(a),dispose:()=>o.dispose()}}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(I,{resource:e.uri});for(const[e,n]of Object.entries(i)){const i=new p.k(n),s=t.findIndex((t=>i.value===t.providerId&&t.handledMimeType&&(0,g.Y)(e,[t.handledMimeType])));if(s>=0)return s}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new g.Vq;const t=(0,m.l)(e.dataTransfer);if(this.treeItemsTransfer.hasData(b.DraggedTreeItemsIdentifier.prototype)){const e=this.treeItemsTransfer.getData(b.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(e))for(const i of e){const e=await this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}};R=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([N(1,L._Y),N(2,S.pG),N(3,v.ILanguageFeaturesService),N(4,w.ITreeViewsDnDService)],R),(0,s.HW)(R.ID,R,2),(0,r.x)(a.ZR),(0,s.E_)(new class extends s.DX{constructor(){super({id:M,precondition:T,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){R.get(t)?.changeDropType()}}),(0,s.E_)(new class extends s.DX{constructor(){super({id:"editor.hideDropWidget",precondition:T,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t,i){R.get(t)?.clearWidgets()}}),d.O.as(c.Fd.Configuration).registerConfiguration({...o.JJ,properties:{[I]:{type:"object",scope:5,description:l.kg("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}})},43009:function(e,t,i){"use strict";i.d(t,{H:function(){return r},v:function(){return o}});var n=i(98325),s=i(62347);function o(e,t,i){return("string"==typeof i.insertText?""===i.insertText:""===i.insertText.snippet)?{edits:i.additionalEdit?.edits??[]}:{edits:[...t.map((t=>new n.cw(e,{range:t,text:"string"==typeof i.insertText?s.fr.escape(i.insertText)+"$0":i.insertText.snippet,insertAsSnippet:!0}))),...i.additionalEdit?.edits??[]]}}function r(e){function t(e,t){return"mimeType"in e?e.mimeType===t.handledMimeType:!!t.kind&&e.kind.contains(t.kind)}const i=new Map;for(const n of e)for(const s of n.yieldTo??[])for(const o of e)if(o!==n&&t(s,o)){let e=i.get(n);e||(e=[],i.set(n,e)),e.push(o)}if(!i.size)return Array.from(e);const n=new Set,s=[];return function e(t){if(!t.length)return[];const o=t[0];if(s.includes(o))return console.warn("Yield to cycle detected",o),t;if(n.has(o))return e(t.slice(1));let r=[];const a=i.get(o);return a&&(s.push(o),r=e(a),s.pop()),n.add(o),[...r,o,...e(t.slice(1))]}(Array.from(e))}},80307:function(e,t,i){"use strict";i.d(t,{G:function(){return y}});var n,s=i(84201),o=i(96337),r=i(30981),a=i(14697),l=i(20187),c=i(80670),d=i(35114),h=i(98325),u=i(43009),g=i(14374),p=i(97848),f=i(14280),m=i(63619),_=i(87163),v=i(31835),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};let C=class extends d.jG{static{n=this}static{this.baseId="editor.widget.postEditWidget"}constructor(e,t,i,n,s,o,r,a,l,h){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=o,this.onSelectNewEdit=r,this._contextMenuService=a,this._keybindingService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(l),this.visibleContext.set(!0),this._register((0,d.s)((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,d.s)((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{s.containsPosition(e.position)||this.dispose()}))),this._register(c.Jh.runAndSubscribe(h.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){const e=this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=s.$(".post-edit-widget"),this.button=this._register(new o.$(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(s.ko(this.domNode,s.Bx.CLICK,(()=>this.showSelector())))}getId(){return n.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=s.BK(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>(0,r.ih)({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};C=n=b([w(7,f.Z),w(8,p.fN),w(9,_.b)],C);let y=class extends d.jG{constructor(e,t,i,n,s,o,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=o,this._notificationService=r,this._currentWidget=this._register(new d.HE),this._register(c.Jh.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}async applyEditAndShowIfNeeded(e,t,i,n,s){const o=this._editor.getModel();if(!o||!e.length)return;const r=t.allEdits.at(t.activeEditIndex);if(!r)return;const c=async o=>{const r=this._editor.getModel();r&&(await r.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:o,allEdits:t.allEdits},i,n,s))},d=(n,s)=>{(0,l.MB)(n)||(this._notificationService.error(s),i&&this.show(e[0],t,c))};let h;try{h=await n(r,s)}catch(e){return d(e,(0,g.kg)("resolveError","Error resolving edit '{0}':\n{1}",r.title,(0,a.r)(e)))}if(s.isCancellationRequested)return;const p=(0,u.v)(o.uri,e,h),f=e[0],m=o.deltaDecorations([],[{range:f,options:{description:"paste-line-suffix",stickiness:0}}]);let _,v;this._editor.focus();try{_=await this._bulkEditService.apply(p,{editor:this._editor,token:s}),v=o.getDecorationRange(m[0])}catch(e){return d(e,(0,g.kg)("applyError","Error applying edit '{0}':\n{1}",r.title,(0,a.r)(e)))}finally{o.deltaDecorations(m,[])}s.isCancellationRequested||i&&_.isApplied&&t.allEdits.length>1&&this.show(v??f,t,c)}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(C,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};y=b([w(4,m._Y),w(5,h.nu),w(6,v.Ot)],y)},765:function(e,t,i){"use strict";i.d(t,{$t:function(){return m},gI:function(){return _},ER:function(){return v}});var n=i(43920),s=i(40393),o=i(76611),r=i(35114),a=i(52694),l=i(97848),c=i(54409),d=i(63619),h=i(48682),u=i(14374);const g=(0,d.u1)("IEditorCancelService"),p=new l.N1("cancellableOperation",!1,(0,u.kg)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,h.v)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:p.bindTo(e.get(l.fN)),tokens:new c.w}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class f extends o.Qi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.E_)(new class extends a.DX{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class m{constructor(e,t){if(this.flags=t,1&this.flags){const t=e.getModel();this.modelVersionId=t?n.GP("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;4&this.flags?this.position=e.getPosition():this.position=null,2&this.flags?this.selection=e.getSelection():this.selection=null,8&this.flags?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof m))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new m(e,this.flags))}}class _ extends f{constructor(e,t,i,n){super(e,n),this._listener=new r.Cm,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&s.Q.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&s.Q.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends o.Qi{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}},23793:function(e,t,i){"use strict";i.d(t,{z0:function(){return at}});var n=i(90890),s=i(35114),o=i(43920),r=i(52694),a=i(99851),l=i(49678),c=i(62067),d=i(64429),h=i(24608),u=i(62993),g=i(40393),p=i(56218),f=i(58980),m=i(49079),_=i(4195),v=i(40616);class b{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new g.Q(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=b._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,o=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(s.push({range:new g.Q(r,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=i.startLineNumber,a=i.endLineNumber)}s.push({range:new g.Q(r,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const o=new Array(e.length);for(let t=0,i=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,b._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){const e=[];for(let t=0;tg.Q.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function y(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function S(e,t,i){const n=t.split(i),s=e[0].split(i);let o="";return n.forEach(((e,t)=>{o+=C([s[t]],e)+i})),o.slice(0,-1)}class k{constructor(e){this.staticValue=e,this.kind=0}}class x{constructor(e){this.pieces=e,this.kind=1}}class L{static fromStaticValue(e){return new L([D.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new k(e[0].staticValue):this._state=new x(e):this._state=new k("")}buildReplaceString(e,t){if(0===this._state.kind)return t?C(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t0){const e=[],t=n.caseOps.length;let i=0;for(let o=0,r=s.length;o=t){e.push(s.slice(o));break}switch(n.caseOps[i]){case"U":e.push(s[o].toUpperCase());break;case"u":e.push(s[o].toUpperCase()),i++;break;case"L":e.push(s[o].toLowerCase());break;case"l":e.push(s[o].toLowerCase()),i++;break;default:e.push(s[o])}}s=e.join("")}i+=s}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(e{if(this._editor.hasModel())return this.research(!1)}),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,s.AS)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new g.Q(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,G);this._decorations.set(n,i);const s=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(s);if(0===o&&n.length>0){const e=(0,d.hw)(n.map((e=>e.range)),(e=>g.Q.compareRangesUsingStarts(e,s)>=0));o=e>0?e-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||1===n?(1===i?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new u.y(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new u.y(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=s)break;const o=e.charCodeAt(n);if(36===o){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===o||38===o){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=o&&o<=57){let r=o-48;if(n+1=s)break;const o=e.charCodeAt(n);switch(o){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(o))}}}return i.finalize()}(this._state.replaceString):L.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const n=e.buildReplaceString(i.matches,this._state.preserveCase),s=new h.iu(t,n);this._executeEditorCommand("replace",s),this._decorations.setStartPosition(new u.y(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>Q._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=G?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new f.lt(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),s=i.getFullModelRange(),o=this._getReplacePattern();let r;const a=this._state.preserveCase;r=o.hasReplacementPatterns||a?n.replace(t,(function(){return o.buildReplaceString(arguments,a)})):n.replace(t,o.buildReplaceString(null,a));const l=new h.ui(s,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,s=i.length;ee.range)),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let t=this._findMatches(e,!1,1073741824).map((e=>new p.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const i=this._editor.getSelection();for(let e=0,n=t.length;ethis._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s={inputActiveOptionBorder:(0,_.GuP)(_.uNK),inputActiveOptionForeground:(0,_.GuP)(_.$$0),inputActiveOptionBackground:(0,_.GuP)(_.c1f)},o=this._register((0,J.bW)());this.caseSensitive=this._register(new Z.bc({appendTitle:this._keybindingLabelFor(V),isChecked:this._state.matchCase,hoverDelegate:o,...s})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new Z.nV({appendTitle:this._keybindingLabelFor(z),isChecked:this._state.wholeWord,hoverDelegate:o,...s})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new Z.Ix({appendTitle:this._keybindingLabelFor(U),isChecked:this._state.isRegex,hoverDelegate:o,...s})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Y.ko(this._domNode,Y.Bx.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(Y.ko(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ee.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}var te=i(80670);function ie(e,t){return 1===e||2!==e&&t}class ne extends s.jG{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ie(this._isRegexOverride,this._isRegex)}get wholeWord(){return ie(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ie(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ie(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new te.vl),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),void 0!==i&&(g.Q.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){const n={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;const o=this.isRegex,r=this.wholeWord,a=this.matchCase,l=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,n.searchString=!0,s=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,n.replaceString=!0,s=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,n.isRevealed=!0,s=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,n.isReplaceRevealed=!0,s=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&(e.searchScope?.every((e=>this._searchScope?.some((t=>!g.Q.equalsRange(t,e)))))||(this._searchScope=e.searchScope,n.searchScope=!0,s=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,n.loop=!0,s=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,n.isSearching=!0,s=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,n.filters=!0,s=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,o!==this.isRegex&&(s=!0,n.isRegex=!0),r!==this.wholeWord&&(s=!0,n.wholeWord=!0),a!==this.matchCase&&(s=!0,n.matchCase=!0),l!==this.preserveCase&&(s=!0,n.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(n)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=G}}var se=i(15075),oe=i(44925),re=i(38175),ae=i(93231),le=i(20187),ce=i(79783),de=i(14374),he=i(87438);function ue(e){return"Up"===e.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()&&"Down"===e.lookupKeybinding("history.showNext")?.getElectronAccelerator()}var ge=i(51310),pe=i(56613),fe=i(39679),me=i(24219),_e=i(52010);const ve=(0,ge.pU)("find-collapsed",ae.W.chevronRight,de.kg("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),be=(0,ge.pU)("find-expanded",ae.W.chevronDown,de.kg("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),we=(0,ge.pU)("find-selection",ae.W.selection,de.kg("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Ce=(0,ge.pU)("find-replace",ae.W.replace,de.kg("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),ye=(0,ge.pU)("find-replace-all",ae.W.replaceAll,de.kg("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Se=(0,ge.pU)("find-previous-match",ae.W.arrowUp,de.kg("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),ke=(0,ge.pU)("find-next-match",ae.W.arrowDown,de.kg("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),xe=de.kg("label.findDialog","Find / Replace"),Le=de.kg("label.find","Find"),De=de.kg("placeholder.find","Find"),Ee=de.kg("label.previousMatchButton","Previous Match"),Ne=de.kg("label.nextMatchButton","Next Match"),Ie=de.kg("label.toggleSelectionFind","Find in Selection"),Me=de.kg("label.closeButton","Close"),Te=de.kg("label.replace","Replace"),Re=de.kg("placeholder.replace","Replace"),Pe=de.kg("label.replaceButton","Replace"),Ae=de.kg("label.replaceAllButton","Replace All"),Oe=de.kg("label.toggleReplaceButton","Toggle Replace"),Fe=de.kg("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",G),Be=de.kg("label.matchesLocation","{0} of {1}"),We=de.kg("label.noResults","No results"),He=419;let Ve=69;const ze="ctrlEnterReplaceAll.windows.donotask",Ue=ce.zx?256:2048;class je{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function qe(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function Ke(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(146)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(41)){const e=this._codeEditor.getOption(41).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new je(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((async()=>{if(this._isVisible){const e=await this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}}))),this._findInputFocused=M.bindTo(a),this._findFocusTracker=this._register(Y.w5(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=T.bindTo(a),this._replaceFocusTracker=this._register(Y.w5(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new je(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return $e.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(92)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Y.Tr(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,le.dz)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Ve+"px",this._state.matchesCount>=G?this._matchesCount.title=Fe:this._matchesCount.title="",this._matchesCount.firstChild?.remove(),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=G&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=o.GP(Be,i,t)}else e=We;this._matchesCount.appendChild(document.createTextNode(e)),(0,se.xE)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Ve=Math.max(Ve,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===We)return""===i?de.kg("ariaSearchNoResultEmpty","{0} found",e):de.kg("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=de.kg("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();return s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1?`${s.getLineContent(t.startLineNumber)}, ${n}`:n}return de.kg("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Y.BK(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=n.left+(s?s.left:0),r=s?s.top:0;if(this._viewZone&&re.startLineNumber&&(t=!1);const i=Y.cL(this._domNode).left;o>i&&(t=!1);const s=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(s?s.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new je(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;const s=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(84).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,s=!1,o=!1;if(this._resized&&Y.Tr(this._domNode)>He)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Y.Tr(this._findInput.domNode));if(447+i>=t&&(s=!0),447+i-Ve>=t&&(o=!0),447+i-Ve>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",o),this._domNode.classList.toggle("reduced-find-widget",s),o||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._findInput.layout({collapsedFindWidget:n,narrowFindWidget:o,reducedFindWidget:s}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Y.Tr(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||g.Q.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|Ue)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?qe(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?Ke(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|Ue)?(this._keybindingService.dispatchEvent(e,e.target)||(ce.uF&&ce.ib&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(de.kg("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ze,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?qe(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?Ke(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const e=!0,t=!0;this._findInput=this._register(new he.pG(null,this._contextViewProvider,{width:221,label:Le,placeholder:De,appendCaseSensitiveLabel:this._keybindingLabelFor(V),appendWholeWordsLabel:this._keybindingLabelFor(z),appendRegexLabel:this._keybindingLabelFor(U),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>ue(this._keybindingService),inputBoxStyles:_e.ho,toggleStyles:_e.mk},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),ce.j9&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const i=this._register((0,J.bW)());this._prevBtn=this._register(new Ge({label:Ee+this._keybindingLabelFor(W),icon:Se,hoverDelegate:i,onTrigger:()=>{(0,me.eU)(this._codeEditor.getAction(W)).run().then(void 0,le.dz)}},this._hoverService)),this._nextBtn=this._register(new Ge({label:Ne+this._keybindingLabelFor(B),icon:ke,hoverDelegate:i,onTrigger:()=>{(0,me.eU)(this._codeEditor.getAction(B)).run().then(void 0,le.dz)}},this._hoverService));const n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);const s=document.createElement("div");s.className="find-actions",n.appendChild(s),s.appendChild(this._matchesCount),s.appendChild(this._prevBtn.domNode),s.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new oe.l({icon:we,title:Ie+this._keybindingLabelFor(j),isChecked:!1,hoverDelegate:i,inputActiveOptionBackground:(0,_.GuP)(_.c1f),inputActiveOptionBorder:(0,_.GuP)(_.uNK),inputActiveOptionForeground:(0,_.GuP)(_.$$0)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),s.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Ge({label:Me+this._keybindingLabelFor(H),icon:ge.$_,hoverDelegate:i,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new he._Q(null,void 0,{label:Te,placeholder:Re,appendPreserveCaseLabel:this._keybindingLabelFor(q),history:[],flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showHistoryHint:()=>ue(this._keybindingService),inputBoxStyles:_e.ho,toggleStyles:_e.mk},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())})));const o=this._register((0,J.bW)());this._replaceBtn=this._register(new Ge({label:Pe+this._keybindingLabelFor(K),icon:Ce,hoverDelegate:o,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new Ge({label:Ae+this._keybindingLabelFor($),icon:ye,hoverDelegate:o,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const r=document.createElement("div");r.className="replace-part",r.appendChild(this._replaceInput.domNode);const a=document.createElement("div");a.className="replace-actions",r.appendChild(a),a.appendChild(this._replaceBtn.domNode),a.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Ge({label:Oe,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Y.Tr(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=xe,this._domNode.role="dialog",this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(r),this._resizeSash=this._register(new re.m(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let l=He;this._register(this._resizeSash.onDidStart((()=>{l=Y.Tr(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=l+e.startX-e.currentX;t(parseFloat(Y.L9(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Y.Tr(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Y.Tr(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown?.(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...pe.L.asClassNameArray(ve)),this._domNode.classList.add(...pe.L.asClassNameArray(be))):(this._domNode.classList.remove(...pe.L.asClassNameArray(be)),this._domNode.classList.add(...pe.L.asClassNameArray(ve)))}}(0,v.zy)(((e,t)=>{const i=e.getColor(_.ECk);i&&t.addRule(`.monaco-editor .findMatch { border: 1px ${(0,fe.Bb)(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`);const n=e.getColor(_.S5J);n&&t.addRule(`.monaco-editor .findScope { border: 1px ${(0,fe.Bb)(e.type)?"dashed":"solid"} ${n}; }`);const s=e.getColor(_.b1q);s&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${s}; }`);const o=e.getColor(_.f3U);o&&t.addRule(`.monaco-editor .findMatchInline { color: ${o}; }`);const r=e.getColor(_.p8Y);r&&t.addRule(`.monaco-editor .currentFindMatchInline { color: ${r}; }`)}));var Qe,Ye=i(93223),Ze=i(42558),Xe=i(14280),Je=i(87163),et=i(31835),tt=i(43575),it=i(87332),nt=i(74856),st=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ot=function(e,t){return function(i,n){t(i,n,e)}};function rt(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let at=class extends s.jG{static{Qe=this}static{this.ID="editor.contrib.findController"}get editor(){return this._editor}static get(e){return e.getContribution(Qe.ID)}constructor(e,t,i,s,o,r){super(),this._editor=e,this._findWidgetVisible=I.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=s,this._notificationService=o,this._hoverService=r,this._updateHistoryDelayer=new n.ve(500),this._state=this._register(new ne),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!M.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=o.bm(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const i={...t,isRevealed:!0};if("single"===e.seedSearchStringFromSelection){const t=rt(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=o.bm(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=rt(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new Q(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._editor.getModel()?.isTooLargeForHeapOperation()?(this._notificationService.warn(de.kg("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0))}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};at=Qe=st([ot(1,N.fN),ot(2,it.CS),ot(3,Ze.h),ot(4,et.Ot),ot(5,nt.TN)],at);let lt=class extends at{constructor(e,t,i,n,s,o,r,a,l){super(e,i,r,a,o,l),this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new $e(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new ee(this._editor,this._state,this._keybindingService))}};lt=st([ot(1,Xe.l),ot(2,N.fN),ot(3,Je.b),ot(4,v.Gy),ot(5,et.Ot),ot(6,it.CS),ot(7,Ze.h),ot(8,nt.TN)],lt),(0,r.gW)(new r.PF({id:"actions.find",label:de.kg("startFindAction","Find"),alias:"Find",precondition:N.M$.or(l.R.focus,N.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Ye.D8.MenubarEditMenu,group:"3_find",title:de.kg({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})).addImplementation(0,((e,t,i)=>{const n=at.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})}));const ct={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class dt extends r.ks{constructor(){super({id:"editor.actions.findWithArgs",label:de.kg("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:ct})}async run(e,t,i){const n=at.get(t);if(n){const e=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:i?.findInSelection||!1,loop:t.getOption(41).loop},e),n.setGlobalBufferTerm(n.getState().searchString)}}}class ht extends r.ks{constructor(){super({id:"actions.findWithSelection",label:de.kg("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=at.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}class ut extends r.ks{async run(e,t){const i=at.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===i.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class gt extends r.ks{constructor(){super({id:"editor.action.goToMatchFindAction",label:de.kg("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:I}),this._highlightDecorations=[]}run(e,t,i){const n=at.get(t);if(!n)return;const o=n.getState().matchesCount;if(o<1)return void e.get(et.Ot).notify({severity:et.AI.Warning,message:de.kg("findMatchAction.noResults","No matches. Try searching for something else.")});const r=e.get(tt.GK),a=new s.Cm,l=a.add(r.createInputBox());l.placeholder=de.kg("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);const c=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},d=e=>{const i=c(e);if("number"==typeof i){l.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else l.validationMessage=de.kg("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};a.add(l.onDidChangeValue((e=>{d(e)}))),a.add(l.onDidAccept((()=>{const e=c(l.value);"number"==typeof e?(n.goToMatch(e),l.hide()):l.validationMessage=de.kg("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)}))),a.add(l.onDidHide((()=>{this.clearDecorations(t),a.dispose()}))),l.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,v.Yf)(a.vp),position:c.A5.Full}}}])}))}}class pt extends r.ks{async run(e,t){const i=at.get(t);if(!i)return;const n=rt(t,"single",!1);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}(0,r.gW)(new r.PF({id:"editor.action.startFindReplaceAction",label:de.kg("startReplace","Replace"),alias:"Replace",precondition:N.M$.or(l.R.focus,N.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Ye.D8.MenubarEditMenu,group:"3_find",title:de.kg({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})).addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(92))return!1;const n=at.get(t);if(!n)return!1;const s=t.getSelection(),o=n.isFindInputFocused(),r=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&"never"!==t.getOption(41).seedSearchStringFromSelection&&!o,a=o||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(41).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})})),(0,r.HW)(at.ID,lt,0),(0,r.Fl)(dt),(0,r.Fl)(ht),(0,r.Fl)(class extends ut{constructor(){super({id:B,label:de.kg("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.R.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:N.M$.and(l.R.focus,M),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}),(0,r.Fl)(class extends ut{constructor(){super({id:W,label:de.kg("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.R.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:N.M$.and(l.R.focus,M),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}),(0,r.Fl)(gt),(0,r.Fl)(class extends pt{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:de.kg("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.R.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}),(0,r.Fl)(class extends pt{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:de.kg("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.R.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}});const ft=r.DX.bindToContribution(at.get);(0,r.E_)(new ft({id:H,precondition:I,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:N.M$.and(l.R.focus,N.M$.not("isComposing")),primary:9,secondary:[1033]}})),(0,r.E_)(new ft({id:V,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,r.E_)(new ft({id:z,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,r.E_)(new ft({id:U,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),(0,r.E_)(new ft({id:j,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,r.E_)(new ft({id:q,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),(0,r.E_)(new ft({id:K,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:3094}})),(0,r.E_)(new ft({id:K,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:N.M$.and(l.R.focus,T),primary:3}})),(0,r.E_)(new ft({id:$,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:2563}})),(0,r.E_)(new ft({id:$,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:N.M$.and(l.R.focus,T),primary:void 0,mac:{primary:2051}}})),(0,r.E_)(new ft({id:"editor.action.selectAllMatches",precondition:I,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:515}}))},69904:function(e,t,i){"use strict";i.d(t,{WR:function(){return W},BP:function(){return H}});var n=i(90890),s=i(76611),o=i(20187),r=i(62167),a=i(35114),l=i(43920),c=i(24219),d=i(61554),h=i(52694),u=i(49678),g=i(35720),p=i(8494),f=i(93795),m=i(64429),_=i(80670),v=i(40393),b=i(64266);class w{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new _.vl,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==(0,b.W)(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,s=Number.MAX_VALUE,o=-1;const r=this._foldingModel.regions;for(;i0}isHidden(e){return null!==C(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const s=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=C(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,o=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function C(e,t){const i=(0,m.hw)(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}var y,S=i(59691),k=i(14374),x=i(97848),L=i(54961),D=i(4046),E=i(45692),N=i(31835),I=i(82688),M=i(43857),T=i(69122),R=i(21335),P=i(54244),A=i(59266),O=i(47901),F=function(e,t){return function(i,n){t(i,n,e)}};const B=new x.N1("foldingEnabled",!1);let W=class extends a.jG{static{y=this}static{this.ID="editor.contrib.folding"}static get(e){return e.getContribution(y.ID)}static getFoldingRangeProviders(e,t){const i=e.foldingRangeProvider.ordered(t);return y._foldingRangeSelector?.(i,t)??i}constructor(e,t,i,n,s,o){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=o,this.localToDispose=this._register(new a.Cm),this.editor=e,this._foldingLimitReporter=new H(e);const r=this.editor.getOptions();this._isEnabled=r.get(43),this._useFoldingProviders="indentation"!==r.get(44),this._unfoldOnClickAfterEndOfLine=r.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=r.get(46),this.updateDebounceInfo=s.for(o.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new L.rv(e),this.foldingDecorationProvider.showFoldingControls=r.get(111),this.foldingDecorationProvider.showFoldingHighlights=r.get(45),this.foldingEnabled=B.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(47)&&this.onModelChanged(),e.hasChanged(111)||e.hasChanged(45)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(111),this.foldingDecorationProvider.showFoldingHighlights=e.get(45),this.triggerFoldingModelChanged()}e.hasChanged(44)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(44),this.onFoldingStrategyChanged()),e.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),e.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new f.pN(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new w(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new n.ve(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new n.uC((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new S.hW(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=y.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new E.M(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){this.hiddenRangeModel?.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new M.W,i=this.getRangeProvider(e.textModel),s=this.foldingRegionPromise=(0,n.SS)((e=>i.compute(e)));return s.then((i=>{if(i&&s===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(g.lO.Imports.value,!0);e&&(n=d.D.capture(this.editor),this._currentModelHasFoldedImports=e)}const s=this.editor.getSelections();e.update(i,function(e){return e&&0!==e.length?{startsInside(t,i){for(const n of e){const e=n.startLineNumber;if(e>=t&&e<=i)return!0}return!1}}:{startsInside:()=>!1}}(s)),n?.restore(this.editor);const o=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=o)}return e}))})).then(void 0,(e=>((0,o.dz)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,o.dz)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<4)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!s||s.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||s.startColumn!==e.getLineMaxColumn(i))return}const o=t.getRegionAtLine(i);if(o&&o.startLineNumber===i){const s=o.isCollapsed;if(n||s){let n=[];if(e.event.altKey){const e=e=>!e.containedBy(o)&&!o.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(o))e.isCollapsed===s&&n.push(e);!s&&i&&0!==n.length||n.push(o)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};W=y=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([F(1,x.fN),F(2,p.JZ),F(3,N.Ot),F(4,I.ILanguageFeatureDebounceService),F(5,T.ILanguageFeaturesService)],W);class H{constructor(e){this.editor=e,this._onDidChange=new _.vl,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class V extends h.ks{runEditorCommand(e,t,i){const n=e.get(p.JZ),s=W.get(t);if(!s)return;const o=s.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(s,e,t,i,n);const o=t.getSelection();o&&s.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function z(e){if(!c.b0(e)){if(!c.Gv(e))return!1;const t=e;if(!c.b0(t.levels)&&!c.Et(t.levels))return!1;if(!c.b0(t.direction)&&!c.Kg(t.direction))return!1;if(!(c.b0(t.selectionLines)||Array.isArray(t.selectionLines)&&t.selectionLines.every(c.Et)))return!1}return!0}class U extends V{static{this.ID_PREFIX="editor.foldLevel"}static{this.ID=e=>U.ID_PREFIX+e}getFoldingLevel(){return parseInt(this.id.substr(U.ID_PREFIX.length))}invoke(e,t,i){(0,f.sO)(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}(0,h.HW)(W.ID,W,0),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfold",label:k.kg("unfoldAction.label","Unfold"),alias:"Unfold",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:z,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,o=this.getLineNumbers(n,i);n&&"up"===n.direction?(0,f.dN)(t,!1,s,o):(0,f.uV)(t,!1,s,o)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfoldRecursively",label:k.kg("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2142),weight:100}})}invoke(e,t,i,n){(0,f.uV)(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.fold",label:k.kg("foldAction.label","Fold"),alias:"Fold",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:z,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),o=n&&n.levels,r=n&&n.direction;"number"!=typeof o&&"string"!=typeof r?(0,f.W8)(t,!0,s):"up"===r?(0,f.dN)(t,!0,o||1,s):(0,f.uV)(t,!0,o||1,s)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldRecursively",label:k.kg("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.uV)(t,!0,Number.MAX_VALUE,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.toggleFoldRecursively",label:k.kg("toggleFoldRecursivelyAction.label","Toggle Fold Recursively"),alias:"Toggle Fold Recursively",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,3114),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.bC)(t,Number.MAX_VALUE,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldAll",label:k.kg("foldAllAction.label","Fold All"),alias:"Fold All",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2069),weight:100}})}invoke(e,t,i){(0,f.uV)(t,!0)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfoldAll",label:k.kg("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2088),weight:100}})}invoke(e,t,i){(0,f.uV)(t,!1)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldAllBlockComments",label:k.kg("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2138),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).comments;if(n&&n.blockCommentStartToken){const e=new RegExp("^\\s*"+(0,l.bm)(n.blockCommentStartToken));(0,f.AI)(t,e,!0)}}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldAllMarkerRegions",label:k.kg("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,f.AI)(t,e,!0)}}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:k.kg("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,f.AI)(t,e,!1)}}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldAllExcept",label:k.kg("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.GR)(t,!0,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfoldAllExcept",label:k.kg("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.GR)(t,!1,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.toggleFold",label:k.kg("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.bC)(t,1,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.gotoParentFold",label:k.kg("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.kK)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.gotoPreviousFold",label:k.kg("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.JX)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.gotoNextFold",label:k.kg("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.pr)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:k.kg("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2135),weight:100}})}invoke(e,t,i){const n=[],s=i.getSelections();if(s){for(const e of s){let t=e.endLineNumber;1===e.endColumn&&--t,t>e.startLineNumber&&(n.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(n.length>0){n.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=D.tz.sanitizeAndMerge(t.regions,n,i.getModel()?.getLineCount());t.updatePost(D.tz.fromFoldRanges(e))}}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.removeManualFoldingRanges",label:k.kg("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}});for(let e=1;e<=7;e++)(0,h.xX)(new U({id:U.ID(e),label:k.kg("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2048|21+e),weight:100}}));R.w.registerCommand("_executeFoldingRangeProvider",(async function(e,...t){const[i]=t;if(!(i instanceof P.r))throw(0,o.Qg)();const n=e.get(T.ILanguageFeaturesService),r=e.get(A.IModelService).getModel(i);if(!r)throw(0,o.Qg)();const a=e.get(O.pG);if(!a.getValue("editor.folding",{resource:i}))return[];const l=e.get(p.JZ),c=a.getValue("editor.foldingStrategy",{resource:i}),d={get limit(){return a.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},h=new S.hW(r,l,d);let u=h;if("indentation"!==c){const e=W.getFoldingRangeProviders(n,r);e.length&&(u=new E.M(r,e,(()=>{}),d,h))}const f=await u.compute(s.XO.None),m=[];try{if(f)for(let e=0;ee.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,s=-1,o=-1;const r=e=>{for(;no&&(o=e),n++}};for(const i of e){const e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);const i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),s=Math.max(s,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let e=0;ei&&(i=o)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){const t=[];for(let i=0,n=this._regions.length;i=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>i)continue;const o=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:o})}return t.length>0?t:void 0}applyMemento(e){if(!Array.isArray(e))return;const t=[],i=this._textModel.getLineCount();for(const n of e){if(n.startLineNumber>=n.endLineNumber||n.startLineNumber<1||n.endLineNumber>i)continue;const e=this._getLinesChecksum(n.startLineNumber+1,n.endLineNumber);n.checksum&&e!==n.checksum||t.push({startLineNumber:n.startLineNumber,endLineNumber:n.endLineNumber,type:void 0,isCollapsed:n.isCollapsed??!0,source:n.source??0})}const n=s.tz.sanitizeAndMerge(this._regions,t,i);this.updatePost(s.tz.fromFoldRanges(n))}_getLinesChecksum(e,t){return(0,o.tW)(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){const e=this._regions.toRegion(n);t&&!t(e,s)||i.push(e),s++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let o=n,r=this._regions.length;o0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,o=this._regions.length;e1){const o=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==s&&i0)for(const o of n){const n=e.getRegionAtLine(o);if(n&&(n.isCollapsed!==t&&s.push(n),i>1)){const o=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));s.push(...n)}e.toggleCollapseState(s)}function d(e,t,i){const n=[];for(const s of i){const i=e.getAllRegionsAtLine(s,(e=>e.isCollapsed!==t));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}function h(e,t,i,n){const s=e.getRegionsInside(null,((e,s)=>s===t&&e.isCollapsed!==i&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(s)}function u(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,void 0);i.length>0&&n.push(i[0])}const s=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(s)}function g(e,t,i){const n=e.textModel,s=e.regions,o=[];for(let e=s.length-1;e>=0;e--)if(i!==s.isCollapsed(e)){const i=s.getStartLineNumber(e);t.test(n.getLineContent(i))&&o.push(s.toRegion(e))}e.toggleCollapseState(o)}function p(e,t,i){const n=e.regions,s=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&s.push(n.toRegion(e));e.toggleCollapseState(s)}function f(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}function m(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}return null}function _(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new r(e.length),this._userDefinedStates=new r(e.length),this._recoveredStates=new r(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;is||o>s)throw new Error("startLineNumber or endLineNumber must not exceed "+s);for(;e.length>0&&!t(n,o);)e.pop();const r=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&r)<<24),this._endIndexes[i]=o+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&s}getEndLineNumber(e){return this._endIndexes[e]&s}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&o)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(e)?i=>ii=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(1===d.source?e=d:(e=c,e.isCollapsed=d.isCollapsed&&(c.endLineNumber===d.endLineNumber||!n?.startsInside(c.startLineNumber+1,c.endLineNumber+1)),e.source=0),c=o(++a)):(e=d,d.isCollapsed&&0===d.source&&(e.source=2)),d=r(++l);else{let t=l,i=d;for(;;){if(!i||i.startLineNumber>c.endLineNumber){e=c;break}if(1===i.source&&i.endLineNumber>c.endLineNumber)break;i=r(++t)}c=o(++a)}if(e){for(;u&&u.endLineNumbere.startLineNumber&&e.startLineNumber>g&&e.endLineNumber<=i&&(!u||u.endLineNumber>=e.endLineNumber)&&(p.push(e),g=e.startLineNumber,u&&h.push(u),u=e)}}return p}}class l{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}},59691:function(e,t,i){"use strict";i.d(t,{hW:function(){return o}});var n=i(43573),s=i(4046);class o{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id="indent"}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,s=t&&t.markers;return Promise.resolve(function(e,t,i,s=a){const o=e.getOptions().tabSize,l=new r(s);let c;i&&(c=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const d=[],h=e.getLineCount()+1;d.push({indent:-1,endAbove:h,line:h});for(let i=e.getLineCount();i>0;i--){const s=e.getLineContent(i),r=(0,n.G)(s,o);let a,h=d[d.length-1];if(-1!==r){if(c&&(a=s.match(c))){if(!a[1]){d.push({indent:-2,endAbove:i,line:i});continue}{let e=d.length-1;for(;e>0&&-2!==d[e].indent;)e--;if(e>0){d.length=e+1,h=d[e],l.insertFirst(i,h.line,r),h.line=i,h.indent=r,h.endAbove=i;continue}}}if(h.indent>r){do{d.pop(),h=d[d.length-1]}while(h.indent>r);const e=h.endAbove-1;e-i>=1&&l.insertFirst(i,e,r)}h.indent===r?h.endAbove=i:d.push({indent:r,endAbove:i,line:i})}else t&&(h.endAbove=i)}return l.toIndentRanges(e)}(this.editorModel,i,s,this.foldingRangesLimit))}}class r{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>s.yy||t>s.yy)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new s.tz(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,o=this._indentOccurrences.length;for(let e=0;et){o=e;break}i+=n}}const r=e.getOptions().tabSize,a=new Uint32Array(t),l=new Uint32Array(t);for(let s=this._length-1,c=0;s>=0;s--){const d=this._startIndexes[s],h=e.getLineContent(d),u=(0,n.G)(h,r);(u{}}},45692:function(e,t,i){"use strict";i.d(t,{M:function(){return a}});var n=i(20187),s=i(35114),o=i(4046);const r={};class a{constructor(e,t,i,n,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=o,this.id="syntax",this.disposables=new s.Cm,o&&this.disposables.add(o);for(const e of t)"function"==typeof e.onDidChange&&this.disposables.add(e.onDidChange(i))}compute(e){return function(e,t,i){let s=null;const o=e.map(((e,o)=>Promise.resolve(e.provideFoldingRanges(t,r,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(s)||(s=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&s.push({start:t.start,end:t.end,rank:o,kind:t.kind})}}),n.M_)));return Promise.all(o).then((e=>s))}(this.providers,this.editorModel,e).then((t=>t?function(e,t){const i=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new l(t);let s;const o=[];for(const e of i)if(s){if(e.start>s.start)if(e.end<=s.end)o.push(s),s=e,n.add(e.start,e.end,e.kind&&e.kind.value,o.length);else{if(e.start>s.end){do{s=o.pop()}while(s&&e.start>s.end);s&&o.push(s),s=e}n.add(e.start,e.end,e.kind&&e.kind.value,o.length)}}else s=e,n.add(e.start,e.end,e.kind&&e.kind.value,o.length);return n.toIndentRanges()}(t,this.foldingRangesLimit):this.fallbackRangeProvider?.compute(e)??null))}dispose(){this.disposables.dispose()}}class l{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>o.yy||t>o.yy)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._nestingLevels[s]=n,this._types[s]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ie){i=n;break}t+=s}}const n=new Uint32Array(e),s=new Uint32Array(e),r=[];for(let o=0,a=0;o0&&g.Q.areIntersectingOrTouching(v[b-1],e)?v[b-1]=g.Q.fromPositions(v[b-1].getStartPosition(),e.getEndPosition()):b=v.push(e);const w=async e=>{l.trace("[format][provideDocumentRangeFormattingEdits] (request)",t.extensionId?.value,e);const i=await t.provideDocumentRangeFormattingEdits(u,e,u.getFormattingOptions(),m.token)||[];return l.trace("[format][provideDocumentRangeFormattingEdits] (response)",t.extensionId?.value,i),i},C=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>g.Q.plusRange(e,t.range)),e[0].range);if(!t.some((e=>g.Q.intersectRanges(i,e.range))))return!1;for(const i of e)for(const e of t)if(g.Q.intersectRanges(i.range,e.range))return!0;return!1},y=[],x=[];try{if("function"==typeof t.provideDocumentRangesFormattingEdits){l.trace("[format][provideDocumentRangeFormattingEdits] (request)",t.extensionId?.value,v);const e=await t.provideDocumentRangesFormattingEdits(u,v,u.getFormattingOptions(),m.token)||[];l.trace("[format][provideDocumentRangeFormattingEdits] (response)",t.extensionId?.value,e),x.push(e)}else{for(const e of v){if(m.token.isCancellationRequested)return!0;x.push(await w(e))}for(let e=0;e({text:e.text,range:g.Q.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.Q.areIntersectingOrTouching(i,t))return[new p.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return c.playSignal(k.Rh.format,{userGesture:r}),!0}async function N(e,t,i,n,s,o){const r=e.get(C._Y),a=e.get(y.ILanguageFeaturesService),l=(0,h.z9)(t)?t.getModel():t,c=x(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),d=await L.select(c,l,i,1);d&&(n.report(d),await r.invokeFunction(I,d,t,i,s,o))}async function I(e,t,i,n,s,o){const r=e.get(f.IEditorWorkerService),a=e.get(k.Nt);let l,c,u;(0,h.z9)(i)?(l=i.getModel(),c=new d.gI(i,5,void 0,s)):(l=i,c=new d.ER(i,s));try{const e=await t.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(u=await r.computeMoreMinimalEdits(l.uri,e),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!u||0===u.length)return!1;if((0,h.z9)(i))_.c.execute(i,u,2!==n),2!==n&&i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=u,t=new p.L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);l.pushEditOperations([t],u.map((e=>({text:e.text,range:g.Q.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.Q.areIntersectingOrTouching(i,t))return[new p.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return a.playSignal(k.Rh.format,{userGesture:o}),!0}function M(e,t,i,n,s,r,a){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(s)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,s,r,a)).catch(o.M_).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}v.w.registerCommand("_executeFormatRangeProvider",(async function(e,...t){const[i,r,a]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(g.Q.isIRange(r));const d=e.get(m.ITextModelService),h=e.get(f.IEditorWorkerService),u=e.get(y.ILanguageFeaturesService),p=await d.createModelReference(i);try{return async function(e,t,i,s,r,a){const l=t.documentRangeFormattingEditProvider.ordered(i);for(const t of l){const l=await Promise.resolve(t.provideDocumentRangeFormattingEdits(i,s,r,a)).catch(o.M_);if((0,n.EI)(l))return await e.computeMoreMinimalEdits(i.uri,l)}}(h,u,p.object.textEditorModel,g.Q.lift(r),a,s.XO.None)}finally{p.dispose()}})),v.w.registerCommand("_executeFormatDocumentProvider",(async function(e,...t){const[i,r]=t;(0,l.j)(c.r.isUri(i));const a=e.get(m.ITextModelService),d=e.get(f.IEditorWorkerService),h=e.get(y.ILanguageFeaturesService),u=await a.createModelReference(i);try{return async function(e,t,i,s,r){const a=x(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of a){const a=await Promise.resolve(t.provideDocumentFormattingEdits(i,s,r)).catch(o.M_);if((0,n.EI)(a))return await e.computeMoreMinimalEdits(i.uri,a)}}(d,h,u.object.textEditorModel,r,s.XO.None)}finally{u.dispose()}})),v.w.registerCommand("_executeFormatOnTypeProvider",(async function(e,...t){const[i,n,o,r]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(u.y.isIPosition(n)),(0,l.j)("string"==typeof o);const a=e.get(m.ITextModelService),d=e.get(f.IEditorWorkerService),h=e.get(y.ILanguageFeaturesService),g=await a.createModelReference(i);try{return M(d,h,g.object.textEditorModel,u.y.lift(n),o,r,s.XO.None)}finally{g.dispose()}}))},59587:function(e,t,i){"use strict";var n=i(97358),s=i(76611),o=i(20187),r=i(62167),a=i(35114),l=i(52694),c=i(72777),d=i(82282),h=i(40393),u=i(49678),g=i(56812),p=i(69122),f=i(5973),m=i(94130),_=i(14374),v=i(54673),b=i(21335),w=i(97848),C=i(63619),y=i(86171),S=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},k=function(e,t){return function(i,n){t(i,n,e)}};let x=class{static{this.ID="editor.contrib.autoFormat"}constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibilitySignalService=n,this._disposables=new a.Cm,this._sessionDisposables=new a.Cm,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(56)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new d.y;for(const e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),o=new s.Qi,r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return o.cancel(),void r.dispose();for(let t=0,n=e.changes.length;t{o.token.isCancellationRequested||(0,n.EI)(e)&&(this._accessibilitySignalService.playSignal(v.Rh.format,{userGesture:!1}),m.c.execute(this._editor,e,!0))})).finally((()=>{r.dispose()}))}};x=S([k(1,p.ILanguageFeaturesService),k(2,g.IEditorWorkerService),k(3,v.Nt)],x);let L=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.Cm,this._callOnModel=new a.Cm,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(f.jX,this.editor,e,2,y.ke.None,s.XO.None,!1).catch(o.dz))}};L=S([k(1,p.ILanguageFeaturesService),k(2,C._Y)],L);class D extends l.ks{constructor(){super({id:"editor.action.formatDocument",label:_.kg("formatDocument.label","Format Document"),alias:"Format Document",precondition:w.M$.and(u.R.notInCompositeEditor,u.R.writable,u.R.hasDocumentFormattingProvider),kbOpts:{kbExpr:u.R.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(C._Y),n=e.get(y.N8);await n.showWhile(i.invokeFunction(f.vg,t,1,y.ke.None,s.XO.None,!0),250)}}}class E extends l.ks{constructor(){super({id:"editor.action.formatSelection",label:_.kg("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:w.M$.and(u.R.writable,u.R.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2084),weight:100},contextMenuOpts:{when:u.R.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(C._Y),n=t.getModel(),o=t.getSelections().map((e=>e.isEmpty()?new h.Q(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),r=e.get(y.N8);await r.showWhile(i.invokeFunction(f.jX,t,o,1,y.ke.None,s.XO.None,!0),250)}}(0,l.HW)(x.ID,x,2),(0,l.HW)(L.ID,L,2),(0,l.Fl)(D),(0,l.Fl)(E),b.w.registerCommand("editor.action.format",(async e=>{const t=e.get(c.T).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(b.d);t.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")}))},94130:function(e,t,i){"use strict";i.d(t,{c:function(){return r}});var n=i(48905),s=i(40393),o=i(61554);class r{static _handleEolEdits(e,t){let i;const n=[];for(const e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const a=o.D.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map((e=>n.k.replace(s.Q.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",l.map((e=>n.k.replaceMove(s.Q.lift(e.range),e.text)))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},28557:function(e,t,i){"use strict";i.d(t,{j:function(){return se},i:function(){return re}});var n=i(93231),s=i(35114),o=i(52694),r=i(72777),a=i(62993),l=i(40393),c=i(49678),d=i(97358),h=i(80670),u=i(54409),g=i(43920),p=i(54244),f=i(48682),m=i(63619),_=i(84119),v=i(47901),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};class C{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let y=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new h.vl,this.onDidChange=this._onDidChange.event,this._dispoables=new s.Cm,this._markers=[],this._nextIdx=-1,p.r.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),o=(e,t)=>{let i=(0,g.UD)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?l.Q.compareRangesUsingStarts(e,t)||_.cj.compare(e.severity,t.severity):_.cj.compare(e.severity,t.severity)||l.Q.compareRangesUsingStarts(e,t)),i},r=()=>{this._markers=this._markerService.read({resource:p.r.isUri(e)?e:void 0,severities:_.cj.Error|_.cj.Warning|_.cj.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(o)};r(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(r(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new C(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));s<0&&(s=(0,d.El)(this._markers,{resource:e.uri},((e,t)=>(0,g.UD)(e.resource.toString(),t.resource.toString()))),s<0&&(s=~s));for(let i=s;it.resource.toString()===e.toString()));if(!(i<0))for(;i{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new M.Se(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,s.AS)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let o=(t?.length||0)+2;s&&(o+="string"==typeof s?s.length:s.value.length);const r=(0,g.uz)(i);this._lines=r.length,this._longestLineLength=0;for(const e of r)this._longestLineLength=Math.max(e.length+o,this._longestLineLength);I.w_(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of r)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||s){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(s)if("string"==typeof s){const t=document.createElement("span");t.innerText=`(${s})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=I.$("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},I.BC(this._codeLink,I.$("span")).innerText=s.value,e.appendChild(this._codeLink)}if(I.w_(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,d.EI)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(67))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const s=document.createElement("span");s.innerText=t.message,i.appendChild(n),i.appendChild(s),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(50),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case _.cj.Error:t=L.kg("Error","Error");break;case _.cj.Warning:t=L.kg("Warning","Warning");break;case _.cj.Info:t=L.kg("Info","Info");break;case _.cj.Hint:t=L.kg("Hint","Hint")}let i=L.kg("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let q=class extends P.j6{static{H=this}static{this.TitleMenu=new D.D8("gotoErrorTitleMenu")}constructor(e,t,i,n,o,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new s.Cm,this._onDidSelectRelatedInformation=new h.vl,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=_.cj.Warning,this._backgroundColor=T.Q1.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(te);let t=Q,i=Y;this._severity===_.cj.Warning?(t=Z,i=X):this._severity===_.cj.Info&&(t=J,i=ee);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(P._X),secondaryHeadingColor:e.getColor(P.e3)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const t=[],i=this._menuService.getMenuActions(H.TitleMenu,this._contextKeyService);(0,A.Ot)(i,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=I.BC(e,I.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new j(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=l.Q.lift(e),s=this.editor.getPosition(),o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=i>1?L.kg("problems","{0} of {1} problems",t,i):L.kg("change","{0} of {1} problem",t,i);this.setTitle((0,R.P8)(r.uri),e)}this._icon.className=`codicon ${x.className(_.cj.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};q=H=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([U(1,z.Gy),U(2,F.C),U(3,D.ez),U(4,m._Y),U(5,E.fN),U(6,O.L)],q);const K=(0,V.yLr)(V.Rbi,V.AN$),$=(0,V.yLr)(V.Hng,V.Stt),G=(0,V.yLr)(V.pOz,V.IIb),Q=(0,V.x1A)("editorMarkerNavigationError.background",{dark:K,light:K,hcDark:V.b1q,hcLight:V.b1q},L.kg("editorMarkerNavigationError","Editor marker navigation widget error color.")),Y=(0,V.x1A)("editorMarkerNavigationError.headerBackground",{dark:(0,V.JO0)(Q,.1),light:(0,V.JO0)(Q,.1),hcDark:null,hcLight:null},L.kg("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Z=(0,V.x1A)("editorMarkerNavigationWarning.background",{dark:$,light:$,hcDark:V.b1q,hcLight:V.b1q},L.kg("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),X=(0,V.x1A)("editorMarkerNavigationWarning.headerBackground",{dark:(0,V.JO0)(Z,.1),light:(0,V.JO0)(Z,.1),hcDark:"#0C141F",hcLight:(0,V.JO0)(Z,.2)},L.kg("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),J=(0,V.x1A)("editorMarkerNavigationInfo.background",{dark:G,light:G,hcDark:V.b1q,hcLight:V.b1q},L.kg("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),ee=(0,V.x1A)("editorMarkerNavigationInfo.headerBackground",{dark:(0,V.JO0)(J,.1),light:(0,V.JO0)(J,.1),hcDark:null,hcLight:null},L.kg("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),te=(0,V.x1A)("editorMarkerNavigation.background",V.YtV,L.kg("editorMarkerNavigationBackground","Editor marker navigation widget background."));var ie,ne=function(e,t){return function(i,n){t(i,n,e)}};let se=class{static{ie=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(ie.ID)}constructor(e,t,i,n,o){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=o,this._sessionDispoables=new s.Cm,this._editor=e,this._widgetVisible=le.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(q,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{this._model?.selected&&l.Q.containsPosition(this._model?.selected.marker,e.position)||this._model?.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.Q.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.y(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){if(this._editor.hasModel()){const i=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(i.move(e,this._editor.getModel(),this._editor.getPosition()),!i.selected)return;if(i.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const n=await this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);n&&(ie.get(n)?.close(),ie.get(n)?.nagivate(e,t))}else this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}};se=ie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ne(1,S),ne(2,E.fN),ne(3,r.T),ne(4,m._Y)],se);class oe extends o.ks{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&se.get(t)?.nagivate(this._next,this._multiFile)}}class re extends oe{static{this.ID="editor.action.marker.next"}static{this.LABEL=L.kg("markerAction.next.label","Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:re.ID,label:re.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:578,weight:100},menuOpts:{menuId:q.TitleMenu,title:re.LABEL,icon:(0,N.pU)("marker-navigation-next",n.W.arrowDown,L.kg("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}class ae extends oe{static{this.ID="editor.action.marker.prev"}static{this.LABEL=L.kg("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:ae.ID,label:ae.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:1602,weight:100},menuOpts:{menuId:q.TitleMenu,title:ae.LABEL,icon:(0,N.pU)("marker-navigation-previous",n.W.arrowUp,L.kg("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}(0,o.HW)(se.ID,se,4),(0,o.Fl)(re),(0,o.Fl)(ae),(0,o.Fl)(class extends oe{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:L.kg("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:66,weight:100},menuOpts:{menuId:D.D8.MenubarGoMenu,title:L.kg({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,o.Fl)(class extends oe{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:L.kg("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:1090,weight:100},menuOpts:{menuId:D.D8.MenubarGoMenu,title:L.kg({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const le=new E.N1("markersNavigationVisible",!1),ce=o.DX.bindToContribution(se.get);(0,o.E_)(new ce({id:"closeMarkersNavigation",precondition:le,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:c.R.focus,primary:9,secondary:[1033]}}))},35620:function(e,t,i){"use strict";i.d(t,{mR:function(){return K},bn:function(){return q},QS:function(){return j}});var n=i(15075),s=i(90890),o=i(62167),r=i(24219),a=i(54244),l=i(765),c=i(47010),d=i(52694),h=i(72777),u=i(11797),g=i(62993),p=i(40393),f=i(49678),m=i(35720),_=i(68625),v=i(58130),b=i(80670),w=i(35114),C=i(59951),y=i(14374),S=i(97848),k=i(48682),x=i(63619),L=i(87163),D=i(19561),E=i(31835),N=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};const M=new S.N1("hasSymbols",!1,(0,y.kg)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),T=(0,x.u1)("ISymbolNavigationService");let R=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=M.bindTo(e)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new P(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),s=i.getPosition();if(!n||!s)return;let o=!1,r=!1;for(const e of t.references)if((0,C.n4)(e.uri,n.uri))o=!0,r=r||p.Q.containsPosition(e.range,s);else if(o)break;o&&r||this.reset()}));this._currentState=(0,w.qE)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:p.Q.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){this._currentMessage?.dispose();const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?(0,y.kg)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):(0,y.kg)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};R=N([I(0,S.fN),I(1,h.T),I(2,E.Ot),I(3,L.b)],R),(0,k.v)(T,R,1),(0,d.E_)(new class extends d.DX{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:M,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(T).revealNext(t)}}),D.f.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:M,primary:9,handler(e){e.get(T).reset()}});let P=class{constructor(e){this._listener=new Map,this._disposables=new w.Cm,this._onDidChange=new b.vl,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,w.AS)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,w.qE)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){this._listener.get(e)?.dispose(),this._listener.delete(e)}};P=N([I(0,h.T)],P);var A=i(7588),O=i(70776),F=i(93223),B=i(21335),W=i(86171),H=i(3638),V=i(69122),z=i(26182),U=i(56614);F.ZG.appendMenuItem(F.D8.EditorContext,{submenu:F.D8.EditorContextPeek,title:y.kg("peek.submenu","Peek"),group:"navigation",order:100});class j{static is(e){return!(!e||"object"!=typeof e)&&(e instanceof j||!(!g.y.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class q extends d.qO{static{this._allSymbolNavigationCommands=new Map}static{this._activeAlternativeCommands=new Set}static all(){return q._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of z.f.wrap(t.menu))i.id!==F.D8.EditorContext&&i.id!==F.D8.EditorContextPeek||(i.when=S.M$.and(e.precondition,i.when));return t}constructor(e,t){super(q._patchConfig(t)),this.configuration=e,q._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,o){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(E.Ot),a=e.get(h.T),c=e.get(W.N8),d=e.get(T),u=e.get(V.ILanguageFeaturesService),g=e.get(x._Y),p=t.getModel(),f=t.getPosition(),m=j.is(i)?i:new j(p,f),_=new l.gI(t,5),v=(0,s.PK)(this._getLocationModel(u,m.model,m.position,_.token),_.token).then((async e=>{if(!e||_.token.isCancellationRequested)return;let s;if((0,n.xE)(e.ariaMessage),e.referenceAt(p.uri,f)){const e=this._getAlternativeCommand(t);!q._activeAlternativeCommands.has(e)&&q._allSymbolNavigationCommands.has(e)&&(s=q._allSymbolNavigationCommands.get(e))}const r=e.references.length;if(0===r){if(!this.configuration.muteMessage){const e=p.getWordAtPosition(f);A.k.get(t)?.showMessage(this._getNoResultFoundMessage(e),f)}}else{if(1!==r||!s)return this._onResult(a,d,t,e,o);q._activeAlternativeCommands.add(this.desc.id),g.invokeFunction((e=>s.runEditorCommand(e,t,i,o).finally((()=>{q._activeAlternativeCommands.delete(this.desc.id)}))))}}),(e=>{r.error(e)})).finally((()=>{_.dispose()}));return c.showWhile(v,250),v}async _onResult(e,t,i,n,s){const o=this._getGoToPreference(i);if(i instanceof u.t||!(this.configuration.openInPeek||"peek"===o&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===o,l=await this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,s):n.dispose(),"goto"===o&&t.put(r)}else this._openInPeek(i,n,s)}async _openReference(e,t,i,n,s){let o;if((0,m.Iu)(i)&&(o=i.targetSelectionRange),o||(o=i.range),!o)return;const r=await t.openCodeEditor({resource:i.uri,options:{selection:p.Q.collapseToStart(o),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(r){if(s){const e=r.getModel(),t=r.createDecorationsCollection([{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&t.clear()}),350)}return r}}_openInPeek(e,t,i){const n=_.X.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),(0,s.SS)((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}class K extends q{async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.hE)(e.definitionProvider,t,i,!1,n),y.kg("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?y.kg("noResultWord","No definition found for '{0}'",e.word):y.kg("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}(0,F.ug)(class e extends K{static{this.id="editor.action.revealDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{...y.aS("actions.goToDecl.label","Go to Definition"),mnemonicTitle:y.kg({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:f.R.hasDefinitionProvider,keybinding:[{when:f.R.editorTextFocus,primary:70,weight:100},{when:S.M$.and(f.R.editorTextFocus,U.W0),primary:2118,weight:100}],menu:[{id:F.D8.EditorContext,group:"navigation",order:1.1},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),B.w.registerCommandAlias("editor.action.goToDeclaration",e.id)}}),(0,F.ug)(class e extends K{static{this.id="editor.action.revealDefinitionAside"}constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,title:y.aS("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:S.M$.and(f.R.hasDefinitionProvider,f.R.isInEmbeddedEditor.toNegated()),keybinding:[{when:f.R.editorTextFocus,primary:(0,o.m5)(2089,70),weight:100},{when:S.M$.and(f.R.editorTextFocus,U.W0),primary:(0,o.m5)(2089,2118),weight:100}]}),B.w.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}),(0,F.ug)(class e extends K{static{this.id="editor.action.peekDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,title:y.aS("actions.previewDecl.label","Peek Definition"),precondition:S.M$.and(f.R.hasDefinitionProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:F.D8.EditorContextPeek,group:"peek",order:2}}),B.w.registerCommandAlias("editor.action.previewDeclaration",e.id)}});class $ extends q{async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.sv)(e.declarationProvider,t,i,!1,n),y.kg("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?y.kg("decl.noResultWord","No declaration found for '{0}'",e.word):y.kg("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}(0,F.ug)(class e extends ${static{this.id="editor.action.revealDeclaration"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{...y.aS("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:y.kg({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:S.M$.and(f.R.hasDeclarationProvider,f.R.isInEmbeddedEditor.toNegated()),menu:[{id:F.D8.EditorContext,group:"navigation",order:1.3},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?y.kg("decl.noResultWord","No declaration found for '{0}'",e.word):y.kg("decl.generic.noResults","No declaration found")}}),(0,F.ug)(class extends ${constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:y.aS("actions.peekDecl.label","Peek Declaration"),precondition:S.M$.and(f.R.hasDeclarationProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:3}})}});class G extends q{async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.f9)(e.typeDefinitionProvider,t,i,!1,n),y.kg("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?y.kg("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):y.kg("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}(0,F.ug)(class e extends G{static{this.ID="editor.action.goToTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{...y.aS("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:y.kg({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:f.R.hasTypeDefinitionProvider,keybinding:{when:f.R.editorTextFocus,primary:0,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.4},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}),(0,F.ug)(class e extends G{static{this.ID="editor.action.peekTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:y.aS("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:S.M$.and(f.R.hasTypeDefinitionProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:4}})}});class Q extends q{async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.eS)(e.implementationProvider,t,i,!1,n),y.kg("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?y.kg("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):y.kg("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}(0,F.ug)(class e extends Q{static{this.ID="editor.action.goToImplementation"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{...y.aS("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:y.kg({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:f.R.hasImplementationProvider,keybinding:{when:f.R.editorTextFocus,primary:2118,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.45},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}),(0,F.ug)(class e extends Q{static{this.ID="editor.action.peekImplementation"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:y.aS("actions.peekImplementation.label","Peek Implementations"),precondition:S.M$.and(f.R.hasImplementationProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:3142,weight:100},menu:{id:F.D8.EditorContextPeek,group:"peek",order:5}})}});class Y extends q{_getNoResultFoundMessage(e){return e?y.kg("references.no","No references found for '{0}'",e.word):y.kg("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}(0,F.ug)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...y.aS("goToReferences.label","Go to References"),mnemonicTitle:y.kg({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:S.M$.and(f.R.hasReferenceProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:1094,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.45},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.NN)(e.referenceProvider,t,i,!0,!1,n),y.kg("ref.title","References"))}}),(0,F.ug)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:y.aS("references.action.label","Peek References"),precondition:S.M$.and(f.R.hasReferenceProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.NN)(e.referenceProvider,t,i,!1,!1,n),y.kg("ref.title","References"))}});class Z extends q{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:y.aS("label.generic","Go to Any Symbol"),precondition:S.M$.and(O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new v.y4(this._references,y.kg("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&y.kg("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}B.w.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.r},{name:"position",description:"The position at which to start",constraint:g.y.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(e,t,i,n,s,o,l)=>{(0,r.j)(a.r.isUri(t)),(0,r.j)(g.y.isIPosition(i)),(0,r.j)(Array.isArray(n)),(0,r.j)(void 0===s||"string"==typeof s),(0,r.j)(void 0===l||"boolean"==typeof l);const d=e.get(h.T),u=await d.openCodeEditor({resource:t},d.getFocusedCodeEditor());if((0,c.z9)(u))return u.setPosition(i),u.revealPositionInCenterIfOutsideViewport(i,0),u.invokeWithinContext((e=>{const t=new class extends Z{_getNoResultFoundMessage(e){return o||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(o),openInPeek:Boolean(l),openToSide:!1},n,s);e.get(x._Y).invokeFunction(t.run.bind(t),u)}))}}),B.w.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.r},{name:"position",description:"The position at which to start",constraint:g.y.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(e,t,i,n,s)=>{e.get(B.d).executeCommand("editor.action.goToLocations",t,i,n,s,void 0,!0)}}),B.w.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,r.j)(a.r.isUri(t)),(0,r.j)(g.y.isIPosition(i));const n=e.get(V.ILanguageFeaturesService),o=e.get(h.T);return o.openCodeEditor({resource:t},o.getFocusedCodeEditor()).then((e=>{if(!(0,c.z9)(e)||!e.hasModel())return;const t=_.X.get(e);if(!t)return;const o=(0,s.SS)((t=>(0,H.NN)(n.referenceProvider,e.getModel(),g.y.lift(i),!1,!1,t).then((e=>new v.y4(e,y.kg("ref.title","References")))))),r=new p.Q(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,o,!1))}))}}),B.w.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},3638:function(e,t,i){"use strict";i.d(t,{NN:function(){return m},eS:function(){return p},f9:function(){return f},hE:function(){return u},sv:function(){return g}});var n=i(97358),s=i(76611),o=i(20187),r=i(84756),a=i(52694),l=i(69122),c=i(58130);function d(e,t){return t.uri.scheme===e.uri.scheme||!(0,r.fV)(t.uri,r.ny.walkThroughSnippet,r.ny.vscodeChatCodeBlock,r.ny.vscodeChatCodeCompareBlock)}async function h(e,t,i,s,r){const a=i.ordered(e,s).map((i=>Promise.resolve(r(i,e,t)).then(void 0,(e=>{(0,o.M_)(e)})))),l=await Promise.all(a);return(0,n.Yc)(l.flat()).filter((t=>d(e,t)))}function u(e,t,i,n,s){return h(t,i,e,n,((e,t,i)=>e.provideDefinition(t,i,s)))}function g(e,t,i,n,s){return h(t,i,e,n,((e,t,i)=>e.provideDeclaration(t,i,s)))}function p(e,t,i,n,s){return h(t,i,e,n,((e,t,i)=>e.provideImplementation(t,i,s)))}function f(e,t,i,n,s){return h(t,i,e,n,((e,t,i)=>e.provideTypeDefinition(t,i,s)))}function m(e,t,i,n,s,o){return h(t,i,e,s,(async(e,t,i)=>{const s=(await e.provideReferences(t,i,{includeDeclaration:!0},o))?.filter((e=>d(t,e)));if(!n||!s||2!==s.length)return s;const r=(await e.provideReferences(t,i,{includeDeclaration:!1},o))?.filter((e=>d(t,e)));return r&&1===r.length?r:s}))}async function _(e){const t=await e(),i=new c.y4(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}(0,a.ke)("_executeDefinitionProvider",((e,t,i)=>{const n=u(e.get(l.ILanguageFeaturesService).definitionProvider,t,i,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeDefinitionProvider_recursive",((e,t,i)=>{const n=u(e.get(l.ILanguageFeaturesService).definitionProvider,t,i,!0,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeTypeDefinitionProvider",((e,t,i)=>{const n=f(e.get(l.ILanguageFeaturesService).typeDefinitionProvider,t,i,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeTypeDefinitionProvider_recursive",((e,t,i)=>{const n=f(e.get(l.ILanguageFeaturesService).typeDefinitionProvider,t,i,!0,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeDeclarationProvider",((e,t,i)=>{const n=g(e.get(l.ILanguageFeaturesService).declarationProvider,t,i,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeDeclarationProvider_recursive",((e,t,i)=>{const n=g(e.get(l.ILanguageFeaturesService).declarationProvider,t,i,!0,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeReferenceProvider",((e,t,i)=>{const n=m(e.get(l.ILanguageFeaturesService).referenceProvider,t,i,!1,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeReferenceProvider_recursive",((e,t,i)=>{const n=m(e.get(l.ILanguageFeaturesService).referenceProvider,t,i,!1,!0,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeImplementationProvider",((e,t,i)=>{const n=p(e.get(l.ILanguageFeaturesService).implementationProvider,t,i,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeImplementationProvider_recursive",((e,t,i)=>{const n=p(e.get(l.ILanguageFeaturesService).implementationProvider,t,i,!0,s.XO.None);return _((()=>n))}))},48843:function(e,t,i){"use strict";i.d(t,{gi:function(){return h}});var n=i(80670),s=i(35114),o=i(79783);function r(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=r(e.event,t.triggerModifier),this.hasSideBySideModifier=r(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=r(e,t.triggerModifier)}}class c{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function d(e){return"altKey"===e?o.zx?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):o.zx?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class h extends s.jG{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.vl),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.vl),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.vl),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=t?.extractLineNumberFromMouseEvent??(e=>e.target.position?e.target.position.lineNumber:0),this._opts=d(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(78)){const e=d(this._editor.getOption(78));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},53720:function(e,t,i){"use strict";i.d(t,{k:function(){return y}});var n,s=i(90890),o=i(20187),r=i(85584),a=i(35114),l=i(765),c=i(52694),d=i(40393),h=i(41750),u=i(20878),g=i(48843),p=i(70776),f=i(14374),m=i(97848),_=i(35620),v=i(3638),b=i(69122),w=i(49079),C=function(e,t){return function(i,n){t(i,n,e)}};let y=class{static{n=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new a.Cm,this.toUnhookForKeyboard=new a.Cm,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new g.gi(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,t??void 0)}))),this.toUnhook.add(s.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{(0,o.dz)(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(s.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(n.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){this.toUnhookForKeyboard.clear();const t=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!t)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===t.startColumn&&this.currentWordAtPosition.endColumn===t.endColumn&&this.currentWordAtPosition.word===t.word)return;this.currentWordAtPosition=t;const i=new l.$t(this.editor,15);let n;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,s.SS)((t=>this.findDefinition(e,t)));try{n=await this.previousPromise}catch(e){return void(0,o.dz)(e)}if(!n||!n.length||!i.validate(this.editor))return void this.removeLinkDecorations();const a=n[0].originSelectionRange?d.Q.lift(n[0].originSelectionRange):new d.Q(e.lineNumber,t.startColumn,e.lineNumber,t.endColumn);if(n.length>1){let e=a;for(const{originSelectionRange:t}of n)t&&(e=d.Q.plusRange(e,t));this.addDecoration(e,(new r.Bc).appendText(f.kg("multipleResults","Click to show {0} definitions.",n.length)))}else{const e=n[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const s=this.getPreviewValue(i,n,e),o=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(a,s?(new r.Bc).appendCodeblock(o||"",s):void 0),t.dispose()}))}}getPreviewValue(e,t,i){let s=i.range;return s.endLineNumber-s.startLineNumber>=n.MAX_SOURCE_PREVIEW_LINES&&(s=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,s)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let s=t+1;s{const i=!t&&this.editor.getOption(89)&&!this.isInPeekEditor(e);return new _.mR({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)}))}isInPeekEditor(e){const t=e.get(m.fN);return p.x2.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};y=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([C(1,u.ITextModelService),C(2,h.L),C(3,b.ILanguageFeaturesService)],y),(0,c.HW)(y.ID,y,2)},68625:function(e,t,i){"use strict";i.d(t,{X:function(){return ae}});var n,s=i(90890),o=i(20187),r=i(62167),a=i(35114),l=i(72777),c=i(62993),d=i(40393),h=i(70776),u=i(14374),g=i(21335),p=i(47901),f=i(97848),m=i(63619),_=i(19561),v=i(76432),b=i(31835),w=i(87332),C=i(58130),y=i(84201),S=i(50815),k=i(59321),x=i(80670),L=i(84756),D=i(59951),E=i(11797),N=i(49079),I=i(11521),M=i(20878),T=i(229),R=i(2627),P=i(38403),A=i(17793),O=i(87163),F=i(41517),B=i(52010),W=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},H=function(e,t){return function(i,n){t(i,n,e)}};let V=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof C.y4||e instanceof C.$L}getChildren(e){if(e instanceof C.y4)return e.groups;if(e instanceof C.$L)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};V=W([H(0,M.ITextModelService)],V);class z{getHeight(){return 23}getTemplateId(e){return e instanceof C.$L?K.id:G.id}}let U=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){if(e instanceof C.yc){const t=e.parent.getPreview(e)?.preview(e.range);if(t)return t.value}return(0,D.P8)(e.uri)}};U=W([H(0,O.b)],U);class j{getId(e){return e instanceof C.yc?e.id:e.uri}}let q=class extends a.jG{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new P.s(i,{supportHighlights:!0})),this.badge=new T.x(y.BC(i,y.$(".count")),{},B.m$),e.appendChild(i)}set(e,t){const i=(0,D.pD)(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat((0,u.kg)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,u.kg)("referenceCount","{0} reference",n))}};q=W([H(1,F.L)],q);let K=class{static{n=this}static{this.id="FileReferencesRenderer"}constructor(e){this._instantiationService=e,this.templateId=n.id}renderTemplate(e){return this._instantiationService.createInstance(q,e)}renderElement(e,t,i){i.set(e.element,(0,A.WJ)(e.filterData))}disposeTemplate(e){e.dispose()}};K=n=W([H(0,m._Y)],K);class $ extends a.jG{constructor(e){super(),this.label=this._register(new R._(e))}set(e,t){const i=e.parent.getPreview(e)?.preview(e.range);if(i&&i.value){const{value:e,highlight:n}=i;t&&!A.ne.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,A.WJ)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[n]))}else this.label.set(`${(0,D.P8)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class G{constructor(){this.templateId=G.id}static{this.id="OneReferenceRenderer"}renderTemplate(e){return new $(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}}class Q{getWidgetAriaLabel(){return(0,u.kg)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Y=i(40616),Z=function(e,t){return function(i,n){t(i,n,e)}};class X{static{this.DecorationOptions=N.kI.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"})}constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new a.Cm,this._callOnModelChange=new a.Cm,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(const t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let t=0;t{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(ee,"ReferencesWidget",this._treeContainer,new z,[this._instantiationService.createInstance(K),this._instantiationService.createInstance(G)],this._instantiationService.createInstance(V),t),this._splitView.addView({onDidChange:x.Jh.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},S.X.Distribute),this._splitView.addView({onDidChange:x.Jh.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},S.X.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const i=(e,t)=>{e instanceof C.yc&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._disposables.add(this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")}))),y.jD(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new y.fg(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=u.kg("noResults","No results"),y.WU(this._messageContainer),Promise.resolve(void 0)):(y.jD(this._messageContainer),this._decorationsManager=new X(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),y.WU(this._treeContainer),y.WU(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof C.yc?e:e instanceof C.$L&&e.children.length>0?e.children[0]:void 0}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==L.ny.inMemory?this.setTitle((0,D.Pi)(e.uri),this._uriLabel.getUriLabel((0,D.pD)(e.uri))):this.setTitle(u.kg("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent)),this._tree.reveal(e);const n=await i;if(!this._model)return void n.dispose();(0,a.AS)(this._previewModelReference);const s=n.object;if(s){const t=this._preview.getModel()===s.textEditorModel?0:1,i=d.Q.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};te=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Z(3,Y.Gy),Z(4,M.ITextModelService),Z(5,m._Y),Z(6,h.zn),Z(7,F.L),Z(8,O.b)],te);var ie,ne=i(49678),se=i(56614),oe=function(e,t){return function(i,n){t(i,n,e)}};const re=new f.N1("referenceSearchVisible",!1,u.kg("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let ae=class{static{ie=this}static{this.ID="editor.contrib.referencesController"}static get(e){return e.getContribution(ie.ID)}constructor(e,t,i,n,s,o,r,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=o,this._storageService=r,this._configurationService=l,this._disposables=new a.Cm,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=re.bindTo(i)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const s="peekViewLayout",o=J.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(te,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(u.kg("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget?(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{if(r===this._requestIdPool&&this._widget)return this._model?.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(u.kg("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new c.y(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(87)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),s?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()}async revealReference(e){this._editor.hasModel()&&this._model&&this._widget&&await this._widget.revealReference(e)}closeWidget(e=!0){this._widget?.dispose(),this._model?.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){this._widget?.hide(),this._ignoreModelChangeEvent=!0;const i=d.Q.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(i),this._widget.focusOnReferenceTree();else{const t=ie.get(e),n=this._model.clone();this.closeWidget(),e.focus(),t?.toggleWidget(i,(0,s.SS)((e=>Promise.resolve(n))),this._peekMode??!1)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,o.dz)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function le(e,t){const i=(0,h.RL)(e);if(!i)return;const n=ae.get(i);n&&t(n)}ae=ie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([oe(2,f.fN),oe(3,l.T),oe(4,b.Ot),oe(5,m._Y),oe(6,w.CS),oe(7,p.pG)],ae),_.f.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,r.m5)(2089,60),when:f.M$.or(re,h.x2.inPeekEditor),handler(e){le(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),_.f.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:f.M$.or(re,h.x2.inPeekEditor),handler(e){le(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),_.f.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:f.M$.or(re,h.x2.inPeekEditor),handler(e){le(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),g.w.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),g.w.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),g.w.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),g.w.registerCommand("closeReferenceSearch",(e=>le(e,(e=>e.closeWidget())))),_.f.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:f.M$.and(h.x2.inPeekEditor,f.M$.not("config.editor.stablePeek"))}),_.f.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:f.M$.and(re,f.M$.not("config.editor.stablePeek"),f.M$.or(ne.R.editorTextFocus,se.J7.negate()))}),_.f.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:f.M$.and(re,v.YD,v.Nf.negate(),v.cH.negate()),handler(e){const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof C.yc&&le(e,(e=>e.revealReference(i[0])))}}),_.f.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:f.M$.and(re,v.YD,v.Nf.negate(),v.cH.negate()),handler(e){const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof C.yc&&le(e,(e=>e.openReference(i[0],!0,!0)))}}),g.w.registerCommand("openReference",(e=>{const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof C.yc&&le(e,(e=>e.openReference(i[0],!1,!0)))}))},58130:function(e,t,i){"use strict";i.d(t,{$L:function(){return p},y4:function(){return f},yc:function(){return u}});var n=i(20187),s=i(80670),o=i(68860),r=i(35114),a=i(52732),l=i(59951),c=i(43920),d=i(40393),h=i(14374);class u{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=o.r.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){const e=this.parent.getPreview(this)?.preview(this.range);return e?(0,h.kg)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",e.value,(0,l.P8)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,h.kg)("aria.oneReference","in {0} on line {1} at column {2}",(0,l.P8)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:o,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:s-t}),l=new d.Q(n,a.startColumn,n,s),c=new d.Q(o,r,o,1073741824),h=i.getValueInRange(l).replace(/^\s+/,""),u=i.getValueInRange(e);return{value:h+u+i.getValueInRange(c).replace(/\s+$/,""),highlight:{start:h.length,end:h.length+u.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.fT}dispose(){(0,r.AS)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,h.kg)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,l.P8)(this.uri),this.uri.fsPath):(0,h.kg)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,l.P8)(this.uri),this.uri.fsPath)}async resolve(e){if(0!==this._previews.size)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new g(i))}catch(e){(0,n.dz)(e)}return this}}class f{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new s.vl,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(f._compareReferences);for(const t of e)if(n&&l.er.isEqual(n.uri,t.uri,!0)||(n=new p(this,t.uri),this.groups.push(n)),0===n.children.length||0!==f._compareReferences(t,n.children[n.children.length-1])){const e=new u(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,r.AS)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new f(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,h.kg)("aria.result.0","No results found"):1===this.references.length?(0,h.kg)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,h.kg)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,h.kg)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,o=i.parent.groups.length;return 1===o||t&&n+10?(n=t?(n+1)%s:(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%o,i.parent.groups[n].children[0]):(n=(n+o-1)%o,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:c.Qp(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&d.Q.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return l.er.compare(e.uri,t.uri)||d.Q.compareRangesUsingStarts(e.range,t.range)}}},52209:function(e,t,i){"use strict";i.d(t,{A:function(){return q}});var n=i(27106),s=i(35114),o=i(63619),r=i(27567),a=i(87163),l=i(90890),c=i(50639),d=i(84201),h=i(35720),u=i(70235),g=i(51059),p=i(98435),f=i(62993);class m extends s.jG{constructor(e,t=new d.fg(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new p.v),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=d.fg.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new d.fg(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)}))),this._register(this._resizableNode.onDidWillResize((()=>{this._isResizing=!0})))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){return this._contentPosition?.position?f.y.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(t&&i)return d.BK(t).top+i.top-30}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=d.BK(t),s=d.tG(t.ownerDocument.body),o=n.top+i.top+i.height;return s.height-o-24}_findPositionPreference(e,t){const i=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),n=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),s=Math.min(Math.max(n,i),e),o=Math.min(e,s);let r;return r=this._editor.getOption(60).above?o<=n?1:2:o<=i?2:1,1===r?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),r}_resize(e){this._resizableNode.layout(e.height,e.width)}}var _,v=i(97848),b=i(47901),w=i(68745),C=i(49678),y=i(49943),S=i(80670),k=function(e,t){return function(i,n){t(i,n,e)}};let x=class extends m{static{_=this}static{this.ID="editor.contrib.resizableContentHoverWidget"}static{this._lastDimensions=new d.fg(0,0)}get isVisibleFromKeyboard(){return 1===this._renderedHover?.source}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,i,n,s){const o=e.getOption(67)+8,r=new d.fg(150,o);super(e,r),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new y.N4),this._onDidResize=this._register(new S.vl),this.onDidResize=this._onDidResize.event,this._minimumSize=r,this._hoverVisibleKey=C.R.hoverVisible.bindTo(t),this._hoverFocusedKey=C.R.hoverFocused.bindTo(t),d.BC(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>{this.isVisible&&this._updateMaxDimensions()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()})));const a=this._register(d.w5(this._resizableNode.domNode));this._register(a.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(a.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return _.ID}static _applyDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,s="number"==typeof i?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return _._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return _._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,s="number"==typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){_._applyMaxDimensions(this._hover.contentsDomNode,e,t),_._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"==typeof e?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new d.fg(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){_._lastDimensions=new d.fg(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){const e=this._renderedHover?.showAtPosition;if(e)return 1===this._positionPreference?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=6;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some((e=>e.scrollWidth>e.clientWidth));return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=void 0===this._contentWidth?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4||(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,n),0))}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,_._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,_._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);const t=d.OK(this._hover.containerDomNode),i=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,i)??1,this.onContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const n=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&(0,y.vr)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");n&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+n)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new d.fg(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new d.fg(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=void 0===this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new d.fg(e,this._minimumSize.height)}onContentsChanged(){this._removeConstraintsRenderNormally();const e=this._hover.containerDomNode;let t=d.OK(e),i=d.Tr(e);if(this._resizableNode.layout(t,i),this._setHoverWidgetDimensions(i,t),t=d.OK(e),i=d.Tr(e),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(t,i),this._renderedHover?.showAtPosition){const e=d.OK(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._renderedHover.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-30})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+30})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};function L(e,t,i,n,s,o){const r=i+s/2,a=n+o/2,l=Math.max(Math.abs(e-r)-s/2,0),c=Math.max(Math.abs(t-a)-o/2,0);return Math.sqrt(l*l+c*c)}x=_=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([k(1,v.fN),k(2,b.pG),k(3,w.j),k(4,a.b)],x);var D=i(97358);class E{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,o=e.range.endLineNumber===n?e.range.endColumn:s;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>o)return!1}else if(i>t.range.startColumn||t.range.endColumn>o)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return l.AE.EMPTY;const i=E._getLineDecorations(this._editor,t);return l.AE.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):l.AE.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=E._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,D.Yc)(t)}}class N{constructor(e,t,i){this.anchor=e,this.hoverParts=t,this.isComplete=i}filter(e){const t=this.hoverParts.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.hoverParts.length?this:new I(this,this.anchor,t,this.isComplete)}}class I extends N{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}var M=i(21914),T=i(49079),R=i(40393),P=i(8106),A=i(39978),O=i(7206),F=i(20187);class B extends s.jG{constructor(e,t,i,n,s,o){super();const r=t.anchor,a=t.hoverParts;this._renderedHoverParts=this._register(new H(e,i,a,o,s));const{showAtPosition:l,showAtSecondaryPosition:c}=B.computeHoverPositions(e,r.range,a);this.shouldAppearBeforeContent=a.some((e=>e.isBeforeContent)),this.showAtPosition=l,this.showAtSecondaryPosition=c,this.initialMousePosX=r.initialMousePosX,this.initialMousePosY=r.initialMousePosY,this.shouldFocus=n.shouldFocus,this.source=n.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}async updateHoverVerbosityLevel(e,t,i){this._renderedHoverParts.updateHoverVerbosityLevel(e,t,i)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),s=i.coordinatesConverter,o=s.convertModelRangeToViewRange(t),r=i.getLineMinColumn(o.startLineNumber),a=new f.y(o.startLineNumber,r);n=s.convertViewPositionToModelPosition(a).column}const s=t.startLineNumber;let o,r,a,l=t.startColumn;for(const e of i){const t=e.range,i=t.startLineNumber===s,r=t.endLineNumber===s;if(i&&r){const e=t.startColumn,i=Math.min(l,e);l=Math.max(i,n)}e.forceShowAtRange&&(o=t)}if(o){const e=o.getStartPosition();r=e,a=e}else r=t.getStartPosition(),a=new f.y(s,l);return{showAtPosition:r,showAtSecondaryPosition:a}}}class W{constructor(e,t){this._statusBar=t,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}}class H extends s.jG{static{this._DECORATION_OPTIONS=T.kI.register({description:"content-hover-highlight",className:"hoverHighlight"})}constructor(e,t,i,n,s){super(),this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=s,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(t,i,s,n)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,i)),this._updateMarkdownAndColorParticipantInfo(t)}_createEditorDecorations(e,t){if(0===t.length)return s.jG.None;let i=t[0].range;for(const e of t){const t=e.range;i=R.Q.plusRange(i,t)}const n=e.createDecorationsCollection();return n.set([{range:i,options:H._DECORATION_OPTIONS}]),(0,s.s)((()=>{n.clear()}))}_renderParts(e,t,i,n){const o=new M.L(n),r={fragment:this._fragment,statusBar:o,...i},a=new s.Cm;for(const i of e){const e=this._renderHoverPartsForParticipant(t,i,r);a.add(e);for(const t of e.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:i,hoverPart:t.hoverPart,hoverElement:t.hoverElement})}const l=this._renderStatusBar(this._fragment,o);return l&&(a.add(l),this._renderedParts.push({type:"statusBar",hoverElement:l.hoverElement,actions:l.actions})),(0,s.s)((()=>{a.dispose()}))}_renderHoverPartsForParticipant(e,t,i){const n=e.filter((e=>e.owner===t));return n.length>0?t.renderHoverParts(i,n):new g.Ke([])}_renderStatusBar(e,t){if(t.hasContent)return new W(e,t)}_registerListenersOnRenderedParts(){const e=new s.Cm;return this._renderedParts.forEach(((t,i)=>{const n=t.hoverElement;n.tabIndex=0,e.add(d.ko(n,d.Bx.FOCUS_IN,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=i}))),e.add(d.ko(n,d.Bx.FOCUS_OUT,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=-1})))})),e}_updateMarkdownAndColorParticipantInfo(e){const t=e.find((e=>e instanceof P.xJ&&!(e instanceof O.u)));t&&(this._markdownHoverParticipant=t),this._colorHoverParticipant=e.find((e=>e instanceof A.BJ))}async updateHoverVerbosityLevel(e,t,i){if(!this._markdownHoverParticipant)return;const n=this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant,t);if(void 0===n)return;const s=await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e,n,i);s&&(this._renderedParts[t]={type:"hoverPart",participant:this._markdownHoverParticipant,hoverPart:s.hoverPart,hoverElement:s.hoverElement},this._context.onContentsChanged())}isColorPickerVisible(){return this._colorHoverParticipant?.isColorPickerVisible()??!1}_normalizedIndexToMarkdownHoverIndexRange(e,t){const i=this._renderedParts[t];if(!i||"hoverPart"!==i.type)return;if(i.participant!==e)return;const n=this._renderedParts.findIndex((t=>"hoverPart"===t.type&&t.participant===e));if(-1===n)throw new F.D7;return t-n}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}}var V=function(e,t){return function(i,n){t(i,n,e)}};let z=class extends s.jG{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._onContentsChanged=this._register(new S.vl),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(x,this._editor)),this._participants=this._initializeHoverParticipants(),this._computer=new E(this._editor,this._participants),this._hoverOperation=this._register(new u.w(this._editor,this._computer)),this._registerListeners()}_initializeHoverParticipants(){const e=[];for(const t of g.B2.getAll()){const i=this._instantiationService.createInstance(t,this._editor);e.push(i)}return e.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._register(this._contentHoverWidget.onDidResize((()=>{this._participants.forEach((e=>e.handleResize?.()))}))),e}_registerListeners(){this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new N(this._computer.anchor,t,e.isComplete))})));const e=this._contentHoverWidget.getDomNode();this._register(d.b2(e,"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(d.b2(e,"mouseleave",(e=>{this._onMouseLeave(e)}))),this._register(h.dG.onDidChange((()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}_startShowingOrUpdateHover(e,t,i,n,s){if(!this._contentHoverWidget.position||!this._currentResult)return!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0);const o=this._editor.getOption(60).sticky,r=s&&this._contentHoverWidget.isMouseGettingCloser(s.event.posx,s.event.posy);return o&&r?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?!!this._currentResult.anchor.equals(e)||(e.canAdoptVisibleHover(this._currentResult.anchor,this._contentHoverWidget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,n,s){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=s,this._hoverOperation.start(t))}_setCurrentResult(e){let t=e;this._currentResult!==t&&(t&&0===t.hoverParts.length&&(t=null),this._currentResult=t,this._currentResult?this._showHover(this._currentResult):this._hideHover())}_addLoadingMessage(e){if(!this._computer.anchor)return e;for(const t of this._participants){if(!t.createLoadingMessage)continue;const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){if(this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete||this._setCurrentResult(e),!e.isComplete)return;const t=0===e.hoverParts.length,i=this._computer.insistOnKeepingHoverVisible;t&&i||this._setCurrentResult(e)}_showHover(e){const t=this._getHoverContext();this._renderedContentHover=new B(this._editor,e,this._participants,this._computer,t,this._keybindingService),this._renderedContentHover.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover):this._renderedContentHover.dispose()}_hideHover(){this._contentHoverWidget.hide()}_getHoverContext(){return{hide:()=>{this.hide()},onContentsChanged:()=>{this._onContentsChanged.fire(),this._contentHoverWidget.onContentsChanged()},setMinimumDimensions:e=>{this._contentHoverWidget.setMinimumDimensions(e)}}}showsOrWillShow(e){if(this._contentHoverWidget.isResizing)return!0;const t=this._findHoverAnchorCandidates(e);if(!(t.length>0))return this._startShowingOrUpdateHover(null,0,0,!1,e);const i=t[0];return this._startShowingOrUpdateHover(i,0,0,!1,e)}_findHoverAnchorCandidates(e){const t=[];for(const i of this._participants){if(!i.suggestHoverAnchor)continue;const n=i.suggestHoverAnchor(e);n&&t.push(n)}const i=e.target;switch(i.type){case 6:t.push(new g.hx(0,i.range,e.event.posx,e.event.posy));break;case 7:{const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;if(i.detail.isAfterLines||"number"!=typeof i.detail.horizontalDistanceToText||!(i.detail.horizontalDistanceToTextt.priority-e.priority)),t}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!(0,c.U)(t,e.x,e.y))&&this.hide()}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new g.hx(0,e,void 0,void 0),t,i,n,null)}async updateHoverVerbosityLevel(e,t,i){this._renderedContentHover?.updateHoverVerbosityLevel(e,t,i)}focusedHoverPartIndex(){return this._renderedContentHover?.focusedHoverPartIndex??-1}containsNode(e){return!!e&&this._contentHoverWidget.getDomNode().contains(e)}focus(){this._contentHoverWidget.focus()}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){return this._renderedContentHover?.isColorPickerVisible()??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([V(1,o._Y),V(2,a.b)],z);var U,j=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends s.jG{static{U=this}static{this.ID="editor.contrib.contentHover"}constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._onHoverContentsChanged=this._register(new S.vl),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new s.Cm,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new l.uC((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}static get(e){return e.getContribution(U.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,this._shouldNotHideCurrentHoverWidget(e)||this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()}_isMouseOnContentHoverWidget(e){const t=this._contentWidget?.getDomNode();return!!t&&(0,c.U)(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldNotHideCurrentHoverWidget(e)||this._hideWidgets())}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky;return((e,t)=>{const i=this._isMouseOnContentHoverWidget(e);return t&&i})(e,t)||(e=>{const t=this._isMouseOnContentHoverWidget(e),i=this._contentWidget?.isColorPickerVisible??!1;return t&&i})(e)||((e,t)=>(t&&this._contentWidget?.containsNode(e.event.browserEvent.view?.document.activeElement)&&!e.event.browserEvent.view?.getSelection()?.isCollapsed)??!1)(e,t)}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._contentWidget?.isFocused||this._contentWidget?.isResizing)return;const t=this._hoverSettings.sticky;if(t&&this._contentWidget?.isVisibleFromKeyboard)return;if(this._shouldNotRecomputeCurrentHoverWidget(e))return void this._reactToEditorMouseMoveRunner.cancel();const i=this._hoverSettings.hidingDelay,n=this._contentWidget?.isVisible;n&&t&&i>0?this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(i):this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;const t=e.target,i=t.element?.classList.contains("colorpicker-color-decoration"),n=this._editor.getOption(149),s=this._hoverSettings.enabled,o=this._hoverState.activatedByDecoratorClick;i&&("click"===n&&!o||"hover"===n&&!s||"clickAndHover"===n&&!s&&!o)||!(i||s||o)?this._hideWidgets():this._tryShowHoverWidget(e)||this._hideWidgets()}_tryShowHoverWidget(e){return this._getOrCreateContentWidget().showsOrWillShow(e)}_onKeyDown(e){if(!this._editor.hasModel())return;const t=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=1===t.kind||2===t.kind&&(t.commandId===n.jA||t.commandId===n.jq||t.commandId===n.Zp)&&this._contentWidget?.isVisible;5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||i||this._hideWidgets()}_hideWidgets(){this._hoverState.mouseDown&&this._contentWidget?.isColorPickerVisible||r.bo.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._contentWidget?.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(z,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged((()=>this._onHoverContentsChanged.fire())))),this._contentWidget}showContentHover(e,t,i,n,s=!1){this._hoverState.activatedByDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}_isContentWidgetResizing(){return this._contentWidget?.widget.isResizing||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,t,i){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,t,i)}focus(){this._contentWidget?.focus()}scrollUp(){this._contentWidget?.scrollUp()}scrollDown(){this._contentWidget?.scrollDown()}scrollLeft(){this._contentWidget?.scrollLeft()}scrollRight(){this._contentWidget?.scrollRight()}pageUp(){this._contentWidget?.pageUp()}pageDown(){this._contentWidget?.pageDown()}goToTop(){this._contentWidget?.goToTop()}goToBottom(){this._contentWidget?.goToBottom()}get isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible}get isHoverVisible(){return this._contentWidget?.isVisible}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._contentWidget?.dispose()}};q=U=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([j(1,o._Y),j(2,a.b)],q)},21914:function(e,t,i){"use strict";i.d(t,{L:function(){return l}});var n=i(84201),s=i(49943),o=i(35114),r=i(87163);const a=n.$;let l=class extends o.jG{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this.actions=[],this._hasContent=!1,this.hoverElement=a("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=n.BC(this.hoverElement,a("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;this._hasContent=!0;const n=this._register(s.jQ.render(this.actionsElement,e,i));return this.actions.push(n),n}append(e){const t=n.BC(this.actionsElement,e);return this._hasContent=!0,t}};var c,d;l=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(c=0,d=r.b,function(e,t){d(e,t,c)})],l)},69538:function(e,t,i){"use strict";i.d(t,{U:function(){return c}});var n=i(90890),s=i(76611),o=i(20187),r=i(52694),a=i(69122);class l{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function c(e,t,i,s,r=!1){const a=e.ordered(t,r).map(((e,n)=>async function(e,t,i,n,s){const r=await Promise.resolve(e.provideHover(i,n,s)).catch(o.M_);if(r&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(r))return new l(e,r,t)}(e,n,t,i,s)));return n.AE.fromPromises(a).coalesce()}function d(e,t,i,n,s=!1){return c(e,t,i,n,s).map((e=>e.hover)).toPromise()}(0,r.ke)("_executeHoverProvider",((e,t,i)=>d(e.get(a.ILanguageFeaturesService).hoverProvider,t,i,s.XO.None))),(0,r.ke)("_executeHoverProvider_recursive",((e,t,i)=>d(e.get(a.ILanguageFeaturesService).hoverProvider,t,i,s.XO.None,!0)))},27106:function(e,t,i){"use strict";i.d(t,{G8:function(){return _},Hm:function(){return h},Hp:function(){return a},K6:function(){return r},MB:function(){return l},Xp:function(){return u},Zp:function(){return m},dV:function(){return o},iM:function(){return f},ih:function(){return d},jA:function(){return s},jq:function(){return p},vf:function(){return c},vx:function(){return g}});var n=i(14374);const s="editor.action.showHover",o="editor.action.showDefinitionPreviewHover",r="editor.action.scrollUpHover",a="editor.action.scrollDownHover",l="editor.action.scrollLeftHover",c="editor.action.scrollRightHover",d="editor.action.pageUpHover",h="editor.action.pageDownHover",u="editor.action.goToTopHover",g="editor.action.goToBottomHover",p="editor.action.increaseHoverVerbosityLevel",f=n.kg({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),m="editor.action.decreaseHoverVerbosityLevel",_=n.kg({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level")},31986:function(e,t,i){"use strict";var n,s=i(27106),o=i(62167),r=i(52694),a=i(40393),l=i(49678),c=i(53720),d=i(52209),h=i(35720),u=i(14374);!function(e){e.NoAutoFocus="noAutoFocus",e.FocusIfVisible="focusIfVisible",e.AutoFocusImmediately="autoFocusImmediately"}(n||(n={}));class g extends r.ks{constructor(){super({id:s.jA,label:u.kg({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:u.aS("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[n.NoAutoFocus,n.FocusIfVisible,n.AutoFocusImmediately],enumDescriptions:[u.kg("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),u.kg("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),u.kg("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:n.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:l.R.editorTextFocus,primary:(0,o.m5)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const s=d.A.get(t);if(!s)return;const o=i?.focus;let r=n.FocusIfVisible;Object.values(n).includes(o)?r=o:"boolean"==typeof o&&o&&(r=n.AutoFocusImmediately);const l=e=>{const i=t.getPosition(),n=new a.Q(i.lineNumber,i.column,i.lineNumber,i.column);s.showContentHover(n,1,1,e)},c=2===t.getOption(2);s.isHoverVisible?r!==n.NoAutoFocus?s.focus():l(c):l(c||r===n.AutoFocusImmediately)}}class p extends r.ks{constructor(){super({id:s.dV,label:u.kg({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:u.aS("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,t){const i=d.A.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new a.Q(n.lineNumber,n.column,n.lineNumber,n.column),o=c.k.get(t);o&&o.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(s,1,1,!0)}))}}class f extends r.ks{constructor(){super({id:s.K6,label:u.kg({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:16,weight:100},metadata:{description:u.aS("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollUp()}}class m extends r.ks{constructor(){super({id:s.Hp,label:u.kg({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:18,weight:100},metadata:{description:u.aS("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollDown()}}class _ extends r.ks{constructor(){super({id:s.MB,label:u.kg({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:15,weight:100},metadata:{description:u.aS("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollLeft()}}class v extends r.ks{constructor(){super({id:s.vf,label:u.kg({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:17,weight:100},metadata:{description:u.aS("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollRight()}}class b extends r.ks{constructor(){super({id:s.ih,label:u.kg({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:u.aS("pageUpHoverDescription","Page up the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.pageUp()}}class w extends r.ks{constructor(){super({id:s.Hm,label:u.kg({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:u.aS("pageDownHoverDescription","Page down the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.pageDown()}}class C extends r.ks{constructor(){super({id:s.Xp,label:u.kg({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:u.aS("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.goToTop()}}class y extends r.ks{constructor(){super({id:s.vx,label:u.kg({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:u.aS("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.goToBottom()}}class S extends r.ks{constructor(){super({id:s.jq,label:s.iM,alias:"Increase Hover Verbosity Level",precondition:l.R.hoverVisible})}run(e,t,i){const n=d.A.get(t);if(!n)return;const s=void 0!==i?.index?i.index:n.focusedHoverPartIndex();n.updateHoverVerbosityLevel(h.M$.Increase,s,i?.focus)}}class k extends r.ks{constructor(){super({id:s.Zp,label:s.G8,alias:"Decrease Hover Verbosity Level",precondition:l.R.hoverVisible})}run(e,t,i){const n=d.A.get(t);if(!n)return;const s=void 0!==i?.index?i.index:n.focusedHoverPartIndex();d.A.get(t)?.updateHoverVerbosityLevel(h.M$.Decrease,s,i?.focus)}}var x=i(4195),L=i(40616),D=i(51059),E=i(8106),N=i(84201),I=i(97358),M=i(90890),T=i(20187),R=i(35114),P=i(59951),A=i(69122),O=i(12098),F=i(7126),B=i(97810),W=i(78875),H=i(28557),V=i(84119),z=i(95607),U=i(86171),j=function(e,t){return function(i,n){t(i,n,e)}};const q=N.$;class K{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const $={type:1,filter:{include:W.gB.QuickFix},triggerAction:W.fo.QuickFixHover};let G=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];for(const r of t){const t=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s,c=this._markerDecorationsService.getMarker(i.uri,r);if(!c)continue;const d=new a.Q(e.range.startLineNumber,t,e.range.startLineNumber,l);o.push(new K(this,d,c))}return o}renderHoverParts(e,t){if(!t.length)return new D.Ke([]);const i=new R.Cm,n=[];t.forEach((t=>{const i=this._renderMarkerHover(t);e.fragment.appendChild(i.hoverElement),n.push(i)}));const s=1===t.length?t[0]:t.sort(((e,t)=>V.cj.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,s,i),new D.Ke(n)}_renderMarkerHover(e){const t=new R.Cm,i=q("div.hover-row"),n=N.BC(i,q("div.marker.hover-contents")),{source:s,message:o,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=N.BC(n,q("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=o,s||r)if(r&&"string"!=typeof r){const e=q("span");s&&(N.BC(e,q("span")).innerText=s);const i=N.BC(e,q("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(N.ko(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),N.BC(i,q("span")).innerText=r.value;const o=N.BC(n,e);o.style.opacity="0.6",o.style.paddingLeft="6px"}else{const e=N.BC(n,q("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=s&&r?`${s}(${r})`:s||`(${r})`}if((0,I.EI)(a))for(const{message:e,resource:i,startLineNumber:s,startColumn:o}of a){const r=N.BC(n,q("div"));r.style.marginTop="8px";const a=N.BC(r,q("a"));a.innerText=`${(0,P.P8)(i)}(${s}, ${o}): `,a.style.cursor="pointer",t.add(N.ko(a,"click",(e=>{if(e.stopPropagation(),e.preventDefault(),this._openerService){const e={selection:{startLineNumber:s,startColumn:o}};this._openerService.open(i,{fromUserGesture:!0,editorOptions:e}).catch(T.dz)}})));const l=N.BC(r,q("span"));l.innerText=e,this._editor.applyFontInfo(l)}return{hoverPart:e,hoverElement:i,dispose:()=>t.dispose()}}renderMarkerStatusbar(e,t,i){if(t.marker.severity===V.cj.Error||t.marker.severity===V.cj.Warning||t.marker.severity===V.cj.Info){const i=H.j.get(this._editor);i&&e.statusBar.addAction({label:u.kg("view problem","View Problem"),commandId:H.i.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(92)){const n=e.statusBar.append(q("div"));this.recentMarkerCodeActionsInfo&&(V.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===V.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=u.kg("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?R.jG.None:(0,M.EQ)((()=>n.textContent=u.kg("checkingForQuickFixes","Checking for quick fixes...")),200,i);n.textContent||(n.textContent=String.fromCharCode(160));const o=this.getCodeActions(t.marker);i.add((0,R.s)((()=>o.cancel()))),o.then((o=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return o.dispose(),void(n.textContent=u.kg("noQuickFixes","No quick fixes available"));n.style.display="none";let r=!1;i.add((0,R.s)((()=>{r||o.dispose()}))),e.statusBar.addAction({label:u.kg("quick fixes","Quick Fix..."),commandId:F.pQ,run:t=>{r=!0;const i=B.C.get(this._editor),n=N.BK(t);e.hide(),i?.showCodeActions($,o,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),T.dz)}}getCodeActions(e){return(0,M.SS)((t=>(0,F.dU)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new a.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),$,U.ke.None,t)))}};G=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([j(1,O.IMarkerDecorationsService),j(2,z.C),j(3,A.ILanguageFeaturesService)],G);var Q=i(63619),Y=i(50639),Z=i(69498),X=i(41750),J=i(70235),ee=i(49943),te=i(85584),ie=i(62067);class ne{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=ie.ZS.Center}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[],n="lineNo"===this._laneOrLine;if(!t)return i;for(const s of t){const t=s.options.glyphMargin?.position??ie.ZS.Center;if(!n&&t!==this._laneOrLine)continue;const o=n?s.options.lineNumberHoverMessage:s.options.glyphMarginHoverMessage;o&&!(0,te.it)(o)&&i.push(...(0,I._j)(o).map(e))}return i}}var se,oe=function(e,t){return function(i,n){t(i,n,e)}};const re=N.$;let ae=class extends R.jG{static{se=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,i){super(),this._renderDisposeables=this._register(new R.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new ee.N4),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Z.T({editor:this._editor},t,i)),this._computer=new ne(this._editor),this._hoverOperation=this._register(new J.w(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._register(N.b2(this._hover.containerDomNode,"mouseleave",(e=>{this._onMouseLeave(e)}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return se.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}showsOrWillShow(e){const t=e.target;return 2===t.type&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):3===t.type&&(this._startShowingAt(t.position.lineNumber,"lineNo"),!0)}_startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=re("div.hover-row.markdown-hover"),n=N.BC(t,re("div.hover-contents")),s=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(s.element),i.appendChild(t)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(67),o=i-n-(this._hover.containerDomNode.clientHeight-s)/2,r=t.glyphMarginLeft+t.glyphMarginWidth+("lineNo"===this._computer.lane?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${r}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!(0,Y.U)(t,e.x,e.y))&&this.hide()}};ae=se=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([oe(1,X.L),oe(2,z.C)],ae);let le=class extends R.jG{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new R.Cm,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new M.uC((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,this._isMouseOnMarginHoverWidget(e)||this._hideWidgets()}_isMouseOnMarginHoverWidget(e){const t=this._glyphWidget?.getDomNode();return!!t&&(0,Y.U)(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._isMouseOnMarginHoverWidget(e)||this._hideWidgets())}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,i=this._isMouseOnMarginHoverWidget(e);return t&&i}_onEditorMouseMove(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e)?this._reactToEditorMouseMoveRunner.cancel():this._reactToEditorMouseMove(e))}_reactToEditorMouseMove(e){e&&(this._tryShowHoverWidget(e)||this._hideWidgets())}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(ae,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};var ce,de;le=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(ce=1,de=Q._Y,function(e,t){de(e,t,ce)})],le);var he=i(92998);(0,r.HW)(d.A.ID,d.A,2),(0,r.HW)(le.ID,le,2),(0,r.Fl)(g),(0,r.Fl)(p),(0,r.Fl)(f),(0,r.Fl)(m),(0,r.Fl)(_),(0,r.Fl)(v),(0,r.Fl)(b),(0,r.Fl)(w),(0,r.Fl)(C),(0,r.Fl)(y),(0,r.Fl)(S),(0,r.Fl)(k),D.B2.register(E.xJ),D.B2.register(G),(0,L.zy)(((e,t)=>{const i=e.getColor(x.oZ8);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))})),he.Z.register(new class{}),he.Z.register(new class{}),he.Z.register(new class{})},70235:function(e,t,i){"use strict";i.d(t,{w:function(){return l}});var n=i(90890),s=i(20187),o=i(80670),r=i(35114);class a{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class l extends r.jG{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new o.vl),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new n.uC((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new n.uC((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new n.uC((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,n.bI)((e=>this._computer.computeAsync(e))),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){(0,s.dz)(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new a(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}},51059:function(e,t,i){"use strict";i.d(t,{B2:function(){return r},Ke:function(){return o},hx:function(){return n},mm:function(){return s}});class n{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class s{constructor(e,t,i,n,s,o){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=o,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}class o{constructor(e){this.renderedHoverParts=e}dispose(){for(const e of this.renderedHoverParts)e.dispose()}}const r=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},50639:function(e,t,i){"use strict";i.d(t,{U:function(){return s}});var n=i(84201);function s(e,t,i){const s=n.BK(e);return!(ts.left+s.width||is.top+s.height)}},8106:function(e,t,i){"use strict";i.d(t,{eH:function(){return T},fm:function(){return F},xJ:function(){return P}});var n=i(84201),s=i(97358),o=i(76611),r=i(85584),a=i(35114),l=i(69498),c=i(27106),d=i(40393),h=i(41750),u=i(51059),g=i(14374),p=i(47901),f=i(95607),m=i(69122),_=i(35720),v=i(51310),b=i(93231),w=i(56613),C=i(20187),y=i(87163),S=i(49943),k=i(74856),x=i(90890),L=i(69538),D=i(21335),E=function(e,t){return function(i,n){t(i,n,e)}};const N=n.$,I=(0,v.pU)("hover-increase-verbosity",b.W.add,g.kg("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),M=(0,v.pU)("hover-decrease-verbosity",b.W.remove,g.kg("decreaseHoverVerbosity","Icon for decreasing hover verbosity."));class T{constructor(e,t,i,n,s,o=void 0){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s,this.source=o}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class R{constructor(e,t,i){this.hover=e,this.hoverProvider=t,this.hoverPosition=i}supportsVerbosityAction(e){switch(e){case _.M$.Increase:return this.hover.canIncreaseVerbosity??!1;case _.M$.Decrease:return this.hover.canDecreaseVerbosity??!1}}}let P=class{constructor(e,t,i,n,s,o,r,a){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this._keybindingService=o,this._hoverService=r,this._commandService=a,this.hoverOrdinal=3}createLoadingMessage(e){return new T(this,e.range,[(new r.Bc).appendText(g.kg("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),a=[];let l=1e3;const c=i.getLineLength(n),h=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(118),p=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:h});let f=!1;u>=0&&c>u&&e.range.startColumn>=u&&(f=!0,a.push(new T(this,e.range,[{value:g.kg("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,l++))),!f&&"number"==typeof p&&c>=p&&a.push(new T(this,e.range,[{value:g.kg("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,l++));let m=!1;for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,c=i.range.endLineNumber===n?i.range.endColumn:o,h=i.options.hoverMessage;if(!h||(0,r.it)(h))continue;i.options.beforeContentClassName&&(m=!0);const u=new d.Q(e.range.startLineNumber,t,e.range.startLineNumber,c);a.push(new T(this,u,(0,s._j)(h),m,l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return x.AE.EMPTY;const n=this._editor.getModel(),s=this._languageFeaturesService.hoverProvider;return s.has(n)?this._getMarkdownHovers(s,n,e,i):x.AE.EMPTY}_getMarkdownHovers(e,t,i,n){const s=i.range.getStartPosition();return(0,L.U)(e,t,s,n).filter((e=>!(0,r.it)(e.hover.contents))).map((e=>{const t=e.hover.range?d.Q.lift(e.hover.range):i.range,n=new R(e.hover,e.provider,s);return new T(this,t,e.hover.contents,!1,e.ordinal,n)}))}renderHoverParts(e,t){return this._renderedHoverParts=new O(t,e.fragment,this,this._editor,this._languageService,this._openerService,this._commandService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}updateMarkdownHoverVerbosityLevel(e,t,i){return Promise.resolve(this._renderedHoverParts?.updateMarkdownHoverPartVerbosityLevel(e,t,i))}};P=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([E(1,h.L),E(2,f.C),E(3,p.pG),E(4,m.ILanguageFeaturesService),E(5,y.b),E(6,k.TN),E(7,D.d)],P);class A{constructor(e,t,i){this.hoverPart=e,this.hoverElement=t,this.disposables=i}dispose(){this.disposables.dispose()}}class O{constructor(e,t,i,n,s,o,r,l,c,d,h){this._hoverParticipant=i,this._editor=n,this._languageService=s,this._openerService=o,this._commandService=r,this._keybindingService=l,this._hoverService=c,this._configurationService=d,this._onFinishedRendering=h,this._ongoingHoverOperations=new Map,this._disposables=new a.Cm,this.renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._disposables.add((0,a.s)((()=>{this.renderedHoverParts.forEach((e=>{e.dispose()})),this._ongoingHoverOperations.forEach((e=>{e.tokenSource.dispose(!0)}))})))}_renderHoverParts(e,t,i){return e.sort((0,s.VE)((e=>e.ordinal),s.U9)),e.map((e=>{const n=this._renderHoverPart(e,i);return t.appendChild(n.hoverElement),n}))}_renderHoverPart(e,t){const i=this._renderMarkdownHover(e,t),n=i.hoverElement,s=e.source,o=new a.Cm;if(o.add(i),!s)return new A(e,n,o);const r=s.supportsVerbosityAction(_.M$.Increase),l=s.supportsVerbosityAction(_.M$.Decrease);if(!r&&!l)return new A(e,n,o);const c=N("div.verbosity-actions");return n.prepend(c),o.add(this._renderHoverExpansionAction(c,_.M$.Increase,r)),o.add(this._renderHoverExpansionAction(c,_.M$.Decrease,l)),new A(e,n,o)}_renderMarkdownHover(e,t){return B(this._editor,e,this._languageService,this._openerService,t)}_renderHoverExpansionAction(e,t,i){const s=new a.Cm,o=t===_.M$.Increase,r=n.BC(e,N(w.L.asCSSSelector(o?I:M)));r.tabIndex=0;const l=new k.fO("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(s.add(this._hoverService.setupManagedHover(l,r,function(e,t){switch(t){case _.M$.Increase:{const t=e.lookupKeybinding(c.jq);return t?g.kg("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",t.getLabel()):g.kg("increaseVerbosity","Increase Hover Verbosity")}case _.M$.Decrease:{const t=e.lookupKeybinding(c.Zp);return t?g.kg("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",t.getLabel()):g.kg("decreaseVerbosity","Decrease Hover Verbosity")}}}(this._keybindingService,t))),!i)return r.classList.add("disabled"),s;r.classList.add("enabled");const d=()=>this._commandService.executeCommand(t===_.M$.Increase?c.jq:c.Zp);return s.add(new S.vV(r,d)),s.add(new S.M4(r,d,[3,10])),s}async updateMarkdownHoverPartVerbosityLevel(e,t,i=!0){const n=this._editor.getModel();if(!n)return;const s=this._getRenderedHoverPartAtIndex(t),o=s?.hoverPart.source;if(!s||!o?.supportsVerbosityAction(e))return;const r=await this._fetchHover(o,n,e);if(!r)return;const a=new R(r,o.hoverProvider,o.hoverPosition),l=s.hoverPart,c=new T(this._hoverParticipant,l.range,r.contents,l.isBeforeContent,l.ordinal,a),d=this._renderHoverPart(c,this._onFinishedRendering);return this._replaceRenderedHoverPartAtIndex(t,d,c),i&&this._focusOnHoverPartWithIndex(t),{hoverPart:c,hoverElement:d.hoverElement}}async _fetchHover(e,t,i){let n=i===_.M$.Increase?1:-1;const s=e.hoverProvider,r=this._ongoingHoverOperations.get(s);r&&(r.tokenSource.cancel(),n+=r.verbosityDelta);const a=new o.Qi;this._ongoingHoverOperations.set(s,{verbosityDelta:n,tokenSource:a});const l={verbosityRequest:{verbosityDelta:n,previousHover:e.hover}};let c;try{c=await Promise.resolve(s.provideHover(t,e.hoverPosition,a.token,l))}catch(e){(0,C.M_)(e)}return a.dispose(),this._ongoingHoverOperations.delete(s),c}_replaceRenderedHoverPartAtIndex(e,t,i){if(e>=this.renderedHoverParts.length||e<0)return;const n=this.renderedHoverParts[e],s=n.hoverElement,o=t.hoverElement,r=Array.from(o.children);s.replaceChildren(...r);const a=new A(i,s,t.disposables);s.focus(),n.dispose(),this.renderedHoverParts[e]=a}_focusOnHoverPartWithIndex(e){this.renderedHoverParts[e].hoverElement.focus()}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}function F(e,t,i,n,o){t.sort((0,s.VE)((e=>e.ordinal),s.U9));const r=[];for(const s of t)r.push(B(i,s,n,o,e.onContentsChanged));return new u.Ke(r)}function B(e,t,i,s,o){const c=new a.Cm,d=N("div.hover-row"),h=N("div.hover-row-contents");d.appendChild(h);const u=t.contents;for(const t of u){if((0,r.it)(t))continue;const a=N("div.markdown-hover"),d=n.BC(a,N("div.hover-contents")),u=c.add(new l.T({editor:e},i,s));c.add(u.onDidRenderAsync((()=>{d.className="hover-contents code-hover-contents",o()})));const g=c.add(u.render(t));d.appendChild(g.element),h.appendChild(a)}return{hoverPart:t,hoverElement:d,dispose(){c.dispose()}}}},10965:function(e,t,i){"use strict";var n=i(90890),s=i(20187),o=i(765),r=i(52694),a=i(40393),l=i(56218),c=i(49678),d=i(49079),h=i(56812),u=i(14374);class g{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new l.L(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new l.L(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var p;let f=class{static{p=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(p.ID)}static{this.DECORATION=d.kI.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();const i=this.editor.getSelection(),r=this.editor.getModel();if(!r||!i)return;let c=i;if(c.startLineNumber!==c.endLineNumber)return;const d=new o.$t(this.editor,5),h=r.uri;return this.editorWorkerService.canNavigateValueSet(h)?(this.currentRequest=(0,n.SS)((e=>this.editorWorkerService.navigateValueSet(h,c,t))),this.currentRequest.then((t=>{if(!t||!t.range||!t.value)return;if(!d.validate(this.editor))return;const i=a.Q.lift(t.range);let o=t.range;const r=t.value.length-(c.endColumn-c.startColumn);o={startLineNumber:o.startLineNumber,startColumn:o.startColumn,endLineNumber:o.endLineNumber,endColumn:o.startColumn+t.value.length},r>1&&(c=new l.L(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn+r-1));const h=new g(i,c,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,h),this.editor.pushUndoStop(),this.decorations.set([{range:o,options:p.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,n.wR)(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(s.dz)})).catch(s.dz)):Promise.resolve(void 0)}};var m,_;f=p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(m=1,_=h.IEditorWorkerService,function(e,t){_(e,t,m)})],f);class v extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:u.kg("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:c.R.writable,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=f.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class b extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:u.kg("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:c.R.writable,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=f.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,r.HW)(f.ID,f,4),(0,r.Fl)(v),(0,r.Fl)(b)},64043:function(e,t,i){"use strict";var n=i(35114),s=i(43920),o=i(52694),r=i(97988),a=i(40393),l=i(49678),c=i(8494),d=i(59266),h=i(2335),u=i(14374),g=i(43575),p=i(78265),f=i(48905),m=i(6947),_=i(56218),v=i(38884);function b(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const o=t.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;if(!o)return[];const a=new v.no(e,o,t);for(n=Math.min(n,e.getLineCount());i<=n&&a.shouldIgnore(i);)i++;if(i>n-1)return[];const{tabSize:l,indentSize:c,insertSpaces:d}=e.getOptions(),h=(e,t)=>(t=t||1,r.Y.shiftIndent(e,e.length+t,l,c,d)),u=(e,t)=>(t=t||1,r.Y.unshiftIndent(e,e.length+t,l,c,d)),g=[],p=e.getLineContent(i);let b=s.UU(p),C=b;a.shouldIncrease(i)?(C=h(C),b=h(b)):a.shouldIndentNextLine(i)&&(C=h(C));for(let t=++i;t<=n;t++){if(w(e,t))continue;const i=e.getLineContent(t),n=s.UU(i),o=C;a.shouldDecrease(t,o)&&(C=u(C),b=u(b)),n!==C&&g.push(f.k.replaceMove(new _.L(t,1,t,n.length+1),(0,m.P)(C,c,d))),a.shouldIgnore(t)||(a.shouldIncrease(t,o)?(b=h(b),C=b):C=a.shouldIndentNextLine(t,o)?h(C):b)}return g}function w(e,t){return!!e.tokenization.isCheapToTokenize(t)&&2===e.tokenization.getLineTokens(t).getStandardTokenType(0)}var C=i(44425);class y extends o.ks{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:y.ID,label:u.kg("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:l.R.writable,metadata:{description:u.aS("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new O(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}class S extends o.ks{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:S.ID,label:u.kg("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:l.R.writable,metadata:{description:u.aS("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new F(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}class k extends o.ks{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(g.GK),n=e.get(d.IModelService),s=t.getModel();if(!s)return;const o=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),r=s.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===o.tabSize&&e===r.tabSize?u.kg("configuredTabSize","Configured Tab Size"):e===o.tabSize?u.kg("defaultTabSize","Default Tab Size"):e===r.tabSize?u.kg("currentTabSize","Current Tab Size"):void 0}))),l=Math.min(s.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:u.kg({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&s&&!s.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?s.updateOptions({tabSize:t}):s.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class x extends k{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:x.ID,label:u.kg("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:u.aS("indentUsingTabsDescription","Use indentation with tabs.")}})}}class L extends k{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:L.ID,label:u.kg("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:u.aS("indentUsingSpacesDescription","Use indentation with spaces.")}})}}class D extends k{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:D.ID,label:u.kg("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:u.aS("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}}class E extends o.ks{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:E.ID,label:u.kg("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:u.aS("detectIndentationDescription","Detect the indentation from content.")}})}run(e,t){const i=e.get(d.IModelService),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}class N extends o.ks{constructor(){super({id:"editor.action.reindentlines",label:u.kg("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:l.R.writable,metadata:{description:u.aS("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,t){const i=e.get(c.JZ),n=t.getModel();if(!n)return;const s=b(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class I extends o.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:u.kg("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:l.R.writable,metadata:{description:u.aS("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,t){const i=e.get(c.JZ),n=t.getModel();if(!n)return;const s=t.getSelections();if(null===s)return;const o=[];for(const e of s){let t=e.startLineNumber,s=e.endLineNumber;if(t!==s&&1===e.endColumn&&s--,1===t){if(t===s)continue}else t--;const r=b(n,i,t,s);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class M{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(const e of this._edits)t.addEditOperation(a.Q.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let T=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new n.Cm,this.callOnModel=new n.Cm,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(12)<4||this.editor.getOption(55)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(this.rangeContainsOnlyWhitespaceCharacters(i,e))return;if(function(e,t){const i=t=>2===(0,C.T)(e,t);return i(t.getStartPosition())||i(t.getEndPosition())}(i,e))return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(12),{tabSize:o,indentSize:l,insertSpaces:c}=i.getOptions(),d=[],u={shiftIndent:e=>r.Y.shiftIndent(e,e.length+1,o,l,c),unshiftIndent:e=>r.Y.unshiftIndent(e,e.length+1,o,l,c)};let g=e.startLineNumber;for(;g<=e.endLineNumber&&this.shouldIgnoreLine(i,g);)g++;if(g>e.endLineNumber)return;let f=i.getLineContent(g);if(!/\S/.test(f.substring(0,e.startColumn-1))){const e=(0,p.$f)(n,i,i.getLanguageId(),g,u,this._languageConfigurationService);if(null!==e){const t=s.UU(f),n=h.c(e,o);if(n!==h.c(t,o)){const e=h.k(n,o,c);d.push({range:new a.Q(g,1,g,t.length+1),text:e}),f=e+f.substring(t.length)}else{const e=(0,p.Yb)(i,g,this._languageConfigurationService);if(0===e||8===e)return}}}const m=g;for(;gi.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===m?f:i.getLineContent(e)},r=(0,p.$f)(n,t,i.getLanguageId(),g+1,u,this._languageConfigurationService);if(null!==r){const t=h.c(r,o),n=h.c(s.UU(i.getLineContent(g+1)),o);if(t!==n){const r=t-n;for(let t=g+1;t<=e.endLineNumber;t++){const e=i.getLineContent(t),n=s.UU(e),l=h.c(n,o)+r,u=h.k(l,o,c);u!==n&&d.push({range:new a.Q(t,1,t,n.length+1),text:u})}}}}if(d.length>0){this.editor.pushUndoStop();const e=new M(d,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){const i=e=>0===e.trim().length;let n=!0;if(t.startLineNumber===t.endLineNumber)n=i(e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1));else for(let s=t.startLineNumber;s<=t.endLineNumber;s++){const o=e.getLineContent(s);if(n=s===t.startLineNumber?i(o.substring(t.startColumn-1)):s===t.endLineNumber?i(o.substring(0,t.endColumn-1)):0===e.getLineFirstNonWhitespaceColumn(s),!n)break}return n}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function R(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let s="";for(let e=0;e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(P=1,A=c.JZ,function(e,t){A(e,t,P)})],T);class O{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),R(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class F{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),R(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,o.HW)(T.ID,T,2),(0,o.Fl)(y),(0,o.Fl)(S),(0,o.Fl)(x),(0,o.Fl)(L),(0,o.Fl)(D),(0,o.Fl)(E),(0,o.Fl)(N),(0,o.Fl)(I)},2335:function(e,t,i){"use strict";function n(e,t){let i=0;for(let n=0;nthis._currentResolve=void 0))),await this._currentResolve}}async _doResolve(e){try{const t=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=t?.tooltip??this.hint.tooltip,this.hint.label=t?.label??this.hint.label,this.hint.textEdits=t?.textEdits??this.hint.textEdits,this._isResolved=!0}catch(e){(0,n.M_)(e),this._isResolved=!1}}}class h{static{this._emptyInlayHintList=Object.freeze({dispose(){},hints:[]})}static async create(e,t,i,s){const o=[],r=e.ordered(t).reverse().map((e=>i.map((async i=>{try{const n=await e.provideInlayHints(t,i,s);(n?.hints.length||e.onDidChangeInlayHints)&&o.push([n??h._emptyInlayHintList,e])}catch(e){(0,n.M_)(e)}}))));if(await Promise.all(r.flat()),s.isCancellationRequested||t.isDisposed())throw new n.AL;return new h(i,o,t)}constructor(e,t,i){this._disposables=new s.Cm,this.ranges=e,this.provider=new Set;const n=[];for(const[e,s]of t){this._disposables.add(e),this.provider.add(s);for(const t of e.hints){const e=i.validatePosition(t.position);let o="before";const a=h._getRangeAtPosition(i,e);let l;a.getStartPosition().isBefore(e)?(l=r.Q.fromPositions(a.getStartPosition(),e),o="after"):(l=r.Q.fromPositions(e,a.getEndPosition()),o="before"),n.push(new d(t,new c(l,o),s))}}this.items=n.sort(((e,t)=>o.y.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new r.Q(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),o=t.column-1,a=s.findTokenIndexAtOffset(o);let l=s.getStartOffset(a),c=s.getEndOffset(a);return c-l==1&&(l===o&&a>1?(l=s.getStartOffset(a-1),c=s.getEndOffset(a-1)):c===o&&athis._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(142)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(142);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if("on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(s.Di.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),d.schedule(0)}})))}const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,c.s)((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const o=new Set,d=new r.uC((async()=>{const e=Date.now();n?.dispose(!0),n=new a.Qi;const i=t.onWillDispose((()=>n?.cancel()));try{const i=n.token,s=await x.P8.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(d.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void s.dispose();for(const e of s.provider)"function"!=typeof e.onDidChangeInlayHints||o.has(e)||(o.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{d.isScheduled()||d.schedule()}))));this._sessionDisposables.add(s),this._updateHintsDecorators(s.ranges,s.items),this._cacheHintsForFastRestore(t)}catch(e){(0,l.dz)(e)}finally{n.dispose(),i.dispose()}}),this._debounceInfo.get(t));this._sessionDisposables.add(d),this._sessionDisposables.add((0,c.s)((()=>n?.dispose(!0)))),d.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&d.isScheduled()||d.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{n?.cancel();const t=Math.max(d.delay,1250);d.schedule(t)}))),this._sessionDisposables.add(this._installDblClickGesture((()=>d.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new c.Cm,t=e.add(new k.gi(this._editor)),i=new c.Cm;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),s=this._editor.getModel();if(!n||!s)return void i.clear();const o=new a.Qi;i.add((0,c.s)((()=>o.dispose(!0)))),n.item.resolve(o.token),this._activeInlayHintPart=n.part.command||n.part.location?new F(n,t.hasTriggerModifier):void 0;const r=s.validatePosition(n.item.hint.position).lineNumber,l=new _.Q(r,1,r,s.getLineMaxColumn(r)),d=this._getInlineHintsForRange(l);this._updateHintsDecorators([l],d),i.add((0,c.s)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([l],d)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((async e=>{const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(L.U,e,this._editor,i.location):v.uB.is(i.command)&&await this._invokeCommand(i.command,t.item)}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((async t=>{if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(a.XO.None),(0,o.EI)(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>m.k.replace(_.Q.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))}_installContextMenu(){return this._editor.onContextMenu((async e=>{if(!(0,s.sb)(e.event.target))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(L.h,this._editor,e.event.target,t)}))}_getInlayHintLabelPart(e){if(6!==e.target.type)return;const t=e.target.detail.injectedText?.options;return t instanceof w.Ho&&t?.attachedData instanceof O?t.attachedData:void 0}async _invokeCommand(e,t){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(e){this._notificationService.notify({severity:I.AI.Error,source:t.provider.displayName,message:e})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const e=new x.EP(s,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(_.Q.compareRangesUsingStarts)){const t=e.validateRange(new _.Q(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&_.Q.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=_.Q.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(e,t){const i=[],s=(e,t,n,s,o)=>{const r={content:n,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:s,attachedData:o};i.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},r=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(a/3|0)+"px",display:"inline-block"});s(e,i," ",t?b.VW.Right:b.VW.None)},{fontSize:a,fontFamily:l,padding:c,isUniform:d}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,l);let u={line:0,totalLen:0};for(const e of t){if(u.line!==e.anchor.range.startLineNumber&&(u={line:e.anchor.range.startLineNumber,totalLen:0}),u.totalLen>n._MAX_LABEL_LEN)continue;e.hint.paddingLeft&&r(e,!1);const t="string"==typeof e.hint.label?[{label:e.hint.label}]:e.hint.label;for(let i=0;i0&&(m=m.slice(0,-v)+"…",_=!0),s(e,this._ruleFactory.createClassNameRef(p),m.replace(/[ \t]/g," "),g&&!e.hint.paddingRight?b.VW.Right:b.VW.None,new O(e,i)),_)break}if(e.hint.paddingRight&&r(e,!0),i.length>n._MAX_DECORATORS)break}const g=[];for(const[t,i]of this._decorationsMetadata){const n=this._editor.getModel()?.getDecorationRange(t);n&&e.some((e=>e.containsRange(n)))&&(g.push(t),i.classNameRef.dispose(),this._decorationsMetadata.delete(t))}const m=p.D.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(g,i.map((e=>e.decoration)));for(let e=0;ei)&&(s=i);const o=e.fontFamily||n;return{fontSize:s,fontFamily:o,padding:t,isUniform:!t&&o===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};B=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([R(1,y.ILanguageFeaturesService),R(2,C.ILanguageFeatureDebounceService),R(3,A),R(4,D.d),R(5,I.Ot),R(6,N._Y)],B),D.w.registerCommand("_executeInlayHintProvider",(async(e,...t)=>{const[i,n]=t;(0,h.j)(u.r.isUri(i)),(0,h.j)(_.Q.isIRange(n));const{inlayHintsProvider:s}=e.get(y.ILanguageFeaturesService),o=await e.get(S.ITextModelService).createModelReference(i);try{const e=await x.P8.create(s,o.object.textEditorModel,[_.Q.lift(n)],a.XO.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{o.dispose()}}))},7206:function(e,t,i){"use strict";i.d(t,{u:function(){return x}});var n=i(90890),s=i(85584),o=i(62993),r=i(49079),a=i(51059),l=i(41750),c=i(20878),d=i(69538),h=i(8106),u=i(47610),g=i(47901),p=i(95607),f=i(69122),m=i(14374),_=i(79783),v=i(44830),b=i(97358),w=i(87163),C=i(74856),y=i(21335),S=function(e,t){return function(i,n){t(i,n,e)}};class k extends a.mm{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let x=class extends h.xJ{constructor(e,t,i,n,s,o,r,a,l){super(e,t,i,o,a,n,s,l),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){if(!u.M.get(this._editor))return null;if(6!==e.target.type)return null;const t=e.target.detail.injectedText?.options;return t instanceof r.Ho&&t.attachedData instanceof u.z?new k(t.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof k?new n.AE((async t=>{const{part:n}=e;if(await n.item.resolve(i),i.isCancellationRequested)return;let o,r;if("string"==typeof n.item.hint.tooltip?o=(new s.Bc).appendText(n.item.hint.tooltip):n.item.hint.tooltip&&(o=n.item.hint.tooltip),o&&t.emitOne(new h.eH(this,e.range,[o],!1,0)),(0,b.EI)(n.item.hint.textEdits)&&t.emitOne(new h.eH(this,e.range,[(new s.Bc).appendText((0,m.kg)("hint.dbl","Double-click to insert"))],!1,10001)),"string"==typeof n.part.tooltip?r=(new s.Bc).appendText(n.part.tooltip):n.part.tooltip&&(r=n.part.tooltip),r&&t.emitOne(new h.eH(this,e.range,[r],!1,1)),n.part.location||n.part.command){let i;const o="altKey"===this._editor.getOption(78)?_.zx?(0,m.kg)("links.navigate.kb.meta.mac","cmd + click"):(0,m.kg)("links.navigate.kb.meta","ctrl + click"):_.zx?(0,m.kg)("links.navigate.kb.alt.mac","option + click"):(0,m.kg)("links.navigate.kb.alt","alt + click");n.part.location&&n.part.command?i=(new s.Bc).appendText((0,m.kg)("hint.defAndCommand","Go to Definition ({0}), right click for more",o)):n.part.location?i=(new s.Bc).appendText((0,m.kg)("hint.def","Go to Definition ({0})",o)):n.part.command&&(i=new s.Bc(`[${(0,m.kg)("hint.cmd","Execute Command")}](${(0,v.CN)(n.part.command)} "${n.part.command.title}") (${o})`,{isTrusted:!0})),i&&t.emitOne(new h.eH(this,e.range,[i],!1,1e4))}const a=await this._resolveInlayHintLabelPartHover(n,i);for await(const e of a)t.emitOne(e)})):n.AE.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return n.AE.EMPTY;const{uri:i,range:r}=e.part.location,a=await this._resolverService.createModelReference(i);try{const i=a.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,d.U)(this._languageFeaturesService.hoverProvider,i,new o.y(r.startLineNumber,r.startColumn),t).filter((e=>!(0,s.it)(e.hover.contents))).map((t=>new h.eH(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):n.AE.EMPTY}finally{a.dispose()}}};x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([S(1,l.L),S(2,p.C),S(3,w.b),S(4,C.TN),S(5,g.pG),S(6,c.ITextModelService),S(7,f.ILanguageFeaturesService),S(8,y.d)],x)},59460:function(e,t,i){"use strict";i.d(t,{U:function(){return v},h:function(){return _}});var n=i(84201),s=i(30981),o=i(76611),r=i(20419),a=i(40393),l=i(20878),c=i(35620),d=i(70776),h=i(93223),u=i(21335),g=i(97848),p=i(14280),f=i(63619),m=i(31835);async function _(e,t,i,d){const g=e.get(l.ITextModelService),_=e.get(p.Z),v=e.get(u.d),b=e.get(f._Y),w=e.get(m.Ot);if(await d.item.resolve(o.XO.None),!d.part.location)return;const C=d.part.location,y=[],S=new Set(h.ZG.getMenuItems(h.D8.EditorContext).map((e=>(0,h.is)(e)?e.command.id:(0,r.b)())));for(const e of c.bn.all())S.has(e.desc.id)&&y.push(new s.rc(e.desc.id,h.Xe.label(e.desc,{renderShortTitle:!0}),void 0,!0,(async()=>{const i=await g.createModelReference(C.uri);try{const n=new c.QS(i.object.textEditorModel,a.Q.getStartPosition(C.range)),s=d.item.anchor.range;await b.invokeFunction(e.runEditorCommand.bind(e),t,n,s)}finally{i.dispose()}})));if(d.part.command){const{command:e}=d.part;y.push(new s.wv),y.push(new s.rc(e.id,e.title,void 0,!0,(async()=>{try{await v.executeCommand(e.id,...e.arguments??[])}catch(e){w.notify({severity:m.AI.Error,source:d.item.provider.displayName,message:e})}})))}const k=t.getOption(128);_.showContextMenu({domForShadowRoot:k?t.getDomNode()??void 0:void 0,getAnchor:()=>{const e=n.BK(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>y,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}async function v(e,t,i,n){const s=e.get(l.ITextModelService),o=await s.createModelReference(n.uri);await i.invokeWithinContext((async e=>{const s=t.hasSideBySideModifier,r=e.get(g.fN),l=d.x2.inPeekEditor.getValue(r),h=!s&&i.getOption(89)&&!l;return new c.mR({openToSide:s,openInPeek:h,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e,new c.QS(o.object.textEditorModel,a.Q.getStartPosition(n.range)),a.Q.lift(n.range))})),o.dispose()}},76392:function(e,t,i){"use strict";i.d(t,{PA:function(){return o},Vl:function(){return s},Wt:function(){return n}});const n="editor.action.inlineSuggest.commit",s="editor.action.inlineSuggest.showPrevious",o="editor.action.inlineSuggest.showNext"},99575:function(e,t,i){"use strict";i.d(t,{p:function(){return c}});var n=i(73755),s=i(43920),o=i(39841),r=i(97848),a=i(35114),l=i(14374);class c extends a.jG{static{this.inlineSuggestionVisible=new r.N1("inlineSuggestionVisible",!1,(0,l.kg)("inlineSuggestionVisible","Whether an inline suggestion is visible"))}static{this.inlineSuggestionHasIndentation=new r.N1("inlineSuggestionHasIndentation",!1,(0,l.kg)("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"))}static{this.inlineSuggestionHasIndentationLessThanTabSize=new r.N1("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,l.kg)("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"))}static{this.suppressSuggestions=new r.N1("inlineSuggestionSuppressSuggestions",void 0,(0,l.kg)("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))}constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=c.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=c.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=c.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=c.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,n.fm)((e=>{const t=this.model.read(e),i=t?.state.read(e),n=!!i?.inlineCompletion&&void 0!==i?.primaryGhostText&&!i?.primaryGhostText.isEmpty();this.inlineCompletionVisible.set(n),i?.primaryGhostText&&i?.inlineCompletion&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register((0,n.fm)((e=>{const t=this.model.read(e);let i=!1,n=!0;const r=t?.primaryGhostText.read(e);if(t?.selectedSuggestItem&&r&&r.parts.length>0){const{column:e,lines:a}=r.parts[0],l=a[0];if(e<=t.textModel.getLineIndentColumn(r.lineNumber)){let e=(0,s.HG)(l);-1===e&&(e=l.length-1),i=e>0;const r=t.textModel.getOptions().tabSize;n=o.A.visibleColumnFromColumn(l,e+1,r)=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},M=function(e,t){return function(i,n){t(i,n,e)}};let T=class extends h.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,u.y0)(this,this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(62).showToolbar)),this.sessionPosition=void 0,this.position=(0,u.un)(this,(e=>{const t=this.model.read(e)?.primaryGhostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||0===t.parts.length)return this.sessionPosition=void 0,null;const i=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);const n=new m.y(t.lineNumber,Math.min(i,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=n,n})),this._register((0,u.yC)(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const s=(0,g.rm)(((t,i)=>{const s=i.add(this.instantiationService.createInstance(A,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.activeCommands));return e.addContentWidget(s),i.add((0,h.s)((()=>e.removeContentWidget(s)))),i.add((0,u.fm)((e=>{this.position.read(e)&&n.lastTriggerKind.read(e)!==_.qw.Explicit&&n.triggerExplicitly()}))),s})),o=(0,u.ZX)(this,((e,t)=>!!this.position.read(e)||!!t));i.add((0,u.fm)((e=>{o.read(e)&&s.read(e)})))})))}};T=I([M(2,L._Y)],T);const R=(0,N.pU)("inline-suggestion-hints-next",d.W.chevronRight,(0,b.kg)("parameterHintsNextIcon","Icon for show next parameter hint.")),P=(0,N.pU)("inline-suggestion-hints-previous",d.W.chevronLeft,(0,b.kg)("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let A=class extends h.jG{static{n=this}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(e,t,i){const n=new a.rc(e,t,i,!0,(()=>this._commandService.executeCommand(e))),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let o=t;return s&&(o=(0,b.kg)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,s.getLabel())),n.tooltip=o,n}constructor(e,t,i,o,r,l,d,h,g,p,m){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=o,this._suggestionCount=r,this._extraCommands=l,this._commandService=d,this.keybindingService=g,this._contextKeyService=p,this._menuService=m,this.id="InlineSuggestionHintsContentWidget"+n.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,s.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,s.h)("div@toolBar")]),this.previousAction=this.createCommandAction(v.Vl,(0,b.kg)("previous","Previous"),f.L.asClassName(P)),this.availableSuggestionCountAction=new a.rc("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(v.PA,(0,b.kg)("next","Next"),f.L.asClassName(R)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(y.D8.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new c.uC((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new c.uC((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.toolBar=this._register(h.createInstance(B,this.nodes.toolBar,y.D8.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof y.Xe)return h.createInstance(F,e,void 0);if(e===this.availableSuggestionCountAction){const t=new O(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{n._dropDownVisible=e}))),this._register((0,u.fm)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,u.fm)((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register((0,u.fm)((e=>{const t=this._extraCommands.read(e).map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[e,i]of this.inlineCompletionsActionsMenus.getActions())for(const e of i)e instanceof y.Xe&&t.push(e);t.length>0&&t.unshift(new a.wv),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};A=n=I([M(6,S.d),M(7,L._Y),M(8,D.b),M(9,k.fN),M(10,y.ez)],A);class O extends o.Z4{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}class F extends w.oq{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,s.h)("div.keybinding").root;this._register(new r.x(t,p.OS,{disableTitle:!0,...r.l})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let B=class extends C.p{constructor(e,t,i,n,s,o,r,a,l){super(e,{resetMenu:t,...i},n,s,o,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){const e=[],t=[];(0,w.Ot)(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){(0,l.aI)(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){(0,l.aI)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};B=I([M(3,y.ez),M(4,k.fN),M(5,x.Z),M(6,D.b),M(7,S.d),M(8,E.k)],B)},60224:function(e,t,i){"use strict";var n=i(52694),s=i(51059),o=i(73755),r=i(1878),a=i(49678),l=i(76392),c=i(99575),d=i(84201),h=i(35114),u=i(15075),g=i(90890),p=i(76611),f=i(98018),m=i(84230),_=i(24219),v=i(34157),b=i(90072),w=i(62993),C=i(82688),y=i(69122),S=i(38945),k=i(80670),x=i(43920),L=i(43193),D=i(3520),E=i(40393),N=i(52192),I=i(41750),M=i(62067),T=i(44425),R=i(10621),P=i(73055),A=i(59046),O=i(35173);const F="ghost-text";let B=class extends h.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,o.FY)(this,!1),this.currentTextModel=(0,o.y0)(this,this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,o.un)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof A.Vs?i.columnRange:void 0,s=[],o=[];function r(e,t){if(o.length>0){const i=o[o.length-1];t&&i.decorations.push(new R.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)o.push({content:i,decorations:t?[new R.d(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,c=0;for(const e of i.parts){let t=e.lines;void 0===l?(s.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):r([a.substring(c,e.column-1)],void 0),t.length>0&&(r(t,F),void 0===l&&e.column<=a.length&&(l=e.column)),c=e.column-1}void 0!==l&&r([a.substring(c)],void 0);const d=void 0!==l?new O.GM(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:s,additionalLines:o,hiddenRange:d,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=(0,o.un)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const e of t.inlineTexts)i.push({range:E.Q.fromPositions(new w.y(t.lineNumber,e.column)),options:{description:F,after:{content:e.text,inlineClassName:e.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:M.VW.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new V(this.editor,this.languageService.languageIdCodec,(0,o.un)((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register((0,h.s)((()=>{this.isDisposed.set(!0,void 0)}))),this._register((0,O.pY)(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};var W,H;B=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(W=2,H=I.L,function(e,t){H(e,t,W)})],B);class V extends h.jG{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=(0,o.yQ)("editorOptionChanged",k.Jh.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(33)||e.hasChanged(118)||e.hasChanged(100)||e.hasChanged(95)||e.hasChanged(51)||e.hasChanged(50)||e.hasChanged(67)))),this._register((0,o.fm)((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const o=Math.max(t.length,i);if(o>0){const i=document.createElement("div");!function(e,t,i,n,s){const o=n.get(33),r=n.get(118),a=n.get(95),l=n.get(51),c=n.get(50),d=n.get(67),h=new N.fe(1e4);h.appendString('
    ');for(let e=0,n=i.length;e');const g=x.aC(u),p=x.E_(u),f=T.f.createEmpty(u,s);(0,P.UW)(new P.zL(c.isMonospace&&!o,c.canUseHalfwidthRightwardsArrow,u,!1,g,p,0,f,n.decorations,t,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,r,"none",a,l!==D.Bc.OFF,null),h),h.appendString("
    ")}h.appendString(""),(0,L.M)(e,c);const u=h.build(),g=z?z.createHTML(u):u;e.innerHTML=g}(i,s,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:o,domNode:i,afterColumnAffinity:1})}}))}}const z=(0,S.H)("editorGhostText",{createHTML:e=>e});var U=i(27567),j=i(97358),q=i(64429),K=i(57981),$=i(20187),G=i(48905),Q=i(56218),Y=i(30479),Z=i(13233),X=i(35720),J=i(8494),ee=i(17793),te=i(33597),ie=i(72491);function ne(e,t,i){const n=i?e.range.intersectRanges(i):e.range;if(!n)return e;const s=t.getValueInRange(n,1),o=(0,x.Qp)(s,e.text),r=Z.W.ofText(s.substring(0,o)).addToPosition(e.range.getStartPosition()),a=e.text.substring(o),l=E.Q.fromPositions(r,e.range.getEndPosition());return new Y.WR(l,a)}function se(e,t){return e.text.startsWith(t.text)&&(i=e.range,(n=t.range).getStartPosition().equals(i.getStartPosition())&&n.getEndPosition().isBeforeOrEqual(i.getEndPosition()));var i,n}function oe(e,t,i,n,s=0){let o=ne(e,t);if(o.range.endLineNumber!==o.range.startLineNumber)return;const r=t.getLineContent(o.range.startLineNumber),a=(0,x.UU)(r).length;if(o.range.startColumn-1<=a){const e=(0,x.UU)(o.text).length,t=r.substring(o.range.startColumn-1,a),[i,n]=[o.range.getStartPosition(),o.range.getEndPosition()],s=i.column+t.length<=n.column?i.delta(0,t.length):n,l=E.Q.fromPositions(s,n),c=o.text.startsWith(t)?o.text.substring(t.length):o.text.substring(e);o=new Y.WR(l,c)}const l=t.getValueInRange(o.range),c=function(e,t){if(re?.originalValue===e&&re?.newValue===t)return re?.changes;{let i=le(e,t,!0);if(i){const n=ae(i);if(n>0){const s=le(e,t,!1);s&&ae(s)0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==l.length)return}const u=o.text.length-s;for(const e of c){const t=o.range.startColumn+e.originalStart+e.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===o.range.startLineNumber&&t0)return;if(0===e.modifiedLength)continue;const s=e.modifiedStart+e.modifiedLength,r=Math.max(e.modifiedStart,Math.min(s,u)),a=o.text.substring(e.modifiedStart,r),l=o.text.substring(r,Math.max(e.modifiedStart,s));a.length>0&&h.push(new A.yP(t,a,!1)),l.length>0&&h.push(new A.yP(t,l,!0))}return new A.xD(d,h)}let re;function ae(e){let t=0;for(const i of e)t+=i.originalLength;return t}function le(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const s=Math.max(n(e),n(t));function o(e){if(e<0)throw new Error("unexpected");return s+e+1}function r(e){let t=0,n=0;const s=new Int32Array(e.length);for(let r=0,a=e.length;ra},{getElements:()=>l}).ComputeDiff(!1).changes}var ce=function(e,t){return function(i,n){t(i,n,e)}};let de=class extends h.jG{constructor(e,t,i,n,s){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=s,this._updateOperation=this._register(new h.HE),this.inlineCompletions=(0,o.X2)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,o.X2)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){const n=new he(e,t,this.textModel.getVersionId()),s=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(this._updateOperation.value?.request.satisfies(n))return this._updateOperation.value.promise;if(s.get()?.request.satisfies(n))return Promise.resolve(!0);const r=!!this._updateOperation.value;this._updateOperation.clear();const a=new p.Qi,l=(async()=>{var l,c;if((r||t.triggerKind===X.qw.Automatic)&&await(l=this._debounceValue.get(this.textModel),c=a.token,new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),l);c&&(t=c.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))}))),a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==n.versionId)return!1;const d=new Date,h=await(0,te.Yk)(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,a.token,this.languageConfigurationService);if(a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==n.versionId)return!1;const u=new Date;this._debounceValue.update(this.textModel,u.getTime()-d.getTime());const g=new ge(h,n,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!h.has(t)&&g.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),(0,o.Rn)((e=>{s.set(g,e)})),!0})(),c=new ue(n,a,l);return this._updateOperation.value=c,l}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){this._updateOperation.value?.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};de=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ce(3,y.ILanguageFeaturesService),ce(4,J.JZ)],de);class he{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&(0,K.KC)(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(0,K.r)())&&(e.context.triggerKind===X.qw.Automatic||this.context.triggerKind===X.qw.Explicit)&&this.versionId===e.versionId}}class ue{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class ge{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this._textModel=i,this._versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[];const s=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new pe(e,s[t],this._textModel,this._versionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this._textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new pe(e,n,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}}class pe{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this._textModel=i,this._modelVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=(0,o.C)({owner:this,equalsFn:E.Q.equalsRange},(e=>(this._modelVersion.read(e),this._textModel.getDecorationRange(this.decorationId))))}toInlineCompletion(e){return this.inlineCompletion.withRange(this._updatedRange.read(e)??fe)}toSingleTextEdit(e){return new Y.WR(this._updatedRange.read(e)??fe,this.inlineCompletion.insertText)}isVisible(e,t,i){const n=ne(this._toFilterTextReplacement(i),e),s=this._updatedRange.read(i);if(!s||!this.inlineCompletion.range.getStartPosition().equals(s.getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const o=e.getValueInRange(n.range,1),r=n.text,a=Math.max(0,t.column-n.range.startColumn);let l=r.substring(0,a),c=r.substring(a),d=o.substring(0,a),h=o.substring(a);const u=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=u&&(d=d.trimStart(),0===d.length&&(h=h.trimStart()),l=l.trimStart(),0===l.length&&(c=c.trimStart())),l.startsWith(d)&&!!(0,ee.dE)(h,c)}canBeReused(e,t){const i=this._updatedRange.read(void 0);return!!i&&i.containsPosition(t)&&this.isVisible(e,t,void 0)&&Z.W.ofRange(i).isGreaterThanOrEqualTo(Z.W.ofRange(this.inlineCompletion.range))}_toFilterTextReplacement(e){return new Y.WR(this._updatedRange.read(e)??fe,this.inlineCompletion.filterText)}}const fe=new E.Q(1,1,1,1);var me=i(83012),_e=i(21335),ve=i(63619),be=function(e,t){return function(i,n){t(i,n,e)}};let we=class extends h.jG{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,s,r,a,l,c,d,h,u){let g;super(),this.textModel=e,this.selectedSuggestItem=t,this._textModelVersionId=i,this._positions=n,this._debounceValue=s,this._suggestPreviewEnabled=r,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=h,this._languageConfigurationService=u,this._source=this._register(this._instantiationService.createInstance(de,this.textModel,this._textModelVersionId,this._debounceValue)),this._isActive=(0,o.FY)(this,!1),this._forceUpdateExplicitlySignal=(0,o.Yd)(this),this._selectedInlineCompletionId=(0,o.FY)(this,void 0),this._primaryPosition=(0,o.un)(this,(e=>this._positions.read(e)[0]??new w.y(1,1))),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([Ce.Redo,Ce.Undo,Ce.AcceptWord]),this._fetchInlineCompletionsPromise=(0,o.nb)({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:X.qw.Automatic}),handleChange:(e,t)=>(e.didChange(this._textModelVersionId)&&this._preserveCurrentCompletionReasons.has(this._getReason(e.change))?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=X.qw.Explicit),!0)},((e,t)=>{if(this._forceUpdateExplicitlySignal.read(e),!(this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e)))return void this._source.cancelUpdate();this._textModelVersionId.read(e);const i=this._source.suggestWidgetInlineCompletions.get(),n=this.selectedSuggestItem.read(e);if(i&&!n){const e=this._source.inlineCompletions.get();(0,o.Rn)((t=>{(!e||i.request.versionId>e.request.versionId)&&this._source.inlineCompletions.set(i.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const s=this._primaryPosition.read(e),r={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:n?.toSelectedSuggestionInfo()},a=this.selectedInlineCompletion.get(),l=t.preserveCurrentCompletion||a?.forwardStable?a:void 0;return this._source.fetch(s,r,l)})),this._filteredInlineCompletionItems=(0,o.C)({owner:this,equalsFn:(0,K.S3)()},(e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this._primaryPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=(0,o.un)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=(0,o.un)(this,(e=>this._filteredInlineCompletionItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this.activeCommands=(0,o.C)({owner:this,equalsFn:(0,K.S3)()},(e=>this.selectedInlineCompletion.read(e)?.inlineCompletion.source.inlineCompletions.commands??[])),this.lastTriggerKind=this._source.inlineCompletions.map(this,(e=>e?.request.context.triggerKind)),this.inlineCompletionsCount=(0,o.un)(this,(e=>this.lastTriggerKind.read(e)===X.qw.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=(0,o.C)({owner:this,equalsFn:(e,t)=>e&&t?(0,A.AL)(e.ghostTexts,t.ghostTexts)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{const t=this.textModel,i=this.selectedSuggestItem.read(e);if(i){const n=ne(i.toSingleTextEdit(),t),s=this._computeAugmentation(n,e);if(!this._suggestPreviewEnabled.read(e)&&!s)return;const o=s?.edit??n,r=s?s.edit.text.length-n.text.length:0,a=this._suggestPreviewMode.read(e),l=this._positions.read(e),c=[o,...ye(this.textModel,l,o)],d=c.map(((e,i)=>oe(e,t,a,l[i],r))).filter(_.O9);return{edits:c,primaryGhostText:d[0]??new A.xD(o.range.endLineNumber,[]),ghostTexts:d,inlineCompletion:s?.completion,suggestItem:i}}{if(!this._isActive.read(e))return;const i=this.selectedInlineCompletion.read(e);if(!i)return;const n=i.toSingleTextEdit(e),s=this._inlineSuggestMode.read(e),o=this._positions.read(e),r=[n,...ye(this.textModel,o,n)],a=r.map(((e,i)=>oe(e,t,s,o[i],0))).filter(_.O9);if(!a[0])return;return{edits:r,primaryGhostText:a[0],ghostTexts:a,inlineCompletion:i,suggestItem:void 0}}})),this.ghostTexts=(0,o.C)({owner:this,equalsFn:A.AL},(e=>{const t=this.state.read(e);if(t)return t.ghostTexts})),this.primaryGhostText=(0,o.C)({owner:this,equalsFn:A.x9},(e=>{const t=this.state.read(e);if(t)return t?.primaryGhostText})),this._register((0,o.OI)(this._fetchInlineCompletionsPromise)),this._register((0,o.fm)((e=>{const t=this.state.read(e),i=t?.inlineCompletion;if(i?.semanticId!==g?.semanticId&&(g=i,i)){const e=i.inlineCompletion,t=e.source;t.provider.handleItemDidShow?.(t.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}_getReason(e){return e?.isUndoing?Ce.Undo:e?.isRedoing?Ce.Redo:this.isAcceptingPartially?Ce.AcceptWord:Ce.Other}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){(0,o.PO)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineCompletionsPromise.get()}stop(e){(0,o.PO)(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentation(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),s=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(_.O9);return(0,q.oH)(s,(n=>{let s=n.toSingleTextEdit(t);return s=ne(s,i,E.Q.fromPositions(s.range.getStartPosition(),e.range.getEndPosition())),se(s,e)?{completion:n,edit:s}:void 0}))}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new $.D7;const t=this.state.get();if(!t||t.primaryGhostText.isEmpty()||!t.inlineCompletion)return;const i=t.inlineCompletion.toInlineCompletion(void 0);if(i.command&&i.source.addRef(),e.pushUndoStop(),i.snippetInfo)e.executeEdits("inlineSuggestion.accept",[G.k.replace(i.range,""),...i.additionalTextEdits]),e.setPosition(i.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),me.O.get(e)?.insert(i.snippetInfo.snippet,{undoStopBefore:!1});else{const n=t.edits,s=Se(n).map((e=>Q.L.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",[...n.map((e=>G.k.replace(e.range,e.text))),...i.additionalTextEdits]),e.setSelections(s,"inlineCompletionAccept")}this.stop(),i.command&&(await this._commandService.executeCommand(i.command.id,...i.command.arguments||[]).then(void 0,$.M_),i.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),s=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),o=t.match(s);let r=0;r=o&&void 0!==o.index?0===o.index?o[0].length:o.index:t.length;const a=/\s+/g.exec(t);return a&&void 0!==a.index&&a.index+a[0].length{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}),1)}async _acceptNext(e,t,i){if(e.getModel()!==this.textModel)throw new $.D7;const n=this.state.get();if(!n||n.primaryGhostText.isEmpty()||!n.inlineCompletion)return;const s=n.primaryGhostText,o=n.inlineCompletion.toInlineCompletion(void 0);if(o.snippetInfo||o.filterText!==o.insertText)return void await this.accept(e);const r=s.parts[0],a=new w.y(s.lineNumber,r.column),l=r.text,c=t(a,l);if(c===l.length&&1===s.parts.length)return void this.accept(e);const d=l.substring(0,c),h=this._positions.get(),u=h[0];o.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const t=E.Q.fromPositions(u,a),i=e.getModel().getValueInRange(t)+d,n=new Y.WR(t,i),s=[n,...ye(this.textModel,h,n)],o=Se(s).map((e=>Q.L.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",s.map((e=>G.k.replace(e.range,e.text)))),e.setSelections(o,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){const t=E.Q.fromPositions(o.range.getStartPosition(),Z.W.ofText(d).addToPosition(a)),n=e.getModel().getValueInRange(t,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,n.length,{kind:i})}}finally{o.source.removeRef()}}handleSuggestAccepted(e){const t=ne(e.toSingleTextEdit(),this.textModel),i=this._computeAugmentation(t,void 0);if(!i)return;const n=i.completion.inlineCompletion;n.source.provider.handlePartialAccept?.(n.source.inlineCompletions,n.sourceInlineCompletion,t.text.length,{kind:2})}};var Ce;function ye(e,t,i){if(1===t.length)return[];const n=t[0],s=t.slice(1),o=i.range.getStartPosition(),r=i.range.getEndPosition(),a=e.getValueInRange(E.Q.fromPositions(n,r)),l=(0,O.tN)(n,o);if(l.lineNumber<1)return(0,$.dz)(new $.D7(`positionWithinTextEdit line number should be bigger than 0.\n\t\t\tInvalid subtraction between ${n.toString()} and ${o.toString()}`)),[];const c=function(e,t){let i="";const n=(0,x.en)(e);for(let e=t.lineNumber-1;e{const i=(0,O.OA)((0,O.tN)(t,o),r),n=e.getValueInRange(E.Q.fromPositions(t,i)),s=(0,x.Qp)(a,n),l=E.Q.fromPositions(t,t.delta(0,s));return new Y.WR(l,c)}))}function Se(e){const t=j.t9.createSortPermutation(e,(0,j.VE)((e=>e.range),E.Q.compareRangesUsingStarts)),i=new Y.mF(t.apply(e)).getNewRanges();return t.inverse().apply(i).map((e=>e.getEndPosition()))}we=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([be(9,ve._Y),be(10,_e.d),be(11,J.JZ)],we),function(e){e[e.Undo=0]="Undo",e[e.Redo=1]="Redo",e[e.AcceptWord=2]="AcceptWord",e[e.Other=3]="Other"}(Ce||(Ce={}));var ke=i(62347),xe=i(93155),Le=i(6503);class De extends h.jG{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,t,i){super(),this.editor=e,this.suggestControllerPreselector=t,this.onWillAccept=i,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new k.vl),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const n=Le.D.get(this.editor);if(n){this._register(n.registerSelector({priority:100,select:(e,t,i)=>{const s=this.editor.getModel();if(!s)return-1;const o=this.suggestControllerPreselector(),r=o?ne(o,s):void 0;if(!r)return-1;const a=w.y.lift(t),l=i.map(((e,t)=>{const i=ne(Ee.fromSuggestion(n,s,a,e,this.isShiftKeyPressed).toSingleTextEdit(),s);return{index:t,valid:se(r,i),prefixLength:i.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),c=(0,q.Cn)(l,(0,j.VE)((e=>e.prefixLength),j.U9));return c?c.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(n.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(n.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(n.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(k.Jh.once(n.model.onDidTrigger)((e=>{t()}))),this._register(n.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const s=Ee.fromSuggestion(n,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(s)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();var i,n;this._isActive===e&&((i=this._currentSuggestItemInfo)===(n=t)||i&&n&&i.equals(n))||(this._isActive=e,this._currentSuggestItemInfo=t,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){const e=Le.D.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?Ee.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=Le.D.get(this.editor);e?.stopForceRenderingAbove()}forceRenderingAbove(){const e=Le.D.get(this.editor);e?.forceRenderingAbove()}}class Ee{static fromSuggestion(e,t,i,n,s){let{insertText:o}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new ke.fr).parse(o);e.children.length<100&&xe.O.adjustWhitespace(t,i,!0,e),o=e.toString(),r=!0}const a=e.getOverwriteInfo(n,s);return new Ee(E.Q.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),o,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new X.GE(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new Y.WR(this.range,this.insertText)}}var Ne,Ie=i(14374),Me=i(68745),Te=i(54673),Re=i(47901),Pe=i(97848),Ae=i(87163),Oe=function(e,t){return function(i,n){t(i,n,e)}};let Fe=class extends h.jG{static{Ne=this}static{this.ID="editor.contrib.inlineCompletionsController"}static get(e){return e.getContribution(Ne.ID)}constructor(e,t,i,n,s,r,a,u,C,y){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=s,this._debounceService=r,this._languageFeaturesService=a,this._accessibilitySignalService=u,this._keybindingService=C,this._accessibilityService=y,this._editorObs=(0,b.Ud)(this.editor),this._positions=(0,o.un)(this,(e=>this._editorObs.selections.read(e)?.map((e=>e.getEndPosition()))??[new w.y(1,1)])),this._suggestWidgetAdaptor=this._register(new De(this.editor,(()=>(this._editorObs.forceUpdate(),this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(void 0))),(e=>this._editorObs.forceUpdate((t=>{this.model.get()?.handleSuggestAccepted(e)}))))),this._suggestWidgetSelectedItem=(0,o.y0)(this,(e=>this._suggestWidgetAdaptor.onDidSelectedItemChange((()=>{this._editorObs.forceUpdate((t=>e(void 0)))}))),(()=>this._suggestWidgetAdaptor.selectedItem)),this._enabledInConfig=(0,o.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).enabled)),this._isScreenReaderEnabled=(0,o.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this._editorDictationInProgress=(0,o.y0)(this,this._contextKeyService.onDidChangeContext,(()=>!0===this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress"))),this._enabled=(0,o.un)(this,(e=>this._enabledInConfig.read(e)&&(!this._isScreenReaderEnabled.read(e)||!this._editorDictationInProgress.read(e)))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model=(0,f.a0)(this,(e=>{if(this._editorObs.isReadonly.read(e))return;const t=this._editorObs.model.read(e);return t?this._instantiationService.createInstance(we,t,this._suggestWidgetSelectedItem,this._editorObs.versionId,this._positions,this._debounceValue,(0,o.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(119).preview)),(0,o.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(119).previewMode)),(0,o.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).mode)),this._enabled):void 0})).recomputeInitiallyAndOnChange(this._store),this._ghostTexts=(0,o.un)(this,(e=>{const t=this.model.read(e);return t?.ghostTexts.read(e)??[]})),this._stablizedGhostTexts=function(e,t){const i=(0,o.FY)("result",[]),n=[];return t.add((0,o.fm)((t=>{const s=e.read(t);(0,o.Rn)((e=>{if(s.length!==n.length){n.length=s.length;for(let e=0;et.set(s[i],e)))}))}))),i}(this._ghostTexts,this._store),this._ghostTextWidgets=(0,m.Rl)(this,this._stablizedGhostTexts,((e,t)=>t.add(this._instantiationService.createInstance(B,this.editor,{ghostText:e,minReservedLineCount:(0,o.lk)(0),targetTextModel:this.model.map((e=>e?.textModel))})))).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=(0,o.Yd)(this),this._fontFamily=(0,o.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).fontFamily)),this._register(new c.p(this._contextKeyService,this.model)),this._register((0,b.jD)(this._editorObs.onDidType,((e,t)=>{this._enabled.get()&&this.model.get()?.trigger()}))),this._register(this._commandService.onDidExecuteCommand((t=>{new Set([v.Yh.Tab.id,v.Yh.DeleteLeft.id,v.Yh.DeleteRight.id,l.Wt,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&this._editorObs.forceUpdate((e=>{this.model.get()?.trigger(e)}))}))),this._register((0,b.jD)(this._editorObs.selections,((e,t)=>{t.some((e=>3===e.reason||"api"===e.source))&&this.model.get()?.stop()}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||U.bo.dropDownVisible||(0,o.Rn)((e=>{this.model.get()?.stop(e)}))}))),this._register((0,o.fm)((e=>{const t=this.model.read(e)?.state.read(e);t?.suggestItem?t.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register((0,h.s)((()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()})));const S=(0,m.ZX)(this,((e,t)=>{const i=this.model.read(e),n=i?.state.read(e);return this._suggestWidgetSelectedItem.get()?t:n?.inlineCompletion?.semanticId}));this._register((0,b.Qg)((0,o.un)((e=>(this._playAccessibilitySignal.read(e),S.read(e),{}))),(async(e,t,i)=>{const n=this.model.get(),s=n?.state.get();if(!s||!n)return;const r=n.textModel.getLineContent(s.primaryGhostText.lineNumber);await(0,g.wR)(50,(0,p.bs)(i)),await(0,o.oJ)(this._suggestWidgetSelectedItem,_.b0,(()=>!1),(0,p.bs)(i)),await this._accessibilitySignalService.playSignal(Te.Rh.inlineSuggestion),this.editor.getOption(8)&&this._provideScreenReaderUpdate(s.primaryGhostText.renderForScreenReader(r))}))),this._register(new U.Pm(this.editor,this.model,this._instantiationService)),this._register(function(e){const t=new h.Cm,i=t.add((0,d.jh)());return t.add((0,o.fm)((t=>{i.setStyle(e.read(t))}))),t}((0,o.un)((e=>{const t=this._fontFamily.read(e);return""===t||"default"===t?"":`\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${t};\n}`})))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(150)&&(n=(0,Ie.kg)("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),(0,u.xE)(n?e+", "+n:e)}shouldShowHoverAt(e){const t=this.model.get()?.primaryGhostText.get();return!!t&&t.parts.some((i=>e.containsPosition(new w.y(t.lineNumber,i.column))))}shouldShowHoverAtViewZone(e){return this._ghostTextWidgets.get()[0]?.ownsViewZone(e)??!1}};Fe=Ne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Oe(1,ve._Y),Oe(2,Pe.fN),Oe(3,Re.pG),Oe(4,_e.d),Oe(5,C.ILanguageFeatureDebounceService),Oe(6,y.ILanguageFeaturesService),Oe(7,Te.Nt),Oe(8,Ae.b),Oe(9,Me.j)],Fe);var Be=i(9408),We=i(93223);class He extends n.ks{static{this.ID=l.PA}constructor(){super({id:He.ID,label:Ie.kg("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){const i=Fe.get(t);i?.model.get()?.next()}}class Ve extends n.ks{static{this.ID=l.Vl}constructor(){super({id:Ve.ID,label:Ie.kg("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){const i=Fe.get(t);i?.model.get()?.previous()}}class ze extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:Ie.kg("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:a.R.writable})}async run(e,t){const i=Fe.get(t);await(0,r.fL)((async e=>{await(i?.model.get()?.triggerExplicitly(e)),i?.playAccessibilitySignal(e)}))}}class Ue extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:Ie.kg("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible)},menuOpts:[{menuId:We.D8.InlineSuggestionToolbar,title:Ie.kg("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){const i=Fe.get(t);await(i?.model.get()?.acceptNextWord(i.editor))}}class je extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:Ie.kg("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:We.D8.InlineSuggestionToolbar,title:Ie.kg("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){const i=Fe.get(t);await(i?.model.get()?.acceptNextLine(i.editor))}}class qe extends n.ks{constructor(){super({id:l.Wt,label:Ie.kg("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:c.p.inlineSuggestionVisible,menuOpts:[{menuId:We.D8.InlineSuggestionToolbar,title:Ie.kg("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:Pe.M$.and(c.p.inlineSuggestionVisible,a.R.tabMovesFocus.toNegated(),c.p.inlineSuggestionHasIndentationLessThanTabSize,Be.ob.Visible.toNegated(),a.R.hoverFocused.toNegated())}})}async run(e,t){const i=Fe.get(t);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}class Ke extends n.ks{static{this.ID="editor.action.inlineSuggest.hide"}constructor(){super({id:Ke.ID,label:Ie.kg("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:c.p.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=Fe.get(t);(0,o.Rn)((e=>{i?.model.get()?.stop(e)}))}}class $e extends We.L{static{this.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}constructor(){super({id:$e.ID,title:Ie.kg("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:We.D8.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Pe.M$.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){const i=e.get(Re.pG),n="always"===i.getValue("editor.inlineSuggest.showToolbar")?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",n)}}var Ge=i(85584),Qe=i(69498),Ye=i(95607),Ze=i(2727),Xe=function(e,t){return function(i,n){t(i,n,e)}};class Je{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let et=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=o,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Fe.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new s.mm(1e3,this,E.Q.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new s.mm(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if("onHover"!==this._editor.getOption(62).showToolbar)return[];const i=Fe.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new Je(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new h.Cm,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&i.add(this.renderScreenReaderText(e,n));const r=n.controller.model.get(),a=this._instantiationService.createInstance(U.bo,this._editor,!1,(0,o.lk)(null),r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands),l=a.getDomNode();e.fragment.appendChild(l),r.triggerExplicitly(),i.add(a);const c={hoverPart:n,hoverElement:l,dispose(){i.dispose()}};return new s.Ke([c])}renderScreenReaderText(e,t){const i=new h.Cm,n=d.$,s=n("div.hover-row.markdown-hover"),r=d.BC(s,n("div.hover-contents",{"aria-live":"assertive"})),a=i.add(new Qe.T({editor:this._editor},this._languageService,this._openerService));return i.add((0,o.fm)((n=>{const s=t.controller.model.read(n)?.primaryGhostText.read(n);if(s){const t=this._editor.getModel().getLineContent(s.lineNumber);(t=>{i.add(a.onDidRenderAsync((()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=Ie.kg("inlineSuggestionFollows","Suggestion:"),s=i.add(a.render((new Ge.Bc).appendText(n).appendCodeblock("text",t)));r.replaceChildren(s.element)})(s.renderForScreenReader(t))}else d.Ln(r)}))),e.fragment.appendChild(s),i}};et=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Xe(1,I.L),Xe(2,Ye.C),Xe(3,Me.j),Xe(4,ve._Y),Xe(5,Ze.k)],et);var tt=i(92998);(0,n.HW)(Fe.ID,Fe,3),(0,n.Fl)(ze),(0,n.Fl)(He),(0,n.Fl)(Ve),(0,n.Fl)(Ue),(0,n.Fl)(je),(0,n.Fl)(qe),(0,n.Fl)(Ke),(0,We.ug)($e),s.B2.register(et),tt.Z.register(new class{})},59046:function(e,t,i){"use strict";i.d(t,{AL:function(){return h},Vs:function(){return d},x9:function(){return u},xD:function(){return l},yP:function(){return c}});var n=i(97358),s=i(43920),o=i(62993),r=i(40393),a=i(30479);class l{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every(((t,i)=>t.equals(e.parts[i])))}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return new a.mF([...this.parts.map((e=>new a.WR(r.Q.fromPositions(new o.y(1,e.column)),e.lines.join("\n"))))]).applyToString(i).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class c{constructor(e,t,i){this.column=e,this.text=t,this.preview=i,this.lines=(0,s.uz)(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class d{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.text=i,this.additionalReservedLineCount=n,this.parts=[new c(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=(0,s.uz)(this.text)}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every(((t,i)=>t===e.newLines[i]))&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function h(e,t){return(0,n.aI)(e,t,u)}function u(e,t){return e===t||!(!e||!t)&&(e instanceof l&&t instanceof l||e instanceof d&&t instanceof d)&&e.equals(t)}},33597:function(e,t,i){"use strict";i.d(t,{Yk:function(){return b}});var n=i(93066),s=i(90890),o=i(76611),r=i(52732),a=i(20187),l=i(62993),c=i(40393),d=i(46218),h=i(91727),u=i(4138),g=i(24536),p=i(6730);class f{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var m=i(30479),_=i(35173),v=i(62347);async function b(e,t,i,n,d=o.XO.None,h){const u=t instanceof l.y?function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new c.Q(e.lineNumber,i.startColumn,e.lineNumber,n):c.Q.fromPositions(e,e.with(void 0,n))}(t,i):t,g=e.all(i),p=new r.db;for(const e of g)e.groupId&&p.add(e.groupId,e);function f(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=p.get(i);for(const i of e)t.push(i)}return t}const m=new Map,_=new Set;function v(e,t){if(t=[...t,e],_.has(e))return t;_.add(e);try{const i=f(e);for(const e of i){const i=v(e,t);if(i)return i}}finally{_.delete(e)}}function b(e){const o=m.get(e);if(o)return o;const r=v(e,[]);r&&(0,a.M_)(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const c=new s.Zv;return m.set(e,c.p),(async()=>{if(!r){const t=f(e);for(const e of t){const t=await b(e);if(t&&t.items.length>0)return}}try{return t instanceof l.y?await e.provideInlineCompletions(i,t,n,d):await(e.provideInlineEdits?.(i,t,n,d))}catch(e){return void(0,a.M_)(e)}})().then((e=>c.complete(e)),(e=>c.error(e))),c.p}const S=await Promise.all(g.map((async e=>({provider:e,completions:await b(e)})))),k=new Map,x=[];for(const e of S){const t=e.completions;if(!t)continue;const n=new C(t,e.provider);x.push(n);for(const e of t.items){const t=y.from(e,n,u,i,h);k.set(t.hash(),t)}}return new w(Array.from(k.values()),new Set(k.keys()),x)}class w{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class C{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class y{static from(e,t,i,s,o){let r,a,l=e.range?c.Q.lift(e.range):i;if("string"==typeof e.insertText){if(r=e.insertText,o&&e.completeBracketPairs){r=S(r,l.getStartPosition(),s,o);const t=r.length-e.insertText.length;0!==t&&(l=new c.Q(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+t))}a=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=S(e.insertText.snippet,l.getStartPosition(),s,o);const i=e.insertText.snippet.length-t;0!==i&&(l=new c.Q(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+i))}const i=(new v.fr).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof v.EY?(r=i.children[0].value,a=void 0):(r=i.toString(),a={snippet:e.insertText.snippet,range:l})}else(0,n.xb)(e.insertText);return new y(r,e.command,l,r,a,e.additionalTextEdits||(0,_.zk)(),e,t)}constructor(e,t,i,n,s,o,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=s,this.additionalTextEdits=o,this.sourceInlineCompletion=r,this.source=a,n=(e=e.replace(/\r\n|\r/g,"\n")).replace(/\r\n|\r/g,"\n")}withRange(e){return new y(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new m.WR(this.range,this.insertText)}}function S(e,t,i,n){const s=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,o=i.tokenization.tokenizeLineWithEdit(t,s.length-(t.column-1),e),r=o?.sliceAndInflate(t.column-1,s.length,0);if(!r)return e;const a=function(e,t){const i=new g.Mg,n=new d.Z(i,(e=>t.getLanguageConfiguration(e))),s=new p.tk(new f([e]),n),o=(0,u.T)(s,[],void 0,!0);let r="";const a=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=(0,h.QB)(i,t.openingBracket.length),t.child&&(e(t.child,i),i=(0,h.QB)(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=(0,h.QB)(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);r+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)r+=a.substring((0,h.sS)(i),(0,h.sS)((0,h.QB)(i,t.length)));else if(4===t.kind)for(const n of t.children)e(n,i),i=(0,h.QB)(i,n.length)}(o,h.Vp),r}(r,n);return a}},35173:function(e,t,i){"use strict";i.d(t,{GM:function(){return d},OA:function(){return u},pY:function(){return h},tN:function(){return g},zk:function(){return c}});var n=i(20187),s=i(35114),o=i(73755),r=i(62993),a=i(40393);const l=[];function c(){return l}class d{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new n.D7(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new a.Q(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function h(e,t){const i=new s.Cm,n=e.createDecorationsCollection();return i.add((0,o.zL)({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function u(e,t){return new r.y(e.lineNumber+t.lineNumber-1,1===t.lineNumber?e.column+t.column-1:t.column)}function g(e,t){return new r.y(e.lineNumber-t.lineNumber+1,e.lineNumber-t.lineNumber==0?e.column-t.column+1:e.column)}},95392:function(e,t,i){"use strict";var n=i(52694),s=i(49678),o=i(35114),r=i(73755),a=i(48905),l=i(62993),c=i(40393),d=i(41750),h=i(62067),u=i(10621),g=i(35173),p=i(51903);const f="inline-edit";let m=class extends o.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,r.FY)(this,!1),this.currentTextModel=(0,r.y0)(this,this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,r.un)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;let n=this.model.range?.read(e);n&&n.startLineNumber===n.endLineNumber&&n.startColumn===n.endColumn&&(n=void 0);const s=(!n||n.startLineNumber===n.endLineNumber)&&1===i.parts.length&&1===i.parts[0].lines.length,o=1===i.parts.length&&i.parts[0].lines.every((e=>0===e.length)),r=[],a=[];function l(e,t){if(a.length>0){const i=a[a.length-1];t&&i.decorations.push(new u.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)a.push({content:i,decorations:t?[new u.d(1,i.length+1,t,0)]:[]})}const c=t.getLineContent(i.lineNumber);let d,h=0;if(!o&&(s||!n)){for(const e of i.parts){let t=e.lines;n&&!s&&(l(t,f),t=[]),void 0===d?(r.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):l([c.substring(h,e.column-1)],void 0),t.length>0&&(l(t,f),void 0===d&&e.column<=c.length&&(d=e.column)),h=e.column-1}void 0!==d&&l([c.substring(h)],void 0)}const p=void 0!==d?new g.GM(d,c.length+1):void 0,m=s||!n?i.lineNumber:n.endLineNumber-1;return{inlineTexts:r,additionalLines:a,hiddenRange:p,lineNumber:m,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t,range:n,isSingleLine:s,isPureRemove:o}})),this.decorations=(0,r.un)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];if(t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),t.range){const e=[];if(t.isSingleLine)e.push(t.range);else if(!t.isPureRemove){const i=t.range.endLineNumber-t.range.startLineNumber;for(let n=0;n{this.isDisposed.set(!0,void 0)}))),this._register((0,g.pY)(this.editor,this.decorations))}};var _,v;m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(_=2,v=d.L,function(e,t){v(e,t,_)})],m);var b,w=i(97848),C=i(63619),y=i(35720),S=i(69122),k=i(76611),x=i(59046),L=i(21335),D=i(84201),E=i(15339),N=i(30981),I=i(97358),M=i(79783),T=i(42574),R=i(86051),P=i(93223),A=i(14280),O=i(87163),F=i(2727),B=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W=function(e,t){return function(i,n){t(i,n,e)}};let H=class extends o.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,r.y0)(this,this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(63).showToolbar)),this.sessionPosition=void 0,this.position=(0,r.un)(this,(e=>{const t=this.model.read(e)?.model.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||0===t.parts.length)return this.sessionPosition=void 0,null;const i=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);const n=new l.y(t.lineNumber,Math.min(i,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=n,n})),this._register((0,r.yC)(((t,i)=>{if(!this.model.read(t)||!this.alwaysShowToolbar.read(t))return;const n=i.add(this.instantiationService.createInstance(V,this.editor,!0,this.position));e.addContentWidget(n),i.add((0,o.s)((()=>e.removeContentWidget(n))))})))}};H=B([W(2,C._Y)],H);let V=class extends o.jG{static{b=this}static{this._dropDownVisible=!1}static{this.id=0}constructor(e,t,i,n,s,o){super(),this.editor=e,this.withBorder=t,this._position=i,this._contextKeyService=s,this._menuService=o,this.id="InlineEditHintsContentWidget"+b.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,D.h)("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[(0,D.h)("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(P.D8.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(n.createInstance(U,this.nodes.toolBar,this.editor,P.D8.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof P.Xe)return n.createInstance(z,e,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{b._dropDownVisible=e}))),this._register((0,r.fm)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,r.fm)((e=>{const t=[];for(const[e,i]of this.inlineCompletionsActionsMenus.getActions())for(const e of i)e instanceof P.Xe&&t.push(e);t.length>0&&t.unshift(new N.wv),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};V=b=B([W(3,C._Y),W(4,w.fN),W(5,P.ez)],V);class z extends T.oq{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,D.h)("div.keybinding").root;this._register(new E.x(t,M.OS,{disableTitle:!0,...E.l})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let U=class extends R.p{constructor(e,t,i,n,s,o,r,a,l,c){super(e,{resetMenu:i,...n},s,o,r,a,l,c),this.editor=t,this.menuId=i,this.options2=n,this.menuService=s,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this._store.add(this.editor.onDidChangeCursorPosition((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){const e=[],t=[];(0,T.Ot)(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setAdditionalSecondaryActions(e){(0,I.aI)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};U=B([W(4,P.ez),W(5,w.fN),W(6,A.Z),W(7,O.b),W(8,L.d),W(9,F.k)],U);var j,q,K=i(47901),$=i(20187),G=i(98018),Q=i(54244),Y=i(90072),Z=i(11797),X=i(41006),J=i(11521),ee=i(49079),te=i(59266),ie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ne=function(e,t){return function(i,n){t(i,n,e)}};function se(e){const t=e[0].match(/^\s*/)?.[0]??"",i=t.length;return{text:e.map((e=>e.replace(new RegExp("^"+t),""))),shift:i}}let oe=class extends o.jG{static{j=this}static{this._modelId=0}static _createUniqueUri(){return Q.r.from({scheme:"inline-edit-widget",path:(new Date).toString()+String(j._modelId++)})}constructor(e,t,i,n,s){super(),this._editor=e,this._model=t,this._instantiationService=i,this._diffProviderFactoryService=n,this._modelService=s,this._position=(0,r.un)(this,(e=>{const t=this._model.read(e);if(!t||0===t.text.length)return null;if(t.range.startLineNumber===t.range.endLineNumber&&(t.range.startColumn!==t.range.endColumn||1!==t.range.startColumn))return null;const i=this._editor.getModel();if(!i)return null;const n=Array.from(function*(e,t,i=1){void 0===t&&([t,e]=[e,0]);for(let n=e;ni.getLineLastNonWhitespaceColumn(e))),o=Math.max(...s),r=n[s.indexOf(o)],a=new l.y(r,o);return{top:t.range.startLineNumber,left:a}})),this._text=(0,r.un)(this,(e=>{const t=this._model.read(e);if(!t)return{text:"",shift:0};const i=se(t.text.split("\n"));return{text:i.text.join("\n"),shift:i.shift}})),this._originalModel=(0,G.a0)((()=>this._modelService.createModel("",null,j._createUniqueUri()))).keepObserved(this._store),this._modifiedModel=(0,G.a0)((()=>this._modelService.createModel("",null,j._createUniqueUri()))).keepObserved(this._store),this._diff=(0,r.un)(this,(e=>this._diffPromise.read(e)?.promiseResult.read(e)?.data)),this._diffPromise=(0,r.un)(this,(e=>{const t=this._model.read(e);if(!t)return;const i=this._editor.getModel();if(!i)return;const n=se(i.getValueInRange(t.range).split("\n")).text.join("\n"),s=se(t.text.split("\n")).text.join("\n");this._originalModel.get().setValue(n),this._modifiedModel.get().setValue(s);const o=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return r.BK.fromFn((async()=>{const e=await o.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},k.XO.None);if(!e.identical)return e.changes}))})),this._register((0,r.yC)(((t,i)=>{if(!this._model.read(t))return;if(null===this._position.get())return;const n=i.add(this._instantiationService.createInstance(re,this._editor,this._position,this._text.map((e=>e.text)),this._text.map((e=>e.shift)),this._diff));e.addOverlayWidget(n),i.add((0,o.s)((()=>e.removeOverlayWidget(n))))})))}};oe=j=ie([ne(2,C._Y),ne(3,X.Hg),ne(4,te.IModelService)],oe);let re=class extends o.jG{static{q=this}static{this.id=0}constructor(e,t,i,n,s,o){super(),this._editor=e,this._position=t,this._text=i,this._shift=n,this._diff=s,this._instantiationService=o,this.id="InlineEditSideBySideContentWidget"+q.id++,this.allowEditorOverflow=!1,this._nodes=(0,D.$)("div.inlineEditSideBySide",void 0),this._scrollChanged=(0,r.yQ)("editor.onDidScrollChange",this._editor.onDidScrollChange),this._previewEditor=this._register(this._instantiationService.createInstance(Z.t,this._nodes,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1,handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off",wrappingIndent:"none",wrappingStrategy:void 0},{contributions:[],isSimpleWidget:!0},this._editor)),this._previewEditorObs=(0,Y.Ud)(this._previewEditor),this._editorObs=(0,Y.Ud)(this._editor),this._previewTextModel=this._register(this._instantiationService.createInstance(ee.Bz,"",this._editor.getModel()?.getLanguageId()??J.vH,ee.Bz.DEFAULT_CREATION_OPTIONS,null)),this._setText=(0,r.un)((e=>{const t=this._text.read(e);t&&this._previewTextModel.setValue(t)})).recomputeInitiallyAndOnChange(this._store),this._decorations=(0,r.un)(this,(e=>{this._setText.read(e);const t=this._position.read(e);if(!t)return{org:[],mod:[]};const i=this._diff.read(e);if(!i)return{org:[],mod:[]};const n=[],s=[];if(1===i.length&&i[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return{org:[],mod:[]};const o=this._shift.get(),r=e=>new c.Q(e.startLineNumber+t.top-1,e.startColumn+o,e.endLineNumber+t.top-1,e.endColumn+o);for(const e of i)if(e.original.isEmpty||n.push({range:r(e.original.toInclusiveRange()),options:p.Ob}),e.modified.isEmpty||s.push({range:e.modified.toInclusiveRange(),options:p.Kl}),e.modified.isEmpty||e.original.isEmpty)e.original.isEmpty||n.push({range:r(e.original.toInclusiveRange()),options:p.KL}),e.modified.isEmpty||s.push({range:e.modified.toInclusiveRange(),options:p.Ou});else for(const t of e.innerChanges||[])e.original.contains(t.originalRange.startLineNumber)&&n.push({range:r(t.originalRange),options:t.originalRange.isEmpty()?p.wp:p.Zb}),e.modified.contains(t.modifiedRange.startLineNumber)&&s.push({range:t.modifiedRange,options:t.modifiedRange.isEmpty()?p.GM:p.bk});return{org:n,mod:s}})),this._originalDecorations=(0,r.un)(this,(e=>this._decorations.read(e).org)),this._modifiedDecorations=(0,r.un)(this,(e=>this._decorations.read(e).mod)),this._previewEditor.setModel(this._previewTextModel),this._register(this._editorObs.setDecorations(this._originalDecorations)),this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)),this._register((0,r.fm)((e=>{const t=this._previewEditorObs.contentWidth.read(e),i=this._text.read(e).split("\n").length-1,n=this._editor.getOption(67)*i;t<=0||this._previewEditor.layout({height:n,width:t})}))),this._register((0,r.fm)((e=>{this._position.read(e),this._editor.layoutOverlayWidget(this)}))),this._register((0,r.fm)((e=>{this._scrollChanged.read(e),this._position.read(e)&&this._editor.layoutOverlayWidget(this)})))}getId(){return this.id}getDomNode(){return this._nodes}getPosition(){const e=this._position.get();if(!e)return null;const t=this._editor.getLayoutInfo(),i=this._editor.getScrolledVisiblePosition(new l.y(e.top,1));if(!i)return null;const n=i.top-1,s=this._editor.getOffsetForColumn(e.left.lineNumber,e.left.column);return{preference:{left:t.contentLeft+s+10,top:n}}}};re=q=ie([ne(5,C._Y)],re);var ae,le=function(e,t){return function(i,n){t(i,n,e)}};let ce=class extends o.jG{static{ae=this}static{this.ID="editor.contrib.inlineEditController"}static{this.inlineEditVisibleKey="inlineEditVisible"}static{this.inlineEditVisibleContext=new w.N1(this.inlineEditVisibleKey,!1)}static{this.cursorAtInlineEditKey="cursorAtInlineEdit"}static{this.cursorAtInlineEditContext=new w.N1(this.cursorAtInlineEditKey,!1)}static get(e){return e.getContribution(ae.ID)}constructor(e,t,i,n,s,o,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.languageFeaturesService=n,this._commandService=s,this._configurationService=o,this._diffProviderFactoryService=a,this._modelService=l,this._isVisibleContext=ae.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=ae.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=(0,r.FY)(this,void 0),this._currentWidget=(0,G.a0)(this._currentEdit,(e=>{const t=this._currentEdit.read(e);if(!t)return;const i=t.range.endLineNumber,n=t.range.endColumn,s=!t.text.endsWith("\n")||t.range.startLineNumber===t.range.endLineNumber&&t.range.startColumn===t.range.endColumn?t.text:t.text.slice(0,-1),o=new x.xD(i,[new x.yP(n,s,!1)]),a=t.range.startLineNumber===t.range.endLineNumber&&1===o.parts.length&&1===o.parts[0].lines.length,l=""===t.text;return a||l?this.instantiationService.createInstance(m,this.editor,{ghostText:(0,r.lk)(o),minReservedLineCount:(0,r.lk)(0),targetTextModel:(0,r.lk)(this.editor.getModel()??void 0),range:(0,r.lk)(t.range)}):void 0})),this._isAccepting=(0,r.FY)(this,!1),this._enabled=(0,r.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).enabled)),this._fontFamily=(0,r.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).fontFamily));const c=(0,r.yQ)("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register((0,r.fm)((t=>{this._enabled.read(t)&&(c.read(t),this._isAccepting.read(t)||this.getInlineEdit(e,!0))})));const d=(0,r.y0)(this,e.onDidChangeCursorPosition,(()=>e.getPosition()));this._register((0,r.fm)((e=>{if(!this._enabled.read(e))return;const t=d.read(e);t&&this.checkCursorPosition(t)}))),this._register((0,r.fm)((t=>{const i=this._currentEdit.read(t);if(this._isCursorAtInlineEditContext.set(!1),!i)return void this._isVisibleContext.set(!1);this._isVisibleContext.set(!0);const n=e.getPosition();n&&this.checkCursorPosition(n)})));const h=(0,r.yQ)("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register((0,r.fm)((async t=>{this._enabled.read(t)&&(h.read(t),this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur||(this._currentRequestCts?.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))})));const u=(0,r.yQ)("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register((0,r.fm)((t=>{this._enabled.read(t)&&(u.read(t),this.getInlineEdit(e,!0))})));const g=this._register((0,D.jh)());this._register((0,r.fm)((e=>{const t=this._fontFamily.read(e);g.setStyle(""===t||"default"===t?"":`\n.monaco-editor .inline-edit-decoration,\n.monaco-editor .inline-edit-decoration-preview,\n.monaco-editor .inline-edit {\n\tfont-family: ${t};\n}`)}))),this._register(new H(this.editor,this._currentWidget,this.instantiationService)),this._register(new oe(this.editor,this._currentEdit,this.instantiationService,this._diffProviderFactoryService,this._modelService))}checkCursorPosition(e){if(!this._currentEdit)return void this._isCursorAtInlineEditContext.set(!1);const t=this._currentEdit.get();t?this._isCursorAtInlineEditContext.set(c.Q.containsPosition(t.range,e)):this._isCursorAtInlineEditContext.set(!1)}validateInlineEdit(e,t){if(t.text.includes("\n")&&t.range.startLineNumber!==t.range.endLineNumber&&t.range.startColumn!==t.range.endColumn){if(1!==t.range.startColumn)return!1;const i=t.range.endLineNumber;if(t.range.endColumn!==(e.getModel()?.getLineLength(i)??0)+1)return!1}return!0}async fetchInlineEdit(e,t){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const i=e.getModel();if(!i)return;const n=i.getVersionId(),s=this.languageFeaturesService.inlineEditProvider.all(i);if(0===s.length)return;const o=s[0];this._currentRequestCts=new k.Qi;const r=this._currentRequestCts.token,a=t?y.sm.Automatic:y.sm.Invoke;var l;if(t&&await(l=r,new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),50);l&&(t=l.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))}))),r.isCancellationRequested||i.isDisposed()||i.getVersionId()!==n)return;const c=await o.provideInlineEdit(i,{triggerKind:a},r);return c&&!r.isCancellationRequested&&!i.isDisposed()&&i.getVersionId()===n&&this.validateInlineEdit(e,c)?c:void 0}async getInlineEdit(e,t){this._isCursorAtInlineEditContext.set(!1),await this.clear();const i=await this.fetchInlineEdit(e,t);i&&this._currentEdit.set(i,void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){this._isAccepting.set(!0,void 0);const e=this._currentEdit.get();if(!e)return;let t=e.text;e.text.startsWith("\n")&&(t=e.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[a.k.replace(c.Q.lift(e.range),t)]),e.accepted&&await this._commandService.executeCommand(e.accepted.id,...e.accepted.arguments||[]).then(void 0,$.M_),this.freeEdit(e),(0,r.Rn)((e=>{this._currentEdit.set(void 0,e),this._isAccepting.set(!1,e)}))}jumpToCurrent(){this._jumpBackPosition=this.editor.getSelection()?.getStartPosition();const e=this._currentEdit.get();if(!e)return;const t=l.y.lift({lineNumber:e.range.startLineNumber,column:e.range.startColumn});this.editor.setPosition(t),this.editor.revealPositionInCenterIfOutsideViewport(t)}async clear(e=!0){const t=this._currentEdit.get();t&&t?.rejected&&e&&await this._commandService.executeCommand(t.rejected.id,...t.rejected.arguments||[]).then(void 0,$.M_),t&&this.freeEdit(t),this._currentEdit.set(void 0,void 0)}freeEdit(e){const t=this.editor.getModel();if(!t)return;const i=this.languageFeaturesService.inlineEditProvider.all(t);0!==i.length&&i[0].freeInlineEdit(e)}};ce=ae=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([le(1,C._Y),le(2,w.fN),le(3,S.ILanguageFeaturesService),le(4,L.d),le(5,K.pG),le(6,X.Hg),le(7,te.IModelService)],ce);class de extends n.ks{constructor(){super({id:"editor.action.inlineEdit.accept",label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:w.M$.and(s.R.writable,ce.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:w.M$.and(s.R.writable,ce.inlineEditVisibleContext,ce.cursorAtInlineEditContext)}],menuOpts:[{menuId:P.D8.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,t){const i=ce.get(t);await(i?.accept())}}class he extends n.ks{constructor(){const e=w.M$.and(s.R.writable,w.M$.not(ce.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,t){const i=ce.get(t);i?.trigger()}}class ue extends n.ks{constructor(){const e=w.M$.and(s.R.writable,ce.inlineEditVisibleContext,w.M$.not(ce.cursorAtInlineEditKey));super({id:"editor.action.inlineEdit.jumpTo",label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:P.D8.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,t){const i=ce.get(t);i?.jumpToCurrent()}}class ge extends n.ks{constructor(){const e=w.M$.and(s.R.writable,ce.cursorAtInlineEditContext);super({id:"editor.action.inlineEdit.jumpBack",label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:P.D8.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,t){const i=ce.get(t);i?.jumpBack()}}class pe extends n.ks{constructor(){const e=w.M$.and(s.R.writable,ce.inlineEditVisibleContext);super({id:"editor.action.inlineEdit.reject",label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:P.D8.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,t){const i=ce.get(t);await(i?.clear())}}(0,n.Fl)(de),(0,n.Fl)(pe),(0,n.Fl)(ue),(0,n.Fl)(ge),(0,n.Fl)(he),(0,n.HW)(ce.ID,ce,3)},91720:function(e,t,i){"use strict";var n=i(52694),s=i(93231),o=i(73755),r=i(1878),a=i(11797),l=i(49678),c=i(14374),d=i(97848);const h=new d.N1("inlineEditsVisible",!1,(0,c.kg)("inlineEditsVisible","Whether an inline edit is visible")),u=new d.N1("inlineEditsIsPinned",!1,(0,c.kg)("isPinned","Whether an inline edit is visible"));var g=i(35114),p=i(98018),f=i(90072),m=i(64523),_=i(56218),v=i(82688),b=i(69122),w=i(90890),C=i(76611),y=i(57981),S=i(20187),k=i(54244),x=i(41006),L=i(80487),D=i(35720),E=i(59266),N=i(33597),I=i(84201),M=i(39159),T=i(51903),R=i(72540),P=i(11521),A=i(49079),O=i(1452),F=i(36206),B=i(6503),W=i(63619);class H{constructor(e,t,i){this.range=e,this.newLines=t,this.changes=i}}let V=class extends g.jG{constructor(e,t,i,s){super(),this._editor=e,this._edit=t,this._userPrompt=i,this._instantiationService=s,this._editorObs=(0,f.Ud)(this._editor),this._elements=(0,I.h)("div.inline-edits-widget",{style:{position:"absolute",overflow:"visible",top:"0px",left:"0px"}},[(0,I.h)("div@editorContainer",{style:{position:"absolute",top:"0px",left:"0px",width:"500px",height:"500px"}},[(0,I.h)("div.toolbar@toolbar",{style:{position:"absolute",top:"-25px",left:"0px"}}),(0,I.h)("div.promptEditor@promptEditor",{style:{position:"absolute",top:"-25px",left:"80px",width:"300px",height:"22px"}}),(0,I.h)("div.preview@editor",{style:{position:"absolute",top:"0px",left:"0px"}})]),(0,I.Mc)("svg",{style:{overflow:"visible",pointerEvents:"none"}},[(0,I.Mc)("defs",[(0,I.Mc)("linearGradient",{id:"Gradient2",x1:"0",y1:"0",x2:"1",y2:"0"},[(0,I.Mc)("stop",{offset:"0%",class:"gradient-stop"}),(0,I.Mc)("stop",{offset:"100%",class:"gradient-stop"})])]),(0,I.Mc)("path@path",{d:"",fill:"url(#Gradient2)"})])]),this._previewTextModel=this._register(this._instantiationService.createInstance(A.Bz,"",P.vH,A.Bz.DEFAULT_CREATION_OPTIONS,null)),this._setText=(0,o.un)((e=>{const t=this._edit.read(e);t&&this._previewTextModel.setValue(t.newLines.join("\n"))})).recomputeInitiallyAndOnChange(this._store),this._promptTextModel=this._register(this._instantiationService.createInstance(A.Bz,"",P.vH,A.Bz.DEFAULT_CREATION_OPTIONS,null)),this._promptEditor=this._register(this._instantiationService.createInstance(a.t,this._elements.promptEditor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,placeholder:"Describe the change you want...",fontFamily:M.z},{contributions:n.dS.getSomeEditorContributions([B.D.ID,F.X.ID,O.d.ID]),isSimpleWidget:!0},this._editor)),this._previewEditor=this._register(this._instantiationService.createInstance(a.t,this._elements.editor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0},{contributions:[]},this._editor)),this._previewEditorObs=(0,f.Ud)(this._previewEditor),this._decorations=(0,o.un)(this,(e=>{this._setText.read(e);const t=this._edit.read(e)?.changes;if(!t)return[];const i=[],n=[];if(1===t.length&&t[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return[];for(const e of t)if(e.original.isEmpty||i.push({range:e.original.toInclusiveRange(),options:T.Ob}),e.modified.isEmpty||n.push({range:e.modified.toInclusiveRange(),options:T.Kl}),e.modified.isEmpty||e.original.isEmpty)e.original.isEmpty||i.push({range:e.original.toInclusiveRange(),options:T.KL}),e.modified.isEmpty||n.push({range:e.modified.toInclusiveRange(),options:T.Ou});else for(const t of e.innerChanges||[])e.original.contains(t.originalRange.startLineNumber)&&i.push({range:t.originalRange,options:t.originalRange.isEmpty()?T.wp:T.Zb}),e.modified.contains(t.modifiedRange.startLineNumber)&&n.push({range:t.modifiedRange,options:t.modifiedRange.isEmpty()?T.GM:T.bk});return n})),this._layout1=(0,o.un)(this,(e=>{const t=this._editor.getModel(),i=this._edit.read(e);if(!i)return null;const n=i.range;let s=0;for(let e=n.startLineNumber;e{const t=this._edit.read(e);if(!t)return null;const i=t.range,n=this._editorObs.scrollLeft.read(e),s=this._layout1.read(e).left+20-n,o=this._editor.getTopForLineNumber(i.startLineNumber)-this._editorObs.scrollTop.read(e),r=this._editor.getTopForLineNumber(i.endLineNumberExclusive)-this._editorObs.scrollTop.read(e),a=new j(s,o),l=new j(s,r),c=r-o,d=this._editor.getOption(67)*t.newLines.length,h=c-d;return{topCode:a,bottomCode:l,codeHeight:c,topEdit:new j(s+50,o+h/2),bottomEdit:new j(s+50,r-h/2),editHeight:d}}));const r=(0,o.un)(this,(e=>void 0!==this._edit.read(e)||void 0!==this._userPrompt.read(e)));var l,c;this._register((0,R.AV)(this._elements.root,{display:(0,o.un)(this,(e=>r.read(e)?"block":"none"))})),this._register((0,R.rX)(this._editor.getDomNode(),this._elements.root)),this._register((0,f.Ud)(e).createOverlayWidget({domNode:this._elements.root,position:(0,o.lk)(null),allowEditorOverflow:!1,minContentWidthInPx:(0,o.un)((e=>{const t=this._layout1.read(e)?.left;return void 0===t?0:t+this._previewEditorObs.contentWidth.read(e)}))})),this._previewEditor.setModel(this._previewTextModel),this._register(this._previewEditorObs.setDecorations(this._decorations)),this._register((0,o.fm)((e=>{const t=this._layout.read(e);if(!t)return;const{topCode:i,bottomCode:n,topEdit:s,bottomEdit:o,editHeight:r}=t,a=(new q).moveTo(i).lineTo(i.deltaX(10)).curveTo(i.deltaX(50),s.deltaX(-40),s.deltaX(-0)).lineTo(s).lineTo(o).lineTo(o.deltaX(-0)).curveTo(o.deltaX(-40),n.deltaX(50),n.deltaX(10)).lineTo(n).build();this._elements.path.setAttribute("d",a),this._elements.editorContainer.style.top=`${s.y}px`,this._elements.editorContainer.style.left=`${s.x}px`,this._elements.editorContainer.style.height=`${r}px`;const l=this._previewEditorObs.contentWidth.read(e);this._previewEditor.layout({height:r,width:l})}))),this._promptEditor.setModel(this._promptTextModel),this._promptEditor.layout(),this._register(function(e,t){const i=new g.Cm;return i.add((0,o.fm)((i=>{const n=e.read(i);t.set(n,void 0)}))),i.add((0,o.fm)((i=>{const n=t.read(i);e.set(n,void 0)}))),i}((l=this._userPrompt,c=e=>e??"",(0,p.dQ)(void 0,(e=>c(l.read(e))),((e,t)=>l.set(e,t)))),(0,f.Ud)(this._promptEditor).value)),this._register((0,o.fm)((e=>{const t=(0,f.Ud)(this._promptEditor).isFocused.read(e);this._elements.root.classList.toggle("focused",t)})))}};var z,U;V=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(z=3,U=W._Y,function(e,t){U(e,t,z)})],V);class j{constructor(e,t){this.x=e,this.y=t}deltaX(e){return new j(this.x+e,this.y)}}class q{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}curveTo(e,t,i){return this._data+=`C ${e.x} ${e.y} ${t.x} ${t.y} ${i.x} ${i.y} `,this}build(){return this._data}}var K,$=function(e,t){return function(i,n){t(i,n,e)}};let G=class extends g.jG{static{K=this}static{this._modelId=0}static _createUniqueUri(){return k.r.from({scheme:"inline-edits",path:(new Date).toString()+String(K._modelId++)})}constructor(e,t,i,n,s,r,a){super(),this.textModel=e,this._textModelVersionId=t,this._selection=i,this._debounceValue=n,this.languageFeaturesService=s,this._diffProviderFactoryService=r,this._modelService=a,this._forceUpdateExplicitlySignal=(0,o.Yd)(this),this._selectedInlineCompletionId=(0,o.FY)(this,void 0),this._isActive=(0,o.FY)(this,!1),this._originalModel=(0,p.a0)((()=>this._modelService.createModel("",null,K._createUniqueUri()))).keepObserved(this._store),this._modifiedModel=(0,p.a0)((()=>this._modelService.createModel("",null,K._createUniqueUri()))).keepObserved(this._store),this._pinnedRange=new Y(this.textModel,this._textModelVersionId),this.isPinned=this._pinnedRange.range.map((e=>!!e)),this.userPrompt=(0,o.FY)(this,void 0),this.inlineEdit=(0,o.un)(this,(e=>this._inlineEdit.read(e)?.promiseResult.read(e)?.data)),this._inlineEdit=(0,o.un)(this,(e=>{const t=this.selectedInlineEdit.read(e);if(!t)return;const i=t.inlineCompletion.range;if(""===t.inlineCompletion.insertText.trim())return;let n=t.inlineCompletion.insertText.split(/\r\n|\r|\n/);function s(e){const t=e[0].match(/^\s*/)?.[0]??"";return e.map((e=>e.replace(new RegExp("^"+t),"")))}n=s(n);let r=this.textModel.getValueInRange(i).split(/\r\n|\r|\n/);r=s(r),this._originalModel.get().setValue(r.join("\n")),this._modifiedModel.get().setValue(n.join("\n"));const a=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return o.BK.fromFn((async()=>{const e=await a.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},C.XO.None);if(!e.identical)return new H(L.M.fromRangeInclusive(i),s(n),e.changes)}))})),this._fetchStore=this._register(new g.Cm),this._inlineEditsFetchResult=(0,o.X2)(this,void 0),this._inlineEdits=(0,o.C)({owner:this,equalsFn:y.dB},(e=>this._inlineEditsFetchResult.read(e)?.completions.map((e=>new Q(e)))??[])),this._fetchInlineEditsPromise=(0,o.nb)({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:D.qw.Automatic}),handleChange:(e,t)=>(e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=D.qw.Explicit),!0)},(async(e,t)=>{this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(e),this._textModelVersionId.read(e);const i=this._pinnedRange.range.read(e)??(s=this._selection.read(e),(n=s).isEmpty()?void 0:n);var n,s;if(!i)return this._inlineEditsFetchResult.set(void 0,void 0),void this.userPrompt.set(void 0,void 0);const o={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(e)},r=(0,C.bs)(this._fetchStore);await(0,w.wR)(200,r);const a=await(0,N.Yk)(this.languageFeaturesService.inlineCompletionsProvider,i,this.textModel,o,r);r.isCancellationRequested||this._inlineEditsFetchResult.set(a,void 0)})),this._filteredInlineEditItems=(0,o.C)({owner:this,equalsFn:(0,y.S3)()},(e=>this._inlineEdits.read(e))),this.selectedInlineCompletionIndex=(0,o.un)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineEditItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineEdit=(0,o.un)(this,(e=>this._filteredInlineEditItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this._register((0,o.OI)(this._fetchInlineEditsPromise))}async triggerExplicitly(e){(0,o.PO)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineEditsPromise.get()}stop(e){(0,o.PO)(e,(e=>{this.userPrompt.set(void 0,e),this._isActive.set(!1,e),this._inlineEditsFetchResult.set(void 0,e),this._pinnedRange.setRange(void 0,e)}))}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineEditItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new S.D7;const t=this.selectedInlineEdit.get();t&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[t.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}};G=K=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([$(4,b.ILanguageFeaturesService),$(5,x.Hg),$(6,E.IModelService)],G);class Q{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}}class Y extends g.jG{constructor(e,t){super(),this._textModel=e,this._versionId=t,this._decorations=(0,o.FY)(this,[]),this.range=(0,o.un)(this,(e=>{this._versionId.read(e);const t=this._decorations.read(e)[0];return t?this._textModel.getDecorationRange(t)??null:null})),this._register((0,g.s)((()=>{this._textModel.deltaDecorations(this._decorations.get(),[])})))}setRange(e,t){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),t)}}var Z,X=i(47901),J=i(74827),ee=function(e,t){return function(i,n){t(i,n,e)}};let te=class extends g.jG{static{Z=this}static{this.ID="editor.contrib.inlineEditsController"}static get(e){return e.getContribution(Z.ID)}constructor(e,t,i,n,s,r){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._debounceService=n,this._languageFeaturesService=s,this._configurationService=r,this._enabled=(0,J.V)("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=(0,f.Ud)(this.editor),this._selection=(0,o.un)(this,(e=>this._editorObs.cursorSelection.read(e)??new _.L(1,1,1,1))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=(0,p.a0)(this,(e=>{if(!this._enabled.read(e))return;if(this._editorObs.isReadonly.read(e))return;const t=this._editorObs.model.read(e);return t?this._instantiationService.createInstance((0,m.b)(G,e),t,this._editorObs.versionId,this._selection,this._debounceValue):void 0})),this._hadInlineEdit=(0,o.ZX)(this,((e,t)=>t||void 0!==this.model.read(e)?.inlineEdit.read(e))),this._widget=(0,p.a0)(this,(e=>{var t;if(this._hadInlineEdit.read(e))return this._instantiationService.createInstance((0,m.b)(V,e),this.editor,this.model.map(((e,t)=>e?.inlineEdit.read(t))),(t=e=>this.model.read(e)?.userPrompt??(0,o.FY)("empty",""),(0,p.dQ)(void 0,(e=>t(e).read(e)),((e,i)=>{t(void 0).set(e,i)}))))})),this._register((0,J.w)(h,this._contextKeyService,(e=>!!this.model.read(e)?.inlineEdit.read(e)))),this._register((0,J.w)(u,this._contextKeyService,(e=>!!this.model.read(e)?.isPinned.read(e)))),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}};te=Z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ee(1,W._Y),ee(2,d.fN),ee(3,v.ILanguageFeatureDebounceService),ee(4,b.ILanguageFeaturesService),ee(5,X.pG)],te);var ie=i(93223);function ne(e){return{label:e.value,alias:e.original}}class se extends n.ks{static{this.ID="editor.action.inlineEdits.showNext"}constructor(){super({id:se.ID,...ne(c.aS("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:d.M$.and(l.R.writable,h),kbOpts:{weight:100,primary:606}})}async run(e,t){const i=te.get(t);i?.model.get()?.next()}}class oe extends n.ks{static{this.ID="editor.action.inlineEdits.showPrevious"}constructor(){super({id:oe.ID,...ne(c.aS("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:d.M$.and(l.R.writable,h),kbOpts:{weight:100,primary:604}})}async run(e,t){const i=te.get(t);i?.model.get()?.previous()}}class re extends n.ks{constructor(){super({id:"editor.action.inlineEdits.trigger",...ne(c.aS("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:l.R.writable})}async run(e,t){const i=te.get(t);await(0,r.fL)((async e=>{await(i?.model.get()?.triggerExplicitly(e))}))}}class ae extends n.ks{constructor(){super({id:"editor.action.inlineEdits.accept",...ne(c.aS("action.inlineEdits.accept","Accept Inline Edit")),precondition:h,menuOpts:{menuId:ie.D8.InlineEditsActions,title:c.kg("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:s.W.check},kbOpts:{primary:2058,weight:2e4,kbExpr:h}})}async run(e,t){t instanceof a.t&&(t=t.getParentEditor());const i=te.get(t);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}class le extends n.ks{static{this.ID="editor.action.inlineEdits.hide"}constructor(){super({id:le.ID,...ne(c.aS("action.inlineEdits.hide","Hide Inline Edit")),precondition:h,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=te.get(t);(0,o.Rn)((e=>{i?.model.get()?.stop(e)}))}}(0,n.HW)(te.ID,te,3),(0,n.Fl)(re),(0,n.Fl)(se),(0,n.Fl)(oe),(0,n.Fl)(ae),(0,n.Fl)(le)},57972:function(e,t,i){"use strict";i.d(t,{I:function(){return p}});var n=i(84201),s=i(90890),o=i(93231),r=i(35114),a=i(43920),l=i(56613),c=i(40393),d=i(49079),h=i(63619);const u=d.kI.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:a.S8,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class g extends r.jG{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=n.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=n.$("span.icon");this.domNode.append(t),t.classList.add(...l.L.asClassNameArray(o.W.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(67);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(52)||e.hasChanged(67))&&i()}))),this._register(n.ko(this.domNode,n.Bx.CLICK,(e=>{this.delegate.cancel()})))}getId(){return g.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}let p=class extends r.jG{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new r.HE),this._currentWidget=this._register(new r.HE),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,n,o){const r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=(0,s.EQ)((()=>{const i=c.Q.fromPositions(e);this._currentDecorations.set([{range:i,options:u}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(g,this.id,this._editor,i,t,n))}),o??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};var f,m;p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(f=2,m=h._Y,function(e,t){m(e,t,f)})],p)},37052:function(e,t,i){"use strict";var n=i(52694),s=i(66092),o=i(49678),r=i(14374);class a extends n.ks{constructor(){super({id:"expandLineSelection",label:r.kg("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:o.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,s.c.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(i.source,!0)}}(0,n.Fl)(a)},23982:function(e,t,i){"use strict";var n=i(62167),s=i(34157),o=i(52694),r=i(24608),a=i(43920),l=i(48905),c=i(40393);class d{constructor(e,t,i){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,t){const i=function(e,t,i){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);const n=[];let s=0,o=0;const r=t.length;for(let d=1,h=e.getLineCount();d<=h;d++){const h=e.getLineContent(d),u=h.length+1;let g=0;if(oe.getLanguageId(),n=(t,i)=>e.getLanguageIdAtPosition(t,i),s=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===s)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let o=this._selection;o.startLineNumbert===o.startLineNumber?e.tokenization.getLineTokens(s):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?e.getLineContent(s):e.getLineContent(t)},c=(0,C.$f)(this._autoIndent,t,e.getLanguageIdAtPosition(s,1),o.startLineNumber,h,this._languageConfigurationService);if(null!==c){const t=a.UU(e.getLineContent(s)),i=w.c(c,r);if(i!==w.c(t,r)){const e=w.k(i,r,d);u=e+this.trimStart(l)}}}t.addEditOperation(new c.Q(o.startLineNumber,1,o.startLineNumber,1),u+"\n");const p=this.matchEnterRuleMovingDown(e,h,r,o.startLineNumber,s,u);if(null!==p)0!==p&&this.getIndentEditsOfMovingBlock(e,t,o,r,d,p);else{const l={tokenization:{getLineTokens:t=>t===o.startLineNumber?e.tokenization.getLineTokens(s):t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.tokenization.getLineTokens(t-1):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?u:t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)},c=(0,C.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(s,1),o.startLineNumber+1,h,this._languageConfigurationService);if(null!==c){const i=a.UU(e.getLineContent(o.startLineNumber)),n=w.c(c,r),s=w.c(i,r);if(n!==s){const i=n-s;this.getIndentEditsOfMovingBlock(e,t,o,r,d,i)}}}}else t.addEditOperation(new c.Q(o.startLineNumber,1,o.startLineNumber,1),u+"\n")}else if(s=o.startLineNumber-1,l=e.getLineContent(s),t.addEditOperation(new c.Q(s,1,s+1,1),null),t.addEditOperation(new c.Q(o.endLineNumber,e.getLineMaxColumn(o.endLineNumber),o.endLineNumber,e.getLineMaxColumn(o.endLineNumber)),"\n"+l),this.shouldAutoIndent(e,o)){const l={tokenization:{getLineTokens:t=>t===s?e.tokenization.getLineTokens(o.startLineNumber):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s?e.getLineContent(o.startLineNumber):e.getLineContent(t)},c=this.matchEnterRule(e,h,r,o.startLineNumber,o.startLineNumber-2);if(null!==c)0!==c&&this.getIndentEditsOfMovingBlock(e,t,o,r,d,c);else{const i=(0,C.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(o.startLineNumber,1),s,h,this._languageConfigurationService);if(null!==i){const n=a.UU(e.getLineContent(o.startLineNumber)),s=w.c(i,r),l=w.c(n,r);if(s!==l){const i=s-l;this.getIndentEditsOfMovingBlock(e,t,o,r,d,i)}}}}}this._selectionId=t.trackSelection(o)}buildIndentConverter(e,t,i){return{shiftIndent:n=>_.Y.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>_.Y.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===v.l.None||s.indentAction===v.l.Indent?o=s.indentation+s.appendText:s.indentAction===v.l.IndentOutdent?o=s.indentation:s.indentAction===v.l.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(o))>=0){const s=a.UU(e.getLineContent(n));let r=a.UU(o);const l=(0,C.Yb)(e,n,this._languageConfigurationService);return null!==l&&2&l&&(r=t.unshiftIndent(r)),w.c(r,i)-w.c(s,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(a.lT(o)>=0){const o=e.getLineMaxColumn(s),r=(0,y.h)(this._autoIndent,e,new c.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let s=n-1;for(;s>=1;){const t=e.getLineContent(s);if(a.lT(t)>=0)break;s--}if(s<1||n>e.getLineCount())return null;const o=e.getLineMaxColumn(s),r=(0,y.h)(this._autoIndent,e,new c.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,s,o){let r=s;for(;r>=1;){let t;if(t=r===s&&void 0!==o?o:e.getLineContent(r),a.lT(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(r),d=(0,y.h)(this._autoIndent,e,new c.Q(r,l,r,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const l=e.getLineContent(r),d=a.UU(l),h=w.c(d,n)+o,u=w.k(h,n,s);u!==d&&(t.addEditOperation(new c.Q(r,1,r,d.length+1),u),r===i.endLineNumber&&i.endColumn<=d.length+1&&""===u&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(k=3,x=b.JZ,function(e,t){x(e,t,k)})],S);class L{static{this._COLLATOR=null}static getCollator(){return L._COLLATOR||(L._COLLATOR=new Intl.Collator),L._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){const i=function(e,t,i){const n=D(e,t,i);return n?l.k.replace(new c.Q(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;const n=D(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e=s)return null;const o=[];for(let t=n;t<=s;t++)o.push(e.getLineContent(t));let r=o.slice(0);return r.sort(L.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:s,before:o,after:r}}var E=i(14374),N=i(93223),I=i(47901);class M extends o.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>c.Q.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;enew g.y(e.positionLineNumber,e.positionColumn))));const s=t.getSelection();if(null===s)return;const o=e.get(I.pG),r=t.getModel(),a=o.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:r?.getLanguageId(),resource:r?.uri}),l=new d(s,n,a);t.pushUndoStop(),t.executeCommands(this.id,[l]),t.pushUndoStop()}}class F extends o.ks{constructor(){super({id:"editor.action.deleteLines",label:E.kg("lines.delete","Delete Line"),alias:"Delete Line",precondition:f.R.writable,kbOpts:{kbExpr:f.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let s=0;const o=[],r=[];for(let e=0,t=i.length;e1&&(a-=1,d=n.getLineMaxColumn(a)),o.push(l.k.replace(new p.L(a,d,c,h),"")),r.push(new p.L(a-s,t.positionColumn,a-s,t.positionColumn)),s+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class B extends o.ks{constructor(){super({id:"editor.action.indentLines",label:E.kg("lines.indent","Indent Line"),alias:"Indent Line",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,h.T.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class W extends o.ks{constructor(){super({id:"editor.action.outdentLines",label:E.kg("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:2140,weight:100}})}run(e,t){s.Yh.Outdent.runEditorCommand(e,t,null)}}class H extends o.ks{constructor(){super({id:"editor.action.insertLineBefore",label:E.kg("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,u.AO.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class V extends o.ks{constructor(){super({id:"editor.action.insertLineAfter",label:E.kg("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,u.AO.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class z extends o.ks{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let e=0,t=n.length-1;el.k.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}}class U extends o.ks{constructor(){super({id:"editor.action.joinLines",label:E.kg("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(c.Q.compareRangesUsingStarts);const s=[],o=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(s.push(e),t):new p.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(s.push(e),t):new p.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));s.push(o);const r=t.getModel();if(null===r)return;const a=[],d=[];let h=n,u=0;for(let e=0,t=s.length;e=1){let e=!0;""===v&&(e=!1),!e||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(e=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));const n=t.substr(i-1);v+=(e?" ":"")+n,m=e?n.length+1:n.length}else m=0}const b=new c.Q(i,o,g,f);if(!b.isEmpty()){let e;t.isEmpty()?(a.push(l.k.replace(b,v)),e=new p.L(b.startLineNumber-u,v.length-m+1,i-u,v.length-m+1)):t.startLineNumber===t.endLineNumber?(a.push(l.k.replace(b,v)),e=new p.L(t.startLineNumber-u,t.startColumn,t.endLineNumber-u,t.endColumn)):(a.push(l.k.replace(b,v)),e=new p.L(t.startLineNumber-u,t.startColumn,t.startLineNumber-u,v.length-_)),null!==c.Q.intersectRanges(b,n)?h=e:d.push(e)}u+=b.endLineNumber-b.startLineNumber}d.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,d),t.pushUndoStop()}}class j extends o.ks{constructor(){super({id:"editor.action.transpose",label:E.kg("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:f.R.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const s=[];for(let e=0,t=i.length;e=a){if(o.lineNumber===n.getLineCount())continue;const e=new c.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new r.iu(new p.L(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t))}else{const e=new c.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber,o.column+1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new r.ui(e,t,new p.L(o.lineNumber,o.column+1,o.lineNumber,o.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class q extends o.ks{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const s=t.getOption(132),o=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;const a=new c.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),d=n.getValueInRange(a);o.push(l.k.replace(a,this._modifyText(d,s)))}else{const t=n.getValueInRange(e);o.push(l.k.replace(e,this._modifyText(t,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class K{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class $ extends q{static{this.titleBoundary=new K("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:E.kg("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:f.R.writable})}_modifyText(e,t){const i=$.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}class G extends q{static{this.caseBoundary=new K("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new K("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:E.kg("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:f.R.writable})}_modifyText(e,t){const i=G.caseBoundary.get(),n=G.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}class Q extends q{static{this.wordBoundary=new K("[_\\s-]","gm")}constructor(){super({id:"editor.action.transformToCamelcase",label:E.kg("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:f.R.writable})}_modifyText(e,t){const i=Q.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}class Y extends q{static{this.wordBoundary=new K("[_\\s-]","gm")}static{this.wordBoundaryToMaintain=new K("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:E.kg("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:f.R.writable})}_modifyText(e,t){const i=Y.wordBoundary.get(),n=Y.wordBoundaryToMaintain.get();return i&&n?e.split(n).map((e=>e.split(i))).flat().map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join(""):e}}class Z extends q{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}static{this.caseBoundary=new K("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new K("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new K("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:E.kg("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:f.R.writable})}_modifyText(e,t){const i=Z.caseBoundary.get(),n=Z.singleLetters.get(),s=Z.underscoreBoundary.get();return i&&n&&s?e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}(0,o.Fl)(class extends M{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:E.kg("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:N.D8.MenubarSelectionMenu,group:"2_line",title:E.kg({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,o.Fl)(class extends M{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:E.kg("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:N.D8.MenubarSelectionMenu,group:"2_line",title:E.kg({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,o.Fl)(T),(0,o.Fl)(class extends R{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:E.kg("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:N.D8.MenubarSelectionMenu,group:"2_line",title:E.kg({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,o.Fl)(class extends R{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:E.kg("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:N.D8.MenubarSelectionMenu,group:"2_line",title:E.kg({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,o.Fl)(class extends P{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:E.kg("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:f.R.writable})}}),(0,o.Fl)(class extends P{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:E.kg("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:f.R.writable})}}),(0,o.Fl)(A),(0,o.Fl)(O),(0,o.Fl)(F),(0,o.Fl)(B),(0,o.Fl)(W),(0,o.Fl)(H),(0,o.Fl)(V),(0,o.Fl)(class extends z{constructor(){super({id:"deleteAllLeft",label:E.kg("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:f.R.writable,kbOpts:{kbExpr:f.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach((t=>{let o;if(1===t.endColumn&&s>0){const e=t.startLineNumber-s;o=new p.L(e,t.startColumn,e,t.startColumn)}else o=new p.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);s+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=o:n.push(o)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(c.Q.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new c.Q(t,i,e.startLineNumber,1)}return new c.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.Q(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}),(0,o.Fl)(class extends z{constructor(){super({id:"deleteAllRight",label:E.kg("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:f.R.writable,kbOpts:{kbExpr:f.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let s=0,o=t.length,r=0;s{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new c.Q(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new c.Q(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(c.Q.compareRangesUsingStarts),n}}),(0,o.Fl)(U),(0,o.Fl)(j),(0,o.Fl)(class extends q{constructor(){super({id:"editor.action.transformToUppercase",label:E.kg("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:f.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}),(0,o.Fl)(class extends q{constructor(){super({id:"editor.action.transformToLowercase",label:E.kg("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:f.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}),G.caseBoundary.isSupported()&&G.singleLetters.isSupported()&&(0,o.Fl)(G),Q.wordBoundary.isSupported()&&(0,o.Fl)(Q),Y.wordBoundary.isSupported()&&(0,o.Fl)(Y),$.titleBoundary.isSupported()&&(0,o.Fl)($),Z.isSupported()&&(0,o.Fl)(Z)},4812:function(e,t,i){"use strict";var n,s=i(97358),o=i(90890),r=i(76611),a=i(59321),l=i(20187),c=i(80670),d=i(35114),h=i(43920),u=i(54244),g=i(52694),p=i(72777),f=i(62993),m=i(40393),_=i(49678),v=i(49079),b=i(8494),w=i(14374),C=i(97848),y=i(69122),S=i(4195),k=i(82688),x=i(43857),L=function(e,t){return function(i,n){t(i,n,e)}};const D=new C.N1("LinkedEditingInputVisible",!1);let E=class extends d.jG{static{n=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=v.kI.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"})}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new d.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=D.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new d.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(70)||e.hasChanged(94))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(70)||this._editor.getOption(94))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(c.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new o.ve(this._debounceInformation.get(t)),s=()=>{this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),this._debounceDuration??this._debounceInformation.get(t))},r=new o.ve(0),a=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{s()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void a(this._syncRangesToken)}s()}))),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const s=[];for(let e=1,i=this._currentDecorations.length;e1)return void this.clearRanges();const i=this._editor.getModel(),s=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=s;const o=this._currentRequestCts=new r.Qi;try{const e=new x.W(!1),r=await M(this._providers,i,t,o.token);if(this._debounceInformation.update(i,e.elapsed()),o!==this._currentRequestCts)return;if(this._currentRequestCts=null,s!==i.getVersionId())return;let a=[];r?.ranges&&(a=r.ranges),this._currentWordPattern=r?.wordPattern||this._languageWordPattern;let l=!1;for(let e=0,i=a.length;e({range:e,options:n.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(c),this._syncRangesToken++}catch(e){(0,l.MB)(e)||(0,l.dz)(e),this._currentRequestCts!==o&&this._currentRequestCts||this.clearRanges()}}};E=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([L(1,C.fN),L(2,y.ILanguageFeaturesService),L(3,b.JZ),L(4,k.ILanguageFeatureDebounceService)],E);class N extends g.ks{constructor(){super({id:"editor.action.linkedEditing",label:w.kg("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:C.M$.and(_.R.writable,_.R.hasRenameProvider),kbOpts:{kbExpr:_.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(p.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return u.r.isUri(n)&&f.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(s),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),l.dz):super.runCommand(e,t)}run(e,t){const i=E.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const I=g.DX.bindToContribution(E.get);function M(e,t,i,n){const r=e.ordered(t);return(0,o.$1)(r.map((e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,n)}catch(e){return void(0,l.M_)(e)}})),(e=>!!e&&s.EI(e?.ranges)))}(0,g.E_)(new I({id:"cancelLinkedEditingInput",precondition:D,handler:e=>e.clearRanges(),kbOpts:{kbExpr:_.R.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),(0,S.x1A)("editor.linkedEditingBackground",{dark:a.Q1.fromHex("#f00").transparent(.3),light:a.Q1.fromHex("#f00").transparent(.3),hcDark:a.Q1.fromHex("#f00").transparent(.3),hcLight:a.Q1.white},w.kg("editorLinkedEditingBackground","Background color when the editor auto renames on type.")),(0,g.ke)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(y.ILanguageFeaturesService);return M(n,t,i,r.XO.None)})),(0,g.HW)(E.ID,E,1),(0,g.Fl)(N)},69143:function(e,t,i){"use strict";var n=i(90890),s=i(76611),o=i(20187),r=i(85584),a=i(35114),l=i(84756),c=i(79783),d=i(59951),h=i(43857),u=i(54244),g=i(52694),p=i(49079),f=i(82688),m=i(69122),_=i(48843),v=i(97358),b=i(24219),w=i(40393),C=i(59266),y=i(21335);class S{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}}class k{constructor(e){this._disposables=new a.Cm;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new S(e,n)));t=k._union(t,e),(0,a.Xm)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,s,o,r;for(n=0,o=0,s=e.length,r=t.length;nPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[s]=[t,e])}),o.M_)));return Promise.all(s).then((()=>{const e=new k((0,v.Yc)(n));return i.isCancellationRequested?(e.dispose(),new k([])):e}))}y.w.registerCommand("_executeLinkProvider",(async(e,...t)=>{let[i,n]=t;(0,b.j)(i instanceof u.r),"number"!=typeof n&&(n=0);const{linkProvider:o}=e.get(m.ILanguageFeaturesService),r=e.get(C.IModelService).getModel(i);if(!r)return[];const a=await x(o,r,s.XO.None);if(!a)return[];for(let e=0;ethis.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new _.gi(e));this._register(r.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(r.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(r.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,n.SS)((t=>x(this.providers,e,t)));try{const t=new h.W(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,o.dz)(e)}finally{this.computePromise=null}}}updateDecorations(e){const t="altKey"===this.editor.getOption(78),i=[],n=Object.keys(this.currentOccurrences);for(const e of n){const t=this.currentOccurrences[e];i.push(t.decorationId)}const s=[];if(e)for(const i of e)s.push(P.decoration(i,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=n.length;t{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(78);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(s.XO.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l.ny.file&&e.startsWith(`${l.ny.file}:`)){const i=u.r.parse(e);if(i.scheme===l.ny.file){const n=d.su(i);let s=null;n.startsWith("/./")||n.startsWith("\\.\\")?s=`.${n.substr(1)}`:(n.startsWith("//./")||n.startsWith("\\\\.\\"))&&(s=`.${n.substr(2)}`),s&&(e=d.uJ(t,s))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(D.kg("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(D.kg("missing.url","Failed to open this link because its target is missing.")):(0,o.dz)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};M=L=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([I(1,N.C),I(2,E.Ot),I(3,m.ILanguageFeaturesService),I(4,f.ILanguageFeatureDebounceService)],M);const T=p.kI.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),R=p.kI.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"});class P{static decoration(e,t){return{range:e.range,options:P._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?R:T};return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?D.kg("links.navigate.executeCmd","Execute command"):D.kg("links.navigate.follow","Follow link"),s=t?c.zx?D.kg("links.navigate.kb.meta.mac","cmd + click"):D.kg("links.navigate.kb.meta","ctrl + click"):c.zx?D.kg("links.navigate.kb.alt.mac","option + click"):D.kg("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=D.kg("tooltip.explanation","Execute command {0}",e)}}return new r.Bc("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${s})`)}return(new r.Bc).appendText(`${n} (${s})`)}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,P._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,P._getOptions(this.link,t,!1))}}class A extends g.ks{constructor(){super({id:"editor.action.openLink",label:D.kg("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=M.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const e of n){const t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,g.HW)(M.ID,M,1),(0,g.Fl)(A)},84956:function(e,t,i){"use strict";var n=i(35114),s=i(52694);class o extends n.jG{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(118);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}(0,s.HW)(o.ID,o,2)},7588:function(e,t,i){"use strict";i.d(t,{k:function(){return _}});var n,s=i(96710),o=i(15075),r=i(80670),a=i(85584),l=i(35114),c=i(52694),d=i(40393),h=i(69498),u=i(14374),g=i(97848),p=i(95607),f=i(84201),m=function(e,t){return function(i,n){t(i,n,e)}};let _=class{static{n=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new g.N1("messageVisible",!1,u.kg("messageVisible","Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(n.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new l.HE,this._messageListeners=new l.Cm,this._mouseOverMessage=!1,this._editor=e,this._visible=n.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._message?.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,o.xE)((0,a.VS)(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,a.VS)(e)?(0,s.Gc)(e,{actionHandler:{callback:t=>{this.closeMessage(),(0,h.i)(this._openerService,t,(0,a.VS)(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new b(this._editor,t,"string"==typeof e?e:this._message.element),this._messageListeners.add(r.Jh.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&f.QX(f.bq(),this._messageWidget.value.getDomNode())||this.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(f.ko(this._messageWidget.value.getDomNode(),f.Bx.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(f.ko(this._messageWidget.value.getDomNode(),f.Bx.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new d.Q(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(b.fadeOut(this._messageWidget.value))}};_=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([m(1,g.fN),m(2,p.C)],_);const v=c.DX.bindToContribution(_.get);(0,c.E_)(new v({id:"leaveEditorMessage",precondition:_.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class b{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");"string"==typeof n?(o.classList.add("message"),o.textContent=n):(n.classList.add("message"),o.appendChild(n)),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,c.HW)(_.ID,_,4)},36988:function(e,t,i){"use strict";var n,s=i(15075),o=i(90890),r=i(62167),a=i(35114),l=i(52694),c=i(66092),d=i(40393),h=i(56218),u=i(49678),g=i(23793),p=i(14374),f=i(93223),m=i(97848),_=i(69122),v=i(22136),b=i(63619);function w(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?p.kg("cursorAdded","Cursor added: {0}",e):p.kg("cursorsAdded","Cursors added: {0}",e);(0,s.h5)(t)}}class C extends l.ks{constructor(){super({id:"editor.action.insertCursorAbove",label:p.kg("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:u.R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const o=s.getCursorStates();s.setCursorStates(i.source,3,c.c.addCursorUp(s,o,n)),s.revealTopMostCursor(i.source),w(o,s.getCursorStates())}}class y extends l.ks{constructor(){super({id:"editor.action.insertCursorBelow",label:p.kg("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:u.R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const o=s.getCursorStates();s.setCursorStates(i.source,3,c.c.addCursorDown(s,o,n)),s.revealBottomMostCursor(i.source),w(o,s.getCursorStates())}}class S extends l.ks{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:p.kg("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:u.R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new h.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),o=s.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),w(o,s.getCursorStates())}}class k extends l.ks{constructor(){super({id:"editor.action.addCursorsToBottom",label:p.kg("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let e=i[0].startLineNumber;e<=n;e++)s.push(new h.L(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),r=o.getCursorStates();s.length>0&&t.setSelections(s),w(r,o.getCursorStates())}}class x extends l.ks{constructor(){super({id:"editor.action.addCursorsToTop",label:p.kg("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new h.L(e,i[0].startColumn,e,i[0].endColumn));const s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),w(o,s.getCursorStates())}}class L{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class D{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new D(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,s,o=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(o=!0,n=!0,s=!0):(n=i.wholeWord,s=i.matchCase);const a=e.getSelection();let l,c=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,c=new h.L(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new D(e,t,o,l,n,s,c)}constructor(e,t,i,n,s,o,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new h.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new h.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824)}}class E extends a.jG{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(E.ID)}constructor(e){super(),this._sessionDispose=this._register(new a.Cm),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=D.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new h.L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!T(this._editor.getModel(),t,i)){const e=this._editor.getModel(),i=[];for(let n=0,s=t.length;n0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew h.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}class N extends l.ks{run(e,t){const i=E.get(t);if(!i)return;const n=t._getViewModel();if(n){const s=n.getCursorStates(),o=g.z0.get(t);if(o)this._run(i,o);else{const n=e.get(b._Y).createInstance(g.z0,t);this._run(i,n),n.dispose()}w(s,n.getCursorStates())}}}class I{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(d.Q.compareRangesUsingStarts)),this._cachedFindMatches}}let M=class extends a.jG{static{n=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(109),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new o.uC((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(109)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=g.z0.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(n._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const s=E.get(i);if(!s)return null;const o=g.z0.get(i);if(!o)return null;let r=s.getSession(o);if(!r){const e=i.getSelections();if(e.length>1){const t=o.getState().matchCase;if(!T(i.getModel(),e,t))return null}r=D.create(i,o)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=o.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new I(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(132):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(d.Q.compareRangesUsingStarts);const s=[];for(let e=0,t=0,o=i.length,r=n.length;e=r)s.push(o),e++;else{const i=d.Q.compareRangesUsingStarts(o,n[t]);i<0?(!n[t].isEmpty()&&d.Q.areIntersecting(o,n[t])||s.push(o),e++):(i>0||e++,t++)}}const o="off"!==this.editor.getOption(81),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&o,a=s.map((e=>({range:e,options:(0,v.v)(r)})));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function T(e,t,i){const n=R(e,t[0],!i);for(let s=1,o=t.length;s=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(P=1,A=_.ILanguageFeaturesService,function(e,t){A(e,t,P)})],M);class O extends l.ks{constructor(){super({id:"editor.action.focusNextCursor",label:p.kg("mutlicursor.focusNextCursor","Focus Next Cursor"),metadata:{description:p.kg("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const s=Array.from(n.getCursorStates()),o=s.shift();o&&(s.push(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),w(s,n.getCursorStates()))}}class F extends l.ks{constructor(){super({id:"editor.action.focusPreviousCursor",label:p.kg("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),metadata:{description:p.kg("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const s=Array.from(n.getCursorStates()),o=s.pop();o&&(s.unshift(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),w(s,n.getCursorStates()))}}(0,l.HW)(E.ID,E,4),(0,l.HW)(M.ID,M,1),(0,l.Fl)(C),(0,l.Fl)(y),(0,l.Fl)(S),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p.kg("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.R.focus,primary:2082,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p.kg("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p.kg("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.R.focus,primary:(0,r.m5)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p.kg("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.selectHighlights",label:p.kg("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:u.R.focus,primary:3114,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.changeAll",label:p.kg("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:m.M$.and(u.R.writable,u.R.editorTextFocus),kbOpts:{kbExpr:u.R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}),(0,l.Fl)(k),(0,l.Fl)(x),(0,l.Fl)(O),(0,l.Fl)(F)},22400:function(e,t,i){"use strict";var n=i(72582),s=i(35114),o=i(52694),r=i(49678),a=i(35720),l=i(69122),c=i(90890),d=i(20187),h=i(80670),u=i(82282),g=i(76611),p=i(24219),f=i(54244),m=i(62993),_=i(20878),v=i(21335),b=i(97848);const w={Visible:new b.N1("parameterHintsVisible",!1),MultipleSignatures:new b.N1("parameterHintsMultipleSignatures",!1)};async function C(e,t,i,n,s){const o=e.ordered(t);for(const e of o)try{const o=await e.provideSignatureHelp(t,i,s,n);if(o)return o}catch(e){(0,d.M_)(e)}}var y;v.w.registerCommand("_executeSignatureHelpProvider",(async(e,...t)=>{const[i,n,s]=t;(0,p.j)(f.r.isUri(i)),(0,p.j)(m.y.isIPosition(n)),(0,p.j)("string"==typeof s||!s);const o=e.get(l.ILanguageFeaturesService),r=await e.get(_.ITextModelService).createModelReference(i);try{const e=await C(o.signatureHelpProvider,r.object.textEditorModel,m.y.lift(n),{triggerKind:a.WA.Invoke,isRetrigger:!1,triggerCharacter:s},g.XO.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}})),function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(y||(y={}));class S extends s.jG{static{this.DEFAULT_DELAY=120}constructor(e,t,i=S.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new h.vl),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=y.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new s.HE),this.triggerChars=new u.y,this.retriggerChars=new u.y,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new c.ve(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=y.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(d.dz)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new y.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(k);this._pendingTriggers=[];const s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),r=this.editor.getPosition();this.state=new y.Pending((0,c.SS)((e=>C(this.providers,o,r,s,e))),i);try{const t=await this.state.request;return e!==this.triggerId?(t?.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new y.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(t?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=y.Default),(0,d.dz)(t),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:a.WA.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.WA.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.WA.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function k(e,t){switch(t.triggerKind){case a.WA.Invoke:return t;case a.WA.ContentChange:return e;case a.WA.TriggerCharacter:default:return t}}var x,L=i(14374),D=i(63619),E=i(84201),N=i(15075),I=i(5390),M=i(93231),T=i(43920),R=i(3520),P=i(41750),A=i(69498),O=i(95607),F=i(4195),B=i(51310),W=i(56613),H=i(43857),V=i(2727),z=function(e,t){return function(i,n){t(i,n,e)}};const U=E.$,j=(0,B.pU)("parameter-hints-next",M.W.chevronDown,L.kg("parameterHintsNextIcon","Icon for show next parameter hint.")),q=(0,B.pU)("parameter-hints-previous",M.W.chevronUp,L.kg("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let K=class extends s.jG{static{x=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,i,n,o,r){super(),this.editor=e,this.model=t,this.telemetryService=r,this.renderDisposeables=this._register(new s.Cm),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new A.T({editor:e},o,n)),this.keyVisible=w.Visible.bindTo(i),this.keyMultipleSignatures=w.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=U(".editor-widget.parameter-hints-widget"),t=E.BC(e,U(".phwrapper"));t.tabIndex=-1;const i=E.BC(t,U(".controls")),n=E.BC(i,U(".button"+W.L.asCSSSelector(q))),s=E.BC(i,U(".overloads")),o=E.BC(i,U(".button"+W.L.asCSSSelector(j)));this._register(E.ko(n,"click",(e=>{E.fs.stop(e),this.previous()}))),this._register(E.ko(o,"click",(e=>{E.fs.stop(e),this.next()})));const r=U(".body"),a=new I.MU(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=E.BC(r,U(".signature")),c=E.BC(r,U(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:s,docs:c,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const d=()=>{if(!this.domNodes)return;const e=this.editor.getOption(50),t=this.domNodes.element;t.style.fontSize=`${e.fontSize}px`,t.style.lineHeight=""+e.lineHeight/e.fontSize,t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",e.fontFamily),t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",R.jU.fontFamily)};d(),this._register(h.Jh.chain(this.editor.onDidChangeConfiguration.bind(this.editor),(e=>e.filter((e=>e.hasChanged(50)))))(d)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{this.domNodes?.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const n=E.BC(this.domNodes.signature,U(".code")),s=i.parameters.length>0,o=i.activeParameter??e.activeParameter;s?this.renderParameters(n,i,o):E.BC(n,U("span")).textContent=i.label;const r=i.parameters[o];if(r?.documentation){const e=U("span.documentation");if("string"==typeof r.documentation)e.textContent=r.documentation;else{const t=this.renderMarkdownDocs(r.documentation);e.appendChild(t.element)}E.BC(this.domNodes.docs,U("p",{},e))}if(void 0===i.documentation);else if("string"==typeof i.documentation)E.BC(this.domNodes.docs,U("p",{},i.documentation));else{const e=this.renderMarkdownDocs(i.documentation);E.BC(this.domNodes.docs,e.element)}const a=this.hasDocs(i,r);if(this.domNodes.signature.classList.toggle("has-docs",a),this.domNodes.docs.classList.toggle("empty",!a),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,r){let e="";const t=i.parameters[o];e=Array.isArray(t.label)?i.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),i.documentation&&(e+="string"==typeof i.documentation?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==e&&(N.xE(L.kg("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=new H.W,i=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));i.element.classList.add("markdown-docs");const n=t.elapsed();return n>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:n}),i}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,p.eU)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,p.eU)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,p.eU)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,p.eU)(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,s]=this.getParameterLabelOffsets(t,i),o=document.createElement("span");o.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,s),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(s),E.BC(e,o,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,T.bm)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return x.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};K=x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([z(2,b.fN),z(3,O.C),z(4,P.L),z(5,V.k)],K),(0,F.x1A)("editorHoverWidget.highlightForeground",F.QI5,L.kg("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var $,G=function(e,t){return function(i,n){t(i,n,e)}};let Q=class extends s.jG{static{$=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution($.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new S(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{e?(this.widget.value.show(),this.widget.value.render(e)):this.widget.rawValue?.hide()}))),this.widget=new n.d((()=>this._register(t.createInstance(K,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};Q=$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([G(1,D._Y),G(2,l.ILanguageFeaturesService)],Q);class Y extends o.ks{constructor(){super({id:"editor.action.triggerParameterHints",label:L.kg("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:r.R.hasSignatureHelpProvider,kbOpts:{kbExpr:r.R.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=Q.get(t);i?.trigger({triggerKind:a.WA.Invoke})}}(0,o.HW)(Q.ID,Q,2),(0,o.Fl)(Y);const Z=o.DX.bindToContribution(Q.get);(0,o.E_)(new Z({id:"closeParameterHints",precondition:w.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:r.R.focus,primary:9,secondary:[1033]}})),(0,o.E_)(new Z({id:"showPrevParameterHint",precondition:b.M$.and(w.Visible,w.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:r.R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,o.E_)(new Z({id:"showNextParameterHint",precondition:b.M$.and(w.Visible,w.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:r.R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},70776:function(e,t,i){"use strict";i.d(t,{zn:function(){return R},x2:function(){return P},j6:function(){return B},RL:function(){return O},zl:function(){return z},n6:function(){return U},z0:function(){return W},_X:function(){return H},e3:function(){return V}});var n=i(84201),s=i(98099),o=i(30981),r=i(93231),a=i(56613),l=i(59321),c=i(80670),d=i(49134),h=i(52694),u=i(72777),g=i(11797),p=i(38175),f=i(68860),m=i(35114),_=i(40393),v=i(49079);const b=new l.Q1(new l.bU(0,122,204)),w={showArrow:!0,showFrame:!0,className:"",frameColor:b,arrowColor:b,keepEditorSelection:!1};class C{constructor(e,t,i,n,s,o,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=s,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class y{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class S{static{this._IdGenerator=new f.n(".arrow-decoration-")}constructor(e){this._editor=e,this._ruleName=S._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),n.U2(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){n.U2(this._ruleName),n.Wt(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:_.Q.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}class k{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new m.Cm,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=d.Go(t),d.co(this.options,w,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new S(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash?.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=_.Q.isIRange(e)?_.Q.lift(e):_.Q.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:v.kI.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const o=document.createElement("div");o.style.overflow="hidden";const r=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new C(o,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new y("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const c=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,s),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const t=d.validateRange(new _.Q(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new p.m(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(67),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var x=i(14374),L=i(42574),D=i(97848),E=i(48682),N=i(63619),I=i(4195),M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},T=function(e,t){return function(i,n){t(i,n,e)}};const R=(0,N.u1)("IPeekViewService");var P;(0,E.v)(R,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}},1),function(e){e.inPeekEditor=new D.N1("inReferenceSearchEditor",!0,x.kg("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(P||(P={}));let A=class{static{this.ID="editor.contrib.referenceController"}constructor(e,t){e instanceof g.t&&P.inPeekEditor.bindTo(t)}dispose(){}};function O(e){const t=e.get(u.T).getFocusedCodeEditor();return t instanceof g.t?t.getParentEditor():t}A=M([T(1,D.fN)],A),(0,h.HW)(A.ID,A,0);const F={headerBackgroundColor:l.Q1.white,primaryHeadingColor:l.Q1.fromHex("#333333"),secondaryHeadingColor:l.Q1.fromHex("#6c6c6cb3")};let B=class extends k{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new c.vl,this.onDidClose=this._onDidClose.event,d.co(this.options,F,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=n.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),n.b2(this._titleElement,"click",(e=>this._onTitleClick(e)))),n.BC(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.BC(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=n.$(".peekview-actions");n.BC(this._headElement,i);const l=this._getActionBarOptions();this._actionbarWidget=new s.E(i,l),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new o.rc("peekview.close",x.kg("label.close","Close"),a.L.asClassName(r.W.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:L.rN.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:n.w_(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.WU(this._metaHeading)):n.jD(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(67)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};B=M([T(2,N._Y)],B);const W=(0,I.x1A)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Q1.black,hcLight:l.Q1.white},x.kg("peekViewTitleBackground","Background color of the peek view title area.")),H=(0,I.x1A)("peekViewTitleLabel.foreground",{dark:l.Q1.white,light:l.Q1.black,hcDark:l.Q1.white,hcLight:I.By2},x.kg("peekViewTitleForeground","Color of the peek view title.")),V=(0,I.x1A)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},x.kg("peekViewTitleInfoForeground","Color of the peek view title info.")),z=(0,I.x1A)("peekView.border",{dark:I.pOz,light:I.pOz,hcDark:I.b1q,hcLight:I.b1q},x.kg("peekViewBorder","Color of the peek view borders and arrow.")),U=(0,I.x1A)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Q1.black,hcLight:l.Q1.white},x.kg("peekViewResultsBackground","Background color of the peek view result list.")),j=((0,I.x1A)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:l.Q1.white,hcLight:I.By2},x.kg("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),(0,I.x1A)("peekViewResult.fileForeground",{dark:l.Q1.white,light:"#1E1E1E",hcDark:l.Q1.white,hcLight:I.By2},x.kg("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),(0,I.x1A)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},x.kg("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),(0,I.x1A)("peekViewResult.selectionForeground",{dark:l.Q1.white,light:"#6C6C6C",hcDark:l.Q1.white,hcLight:I.By2},x.kg("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),(0,I.x1A)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:l.Q1.black,hcLight:l.Q1.white},x.kg("peekViewEditorBackground","Background color of the peek view editor.")));(0,I.x1A)("peekViewEditorGutter.background",j,x.kg("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),(0,I.x1A)("peekViewEditorStickyScroll.background",j,x.kg("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),(0,I.x1A)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},x.kg("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),(0,I.x1A)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},x.kg("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),(0,I.x1A)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:I.buw,hcLight:I.buw},x.kg("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},90098:function(e,t,i){"use strict";var n=i(52694),s=i(99851),o=i(14374),r=i(8552),a=i(36206),l=i(87312),c=i(64523),d=i(73755),h=i(63619);class u{constructor(e){this.instantiationService=e}init(...e){}}let g=class extends u{constructor(e,t){super(t),this.init(e)}};var p,f,m;g=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(f=1,m=h._Y,function(e,t){m(e,t,f)})],g),(0,n.HW)(a.X.ID,(p=()=>a.X,(0,l.e)()?function(e,t){return class extends t{constructor(){super(...arguments),this._autorun=void 0}init(...t){this._autorun=(0,d.yC)(((i,n)=>{const s=(0,c.b)(e(),i);n.add(this.instantiationService.createInstance(s,...t))}))}dispose(){this._autorun?.dispose()}}}(p,g):p()),0),(0,r.x1)("editor.placeholder.foreground",s.Ek,(0,o.kg)("placeholderForeground","Foreground color of the placeholder text in the editor."))},36206:function(e,t,i){"use strict";i.d(t,{X:function(){return c}});var n=i(84201),s=i(57981),o=i(35114),r=i(73755),a=i(98018),l=i(90072);class c extends o.jG{static{this.ID="editor.contrib.placeholderText"}constructor(e){var t;super(),this._editor=e,this._editorObs=(0,l.Ud)(this._editor),this._placeholderText=this._editorObs.getOption(88),this._state=(0,r.C)({owner:this,equalsFn:s.dB},(e=>{const t=this._placeholderText.read(e);if(t&&this._editorObs.valueIsEmpty.read(e))return{placeholder:t}})),this._shouldViewBeAlive=(t=e=>void 0!==this._state.read(e)?.placeholder,(0,r.ZX)(this,((e,i)=>!0===i||t(e)))),this._view=(0,a.rm)(((e,t)=>{if(!this._shouldViewBeAlive.read(e))return;const i=(0,n.h)("div.editorPlaceholder");t.add((0,r.fm)((e=>{const t=this._state.read(e),n=void 0!==t?.placeholder;i.root.style.display=n?"block":"none",i.root.innerText=t?.placeholder??""}))),t.add((0,r.fm)((e=>{const t=this._editorObs.layoutInfo.read(e);i.root.style.left=`${t.contentLeft}px`,i.root.style.width=t.contentWidth-t.verticalScrollbarWidth+"px",i.root.style.top=`${this._editor.getTopForLineNumber(0)}px`}))),t.add((0,r.fm)((e=>{i.root.style.fontFamily=this._editorObs.getOption(49).read(e),i.root.style.fontSize=this._editorObs.getOption(52).read(e)+"px",i.root.style.lineHeight=this._editorObs.getOption(67).read(e)+"px"}))),t.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:(0,r.lk)(0),position:(0,r.lk)(null),domNode:i.root}))})),this._view.recomputeInitiallyAndOnChange(this._store)}}},769:function(e,t,i){"use strict";i.d(t,{o:function(){return d}});var n=i(96845),s=i(35114),o=i(47010),r=i(62067),a=i(99851),l=i(40616),c=i(15075);class d{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){const n=new s.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new s.HE);return o.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange((()=>{o.value=void 0,o.value=this.doProvide(e,t)}))),n}doProvide(e,t,i){const r=new s.Cm,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const l={editor:a},c=(0,o.jA)(a);if(c){let e=a.saveViewState()??void 0;r.add(c.onDidChangeCursorPosition((()=>{e=a.saveViewState()??void 0}))),l.restoreViewState=()=>{e&&a===this.activeTextEditorControl&&a.restoreViewState(e)},r.add((0,n.P)(t.onCancellationRequested)((()=>l.restoreViewState?.())))}r.add((0,s.s)((()=>this.clearDecorations(a)))),r.add(this.provideWithTextEditor(l,e,t,i))}else r.add(this.provideWithoutTextEditor(e,t));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&(0,c.h5)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return(0,o.Np)(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,l.Yf)(a.vp),position:r.A5.Full}}}],[s,o]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:o}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},18615:function(e,t,i){"use strict";var n=i(85584),s=i(35114),o=i(52694),r=i(7588),a=i(14374);class l extends s.jG{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=r.k.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(93);t||(t=this.editor.isSimpleWidget?new n.Bc(a.kg("editor.simple.readonly","Cannot edit in read-only input")):new n.Bc(a.kg("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}(0,o.HW)(l.ID,l,2)},49204:function(e,t,i){"use strict";var n=i(15075),s=i(90890),o=i(76611),r=i(20187),a=i(85584),l=i(35114),c=i(24219),d=i(54244),h=i(52694),u=i(98325),g=i(72777),p=i(62993),f=i(40393),m=i(49678),_=i(35720),v=i(69122),b=i(17492),w=i(765),C=i(7588),y=i(14374),S=i(93223),k=i(16434),x=i(97848),L=i(63619),D=i(76925),E=i(31835),N=i(86171),I=i(56419),M=i(2727),T=i(84201),R=i(40478),P=i(12048),A=i(24764),O=i(43014),F=i(67334),B=i(97358),W=i(93231),H=i(80670),V=i(43857),z=i(43193),U=i(87163),j=i(52010),q=i(4195),K=i(40616),$=function(e,t){return function(i,n){t(i,n,e)}};const G=new x.N1("renameInputVisible",!1,y.kg("renameInputVisible","Whether the rename input widget is visible"));new x.N1("renameInputFocused",!1,y.kg("renameInputFocused","Whether the rename input widget is focused"));let Q=class{constructor(e,t,i,n,s,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=o,this.allowEditorOverflow=!0,this._disposables=new l.Cm,this._visibleContextKey=G.bindTo(s),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new V.W,this._inputWithButton=new Z,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new Y(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange((()=>{void 0!==this._renameCandidateListView?.focusedCandidate&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),!1===this._renameCandidateProvidersCts?.token.isCancellationRequested&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()}))),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const t=e.getColor(q.f9l),i=e.getColor(q.DSL);this._domNode.style.backgroundColor=String(e.getColor(q.CgL)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor(q.cws)??"");const n=e.getColor(q.Zgs);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(q.L4c)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(q.L4c)??""),this._inputWithButton.domNode.style.borderWidth=n?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=n?"solid":"none",this._inputWithButton.domNode.style.borderColor=n?.toString()??"none"}_updateFont(){if(void 0===this._domNode)return;(0,c.j)(void 0!==this._label,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return.8*e}getPosition(){if(!this._visible)return null;if(!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=T.tG(this.getDomNode().ownerDocument.body),t=T.BK(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const n=this._editor.getOption(67),{totalHeight:s}=X.getLayoutInfo({lineHeight:n}),o=this._nPxAvailableBelow>6*s?[2,1]:[1,2];return{position:this._position,preference:o}}beforeRender(){const[e,t]=this._acceptKeybindings;return this._label.innerText=y.kg({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;(0,c.j)(this._renameCandidateListView),(0,c.j)(void 0!==this._nPxAvailableAbove),(0,c.j)(void 0!==this._nPxAvailableBelow);const t=T.OK(this._inputWithButton.domNode),i=T.OK(this._label);let n;n=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._renameCandidateListView.layout({height:n-i-t,width:T.Tr(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,o){const{start:r,end:a}=this._getSelection(e,t);this._renameCts=o;const d=new l.Cm;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,void 0===n?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),d.add(T.ko(this._inputWithButton.button,"click",(()=>this._requestRenameCandidates(t,!0)))),d.add(T.ko(this._inputWithButton.button,T.Bx.KEY_DOWN,(e=>{const i=new R.Z(e);(i.equals(3)||i.equals(10))&&(i.stopPropagation(),i.preventDefault(),this._requestRenameCandidates(t,!0))})))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new p.y(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",r.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max(1.1*(e.endColumn-e.startColumn),20),this._beforeFirstInputFieldEditSW.reset(),d.add((0,l.s)((()=>{this._renameCts=void 0,o.dispose(!0)}))),d.add((0,l.s)((()=>{void 0!==this._renameCandidateProvidersCts&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)}))),d.add((0,l.s)((()=>this._candidates.clear())));const h=new s.Zv;return h.p.finally((()=>{d.dispose(),this._hide()})),this._currentCancelInput=e=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),h.complete(e),!0),this._currentAcceptInput=e=>{this._trace("invoking _currentAcceptInput"),(0,c.j)(void 0!==this._renameCandidateListView);const n=this._renameCandidateListView.nCandidates;let s,o;const r=this._renameCandidateListView.focusedCandidate;void 0!==r?(this._trace("using new name from renameSuggestion"),s=r,o={k:"renameSuggestion"}):(this._trace("using new name from inputField"),s=this._inputWithButton.input.value,o=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),s!==t&&0!==s.trim().length?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),h.complete({newName:s,wantsPreview:i&&e,stats:{source:o,nRenameSuggestions:n,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})):this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)")},d.add(o.token.onCancellationRequested((()=>this.cancelInput(!0,"cts.token.onCancellationRequested")))),d.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget")))),this._show(),h.p}_requestRenameCandidates(e,t){if(void 0!==this._requestRenameCandidatesOnce&&(void 0!==this._renameCandidateProvidersCts&&this._renameCandidateProvidersCts.dispose(!0),(0,c.j)(this._renameCts),"stop"!==this._inputWithButton.buttonState)){this._renameCandidateProvidersCts=new o.Qi;const i=t?_.YT.Invoke:_.YT.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(0===n.length)return void this._inputWithButton.setSparkleButton();t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){(0,c.j)(this._editor.hasModel());const i=this._editor.getSelection();let n=0,s=t.length;return f.Q.isEmpty(i)||f.Q.spansMultipleLines(i)||!f.Q.containsRange(e,i)||(n=Math.max(0,i.startColumn-e.startColumn),s=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:s}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))}),100)}async _updateRenameCandidates(e,t,i){const n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");const o=await(0,s.PK)(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),void 0===o)return void n("returning early - received updateRenameCandidates results - undefined");const r=o.flatMap((e=>"fulfilled"===e.status&&(0,c.O9)(e.value)?e.value:[]));n(`received updateRenameCandidates results - total (unfiltered) ${r.length} candidates.`);const a=B.dM(r,(e=>e.newSymbolName));n(`distinct candidates - ${a.length} candidates.`);const l=a.filter((({newSymbolName:e})=>e.trim().length>0&&e!==this._inputWithButton.input.value&&e!==t&&!this._candidates.has(e)));n(`valid distinct candidates - ${r.length} candidates.`),l.forEach((e=>this._candidates.add(e.newSymbolName))),l.length<1?n("returning early - no valid distinct candidates"):(n("setting candidates"),this._renameCandidateListView.setCandidates(l),n("asking editor to re-layout"),this._editor.layoutContentWidget(this))}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};Q=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([$(2,K.Gy),$(3,U.b),$(4,x.fN),$(5,D.rr)],Q);class Y{constructor(e,t){this._disposables=new l.Cm,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=Y._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._listWidget.onDidChangeFocus((e=>{1===e.elements.length&&t.onFocusChange(e.elements[0].newSymbolName)}),this._disposables),this._listWidget.onDidChangeSelection((e=>{1===e.elements.length&&t.onSelectionChange()}),this._disposables),this._disposables.add(this._listWidget.onDidBlur((e=>{this._listWidget.setFocus([])}))),this._listWidget.style((0,j.t8)({listInactiveFocusForeground:q.nH,listInactiveFocusBackground:q.AlL}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);const t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,n.h5(y.kg("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(0===this._listWidget.length)return;const e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];return void 0!==t?t.newSymbolName:void 0}focusNext(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}focusPrevious(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length){this._listWidget.focusLast();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}if(0===e[0])return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=X.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,7*this._candidateViewHeight)}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map((e=>e.newSymbolName.length)))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,i){const n=new class{getTemplateId(e){return"candidate"}getHeight(e){return t}},s=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new X(e,i)}renderElement(e,t,i){i.populate(e)}disposeTemplate(e){e.dispose()}};return new F.B8("NewSymbolNameCandidates",e,n,[s],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class Z{constructor(){this._onDidInputChange=new H.vl,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new l.Cm}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",y.kg("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=y.kg("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=y.kg("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=(0,P.i)().setupManagedHover((0,A.nZ)("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(T.ko(this.input,T.Bx.INPUT,(()=>this._onDidInputChange.fire()))),this._disposables.add(T.ko(this.input,T.Bx.KEY_DOWN,(e=>{const t=new R.Z(e);15!==t.keyCode&&17!==t.keyCode||this._onDidInputChange.fire()}))),this._disposables.add(T.ko(this.input,T.Bx.CLICK,(()=>this._onDidInputChange.fire()))),this._disposables.add(T.ko(this.input,T.Bx.FOCUS,(()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"}))),this._disposables.add(T.ko(this.input,T.Bx.BLUR,(()=>{this.domNode.style.outline="none"})))),this._domNode}get input(){return(0,c.j)(this._inputNode),this._inputNode}get button(){return(0,c.j)(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=(0,O.s)(W.W.sparkle),T.w_(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHover?.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=(0,O.s)(W.W.primitiveSquare),T.w_(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHover?.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}class X{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${X._PADDING}px`;const i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=.8*t.lineHeight+"px",this._domNode.appendChild(i),this._icon=(0,O.s)(W.W.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),z.M(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){const t=!!e.tags?.includes(_.OV.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+2*X._PADDING}}dispose(){}}var J,ee=function(e,t){return function(i,n){t(i,n,e)}};class te{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:f.Q.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join("\n")};const o=await s.provideRenameEdits(this.model,this.position,e,n);return o?o.rejectReason?this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n):o:this._provideRenameEdits(e,t+1,i.concat(y.kg("no result","No result.")),n)}}let ie=class{static{J=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(J.ID)}constructor(e,t,i,n,s,r,a,c,d){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=c,this._telemetryService=d,this._disposableStore=new l.Cm,this._cts=new o.Qi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(Q,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new o.Qi,!this.editor.hasModel())return void e("editor has no model");const t=this.editor.getPosition(),i=new te(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!i.hasProvider())return void e("skeleton has no provider");const l=new w.gI(this.editor,5,void 0,this._cts.token);let c;try{e("resolving rename location");const t=i.resolveRenameLocation(l.token);this._progressService.showWhile(t,250),c=await t,e("resolved rename location")}catch(i){return void(i instanceof r.AL?e("resolve rename location cancelled",JSON.stringify(i,null,"\t")):(e("resolve rename location failed",i instanceof Error?i:JSON.stringify(i,null,"\t")),("string"==typeof i||(0,a.VS)(i))&&C.k.get(this.editor)?.showMessage(i||y.kg("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t)))}finally{l.dispose()}if(!c)return void e("returning early - no loc");if(c.rejectReason)return e(`returning early - rejected with reason: ${c.rejectReason}`,c.rejectReason),void C.k.get(this.editor)?.showMessage(c.rejectReason,t);if(l.token.isCancellationRequested)return void e("returning early - cts1 cancelled");const d=new w.gI(this.editor,5,c.range,this._cts.token),h=this.editor.getModel(),u=this._languageFeaturesService.newSymbolNamesProvider.all(h),g=await Promise.all(u.map((async e=>[e,await e.supportsAutomaticNewSymbolNamesTriggerKind??!1])));e("creating rename input field and awaiting its result");const p=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),m=await this._renameWidget.getInput(c.range,c.text,p,u.length>0?(e,t)=>{let i=g.slice();return e===_.YT.Automatic&&(i=i.filter((([e,t])=>t))),i.map((([i])=>i.provideNewSymbolNames(h,c.range,e,t)))}:void 0,d);if(e("received response from rename input field"),u.length>0&&this._reportTelemetry(u.length,h.getLanguageId(),m),"boolean"==typeof m)return e(`returning early - rename input field response - ${m}`),m&&this.editor.focus(),void d.dispose();this.editor.focus(),e("requesting rename edits");const v=(0,s.PK)(i.provideRenameEdits(m.newName,d.token),d.token).then((async t=>{if(t)if(this.editor.hasModel()){if(t.rejectReason)return e(`returning early - rejected with reason: ${t.rejectReason}`),void this._notificationService.info(t.rejectReason);this.editor.setSelection(f.Q.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(t,{editor:this.editor,showPreview:m.wantsPreview,label:y.kg("label","Renaming '{0}' to '{1}'",c?.text,m.newName),code:"undoredo.rename",quotableLabel:y.kg("quotableLabel","Renaming {0} to {1}",c?.text,m.newName),respectAutoSaveConfig:!0}).then((t=>{e("edits applied"),t.ariaSummary&&(0,n.xE)(y.kg("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",c.text,m.newName,t.ariaSummary))})).catch((t=>{e(`error when applying edits ${JSON.stringify(t,null,"\t")}`),this._notificationService.error(y.kg("rename.failedApply","Rename failed to apply edits")),this._logService.error(t)}))}else e("returning early - no model after rename edits are provided");else e("returning early - no rename edits result")}),(t=>{e("error when providing rename edits",JSON.stringify(t,null,"\t")),this._notificationService.error(y.kg("rename.failed","Rename failed to compute edits")),this._logService.error(t)})).finally((()=>{d.dispose()}));return e("returning rename operation"),this._progressService.showWhile(v,250),v}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,i){const n="boolean"==typeof i?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:i.stats.source.k,nRenameSuggestions:i.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:i.stats.timeBeforeFirstInputFieldEdit,wantsPreview:i.wantsPreview,nRenameSuggestionsInvocations:i.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:i.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",n)}};ie=J=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ee(1,L._Y),ee(2,E.Ot),ee(3,u.nu),ee(4,N.N8),ee(5,D.rr),ee(6,b.ITextResourceConfigurationService),ee(7,v.ILanguageFeaturesService),ee(8,M.k)],ie);class ne extends h.ks{constructor(){super({id:"editor.action.rename",label:y.kg("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:x.M$.and(m.R.writable,m.R.hasRenameProvider),kbOpts:{kbExpr:m.R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(g.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return d.r.isUri(n)&&p.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(s),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r.dz):super.runCommand(e,t)}run(e,t){const i=e.get(D.rr),n=ie.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}(0,h.HW)(ie.ID,ie,4),(0,h.Fl)(ne);const se=h.DX.bindToContribution(ie.get);(0,h.E_)(new se({id:"acceptRenameInput",precondition:G,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:x.M$.and(m.R.focus,x.M$.not("isComposing")),primary:3}})),(0,h.E_)(new se({id:"acceptRenameInputWithPreview",precondition:x.M$.and(G,x.M$.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:x.M$.and(m.R.focus,x.M$.not("isComposing")),primary:2051}})),(0,h.E_)(new se({id:"cancelRenameInput",precondition:G,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:m.R.focus,primary:9,secondary:[1033]}})),(0,S.ug)(class extends S.L{constructor(){super({id:"focusNextRenameSuggestion",title:{...y.aS("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:G,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(g.T).getFocusedCodeEditor();if(!t)return;const i=ie.get(t);i&&i.focusNextRenameSuggestion()}}),(0,S.ug)(class extends S.L{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...y.aS("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:G,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(g.T).getFocusedCodeEditor();if(!t)return;const i=ie.get(t);i&&i.focusPreviousRenameSuggestion()}}),(0,h.ke)("_executeDocumentRenameProvider",(function(e,t,i,...n){const[s]=n;(0,c.j)("string"==typeof s);const{renameProvider:r}=e.get(v.ILanguageFeaturesService);return async function(e,t,i,n){const s=new te(t,i,e),r=await s.resolveRenameLocation(o.XO.None);return r?.rejectReason?{edits:[],rejectReason:r.rejectReason}:s.provideRenameEdits(n,o.XO.None)}(r,t,i,s)})),(0,h.ke)("_executePrepareRename",(async function(e,t,i){const{renameProvider:n}=e.get(v.ILanguageFeaturesService),s=new te(t,i,n),r=await s.resolveRenameLocation(o.XO.None);if(r?.rejectReason)throw new Error(r.rejectReason);return r})),I.O.as(k.Fd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:y.kg("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},57698:function(e,t,i){"use strict";var n=i(90890),s=i(35114),o=i(52694),r=i(8494),a=i(49079),l=i(56812),c=function(e,t){return function(i,n){t(i,n,e)}};let d=class extends s.jG{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(e.onDidChangeModelLanguage((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(t.onDidChange((t=>{const i=this.editor.getModel()?.getLanguageId();i&&t.affects(i)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(e.onDidChangeConfiguration((t=>{this.options&&!t.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(this.editor.onDidChangeModelContent((e=>{this.computeSectionHeaders.schedule()}))),this._register(e.onDidChangeModelTokens((e=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)}))),this.computeSectionHeaders=this._register(new n.uC((()=>{this.findSectionHeaders()}),250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;return i||n?.markers?{foldingRules:n,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}:void 0}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then((i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)}))}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter((e=>{if(!e.shouldBeInComments)return!0;const i=t.validateRange(e.range),n=t.tokenization.getLineTokens(i.startLineNumber),s=n.findTokenIndexAtOffset(i.startColumn-1),o=n.getStandardTokenType(s);return n.getLanguageId(s)===t.getLanguageId()&&1===o})));const i=Object.values(this.currentOccurrences).map((e=>e.decorationId)),n=e.map((e=>function(e){return{range:e.range,options:a.kI.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:e.hasSeparatorLine?2:1,sectionHeaderText:e.text}})}}(e)));this.editor.changeDecorations((t=>{const s=t.deltaDecorations(i,n);this.currentOccurrences={};for(let t=0,i=s.length;t=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([c(1,r.JZ),c(2,l.IEditorWorkerService)],d),(0,o.HW)(d.ID,d,1)},19933:function(e,t,i){"use strict";var n,s=i(35114),o=i(20187),r=i(59266),a=i(47901),l=i(90890),c=i(76611),d=i(40616),h=i(38620),u=i(45271),g=i(82688),p=i(43857),f=i(69122),m=i(17239),_=i(23534),v=i(41261),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};let C=class extends s.jG{constructor(e,t,i,n,s,o){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new y(t,e,i,s,o)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];(0,v.K)(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach((e=>{(0,v.K)(e,i,n)&&r(e)})),this._register(t.onModelAdded((e=>{(0,v.K)(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(v.r)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};C=b([w(0,m.ISemanticTokensStylingService),w(1,r.IModelService),w(2,d.Gy),w(3,a.pG),w(4,g.ILanguageFeatureDebounceService),w(5,f.ILanguageFeaturesService)],C);let y=class extends s.jG{static{n=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,o,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentSemanticTokens",{min:n.REQUEST_MIN_DELAY,max:n.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new l.uC((()=>this._fetchDocumentSemanticTokensNow()),n.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeAttached((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const a=()=>{(0,s.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};a(),this._register(this._provider.onDidChange((()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,s.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,u.br)(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new c.Qi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,u.aw)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const s=[],r=this._model.onDidChangeContent((e=>{s.push(e)})),a=new p.W(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,s)}else this._setDocumentSemanticTokens(null,null,null,s)}),(e=>{e&&(o.MB(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||o.dz(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let o=0;o{(s.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void r();if((0,u.yS)(t)){if(!o)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const s=o.data,r=new Uint32Array(s.length+e);let a=s.length,l=r.length;for(let e=t.edits.length-1;e>=0;e--){const c=t.edits[e];if(c.start>s.length)return i.warnInvalidEditStart(o.resultId,t.resultId,e,c.start,s.length),void this._model.tokenization.setSemanticTokens(null,!0);const d=a-(c.start+c.deleteCount);d>0&&(n._copy(s,a-d,r,l-d,d),l-=d),c.data&&(n._copy(c.data,0,r,l-c.data.length,c.data.length),l-=c.data.length),a=c.start}a>0&&n._copy(s,0,r,0,a),t={resultId:t.resultId,data:r}}}if((0,u.BB)(t)){this._currentDocumentResponse=new S(e,t.resultId,t.data);const n=(0,h.toMultilineTokens2)(t,i,this._model.getLanguageId());if(s.length>0)for(const e of s)for(const t of n)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(n,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}else this._model.tokenization.setSemanticTokens(null,!1)}};y=n=b([w(1,m.ISemanticTokensStylingService),w(2,d.Gy),w(3,g.ILanguageFeatureDebounceService),w(4,f.ILanguageFeaturesService)],y);class S{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,_.x)(C)},58722:function(e,t,i){"use strict";var n=i(90890),s=i(35114),o=i(52694),r=i(45271),a=i(41261),l=i(38620),c=i(47901),d=i(40616),h=i(82688),u=i(43857),g=i(69122),p=i(17239),f=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.jG{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,i,s,o,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=s,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new n.uC((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const l=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{l()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),l()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),l()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),l()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(a.r)&&(this._cancelAll(),l())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),l()}))),l()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),s=(0,n.SS)((i=>Promise.resolve((0,r.nZ)(this._provider,e,t,i)))),o=new u.W(!1);return s.then((n=>{if(this._debounceInformation.update(e,o.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:s,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(s);e.tokenization.setPartialSemanticTokens(t,(0,l.toMultilineTokens2)(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(s)),(()=>this._removeOutstandingRequest(s))),s}};m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([f(1,p.ISemanticTokensStylingService),f(2,d.Gy),f(3,c.pG),f(4,h.ILanguageFeatureDebounceService),f(5,g.ILanguageFeaturesService)],m),(0,o.HW)(m.ID,m,1)},45271:function(e,t,i){"use strict";i.d(t,{BB:function(){return u},WG:function(){return v},aw:function(){return m},br:function(){return f},nZ:function(){return w},yS:function(){return g}});var n=i(76611),s=i(20187),o=i(54244),r=i(59266),a=i(21335),l=i(24219),c=i(85124),d=i(40393),h=i(69122);function u(e){return e&&!!e.data}function g(e){return e&&Array.isArray(e.edits)}class p{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function f(e,t){return e.has(t)}async function m(e,t,i,n,s){const o=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}(e,t),r=await Promise.all(o.map((async e=>{let o,r=null;try{o=await e.provideDocumentSemanticTokens(t,e===i?n:null,s)}catch(e){r=e,o=null}return o&&(u(o)||g(o))||(o=null),new p(e,o,r)})));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}class _{constructor(e,t){this.provider=e,this.tokens=t}}function v(e,t){return e.has(t)}function b(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function w(e,t,i,n){const o=b(e,t),r=await Promise.all(o.map((async e=>{let o;try{o=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,s.M_)(e),o=null}return o&&u(o)||(o=null),new _(e,o)})));for(const e of r)if(e.tokens)return e;return r.length>0?r[0]:null}a.w.registerCommand("_provideDocumentSemanticTokensLegend",(async(e,...t)=>{const[i]=t;(0,l.j)(i instanceof o.r);const n=e.get(r.IModelService).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=e.get(h.ILanguageFeaturesService),c=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(s,n);return c?c[0].getLegend():e.get(a.d).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})),a.w.registerCommand("_provideDocumentSemanticTokens",(async(e,...t)=>{const[i]=t;(0,l.j)(i instanceof o.r);const s=e.get(r.IModelService).getModel(i);if(!s)return;const{documentSemanticTokensProvider:d}=e.get(h.ILanguageFeaturesService);if(!f(d,s))return e.get(a.d).executeCommand("_provideDocumentRangeSemanticTokens",i,s.getFullModelRange());const g=await m(d,s,null,null,n.XO.None);if(!g)return;const{provider:p,tokens:_}=g;if(!_||!u(_))return;const v=(0,c.encodeSemanticTokensDto)({id:0,type:"full",data:_.data});return _.resultId&&p.releaseDocumentSemanticTokens(_.resultId),v})),a.w.registerCommand("_provideDocumentRangeSemanticTokensLegend",(async(e,...t)=>{const[i,s]=t;(0,l.j)(i instanceof o.r);const a=e.get(r.IModelService).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:c}=e.get(h.ILanguageFeaturesService),u=b(c,a);if(0===u.length)return;if(1===u.length)return u[0].getLegend();if(!s||!d.Q.isIRange(s))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),u[0].getLegend();const g=await w(c,a,d.Q.lift(s),n.XO.None);return g?g.provider.getLegend():void 0})),a.w.registerCommand("_provideDocumentRangeSemanticTokens",(async(e,...t)=>{const[i,s]=t;(0,l.j)(i instanceof o.r),(0,l.j)(d.Q.isIRange(s));const a=e.get(r.IModelService).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:u}=e.get(h.ILanguageFeaturesService),g=await w(u,a,d.Q.lift(s),n.XO.None);return g&&g.tokens?(0,c.encodeSemanticTokensDto)({id:0,type:"full",data:g.tokens.data}):void 0}))},41261:function(e,t,i){"use strict";i.d(t,{K:function(){return s},r:function(){return n}});const n="editor.semanticHighlighting";function s(e,t,i){const s=i.getValue(n,{overrideIdentifier:e.getLanguageId(),resource:e.uri})?.enabled;return"boolean"==typeof s?s:t.getColorTheme().semanticHighlighting}},60738:function(e,t,i){"use strict";i.d(t,{n:function(){return r}});var n=i(54409),s=i(62993),o=i(40393);class r{async provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t);const s=new Map;await new Promise((t=>r._bracketsRightYield(t,0,e,n,s))),await new Promise((i=>r._bracketsLeftYield(i,0,e,n,s,t)))}return i}static{this._maxDuration=30}static{this._maxRounds=2}static _bracketsRightYield(e,t,i,s,o){const a=new Map,l=Date.now();for(;;){if(t>=r._maxRounds){e();break}if(!s){e();break}const c=i.bracketPairs.findNextBracket(s);if(!c){e();break}if(Date.now()-l>r._maxDuration){setTimeout((()=>r._bracketsRightYield(e,t+1,i,s,o)));break}if(c.bracketInfo.isOpeningBracket){const e=c.bracketInfo.bracketText,t=a.has(e)?a.get(e):0;a.set(e,t+1)}else{const e=c.bracketInfo.getOpeningBrackets()[0].bracketText;let t=a.has(e)?a.get(e):0;if(t-=1,a.set(e,Math.max(0,t)),t<0){let t=o.get(e);t||(t=new n.w,o.set(e,t)),t.push(c.range)}}s=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,a){const l=new Map,c=Date.now();for(;;){if(t>=r._maxRounds&&0===s.size){e();break}if(!n){e();break}const d=i.bracketPairs.findPrevBracket(n);if(!d){e();break}if(Date.now()-c>r._maxDuration){setTimeout((()=>r._bracketsLeftYield(e,t+1,i,n,s,a)));break}if(d.bracketInfo.isOpeningBracket){const e=d.bracketInfo.bracketText;let t=l.has(e)?l.get(e):0;if(t-=1,l.set(e,Math.max(0,t)),t<0){const t=s.get(e);if(t){const n=t.shift();0===t.size&&s.delete(e);const l=o.Q.fromPositions(d.range.getEndPosition(),n.getStartPosition()),c=o.Q.fromPositions(d.range.getStartPosition(),n.getEndPosition());a.push({range:l}),a.push({range:c}),r._addBracketLeading(i,c,a)}}}else{const e=d.bracketInfo.getOpeningBrackets()[0].bracketText,t=l.has(e)?l.get(e):0;l.set(e,t+1)}n=d.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(n);0!==r&&r!==t.startColumn&&(i.push({range:o.Q.fromPositions(new s.y(n,r),t.getEndPosition())}),i.push({range:o.Q.fromPositions(new s.y(n,1),t.getEndPosition())}));const a=n-1;if(a>0){const n=e.getLineFirstNonWhitespaceColumn(a);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:o.Q.fromPositions(new s.y(a,n),t.getEndPosition())}),i.push({range:o.Q.fromPositions(new s.y(a,1),t.getEndPosition())}))}}}},42452:function(e,t,i){"use strict";var n=i(97358),s=i(76611),o=i(20187),r=i(52694),a=i(62993),l=i(40393),c=i(56218),d=i(49678),h=i(60738),u=i(43920);class g{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:o}=n,r=i.column-o;let a=r,c=r,d=0;for(;a>=0;a--){const e=s.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if((0,u.Lv)(e)&&(0,u.Wv)(d))break;d=e}for(a+=1;c0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new l.Q(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var p,f=i(14374),m=i(93223),_=i(21335),v=i(69122),b=i(20878),w=i(24219),C=i(54244);class y{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new y(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let S=class{static{p=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(p.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await D(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(114),s.XO.None).then((e=>{if(n.EI(e)&&e.length===t.length&&this._editor.hasModel()&&n.aI(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new y(0,e))),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)}))}})),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const o=this._state.map((e=>c.L.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(o)}finally{this._ignoreSelection=!1}}};var k,x;S=p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(k=1,x=v.ILanguageFeaturesService,function(e,t){x(e,t,k)})],S);class L extends r.ks{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=S.get(t);i&&await i.run(this._forward)}}async function D(e,t,i,s,r){const c=e.all(t).concat(new g(s.selectSubwords));1===c.length&&c.unshift(new h.n);const d=[],u=[];for(const e of c)d.push(Promise.resolve(e.provideSelectionRanges(t,i,r)).then((e=>{if(n.EI(e)&&e.length===i.length)for(let t=0;t{if(0===e.length)return[];e.sort(((e,t)=>a.y.isBefore(e.getStartPosition(),t.getStartPosition())?1:a.y.isBefore(t.getStartPosition(),e.getStartPosition())||a.y.isBefore(e.getEndPosition(),t.getEndPosition())?-1:a.y.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let n;for(const t of e)(!n||l.Q.containsRange(t,n)&&!l.Q.equalsRange(t,n))&&(i.push(t),n=t);if(!s.selectLeadingAndTrailingWhitespace)return i;const o=[i[0]];for(let e=1;e")}}_doInsert(e,t){if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!=typeof e&&this.cancel(),this._session?((0,o.j)("string"==typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new f.O(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!a.y.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),s=Boolean(i.choice.options.find((e=>e.value===n))),o=[];for(let e=0;e{i?.dispose(),n=!1},o=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:o,disable:s}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:e}=this._session;if(!e||!this._choiceCompletions)return this._choiceCompletions?.disable(),void(this._currentChoice=void 0);this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{(0,h.p3)(this._editor,this._choiceCompletions.provider)})))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};v=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([m(1,p.rr),m(2,d.ILanguageFeaturesService),m(3,g.fN),m(4,c.JZ)],v),(0,r.HW)(v.ID,v,4);const b=r.DX.bindToContribution(v.get);(0,r.E_)(new b({id:"jumpToNextSnippetPlaceholder",precondition:g.M$.and(v.InSnippetMode,v.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:2}})),(0,r.E_)(new b({id:"jumpToPrevSnippetPlaceholder",precondition:g.M$.and(v.InSnippetMode,v.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:1026}})),(0,r.E_)(new b({id:"leaveSnippet",precondition:v.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:9,secondary:[1033]}})),(0,r.E_)(new b({id:"acceptSnippet",precondition:v.InSnippetMode,handler:e=>e.finish()}))},62347:function(e,t,i){"use strict";i.d(t,{EY:function(){return o},GR:function(){return l},Or:function(){return a},fr:function(){return p},mQ:function(){return g}});class n{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t,i=0,s=this.value.charCodeAt(e);if(t=n._table[s],"number"==typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(n.isDigitCharacter(s)){t=8;do{i+=1,s=this.value.charCodeAt(e+i)}while(n.isDigitCharacter(s));return this.pos+=i,{type:t,pos:e,len:i}}if(n.isVariableCharacter(s)){t=9;do{s=this.value.charCodeAt(e+ ++i)}while(n.isVariableCharacter(s)||n.isDigitCharacter(s));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,s=this.value.charCodeAt(e+i)}while(!isNaN(s)&&void 0===n._table[s]&&!n.isDigitCharacter(s)&&!n.isVariableCharacter(s));return this.pos+=i,{type:t,pos:e,len:i}}}class s{constructor(){this._children=[]}appendChild(e){return e instanceof o&&this._children[this._children.length-1]instanceof o?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class o extends s{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new o(this.value)}}class r extends s{}class a extends r{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){const e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends s{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof o&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new l;return this.options.forEach(e.appendChild,e),e}}class c extends s{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof d&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof d){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new c;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class d extends s{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){return new d(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class h extends r{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new o(t)],!0)}clone(){const e=new h(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function u(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class g extends s{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof a&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return u([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof h&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){u(this.children,e)}}class p{constructor(){this._scanner=new n,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new g;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk((e=>(e instanceof a&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):s.push(e)),!0)));const o=(e,i)=>{const s=n.get(e.index);if(!s)return;const r=new a(e.index);r.transform=e.transform;for(const e of s){const t=e.clone();r.appendChild(t),t instanceof a&&n.has(t.index)&&!i.has(t.index)&&(i.add(t.index),o(t,i),i.delete(t.index))}t.replace(e,[r])},r=new Set;for(const e of s)o(e,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find((e=>0===e.index))||e.appendChild(new a(0)))}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new o(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new h(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new o("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new o(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new h(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new o("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new c;let i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new o(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new d(Number(n))),!0;if(this._accept(4))return e.appendChild(new d(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new d(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new d(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new o(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},93155:function(e,t,i){"use strict";i.d(t,{O:function(){return P}});var n=i(97358),s=i(35114),o=i(43920),r=i(48905),a=i(40393),l=i(56218),c=i(8494),d=i(49079),h=i(41517),u=i(1255),g=i(62347),p=i(11354),f=i(79783);function m(e,t=f.uF){return(0,p.No)(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var _=i(68847),v=i(59951),b=i(20419),w=i(14374);Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class C{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class y{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=(0,o.UU)(i,0,this._selection.startColumn-1);let s=n;e.snippet.walk((t=>t!==e&&(t instanceof g.EY&&(s=(0,o.UU)((0,o.uz)(t.value).pop())),!0)));const r=(0,o.Qp)(s,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${s.substr(r)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class S{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return _.P8(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=_.P8(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===_.pD(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,v.pD)(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class k{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,o.AV)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let x=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};var L,D;x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(L=2,D=c.JZ,function(e,t){D(e,t,L)})],x);class E{constructor(){this._date=new Date}static{this.dayNames=[w.kg("Sunday","Sunday"),w.kg("Monday","Monday"),w.kg("Tuesday","Tuesday"),w.kg("Wednesday","Wednesday"),w.kg("Thursday","Thursday"),w.kg("Friday","Friday"),w.kg("Saturday","Saturday")]}static{this.dayNamesShort=[w.kg("SundayShort","Sun"),w.kg("MondayShort","Mon"),w.kg("TuesdayShort","Tue"),w.kg("WednesdayShort","Wed"),w.kg("ThursdayShort","Thu"),w.kg("FridayShort","Fri"),w.kg("SaturdayShort","Sat")]}static{this.monthNames=[w.kg("January","January"),w.kg("February","February"),w.kg("March","March"),w.kg("April","April"),w.kg("May","May"),w.kg("June","June"),w.kg("July","July"),w.kg("August","August"),w.kg("September","September"),w.kg("October","October"),w.kg("November","November"),w.kg("December","December")]}static{this.monthNamesShort=[w.kg("JanuaryShort","Jan"),w.kg("FebruaryShort","Feb"),w.kg("MarchShort","Mar"),w.kg("AprilShort","Apr"),w.kg("MayShort","May"),w.kg("JuneShort","Jun"),w.kg("JulyShort","Jul"),w.kg("AugustShort","Aug"),w.kg("SeptemberShort","Sep"),w.kg("OctoberShort","Oct"),w.kg("NovemberShort","Nov"),w.kg("DecemberShort","Dec")]}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return E.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return E.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return E.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return E.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,s=Math.abs(e)-60*i;return t+n+":"+(s<10?"0"+s:s)}}}class N{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=(0,u.Q_)(this._workspaceService.getWorkspace());return(0,u.A7)(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if((0,u.jB)(e))return _.P8(e.uri.path);let t=_.P8(e.configPath.path);return t.endsWith(u.kF)&&(t=t.substr(0,t.length-u.kF.length-1)),t}_resoveWorkspacePath(e){if((0,u.jB)(e))return m(e.uri.fsPath);const t=_.P8(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?m(i):"/"}}class I{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?(0,b.b)():void 0}}var M;class T{static{this._decor={active:d.kI.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:d.kI.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:d.kI.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:d.kI.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})}}constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,n.$z)(t.placeholders,g.Or.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),o=a.Q.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),r=i.isFinalTabstop?T._decor.inactiveFinal:T._decor.inactive,l=t.addDecoration(o,r);this._placeholderDecorations.set(i,l)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),s=this._editor.getModel().getValueInRange(n),o=t.transform.resolve(s).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const o=this._placeholderDecorations.get(s),r=this._editor.getModel().getDecorationRange(o);n.push(new l.L(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(s),e.changeDecorationOptions(o,s.isFinalTabstop?T._decor.activeFinal:T._decor.active),i.add(s);for(const t of this._snippet.enclosingPlaceholders(s)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?T._decor.activeFinal:T._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?T._decor.inactiveFinal:T._decor.inactive);return n}));return t?this.move(e):i??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof g.Or){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),s=this._editor.getModel().getDecorationRange(t);if(!s){e.delete(n.index);break}i.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!e?.choice)return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof g.GR,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(-1!==s._offset),console.assert(!s._placeholderDecorations);const o=s._snippet.placeholderInfo.last.index;for(const e of s._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(o+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of s._snippet.placeholders){const n=s._snippet.offset(e),o=s._snippet.fullLen(e),r=a.Q.fromPositions(t.getPositionAt(s._offset+n),t.getPositionAt(s._offset+n+o)),l=i.addDecoration(r,T._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=(0,n.$z)(this._snippet.placeholders,g.Or.compareByIndex)}))}}const R={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let P=M=class{static adjustWhitespace(e,t,i,n,s){const r=e.getLineContent(t.lineNumber),a=(0,o.UU)(r,0,t.column-1);let l;return n.walk((t=>{if(!(t instanceof g.EY)||t.parent instanceof g.GR)return!0;if(s&&!s.has(t))return!0;const o=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)o[0]=e.normalizeIndentation(o[0]);else{l=l??n.toString();const t=l.charCodeAt(i-1);10!==t&&13!==t||(o[0]=e.normalizeIndentation(a+o[0]))}for(let t=1;te.get(u.VR))),v=e.invokeWithinContext((e=>new S(e.get(h.L),m))),b=()=>l,w=m.getValueInRange(M.adjustSelection(m,e.getSelection(),i,0)),L=m.getValueInRange(M.adjustSelection(m,e.getSelection(),0,n)),D=m.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),R=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>a.Q.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:a,idx:l}of R){let h=M.adjustSelection(m,a,i,0),u=M.adjustSelection(m,a,0,n);w!==m.getValueInRange(h)&&(h=a),L!==m.getValueInRange(u)&&(u=a);const S=a.setStartPosition(h.startLineNumber,h.startColumn).setEndPosition(u.endLineNumber,u.endColumn),P=(new g.fr).parse(t,!0,s),A=S.getStartPosition(),O=M.adjustWhitespace(m,A,o||l>0&&D!==m.getLineFirstNonWhitespaceColumn(a.positionLineNumber),P);P.resolveVariables(new C([v,new k(b,l,R.length,"spread"===e.getOption(79)),new y(m,a,l,c),new x(m,a,d),new E,new N(_),new I])),p[l]=r.k.replace(S,P.toString()),p[l].identifier={major:l,minor:0},p[l]._isTracked=!0,f[l]=new T(e,P,O)}return{edits:p,snippets:f}}static createEditsAndSnippetsFromEdits(e,t,i,n,s,o,l){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const c=[],d=e.getModel(),p=new g.fr,f=new g.mQ,m=new C([e.invokeWithinContext((e=>new S(e.get(h.L),d))),new k((()=>s),0,e.getSelections().length,"spread"===e.getOption(79)),new y(d,e.getSelection(),0,o),new x(d,e.getSelection(),l),new E,new N(e.invokeWithinContext((e=>e.get(u.VR)))),new I]);t=t.sort(((e,t)=>a.Q.compareRangesUsingStarts(e.range,t.range)));let _=0;for(let e=0;e0){const n=t[e-1].range,s=a.Q.fromPositions(n.getEndPosition(),i.getStartPosition()),o=new g.EY(d.getValueInRange(s));f.appendChild(o),_+=o.value.length}const s=p.parseFragment(n,f);M.adjustWhitespace(d,i.getStartPosition(),!0,f,new Set(s)),f.resolveVariables(m);const o=f.toString(),l=o.slice(_);_=o.length;const h=r.k.replace(i,l);h.identifier={major:e,minor:0},h._isTracked=!0,c.push(h)}return p.ensureFinalTabstop(f,i,!0),{edits:c,snippets:[new T(e,f,"")]}}constructor(e,t,i=R,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){(0,s.AS)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"==typeof this._template?M.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):M.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let e=0;el.L.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=R){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=M.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let e=0;el.L.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(a.Q.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(a.Q.compareRangesUsingStarts);for(let s=0;s0}};P=M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,c.JZ)],P)},65450:function(e,t,i){"use strict";var n=i(52694),s=i(14374);const o=Object.freeze({View:(0,s.aS)("view","View"),Help:(0,s.aS)("help","Help"),Test:(0,s.aS)("test","Test"),File:(0,s.aS)("file","File"),Preferences:(0,s.aS)("preferences","Preferences"),Developer:(0,s.aS)({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});var r=i(93223),a=i(47901),l=i(97848),c=i(49678),d=i(35114),h=i(69122),u=i(84201),g=i(38945),p=i(97358),f=i(56613),m=i(19213),_=i(11797),v=i(62993),b=i(52192),w=i(10621),C=i(73055),y=i(54961);class S{constructor(e,t,i,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=i,this.showEndForLine=n}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&(0,p.aI)(this.startLineNumbers,e.startLineNumbers)&&(0,p.aI)(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new S([],[],0)}}const k=(0,g.H)("stickyScrollViewLayer",{createHTML:e=>e}),x="data-sticky-line-index",L="data-sticky-is-line",D="data-sticky-is-folding-icon";class E extends d.jG{constructor(e){super(),this._editor=e,this._foldingIconStore=new d.Cm,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof _.t),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&t(),e.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{this._updateWidgetWidth()}))),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find((t=>t.lineNumber===e))}getCurrentLines(){return this._lineNumbers}setState(e,t,i){if(void 0===i&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const n=this._isWidgetHeightZero(e),s=n?void 0:e,o=n?0:this._findLineToRebuildWidgetFrom(e,i);this._renderRootNode(s,t,o),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];return 0===t}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(void 0!==t)return t;const i=this._previousState,n=e.startLineNumbers.findIndex((e=>!i.startLineNumbers.includes(e)));return-1===n?0:n}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",this._editor.getScrollWidth()-e.verticalScrollbarWidth+"px"),this._rootDomNode.style.width=e.width-e.verticalScrollbarWidth+"px"}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;te.scrollWidth)))+n.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){"mouseover"===this._editor.getOption(111)&&(this._foldingIconStore.add(u.ko(this._lineNumbersDomNode,u.Bx.MOUSE_ENTER,(()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(u.ko(this._lineNumbersDomNode,u.Bx.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const s=this._editor._getViewModel();if(!s)return;const o=s.coordinatesConverter.convertModelPositionToViewPosition(new v.y(t,1)).lineNumber,r=s.getViewLineRenderingData(o),a=this._editor.getOption(68);let l;try{l=w.d.filter(r.inlineDecorations,o,r.minColumn,r.maxColumn)}catch(e){l=[]}const c=new C.zL(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,l,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new b.fe(2e3),h=(0,C.UW)(c,d);let u;u=k?k.createHTML(d.build()):d.build();const g=document.createElement("span");g.setAttribute(x,String(e)),g.setAttribute(L,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=u;const p=document.createElement("span");p.setAttribute(x,String(e)),p.setAttribute("data-sticky-is-line-number",""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const f=n.contentLeft;p.style.width=`${f}px`;const m=document.createElement("span");1===a.renderType||3===a.renderType&&t%10==0?m.innerText=t.toString():2===a.renderType&&(m.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),m.className="sticky-line-number-inner",m.style.lineHeight=`${this._lineHeight}px`,m.style.width=`${n.lineNumbersWidth}px`,m.style.paddingLeft=`${n.lineNumbersLeft}px`,p.appendChild(m);const _=this._renderFoldingIconForLine(i,t);_&&p.appendChild(_.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(m),p.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const y=new N(e,t,g,p,_,h.characterMapping,g.scrollWidth);return this._updateTopAndZIndexOfStickyLine(y)}_updateTopAndZIndexOfStickyLine(e){const t=e.index,i=e.lineDomNode,n=e.lineNumberDomNode,s=t===this._lineNumbers.length-1;i.style.zIndex=s?"0":"1",n.style.zIndex=s?"0":"1";const o=`${t*this._lineHeight+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`,r=t*this._lineHeight+"px";return i.style.top=s?o:r,n.style.top=s?o:r,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(111);if(!e||"never"===i)return;const n=e.regions,s=n.findRange(t),o=n.getStartLineNumber(s);if(t!==o)return;const r=n.isCollapsed(s),a=new I(r,o,n.getEndLineNumber(s),this._lineHeight);return a.setVisible(!!this._isOnGlyphMargin||r||"always"===i),a.domNode.setAttribute(D,""),a}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=(0,m.rk)(t.characterMapping,e,0);return new v.y(t.lineNumber,i)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,x);return t?parseInt(t,10):null}isInStickyLine(e){return void 0!==this._getAttributeValue(e,L)}isInFoldingIconDomNode(e){return void 0!==this._getAttributeValue(e,D)}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(null!==i)return i;e=e.parentElement}}}class N{constructor(e,t,i,n,s,o,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=s,this.characterMapping=o,this.scrollWidth=r}}class I{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=f.L.asClassName(e?y.k0:y.E0)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}var M=i(76611),T=i(90890),R=i(80670),P=i(8494),A=i(51099),O=i(69904),F=i(45692),B=i(59691),W=i(20187);class H{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class V{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class z{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var U,j,q=i(26182),K=i(63619),$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},G=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.OUTLINE_MODEL="outlineModel",e.FOLDING_PROVIDER_MODEL="foldingProviderModel",e.INDENTATION_MODEL="indentationModel"}(U||(U={})),function(e){e[e.VALID=0]="VALID",e[e.INVALID=1]="INVALID",e[e.CANCELED=2]="CANCELED"}(j||(j={}));let Q=class extends d.jG{constructor(e,t,i,n){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new T.ve(300)),this._updateOperation=this._register(new d.Cm),this._editor.getOption(116).defaultModel){case U.OUTLINE_MODEL:this._modelProviders.push(new Z(this._editor,n));case U.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new ee(this._editor,t,n));case U.INDENTATION_MODEL:this._modelProviders.push(new J(this._editor,i))}}dispose(){this._modelProviders.forEach((e=>e.dispose())),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger((async()=>{for(const t of this._modelProviders){const{statusPromise:i,modelPromise:n}=t.computeStickyModel(e);this._modelPromise=n;const s=await i;if(this._modelPromise!==n)return null;switch(s){case j.CANCELED:return this._updateOperation.clear(),null;case j.VALID:return t.stickyModel}}return null})).catch((e=>((0,W.dz)(e),null)))}};Q=$([G(2,K._Y),G(3,h.ILanguageFeaturesService)],Q);class Y extends d.jG{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,j.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=(0,T.SS)((e=>this.createModelFromProvider(e)));return{statusPromise:t.then((t=>this.isModelValid(t)?e.isCancellationRequested?j.CANCELED:(this._stickyModel=this.createStickyModel(e,t),j.VALID):this._invalid())).then(void 0,(e=>((0,W.dz)(e),j.CANCELED))),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let Z=class extends Y{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return A.i9.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){const{stickyOutlineElement:i,providerID:n}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),s=this._editor.getModel();return new z(s.uri,s.getVersionId(),i,n)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(q.f.first(e.children.values())instanceof A.e0){const n=q.f.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,s="",o=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>o&&(n=i,o=e,s=i.id)}t=s,i=n.children}}else i=e.children;const n=[],s=Array.from(i.values()).sort(((e,t)=>{const i=new H(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new H(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const e of s)n.push(this._stickyModelFromOutlineElement(e,e.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new V(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const n of e.children.values())if(n.symbol.selectionRange.startLineNumber!==n.symbol.range.endLineNumber)if(n.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(n,n.symbol.selectionRange.startLineNumber));else for(const e of n.children.values())i.push(this._stickyModelFromOutlineElement(e,n.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new H(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new V(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof A.LC?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};Z=$([G(1,h.ILanguageFeaturesService)],Z);class X extends Y{constructor(e){super(e),this._foldingLimitReporter=new O.BP(e)}createStickyModel(e,t){const i=this._fromFoldingRegions(t),n=this._editor.getModel();return new z(n.uri,n.getVersionId(),i,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new V(void 0,[],void 0);for(let s=0;s0&&(this.provider=this._register(new F.M(e.getModel(),n,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return void 0!==this.provider}async createModelFromProvider(e){return this.provider?.compute(e)??null}};ee=$([G(2,h.ILanguageFeaturesService)],ee);var te=function(e,t){return function(i,n){t(i,n,e)}};class ie{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let ne=class extends d.jG{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new R.vl),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new d.Cm),this._updateSoon=this._register(new T.uC((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(116).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>this.update()))),this._sessionStore.add((0,d.s)((()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null}))),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null;const e=this._editor;e.hasModel()&&(this._stickyModelProvider=new Q(e,(()=>this._updateSoon.schedule()),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new M.Qi,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization())return void(this._model=null);const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,s){if(0===t.children.length)return;let o=s;const r=[];for(let e=0;ee-t))),l=this.updateIndex((0,p.El)(r,e.startLineNumber+n,((e,t)=>e-t)));for(let r=a;r<=l;r++){const a=t.children[r];if(!a)return;if(a.range){const t=a.range.startLineNumber,s=a.range.endLineNumber;e.startLineNumber<=s+1&&t-1<=e.endLineNumber&&t!==o&&(o=t,i.push(new ie(t,s-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n,s)}}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];let t=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,-1);const i=this._editor._getViewModel()?.getHiddenAreas();if(i)for(const e of i)t=t.filter((t=>!(t.startLineNumber>=e.startLineNumber&&t.endLineNumber<=e.endLineNumber+1)));return t}};ne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([te(1,h.ILanguageFeaturesService),te(2,P.JZ)],ne);var se,oe=i(14280),re=i(48843),ae=i(40393),le=i(3638),ce=i(59460),de=i(82688),he=i(34287),ue=i(93795),ge=function(e,t){return function(i,n){t(i,n,e)}};let pe=class extends d.jG{static{se=this}static{this.ID="store.contrib.stickyScrollController"}constructor(e,t,i,n,s,o,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new d.Cm,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new E(this._editor),this._stickyLineCandidateProvider=new ne(this._editor,i,s),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=S.Empty,this._onDidResize(),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{this._readConfigurationChange(e)}))),this._register(u.ko(a,u.Bx.CONTEXT_MENU,(async e=>{this._onContextMenu(u.zk(a),e)}))),this._stickyScrollFocusedContextKey=c.R.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=c.R.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(u.w5(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(u.ko(a,u.Bx.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(se.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();!0!==this._stickyScrollFocusedContextKey.get()&&(this._focused=!0,this._focusDisposableStore=new d.Cm,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,(()=>this._editor.revealPosition(e)))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,(()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0)))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(ae.Q.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new d.Cm),t=this._register(new re.gi(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new ae.Q(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(u.b2(n,u.Bx.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new v.y(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}if(this._stickyScrollWidget.isInFoldingIconDomNode(e.target)){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);return void this._toggleFoldingRegionForLine(t)}if(!this._stickyScrollWidget.isInStickyLine(e.target))return;let t=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!t){const i=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===i)return;t=new v.y(i,1)}this._revealPosition(t)}))),this._register(u.b2(n,u.Bx.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}void 0!==this._showEndForLine&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._register(u.ko(n,u.Bx.MOUSE_LEAVE,(e=>{void 0!==this._showEndForLine&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const s=i(t);if(!s||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:o,textElement:r}=s;if(o.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=o,e.clear();const a=new M.Qi;let l;e.add((0,d.s)((()=>a.dispose(!0)))),(0,le.hE)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new v.y(o.startLineNumber,o.startColumn+1),!1,a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add((0,d.s)((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add((0,d.s)((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((async e=>{if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&this._editor.hasModel()&&this._stickyRangeProjectedOnEditor&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(ce.U,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e,t){const i=new he.P(e,t);this._contextMenuService.showContextMenu({menuId:r.D8.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||null===e)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),i=t?.foldingIcon;if(!i)return;(0,ue.bC)(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(116);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=void 0,this._renderStickyScroll()}))),this._enabled=!0),2===this._editor.getOption(68).renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)})))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const e=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(.25*e)}async _renderStickyScroll(e){const t=this._editor.getModel();if(!t||t.isTooLargeForTokenization())return void this._resetState();const i=this._updateAndGetMinRebuildFromLine(e),n=this._stickyLineCandidateProvider.getVersionId();if(void 0===n||n===t.getVersionId())if(this._focused)if(-1===this._focusedStickyElementIndex)await this._updateState(i),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const e=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(i),0===this._stickyScrollWidget.lineNumberCount?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(e)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}else await this._updateState(i)}_updateAndGetMinRebuildFromLine(e){if(void 0!==e){const t=void 0!==this._minRebuildFromLine?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await(O.WR.get(this._editor)?.getFoldingModel())??void 0,this._widgetState=this.findScrollWidgetState();const t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=S.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),i=this._editor.getScrollTop();let n=0;const s=[],o=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new H(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,c=r.nestingDepth;if(l-a>0){const r=(c-1)*e,d=c*e,h=this._editor.getBottomForLineNumber(a)-i,u=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>u&&r<=g){s.push(a),o.push(l+1),n=g-d;break}if(d>h&&d<=g&&(s.push(a),o.push(l+1)),s.length===t)break}}}return this._endLineNumbers=o,new S(s,o,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};pe=se=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ge(1,oe.Z),ge(2,h.ILanguageFeaturesService),ge(3,K._Y),ge(4,P.JZ),ge(5,de.ILanguageFeatureDebounceService),ge(6,l.fN)],pe);class fe extends r.L{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...(0,s.aS)("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:(0,s.kg)({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:(0,s.aS)("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:o.View,toggled:{condition:l.M$.equals("config.editor.stickyScroll.enabled",!0),title:(0,s.kg)("stickyScroll","Sticky Scroll"),mnemonicTitle:(0,s.kg)({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:r.D8.CommandPalette},{id:r.D8.MenubarAppearanceMenu,group:"4_editor",order:3},{id:r.D8.StickyScrollContext}]})}async run(e){const t=e.get(a.pG),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}}const me=100;class _e extends n.qO{constructor(){super({id:"editor.action.focusStickyScroll",title:{...(0,s.aS)("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:(0,s.kg)({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:l.M$.and(l.M$.has("config.editor.stickyScroll.enabled"),c.R.stickyScrollVisible),menu:[{id:r.D8.CommandPalette}]})}runEditorCommand(e,t){pe.get(t)?.focus()}}class ve extends n.qO{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:(0,s.aS)("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:me,primary:18}})}runEditorCommand(e,t){pe.get(t)?.focusNext()}}class be extends n.qO{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:(0,s.aS)("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:me,primary:16}})}runEditorCommand(e,t){pe.get(t)?.focusPrevious()}}class we extends n.qO{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:(0,s.aS)("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:me,primary:3}})}runEditorCommand(e,t){pe.get(t)?.goToFocused()}}class Ce extends n.qO{constructor(){super({id:"editor.action.selectEditor",title:(0,s.aS)("selectEditor.title","Select Editor"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:me,primary:9}})}runEditorCommand(e,t){pe.get(t)?.selectEditor()}}(0,n.HW)(pe.ID,pe,1),(0,r.ug)(fe),(0,r.ug)(_e),(0,r.ug)(be),(0,r.ug)(ve),(0,r.ug)(we),(0,r.ug)(Ce)},329:function(e,t,i){"use strict";i.d(t,{C:function(){return a},O:function(){return r}});var n=i(97358),s=i(17793),o=i(43920);class r{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class a{constructor(e,t,i,n,o,r,l=s.Nd.default,c=void 0){this.clipboardText=c,this._snippetCompareFn=a._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=l,"top"===r?this._snippetCompareFn=a._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=a._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let r="",a="";const l=1===this._refilterKind?this._items:this._filteredItems,c=[],d=!this._options.filterGraceful||l.length>2e3?s.dt:s.uU;for(let n=0;n=p)h.score=s.ne.Default;else if("string"==typeof h.completion.filterText){const t=d(r,a,e,h.completion.filterText,h.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===(0,o.W1)(h.completion.filterText,h.textLabel)?h.score=t:(h.score=(0,s.Jo)(r,a,e,h.textLabel,h.labelLow,0),h.score[0]=t[0])}else{const t=d(r,a,e,h.textLabel,h.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;h.score=t}}h.idx=n,h.distance=this._wordDistance.distance(h.position,h.completion),c.push(h),e.push(h.textLabel.length)}this._filteredItems=c.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,n.SO)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return a._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return a._compareCompletionItems(e,t)}}},9408:function(e,t,i){"use strict";i.d(t,{aR:function(){return L},dt:function(){return w},f3:function(){return k},l1:function(){return y},ob:function(){return b},p3:function(){return N},r3:function(){return I}});var n=i(76611),s=i(20187),o=i(17793),r=i(35114),a=i(43857),l=i(24219),c=i(54244),d=i(62993),h=i(40393),u=i(20878),g=i(62347),p=i(14374),f=i(93223),m=i(21335),_=i(97848),v=i(69122);const b={Visible:i(87438).dg,HasFocusedSuggestion:new _.N1("suggestWidgetHasFocusedSuggestion",!1,(0,p.kg)("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new _.N1("suggestWidgetDetailsVisible",!1,(0,p.kg)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new _.N1("suggestWidgetMultipleSuggestions",!1,(0,p.kg)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new _.N1("suggestionMakesTextEdit",!0,(0,p.kg)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new _.N1("acceptSuggestionOnEnter",!0,(0,p.kg)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new _.N1("suggestionHasInsertAndReplaceRange",!1,(0,p.kg)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new _.N1("suggestionInsertMode",void 0,{type:"string",description:(0,p.kg)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new _.N1("suggestionCanResolve",!1,(0,p.kg)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new f.D8("suggestWidgetStatusBar");class C{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=o.ne.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,h.Q.isIRange(t.range)?(this.editStart=new d.y(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new d.y(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new d.y(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||h.Q.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new d.y(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new d.y(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new d.y(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||h.Q.spansMultipleLines(t.range.insert)||h.Q.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new a.W(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed()}),(e=>{(0,s.MB)(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})).finally((()=>{t.dispose()}))}return this._resolveCache}}class y{static{this.default=new y}constructor(e=2,t=new Set,i=new Set,n=new Map,s=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=s}}let S;function k(){return S}class x{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function L(e,t,i,o=y.default,l={triggerKind:0},c=n.XO.None){const d=new a.W;i=i.clone();const u=t.getWordAtPosition(i),p=u?new h.Q(i.lineNumber,u.startColumn,i.lineNumber,u.endColumn):h.Q.fromPositions(i),f={replace:p,insert:p.setEndPosition(i.lineNumber,i.column)},m=[],_=new r.Cm,v=[];let b=!1;const w=(e,t,n)=>{let s=!1;if(!t)return s;for(const n of t.suggestions)if(!o.kindFilter.has(n.kind)){if(!o.showDeprecated&&n?.tags?.includes(1))continue;n.range||(n.range=f),n.sortText||(n.sortText="string"==typeof n.label?n.label:n.label.label),!b&&n.insertTextRules&&4&n.insertTextRules&&(b=g.fr.guessNeedsClipboard(n.insertText)),m.push(new C(i,n,t,e)),s=!0}return(0,r.Xm)(t)&&_.add(t),v.push({providerName:e._debugDisplayName??"unknown_provider",elapsedProvider:t.duration??-1,elapsedOverall:n.elapsed()}),s},k=(async()=>{if(!S||o.kindFilter.has(27))return;const e=o.providerItemsToReuse.get(S);if(e)return void e.forEach((e=>m.push(e)));if(o.providerFilter.size>0&&!o.providerFilter.has(S))return;const n=new a.W,s=await S.provideCompletionItems(t,i,l,c);w(S,s,n)})();for(const n of e.orderedGroups(t)){let e=!1;if(await Promise.all(n.map((async n=>{if(o.providerItemsToReuse.has(n)){const t=o.providerItemsToReuse.get(n);return t.forEach((e=>m.push(e))),void(e=e||t.length>0)}if(!(o.providerFilter.size>0)||o.providerFilter.has(n))try{const s=new a.W,o=await n.provideCompletionItems(t,i,l,c);e=w(n,o,s)||e}catch(e){(0,s.M_)(e)}}))),e||c.isCancellationRequested)break}return await k,c.isCancellationRequested?(_.dispose(),Promise.reject(new s.AL)):new x(m.sort((L=o.snippetSortOrder,E.get(L))),b,{entries:v,elapsed:d.elapsed()},_);var L}function D(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.textLabelt.textLabel?1:e.completion.kind-t.completion.kind}const E=new Map;function N(e,t){e.getContribution("editor.contrib.suggestController")?.triggerSuggest((new Set).add(t),void 0,!0)}E.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return D(e,t)})),E.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return D(e,t)})),E.set(1,D),m.w.registerCommand("_executeCompletionItemProvider",(async(e,...t)=>{const[i,s,o,r]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(d.y.isIPosition(s)),(0,l.j)("string"==typeof o||!o),(0,l.j)("number"==typeof r||!r);const{completionProvider:a}=e.get(v.ILanguageFeaturesService),h=await e.get(u.ITextModelService).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=h.object.textEditorModel.validatePosition(s),l=await L(a,h.object.textEditorModel,i,void 0,{triggerCharacter:o??void 0,triggerKind:o?1:0});for(const i of l.items)t.length<(r??0)&&t.push(i.resolve(n.XO.None)),e.incomplete=e.incomplete||i.container.incomplete,e.suggestions.push(i.completion);try{return await Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{h.dispose()}}));class I{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}},6503:function(e,t,i){"use strict";i.d(t,{D:function(){return Fe}});var n,s=i(15075),o=i(97358),r=i(76611),a=i(20187),l=i(80670),c=i(99559),d=i(35114),h=i(79783),u=i(43857),g=i(24219),p=i(61554),f=i(52694),m=i(48905),_=i(62993),v=i(40393),b=i(49678),w=i(83012),C=i(62347),y=i(49195),S=i(97848);let k=class{static{n=this}static{this.AtEnd=new S.N1("atEndOfWord",!1)}constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=n.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(124)&&this._update())),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(124);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};var x,L;k=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(x=1,L=S.fN,function(e,t){L(e,t,x)})],k);var D,E=i(14374),N=i(21335),I=i(63619),M=i(76925),T=i(9408);let R=class{static{D=this}static{this.OtherSuggestions=new S.N1("hasOtherSuggestions",!1)}constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=D.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){0!==e.items.length&&D._moveIndex(!0,e,t)!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let s=t.items.length;s>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i)&&t.items[n].completion.additionalTextEdits;s--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=D._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};R=D=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,S.fN)],R);var P=i(82282);class A{constructor(e,t,i,n){this._disposables=new d.Cm,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((s=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!(0,o.EI)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new P.y;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var O=i(82919);class F{static{this._maxSelectionLength=51200}constructor(e,t){this._disposables=new d.Cm,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eF._maxSelectionLength)return;this._lastOvertyped[e]={value:s.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&ee instanceof K.Xe?i.createInstance(q.rr,e,{useComma:!0}):void 0;this._leftActions=new j.E(this.element,{actionViewItemProvider:o}),this._rightActions=new j.E(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,s]of e.getActions())"left"===n?t.push(...s):i.push(...s);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};G=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([$(2,I._Y),$(3,K.ez),$(4,S.fN)],G),i(83172);var Q=i(87332),Y=i(4195),Z=i(39679),X=i(40616),J=i(98435),ee=i(5390),te=i(93231),ie=i(56613),ne=i(85584),se=i(69498);function oe(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let re=class{constructor(e,t){this._editor=e,this._onDidClose=new l.vl,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new l.vl,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new d.Cm,this._renderDisposeable=new d.Cm,this._borderWidth=1,this._size=new B.fg(330,0),this.domNode=B.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(se.T,{editor:e}),this._body=B.$(".body"),this._scrollbar=new ee.MU(this._body,{alwaysConsumeMouseWheel:!0}),B.BC(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=B.BC(this._body,B.$(".header")),this._close=B.BC(this._header,B.$("span"+ie.L.asCSSSelector(te.W.close))),this._close.title=E.kg("details.close","Close"),this._type=B.BC(this._header,B.$("p.type")),this._docs=B.BC(this._body,B.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(120)||t.fontSize,s=e.get(121)||t.lineHeight,o=t.fontWeight,r=`${n}px`,a=`${s}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+s/n,this.domNode.style.fontWeight=o,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(121)||this._editor.getOption(50).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=E.kg("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){this._renderDisposeable.clear();let{detail:i,documentation:n}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${e.word??"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${e.completion.commitCharacters?.join("")}\n`,n=(new ne.Bc).appendCodeblock("empty",t),i=`Provider: ${e.provider._debugDisplayName}`}if(t||oe(e)){if(this.domNode.classList.remove("no-docs","no-type"),i){const e=i.length>1e5?`${i.substr(0,1e5)}…`:i;this._type.textContent=e,this._type.title=e,B.WU(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else B.w_(this._type),this._type.title="",B.jD(this._type),this.domNode.classList.add("no-type");if(B.w_(this._docs),"string"==typeof n)this._docs.classList.remove("markdown-docs"),this._docs.textContent=n;else if(n){this._docs.classList.add("markdown-docs"),B.w_(this._docs);const e=this._markdownRenderer.render(n);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){const i=new B.fg(e,t);B.fg.equals(i,this._size)||(this._size=i,B.Ej(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};re=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,I._Y)],re);class ae{constructor(e,t){let i,n;this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new d.Cm,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new J.v,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let s=0,o=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(o=n.width-e.dimension.width,t=!0),e.north&&(s=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+s,left:i.left+o})}e.done&&(i=void 0,n=void 0,s=0,o=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,i){const n=B.tG(this.getDomNode().ownerDocument.body),s=this.widget.getLayoutInfo(),o=new B.fg(220,2*s.lineHeight),r=e.top,a=function(){const i=n.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),a=-s.borderWidth+e.left+e.width,l=new B.fg(i,n.height-e.top-s.borderHeight-s.verticalPadding),c=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:o.with(Math.min(i,o.width))}}(),l=function(){const i=e.left-s.borderWidth-s.horizontalPadding,a=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),l=new B.fg(i,n.height-e.top-s.borderHeight-s.verticalPadding),c=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:o.with(Math.min(i,o.width))}}(),c=function(){const i=e.left,r=-s.borderWidth+e.top+e.height,a=new B.fg(e.width-s.borderHeight,n.height-e.top-e.height-s.verticalPadding);return{top:r,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:o.with(a.width)}}(),d=[a,l,c],h=d.find((e=>e.fit>=0))??d.sort(((e,t)=>t.fit-e.fit))[0],u=e.top+e.height-s.borderHeight;let g,p=t.height;const f=Math.max(h.maxSizeTop.height,h.maxSizeBottom.height);let m;p>f&&(p=f),i?p<=h.maxSizeTop.height?(g=!0,m=h.maxSizeTop):(g=!1,m=h.maxSizeBottom):p<=h.maxSizeBottom.height?(g=!1,m=h.maxSizeBottom):(g=!0,m=h.maxSizeTop);let{top:_,left:v}=h;!g&&p>e.height&&(_=u-p);const b=this._editor.getDomNode();if(b){const e=b.getBoundingClientRect();_-=e.top,v-=e.left}this._applyTopLeft({left:v,top:_}),this._resizable.enableSashes(!g,h===a,g,h!==a),this._resizable.minSize=h.minSize,this._resizable.maxSize=m,this._resizable.layout(p,Math.min(m.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var le=i(38403),ce=i(17793),de=i(54244),he=i(35720),ue=i(32352),ge=i(59266),pe=i(41750),fe=i(65127),me=function(e,t){return function(i,n){t(i,n,e)}};function _e(e){return`suggest-aria-id:${e}`}const ve=(0,i(51310).pU)("suggest-more-info",te.W.chevronRight,E.kg("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),be=new class e{static{this._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/}static{this._regexStrict=new RegExp(`^${e._regexRelaxed.source}$`,"i")}extract(t,i){if(t.textLabel.match(e._regexStrict))return i[0]=t.textLabel,!0;if(t.completion.detail&&t.completion.detail.match(e._regexStrict))return i[0]=t.completion.detail,!0;if(t.completion.documentation){const n="string"==typeof t.completion.documentation?t.completion.documentation:t.completion.documentation.value,s=e._regexRelaxed.exec(n);if(s&&(0===s.index||s.index+s[0].length===n.length))return i[0]=s[0],!0}return!1}};let we=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new l.vl,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new d.Cm,i=e;i.classList.add("show-file-icons");const n=(0,B.BC)(e,(0,B.$)(".icon")),s=(0,B.BC)(n,(0,B.$)("span.colorspan")),o=(0,B.BC)(e,(0,B.$)(".contents")),r=(0,B.BC)(o,(0,B.$)(".main")),a=(0,B.BC)(r,(0,B.$)(".icon-label.codicon")),l=(0,B.BC)(r,(0,B.$)("span.left")),c=(0,B.BC)(r,(0,B.$)("span.right")),h=new le.s(l,{supportHighlights:!0,supportIcons:!0});t.add(h);const u=(0,B.BC)(l,(0,B.$)("span.signature-label")),g=(0,B.BC)(l,(0,B.$)("span.qualifier-label")),p=(0,B.BC)(c,(0,B.$)("span.details-label")),f=(0,B.BC)(c,(0,B.$)("span.readMore"+ie.L.asCSSSelector(ve)));return f.title=E.kg("readMore","Read More"),{root:i,left:l,right:c,icon:n,colorspan:s,iconLabel:h,iconContainer:a,parametersLabel:u,qualifierLabel:g,detailsLabel:p,readMore:f,disposables:t,configureFont:()=>{const e=this._editor.getOptions(),t=e.get(50),s=t.getMassagedFontFamily(),o=t.fontFeatureSettings,a=e.get(120)||t.fontSize,l=e.get(121)||t.lineHeight,c=t.fontWeight,d=`${a}px`,h=`${l}px`,u=`${t.letterSpacing}px`;i.style.fontSize=d,i.style.fontWeight=c,i.style.letterSpacing=u,r.style.fontFamily=s,r.style.fontFeatureSettings=o,r.style.lineHeight=h,n.style.height=h,n.style.width=h,f.style.height=h,f.style.width=h}}}renderElement(e,t,i){i.configureFont();const{completion:n}=e;i.root.id=_e(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:(0,ce.WJ)(e.score)},o=[];if(19===n.kind&&be.extract(e,o))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=o[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=(0,ue.getIconClasses)(this._modelService,this._languageService,de.r.from({scheme:"fake",path:e.textLabel}),fe.p.FILE),o=(0,ue.getIconClasses)(this._modelService,this._languageService,de.r.from({scheme:"fake",path:n.detail}),fe.p.FILE);s.extraClasses=t.length>o.length?t:o}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[(0,ue.getIconClasses)(this._modelService,this._languageService,de.r.from({scheme:"fake",path:e.textLabel}),fe.p.FOLDER),(0,ue.getIconClasses)(this._modelService,this._languageService,de.r.from({scheme:"fake",path:n.detail}),fe.p.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...ie.L.asClassNameArray(he.HC.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=Ce(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=Ce(n.label.detail||""),i.detailsLabel.textContent=Ce(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(119).showInlineDetails?(0,B.WU)(i.detailsLabel):(0,B.jD)(i.detailsLabel),oe(e)?(i.right.classList.add("can-expand-details"),(0,B.WU)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,B.jD)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Ce(e){return e.replace(/\r\n|\r|\n/g,"")}we=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([me(1,ge.IModelService),me(2,pe.L),me(3,X.Gy)],we);var ye,Se=i(52010),ke=function(e,t){return function(i,n){t(i,n,e)}};(0,Y.x1A)("editorSuggestWidget.background",Y.CgL,E.kg("editorSuggestWidgetBackground","Background color of the suggest widget.")),(0,Y.x1A)("editorSuggestWidget.border",Y.sIe,E.kg("editorSuggestWidgetBorder","Border color of the suggest widget."));const xe=(0,Y.x1A)("editorSuggestWidget.foreground",Y.By2,E.kg("editorSuggestWidgetForeground","Foreground color of the suggest widget."));(0,Y.x1A)("editorSuggestWidget.selectedForeground",Y.nH,E.kg("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),(0,Y.x1A)("editorSuggestWidget.selectedIconForeground",Y.c7i,E.kg("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const Le=(0,Y.x1A)("editorSuggestWidget.selectedBackground",Y.AlL,E.kg("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));(0,Y.x1A)("editorSuggestWidget.highlightForeground",Y.QI5,E.kg("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),(0,Y.x1A)("editorSuggestWidget.focusHighlightForeground",Y.eMz,E.kg("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused.")),(0,Y.x1A)("editorSuggestWidgetStatus.foreground",(0,Y.JO0)(xe,.5),E.kg("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class De{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof U.t}`}restore(){const e=this._service.get(this._key,0)??"";try{const t=JSON.parse(e);if(B.fg.is(t))return B.fg.lift(t)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Ee=class{static{ye=this}static{this.LOADING_MESSAGE=E.kg("suggestWidget.loading","Loading...")}static{this.NO_SUGGESTIONS_MESSAGE=E.kg("suggestWidget.noSuggestions","No suggestions.")}constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new d.HE,this._pendingShowDetails=new d.HE,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new H.pc,this._disposables=new d.Cm,this._onDidSelect=new l.fV,this._onDidFocus=new l.fV,this._onDidHide=new l.vl,this._onDidShow=new l.vl,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new l.vl,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new J.v,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Ne(this,e),this._persistedSize=new De(t,e);class o{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new o(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:t}=this.getLayoutInfo(),i=Math.round(e/2);let{width:n,height:s}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-s)<=i)&&(s=r.persistedSize?.height??t.height),(!r.persistWidth||Math.abs(r.currentSize.width-n)<=i)&&(n=r.persistedSize?.width??t.width),this._persistedSize.store(new B.fg(n,s))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=B.BC(this.element.domNode,B.$(".message")),this._listElement=B.BC(this.element.domNode,B.$(".tree"));const a=this._disposables.add(s.createInstance(re,this.editor));a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new ae(a,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(119).showIcons);c();const h=s.createInstance(we,this.editor);this._disposables.add(h),this._disposables.add(h.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new W.B8("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[h],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>E.kg("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!=typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=E.kg("label.full","{0} {1}, {2}",t,i,n):i?t=E.kg("label.detail","{0} {1}",t,i):n&&(t=E.kg("label.desc","{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion,s=z.GP("{0}{1}",n||"",i?"string"==typeof i?i:i.value:"");return E.kg("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,s)}}}),this._list.style((0,Se.t8)({listInactiveFocusBackground:Le,listInactiveFocusOutline:Y.buw})),this._status=s.createInstance(G,this.element.domNode,T.dt);const u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(119).showStatusBar);u(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(119)&&(u(),c()),this._completionModel&&(e.hasChanged(50)||e.hasChanged(120)||e.hasChanged(121))&&this._list.splice(0,this._list.length,this._completionModel.items)}))),this._ctxSuggestWidgetVisible=T.ob.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=T.ob.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=T.ob.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=T.ob.HasFocusedSuggestion.bindTo(i),this._disposables.add(B.b2(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=(0,Z.Bb)(e.type)?2:1}_onListFocus(e){if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const t=e.elements[0],i=e.indexes[0];t!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=t,this._list.reveal(i),this._currentSuggestionDetails=(0,H.SS)((async e=>{const i=(0,H.EQ)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>i.dispose()));try{return await t.resolve(e)}finally{i.dispose(),n.dispose()}})),this._currentSuggestionDetails.then((()=>{i>=this._list.length||t!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[t]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:_e(i)}))})).catch(a.dz)),this._onDidFocus.fire({item:t,index:i,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:B.jD(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=ye.LOADING_MESSAGE,B.jD(this._listElement,this._status.element),B.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,s.h5)(ye.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=ye.NO_SUGGESTIONS_MESSAGE,B.jD(this._listElement,this._status.element),B.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,s.h5)(ye.NO_SUGGESTIONS_MESSAGE);break;case 3:case 4:B.jD(this._messageElement),B.WU(this._listElement,this._status.element),this._show();break;case 5:B.jD(this._messageElement),B.WU(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,H.EQ)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,s){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const o=this._completionModel.items.length,r=0===o;if(this._ctxSuggestWidgetMultipleSuggestions.set(o>1),r)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(s?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=B.Oq(B.zk(this.element.domNode),(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!oe(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=B.Oq(B.zk(this.element.domNode),(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._pendingLayout.clear(),this._pendingShowDetails.clear(),this._loadingTimeout?.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const e=this._persistedSize.restore(),t=Math.ceil(4.3*this.getLayoutInfo().itemHeight);e&&e.heighto&&(s=o);const r=this._completionModel?this._completionModel.stats.pLabelLen*i.typicalHalfwidthCharacterWidth:s,a=i.statusBarHeight+this._list.contentHeight+i.borderHeight,l=i.itemHeight+i.statusBarHeight,c=B.BK(this.editor.getDomNode()),d=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),h=c.top+d.top+d.height,u=Math.min(t.height-h-i.verticalPadding,a),g=c.top+d.top-i.verticalPadding,p=Math.min(g,a);let f=Math.min(Math.max(p,u)+i.borderHeight,a);n===this._cappedHeight?.capped&&(n=this._cappedHeight.wanted),nf&&(n=f);const m=150;n>u||this._forceRenderingAbove&&g>m?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),f=p):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),f=u),this.element.preferredSize=new B.fg(r,i.defaultSize.height),this.element.maxSize=new B.fg(o,f),this.element.minSize=new B.fg(220,l),this._cappedHeight=n===a?{wanted:this._cappedHeight?.wanted??e.height,capped:n}:void 0}this._resize(s,n)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=t-s+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===this._contentWidget.getPosition()?.preference[0])}getLayoutInfo(){const e=this.editor.getOption(50),t=(0,V.qE)(this.editor.getOption(121)||e.lineHeight,8,1e3),i=this.editor.getOption(119).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new B.fg(430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Ee=ye=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ke(1,Q.CS),ke(2,S.fN),ke(3,X.Gy),ke(4,I._Y)],Ee);class Ne{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new B.fg(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Ie,Me=i(2727),Te=i(59951),Re=i(65260),Pe=i(49079),Ae=function(e,t){return function(i,n){t(i,n,e)}};class Oe{constructor(e,t){if(this._model=e,this._position=t,this._decorationOptions=Pe.kI.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);e.changeDecorations((e=>{this._marker&&e.removeDecoration(this._marker),this._marker=e.addDecoration(v.Q.fromPositions(t,n),this._decorationOptions)}))}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations((e=>{e.removeDecoration(this._marker),this._marker=void 0}))}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Fe=class{static{Ie=this}static{this.ID="editor.contrib.suggestController"}static get(e){return e.getContribution(Ie.ID)}constructor(e,t,i,n,s,o,r){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=o,this._telemetryService=r,this._lineSuffix=new d.HE,this._toDispose=new d.Cm,this._selectors=new Be((e=>e.priority)),this._onWillInsertSuggestItem=new l.vl,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=s.createInstance(O.Y,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const a=T.ob.InsertMode.bindTo(n);a.set(e.getOption(119).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>a.set(e.getOption(119).insertMode)))),this.widget=this._toDispose.add(new B.Ij((0,B.zk)(e.getDomNode()),(()=>{const e=this._instantiationService.createInstance(Ee,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new A(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=T.ob.MakesTextEdit.bindTo(this._contextKeyService),n=T.ob.HasInsertAndReplaceRange.bindTo(this._contextKeyService),s=T.ob.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,d.s)((()=>{i.reset(),n.reset(),s.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),o=e.editStart.column,r=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-o!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:o,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText),i.set(a),n.set(!_.y.equals(e.editInsertEnd,e.editReplaceEnd)),s.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new c.dG(!0,!1,!1,!1,33))||h.zx&&e.toKeyCodeChord().equals(new c.dG(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new B.Ij((0,B.zk)(e.getDomNode()),(()=>this._toDispose.add(new F(this.editor,this.model))))),this._alternatives=this._toDispose.add(new B.Ij((0,B.zk)(e.getDomNode()),(()=>this._toDispose.add(new R(this.editor,this._contextKeyService))))),this._toDispose.add(s.createInstance(k,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new Oe(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const i of this._selectors.itemsOrderedByPriorityDesc)if(t=i.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;if(-1===t&&(t=0),0===this.model.state)return;let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(119);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));const u=T.ob.AcceptSuggestionsOnEnter.bindTo(n),g=()=>{const e=this.editor.getOption(1);u.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>g()))),g()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=w.O.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:o}=e,l=[],c=new r.Qi;1&t||this.editor.pushUndoStop();const d=this.getOverwriteInfo(o,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),o);const h=o.isResolved;let g=-1,f=-1;if(Array.isArray(o.completion.additionalTextEdits)){this.model.cancel();const e=p.D.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((e=>{let t=v.Q.lift(e.range);if(t.startLineNumber===o.position.lineNumber&&t.startColumn>o.position.column){const e=this.editor.getPosition().column-o.position.column,i=e,n=v.Q.spansMultipleLines(t)?0:e;t=new v.Q(t.startLineNumber,t.startColumn+i,t.endLineNumber,t.endColumn+n)}return m.k.replaceMove(t,e.text)}))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!h){const e=new u.W;let i;const s=n.onDidChangeContent((e=>{if(e.isFlush)return c.cancel(),void s.dispose();for(const t of e.changes){const e=v.Q.getEndPosition(t.range);i&&!_.y.isBefore(e,i)||(i=e)}})),r=t;t|=2;let a=!1;const d=this.editor.onWillType((()=>{d.dispose(),a=!0,2&r||this.editor.pushUndoStop()}));l.push(o.resolve(c.token).then((()=>{if(!o.completion.additionalTextEdits||c.token.isCancellationRequested)return;if(i&&o.completion.additionalTextEdits.some((e=>_.y.isBefore(i,v.Q.getStartPosition(e.range)))))return!1;a&&this.editor.pushUndoStop();const e=p.D.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((e=>m.k.replaceMove(v.Q.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!a&&2&r||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),f=!0===t?1:!1===t?0:-2})).finally((()=>{s.dispose(),d.dispose()})))}let{insertText:b}=o.completion;if(4&o.completion.insertTextRules||(b=C.fr.escape(b)),this.model.cancel(),i.insert(b,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command)if(o.completion.command.id===We.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new u.W;l.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch((e=>{o.completion.extensionId?(0,a.M_)(e):(0,a.dz)(e)})).finally((()=>{g=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{for(c.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(l).finally((()=>{this._reportSuggestionAcceptedTelemetry(o,n,h,g,f,e.index,e.model.items),this.model.clear(),c.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,s,o,r){if(0===Math.floor(100*Math.random()))return;const a=new Map;for(let e=0;e1?l[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:e.extensionId?.value??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:(0,Re.tW)((0,Te.P8)(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:(0,Te.LC)(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:s,index:o,firstIndex:c})}getOverwriteInfo(e,t){(0,g.j)(this.editor.hasModel());let i="replace"===this.editor.getOption(119).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:s+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,o.EI)(e.completion.additionalTextEdits)){const t=E.kg("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,s.xE)(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};l.Jh.once(this.model.onDidTrigger)((e=>{const t=[];l.Jh.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,d.AS)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,d.AS)(t),0===e.items.length)return void i();const s=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),o=e.items[s];n(o)?(this.editor.pushUndoStop(),this._insertSuggestion({index:s,item:o,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Fe=Ie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Ae(1,y.GS),Ae(2,N.d),Ae(3,S.fN),Ae(4,I._Y),Ae(5,M.rr),Ae(6,Me.k)],Fe);class Be{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class We extends f.ks{static{this.id="editor.action.triggerSuggest"}constructor(){super({id:We.id,label:E.kg("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:S.M$.and(b.R.writable,b.R.hasCompletionItemProvider,T.ob.Visible.toNegated()),kbOpts:{kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=Fe.get(t);if(!n)return;let s;i&&"object"==typeof i&&!0===i.auto&&(s=!0),n.triggerSuggest(void 0,s,void 0)}}(0,f.HW)(Fe.ID,Fe,2),(0,f.Fl)(We);const He=190,Ve=f.DX.bindToContribution(Fe.get);(0,f.E_)(new Ve({id:"acceptSelectedSuggestion",precondition:S.M$.and(T.ob.Visible,T.ob.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:S.M$.and(T.ob.Visible,b.R.textInputFocus),weight:He},{primary:3,kbExpr:S.M$.and(T.ob.Visible,b.R.textInputFocus,T.ob.AcceptSuggestionsOnEnter,T.ob.MakesTextEdit),weight:He}],menuOpts:[{menuId:T.dt,title:E.kg("accept.insert","Insert"),group:"left",order:1,when:T.ob.HasInsertAndReplaceRange.toNegated()},{menuId:T.dt,title:E.kg("accept.insert","Insert"),group:"left",order:1,when:S.M$.and(T.ob.HasInsertAndReplaceRange,T.ob.InsertMode.isEqualTo("insert"))},{menuId:T.dt,title:E.kg("accept.replace","Replace"),group:"left",order:1,when:S.M$.and(T.ob.HasInsertAndReplaceRange,T.ob.InsertMode.isEqualTo("replace"))}]})),(0,f.E_)(new Ve({id:"acceptAlternativeSelectedSuggestion",precondition:S.M$.and(T.ob.Visible,b.R.textInputFocus,T.ob.HasFocusedSuggestion),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:T.dt,group:"left",order:2,when:S.M$.and(T.ob.HasInsertAndReplaceRange,T.ob.InsertMode.isEqualTo("insert")),title:E.kg("accept.replace","Replace")},{menuId:T.dt,group:"left",order:2,when:S.M$.and(T.ob.HasInsertAndReplaceRange,T.ob.InsertMode.isEqualTo("replace")),title:E.kg("accept.insert","Insert")}]})),N.w.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,f.E_)(new Ve({id:"hideSuggestWidget",precondition:T.ob.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:9,secondary:[1033]}})),(0,f.E_)(new Ve({id:"selectNextSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,f.E_)(new Ve({id:"selectNextPageSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:12,secondary:[2060]}})),(0,f.E_)(new Ve({id:"selectLastSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),(0,f.E_)(new Ve({id:"selectPrevSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,f.E_)(new Ve({id:"selectPrevPageSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:11,secondary:[2059]}})),(0,f.E_)(new Ve({id:"selectFirstSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),(0,f.E_)(new Ve({id:"focusSuggestion",precondition:S.M$.and(T.ob.Visible,T.ob.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,f.E_)(new Ve({id:"focusAndAcceptSuggestion",precondition:S.M$.and(T.ob.Visible,T.ob.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),(0,f.E_)(new Ve({id:"toggleSuggestionDetails",precondition:S.M$.and(T.ob.Visible,T.ob.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:T.dt,group:"right",order:1,when:S.M$.and(T.ob.DetailsVisible,T.ob.CanResolve),title:E.kg("detail.more","Show Less")},{menuId:T.dt,group:"right",order:1,when:S.M$.and(T.ob.DetailsVisible.toNegated(),T.ob.CanResolve),title:E.kg("detail.less","Show More")}]})),(0,f.E_)(new Ve({id:"toggleExplainMode",precondition:T.ob.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,f.E_)(new Ve({id:"toggleSuggestionFocus",precondition:T.ob.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:2570,mac:{primary:778}}})),(0,f.E_)(new Ve({id:"insertBestCompletion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),k.AtEnd,T.ob.Visible.toNegated(),R.OtherSuggestions.toNegated(),w.O.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,g.Gv)(t)?{fallback:"tab",...t}:{fallback:"tab"})},kbOpts:{weight:He,primary:2}})),(0,f.E_)(new Ve({id:"insertNextSuggestion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),R.OtherSuggestions,T.ob.Visible.toNegated(),w.O.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:2}})),(0,f.E_)(new Ve({id:"insertPrevSuggestion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),R.OtherSuggestions,T.ob.Visible.toNegated(),w.O.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:1026}})),(0,f.Fl)(class extends f.ks{constructor(){super({id:"editor.action.resetSuggestSize",label:E.kg("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){Fe.get(t)?.resetWidgetSize()}})},43370:function(e,t,i){"use strict";var n=i(76611),s=i(17793),o=i(26182),r=i(35114),a=i(72777),l=i(40393),c=i(23534),d=i(69122),h=i(329),u=i(9408),g=i(49195),p=i(82919),f=i(14043),m=i(42558),_=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},v=function(e,t){return function(i,n){t(i,n,e)}};class b{constructor(e,t,i,n,s,o){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.completion=o}}let w=class extends r.mp{constructor(e,t,i,n,s,o){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=o}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&t.resolve(n.XO.None)}return e}};w=_([v(5,g.GS)],w);let C=class extends r.jG{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){if(i.selectedSuggestionInfo)return;let s;for(const t of this._editorService.listCodeEditors())if(t.getModel()===e){s=t;break}if(!s)return;const o=s.getOption(90);if(u.r3.isAllOff(o))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const r=e.tokenization.getLineTokens(t.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==u.r3.valueFor(o,a))return;let c,d,g=e.getWordAtPosition(t);if(g?.word||(c=this._getTriggerCharacterInfo(e,t)),!g?.word&&!c)return;if(g||(g=e.getWordUntilPosition(t)),g.endColumn!==t.column)return;const m=e.getValueInRange(new l.Q(t.lineNumber,1,t.lineNumber,t.column));if(!c&&this._lastResult?.canBeReused(e,t.lineNumber,g)){const e=new h.O(m,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),d=this._lastResult}else{const i=await(0,u.aR)(this._languageFeatureService.completionProvider,e,t,new u.l1(void 0,p.Y.createSuggestFilter(s).itemKind,c?.providers),c&&{triggerKind:1,triggerCharacter:c.ch},n);let o;i.needsClipboard&&(o=await this._clipboardService.readText());const r=new h.C(i.items,t.column,new h.O(m,0),f.S.None,s.getOption(119),s.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},o);d=new w(e,t.lineNumber,g,r,i,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,t){t.completion.resolve(n.XO.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const i=e.getValueInRange(l.Q.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(const t of this._languageFeatureService.completionProvider.all(e))t.triggerCharacters?.includes(i)&&n.add(t);if(0!==n.size)return{providers:n,ch:i}}};C=_([v(0,d.ILanguageFeaturesService),v(1,m.h),v(2,g.GS),v(3,a.T)],C),(0,c.x)(C)},49195:function(e,t,i){"use strict";i.d(t,{GS:function(){return b}});var n,s=i(90890),o=i(35114),r=i(52732),a=i(80945),l=i(35720),c=i(47901),d=i(48682),h=i(63619),u=i(87332),g=function(e,t){return function(i,n){t(i,n,e)}};class p{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let e=0;er&&s.type===i[t].completion.kind&&s.insertText===i[t].completion.insertText&&(r=s.touch,o=t),i[t].completion.preselect)return t}return-1!==o?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:l.HC.fromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}class _ extends p{constructor(){super("recentlyUsedByPrefix"),this._trie=a.cB.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let o=this._trie.get(s);if(o||(o=this._trie.findSubstr(s)),o)for(let e=0;ee.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:l.HC.fromString(i.type),this._trie.set(t,i)}}}let v=class{static{n=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",_],["recentlyUsed",m],["first",f]])}static{this._storagePrefix="suggest/memories"}constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new o.Cm,this._persistSoon=new s.uC((()=>this._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===u.LP.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(this._strategy?.name!==i){this._saveState();const e=n._strategyCtors.get(i)||f;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=this._storageService.get(`${n._storagePrefix}/${i}`,e);t&&this._strategy.fromJSON(JSON.parse(t))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=JSON.stringify(this._strategy);this._storageService.store(`${n._storagePrefix}/${this._strategy.name}`,t,e,1)}}};v=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([g(0,u.CS),g(1,c.pG)],v);const b=(0,h.u1)("ISuggestMemories");(0,d.v)(b,v,1)},82919:function(e,t,i){"use strict";i.d(t,{Y:function(){return E}});var n,s=i(90890),o=i(76611),r=i(20187),a=i(80670),l=i(35114),c=i(43920),d=i(56218),h=i(56812),u=i(14043),g=i(42558),p=i(47901),f=i(97848),m=i(76925),_=i(2727),v=i(329),b=i(9408),w=i(69122),C=i(17793),y=i(24219),S=i(99575),k=i(83012),x=i(37351),L=function(e,t){return function(i,n){t(i,n,e)}};class D{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column&&n.startColumn+1!==i.column||!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}let E=n=class{constructor(e,t,i,n,o,r,c,h,u){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=o,this._contextKeyService=r,this._configurationService=c,this._languageFeaturesService=h,this._envService=u,this._toDispose=new l.Cm,this._triggerCharacterListener=new l.Cm,this._triggerQuickSuggest=new s.pc,this._triggerState=void 0,this._completionDisposables=new l.Cm,this._onDidCancel=new a.vl,this._onDidTrigger=new a.vl,this._onDidSuggest=new a.vl,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new d.L(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let g=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{g=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{g=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{g||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{g||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){(0,l.AS)(this._triggerCharacterListener),(0,l.AS)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(92)||!this._editor.hasModel()||!this._editor.getOption(122))return;const e=new Map;for(const t of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);if(!n){n=new Set;const t=(0,b.f3)();t&&n.add(t),e.set(i,n)}n.add(t)}const t=t=>{if(!function(e,t){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getContextKeyValue(S.p.suppressSuggestions.key);return void 0!==i?!i:!e.getOption(62).suppressSuggestions}(this._editor,this._contextKeyService,this._configurationService))return;if(D.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";(0,c.LJ)(t.charCodeAt(t.length-1))?(0,c.pc)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const n=e.get(i);if(n){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())n.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:i,retrigger:Boolean(this._completionModel),clipboardText:this._completionModel?.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),this._requestToken?.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){b.r3.isAllOff(this._editor.getOption(90))||this._editor.getOption(119).snippetsPreventQuickSuggestions&&k.O.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!D.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(90);if(!b.r3.isAllOff(i)){if(!b.r3.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),s=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==b.r3.valueFor(i,s))return}(function(e,t){if(!Boolean(t.getContextKeyValue(S.p.inlineSuggestionVisible.key)))return!0;const i=t.getContextKeyValue(S.p.suppressSuggestions.key);return void 0!==i?!i:!e.getOption(62).suppressSuggestions})(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(91)))}_refilterCompletionItems(){(0,y.j)(this._editor.hasModel()),(0,y.j)(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new D(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=new D(t,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=i;let s={triggerKind:e.triggerKind??0};e.triggerCharacter&&(s={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new o.Qi;let a=1;switch(this._editor.getOption(113)){case"top":a=0;break;case"bottom":a=2}const{itemKind:l,showDeprecated:c}=n.createSuggestFilter(this._editor),d=new b.l1(a,e.completionOptions?.kindFilter??l,e.completionOptions?.providerFilter,e.completionOptions?.providerItemsToReuse,c),h=u.S.create(this._editorWorkerService,this._editor),g=(0,b.aR)(this._languageFeaturesService.completionProvider,t,this._editor.getPosition(),d,s,this._requestToken.token);Promise.all([g,h]).then((async([t,i])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let n=e?.clipboardText;if(!n&&t.needsClipboard&&(n=await this._clipboardService.readText()),void 0===this._triggerState)return;const s=this._editor.getModel(),o=new D(s,this._editor.getPosition(),e),r={...C.Nd.default,firstMatchCanBeWeak:!this._editor.getOption(119).matchOnWordStartOnly};if(this._completionModel=new v.C(t.items,this._context.column,{leadingLineContent:o.leadingLineContent,characterCountDelta:o.column-this._context.column},i,this._editor.getOption(119),this._editor.getOption(113),r,n),this._completionDisposables.add(t.disposable),this._onNewContext(o),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)})).catch(r.dz)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static createSuggestFilter(e){const t=new Set;"none"===e.getOption(113)&&t.add(27);const i=e.getOption(119);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,c.UU)(e.leadingLineContent)===(0,c.UU)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){if(D.shouldAutoTrigger(this._editor)&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=D.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};E=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([L(1,h.IEditorWorkerService),L(2,g.h),L(3,_.k),L(4,m.rr),L(5,f.fN),L(6,p.pG),L(7,w.ILanguageFeaturesService),L(8,x.k)],E)},14043:function(e,t,i){"use strict";i.d(t,{S:function(){return r}});var n=i(97358),s=i(40393),o=i(60738);class r{static{this.None=new class extends r{distance(){return 0}}}static async create(e,t){if(!t.getOption(119).localityBonus)return r.None;if(!t.hasModel())return r.None;const i=t.getModel(),a=t.getPosition();if(!e.canComputeWordRanges(i.uri))return r.None;const[l]=await(new o.n).provideSelectionRanges(i,[a]);if(0===l.length)return r.None;const c=await e.computeWordRanges(i.uri,l[0].range);if(!c)return r.None;const d=i.getWordUntilPosition(a);return delete c[d.word],new class extends r{distance(e,i){if(!a.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const o="string"==typeof i.label?i.label:i.label.label,r=c[o];if((0,n.Ct)(r))return 2<<20;const d=(0,n.El)(r,s.Q.fromPositions(e),s.Q.compareRangesUsingStarts),h=d>=0?r[d]:r[Math.max(0,~d-1)];let u=l.length;for(const e of l){if(!s.Q.containsRange(e.range,h))break;u-=1}return u}}}}},83172:function(e,t,i){"use strict";var n=i(14374),s=i(4195);(0,s.x1A)("symbolIcon.arrayForeground",s.CU6,(0,n.kg)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.booleanForeground",s.CU6,(0,n.kg)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.colorForeground",s.CU6,(0,n.kg)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.constantForeground",s.CU6,(0,n.kg)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.fileForeground",s.CU6,(0,n.kg)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.folderForeground",s.CU6,(0,n.kg)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.keyForeground",s.CU6,(0,n.kg)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.keywordForeground",s.CU6,(0,n.kg)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.moduleForeground",s.CU6,(0,n.kg)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.namespaceForeground",s.CU6,(0,n.kg)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.nullForeground",s.CU6,(0,n.kg)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.numberForeground",s.CU6,(0,n.kg)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.objectForeground",s.CU6,(0,n.kg)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.operatorForeground",s.CU6,(0,n.kg)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.packageForeground",s.CU6,(0,n.kg)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.propertyForeground",s.CU6,(0,n.kg)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.referenceForeground",s.CU6,(0,n.kg)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.snippetForeground",s.CU6,(0,n.kg)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.stringForeground",s.CU6,(0,n.kg)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.structForeground",s.CU6,(0,n.kg)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.textForeground",s.CU6,(0,n.kg)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.typeParameterForeground",s.CU6,(0,n.kg)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.unitForeground",s.CU6,(0,n.kg)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))},59396:function(e,t,i){"use strict";var n=i(15075),s=i(52055),o=i(14374),r=i(93223);class a extends r.L{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:a.ID,title:o.aS({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:o.aS("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const e=!s.M.getTabFocusMode();s.M.setTabFocusMode(e),e?(0,n.xE)(o.kg("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,n.xE)(o.kg("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}(0,r.ug)(a)},99842:function(e,t,i){"use strict";var n=i(43857),s=i(52694),o=i(14374);class r extends s.ks{constructor(){super({id:"editor.action.forceRetokenize",label:o.kg("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const s=new n.W;i.tokenization.forceTokenization(i.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}(0,s.Fl)(r)},39923:function(e,t,i){"use strict";var n=i(90890),s=i(93231),o=i(85584),r=i(35114),a=i(79783),l=i(43920),c=i(52694),d=i(3520),h=i(49079),u=i(18827),g=i(56812),p=i(41750),f=i(77002),m=i(51059),_=i(8106),v=i(84201),b=i(98099),w=i(30981),C=i(69498),y=i(63619),S=i(26745),k=i(40478),x=i(53510),L=i(80670),D=i(95607),E=i(24764),N=i(74856),I=function(e,t){return function(i,n){t(i,n,e)}};let M=class extends r.jG{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=(0,v.BC)(e,(0,v.$)("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??(0,E.nZ)("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const o=this._register(new S.f(this.el,"click")),r=this._register(new S.f(this.el,"keypress")),a=L.Jh.chain(r.event,(e=>e.map((e=>new k.Z(e))).filter((e=>3===e.keyCode)))),l=this._register(new S.f(this.el,x.B.Tap)).event;this._register(x.q.addTarget(this.el));const c=L.Jh.any(o.event,a,l);this._register(c((e=>{this.enabled&&(v.fs.stop(e,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([I(3,N.TN),I(4,D.C)],M);var T=i(51310),R=i(56613),P=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};let O=class extends r.jG{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(F))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,26)}};O=P([A(1,y._Y)],O);let F=class extends r.jG{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(C.T,{}),this.element=(0,v.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){const t=(0,v.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,v.w_)(this.element)}show(e){(0,v.w_)(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=(0,v.BC)(this.element,(0,v.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,v.$)(`div${R.L.asCSSSelector(e.icon)}`));const n=(0,v.BC)(this.element,(0,v.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,v.BC)(this.element,(0,v.$)("div.message-actions-container")),e.actions)for(const t of e.actions)this._register(this.instantiationService.createInstance(M,this.messageActionsContainer,{...t,tabIndex:-1},{}));const s=(0,v.BC)(this.element,(0,v.$)("div.action-container"));this.actionBar=this._register(new b.E(s)),this.actionBar.push(this._register(new w.rc("banner.close","Close Banner",R.L.asClassName(T.$_),!0,(()=>{"function"==typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};F=P([A(0,y._Y)],F);var B=i(14374),W=i(47901),H=i(43575),V=i(35477),z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},U=function(e,t){return function(i,n){t(i,n,e)}};const j=(0,T.pU)("extensions-warning-message",s.W.warning,B.kg("warningIcon","Icon shown with a warning message in the extensions editor."));let q=class extends r.jG{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:B.kg("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new se};else if(e.ambiguousCharacterCount>=t)i={message:B.kg("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new ie};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:B.kg("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new ne}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:j,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(O,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(126),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())}))),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=function(e,t){return{nonBasicASCII:t.nonBasicASCII===d.XR?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===d.XR?!e:t.includeComments,includeStrings:t.includeStrings===d.XR?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>"_os"===e?(new Intl.NumberFormat).resolvedOptions().locale:"_vscode"===e?a.BH:e))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new K(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new $(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};q=z([U(1,g.IEditorWorkerService),U(2,V.L),U(3,y._Y)],q);let K=class extends r.jG{constructor(e,t,i,s){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.uC((()=>this._update()),250)),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:J.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();return(0,f.GN)(t,e)?{reason:X(t.getValueInRange(e.range),this._options),inComment:(0,f.a6)(t,e),inString:(0,f.wc)(t,e)}:null}};K=z([U(3,g.IEditorWorkerService)],K);class $ extends r.jG{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.uC((()=>this._update()),250)),this._register(this._editor.onDidLayoutChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidScrollChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeHiddenAreas((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const t of e){const e=u.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,t);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const e of i.ranges)t.push({range:e,options:J.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,f.GN)(t,e)?{reason:X(i,this._options),inComment:(0,f.a6)(t,e),inString:(0,f.wc)(t,e)}:null}}const G=B.kg("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let Q=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(q.ID);if(!n)return[];const s=[],r=new Set;let a=300;for(const e of t){const t=n.getDecorationInfo(e);if(!t)continue;const c=i.getValueInRange(e.range).codePointAt(0),d=Z(c);let h;switch(t.reason.kind){case 0:h=(0,l.aC)(t.reason.confusableWith)?B.kg("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",d,Z(t.reason.confusableWith.codePointAt(0))):B.kg("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",d,Z(t.reason.confusableWith.codePointAt(0)));break;case 1:h=B.kg("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",d);break;case 2:h=B.kg("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",d)}if(r.has(h))continue;r.add(h);const u={codePoint:c,reason:t.reason,inComment:t.inComment,inString:t.inString},g=B.kg("unicodeHighlight.adjustSettings","Adjust settings"),p=`command:${oe.ID}?${encodeURIComponent(JSON.stringify(u))}`,f=new o.Bc("",!0).appendMarkdown(h).appendText(" ").appendLink(p,g,G);s.push(new _.eH(this,e.range,[f],!1,a++))}return s}renderHoverParts(e,t){return(0,_.fm)(e,t,this._editor,this._languageService,this._openerService)}};function Y(e){return`U+${e.toString(16).padStart(4,"0")}`}function Z(e){let t=`\`${Y(e)}\``;return l.y_.isInvisibleCharacter(e)||(t+=` "${function(e){return 96===e?"`` ` ``":"`"+String.fromCodePoint(e)+"`"}(e)}"`),t}function X(e,t){return u.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(e,t)}Q=z([U(1,p.L),U(2,D.C)],Q);class J{constructor(){this.map=new Map}static{this.instance=new J}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=h.kI.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}class ee extends c.ks{constructor(){super({id:ie.ID,label:B.kg("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.includeComments,!1,2)}}class te extends c.ks{constructor(){super({id:ie.ID,label:B.kg("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.includeStrings,!1,2)}}class ie extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:ie.ID,label:B.kg("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.ambiguousCharacters,!1,2)}}class ne extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:ne.ID,label:B.kg("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.invisibleCharacters,!1,2)}}class se extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:se.ID,label:B.kg("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.nonBasicASCII,!1,2)}}class oe extends c.ks{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:oe.ID,label:B.kg("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,i){const{codePoint:n,reason:s,inString:o,inComment:r}=i,a=String.fromCodePoint(n),c=e.get(H.GK),h=e.get(W.pG),u=[];if(0===s.kind)for(const e of s.notAmbiguousInLocales)u.push({label:B.kg("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',e),run:async()=>{re(h,[e])}});if(u.push({label:function(e){return l.y_.isInvisibleCharacter(e)?B.kg("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",Y(e)):B.kg("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${Y(e)} "${a}"`)}(n),run:()=>async function(e,t){const i=e.getValue(d.Of.allowedCharacters);let n;n="object"==typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;await e.updateValue(d.Of.allowedCharacters,n,2)}(h,[n])}),r){const e=new ee;u.push({label:e.label,run:async()=>e.runAction(h)})}else if(o){const e=new te;u.push({label:e.label,run:async()=>e.runAction(h)})}if(0===s.kind){const e=new ie;u.push({label:e.label,run:async()=>e.runAction(h)})}else if(1===s.kind){const e=new ne;u.push({label:e.label,run:async()=>e.runAction(h)})}else if(2===s.kind){const e=new se;u.push({label:e.label,run:async()=>e.runAction(h)})}else!function(e){throw new Error(`Unexpected value: ${e}`)}(s);const g=await c.pick(u,{title:G});g&&await g.run()}}async function re(e,t){const i=e.inspect(d.Of.allowedLocales).user?.value;let n;n="object"==typeof i&&i?Object.assign({},i):{};for(const e of t)n[e]=!0;await e.updateValue(d.Of.allowedLocales,n,2)}(0,c.Fl)(ie),(0,c.Fl)(ne),(0,c.Fl)(se),(0,c.Fl)(oe),(0,c.HW)(q.ID,q,1),m.B2.register(Q)},8438:function(e,t,i){"use strict";var n=i(35114),s=i(59951),o=i(52694),r=i(72777),a=i(14374),l=i(13675),c=function(e,t){return function(i,n){t(i,n,e)}};const d="ignoreUnusualLineTerminators";let h=class extends n.jG{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,d)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(92))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:a.kg("unusualLineTerminators.title","Unusual Line Terminators"),message:a.kg("unusualLineTerminators.message","Detected unusual line terminators"),detail:a.kg("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,s.P8)(e.uri)),primaryButton:a.kg({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:a.kg("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t){e.setModelProperty(t.uri,d,!0)}(this._codeEditorService,e)}};h=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([c(1,l.X),c(2,r.T)],h),(0,o.HW)(h.ID,h,1)},22136:function(e,t,i){"use strict";i.d(t,{P:function(){return b},v:function(){return w}});var n=i(62067),s=i(49079),o=i(35720),r=i(14374),a=i(4195),l=i(40616);const c=(0,a.x1A)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},r.kg("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,a.x1A)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},r.kg("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,a.x1A)("editor.wordHighlightTextBackground",c,r.kg("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const d=(0,a.x1A)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:a.buw,hcLight:a.buw},r.kg("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));(0,a.x1A)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:a.buw,hcLight:a.buw},r.kg("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),(0,a.x1A)("editor.wordHighlightTextBorder",d,r.kg("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const h=(0,a.x1A)("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",r.kg("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),u=(0,a.x1A)("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",r.kg("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),g=(0,a.x1A)("editorOverviewRuler.wordHighlightTextForeground",a.z5H,r.kg("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),p=s.kI.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,l.Yf)(u),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),f=s.kI.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,l.Yf)(g),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),m=s.kI.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,l.Yf)(a.z5H),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),_=s.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),v=s.kI.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,l.Yf)(h),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}});function b(e){return e===o.Kb.Write?p:e===o.Kb.Text?f:v}function w(e){return e?_:m}(0,l.zy)(((e,t)=>{const i=e.getColor(a.QwA);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}))},24035:function(e,t,i){"use strict";var n=i(14374),s=i(15075),o=i(90890),r=i(76611),a=i(20187),l=i(35114),c=i(47010),d=i(52694),h=i(72777),u=i(40393),g=i(49678),p=i(62067),f=i(69122),m=i(22136),_=i(97848),v=i(84756),b=i(52732),w=i(71543),C=i(59951),y=i(86506),S=i(35720);class k{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){const n=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return n?e.isDisposed()?void 0:e.findMatches(n.word,!0,!1,!0,y.J3,!1).map((e=>({range:e.range,kind:S.Kb.Text}))):Promise.resolve([])}provideMultiDocumentHighlights(e,t,i,n){const s=new b.fT,o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(s);for(const t of[e,...i]){if(t.isDisposed())continue;const e=t.findMatches(o.word,!0,!1,!0,y.J3,!1).map((e=>({range:e.range,kind:S.Kb.Text})));e&&s.set(t.uri,e)}return s}}let x=class extends l.jG{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new k)),this._register(e.multiDocumentHighlightProvider.register("*",new k))}};var L,D;x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(L=0,D=f.ILanguageFeaturesService,function(e,t){D(e,t,L)})],x);var E,N,I=i(23534),M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},T=function(e,t){return function(i,n){t(i,n,e)}};const R=new _.N1("hasWordHighlights",!1);function P(e,t,i,n){const s=e.ordered(t);return(0,o.$1)(s.map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,a.M_))),(e=>null!=e)).then((e=>{if(e){const i=new b.fT;return i.set(t.uri,e),i}return new b.fT}))}class A{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,o.SS)((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new u.Q(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,o=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let e=0,t=i.length;!a&&e=o&&(a=!0)}return a}cancel(){this.result.cancel()}}class O extends A{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return P(this._providers,e,t.getPosition(),n).then((e=>e||new b.fT))}}class F extends A{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return function(e,t,i,n,s,r){const l=e.ordered(t);return(0,o.$1)(l.map((e=>()=>{const n=r.filter((e=>(0,p.vd)(e))).filter((t=>(0,w.f)(e.selector,t.uri,t.getLanguageId(),!0,void 0,void 0)>0));return Promise.resolve(e.provideMultiDocumentHighlights(t,i,n,s)).then(void 0,a.M_)})),(e=>null!=e))}(this._providers,e,t.getPosition(),0,n,this._otherModels).then((e=>e||new b.fT))}}(0,d.ke)("_executeDocumentHighlights",(async(e,t,i)=>{const n=e.get(f.ILanguageFeaturesService),s=await P(n.documentHighlightProvider,t,i,r.XO.None);return s?.get(t.uri)}));let B=class{static{E=this}static{this.storedDecorationIDs=new b.fT}static{this.query=null}constructor(e,t,i,n,s){this.toUnhook=new l.Cm,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new b.fT,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new o.ve(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=s,this._hasWordHighlights=R.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlight&&this.runDelayer.trigger((()=>{this._onPositionChanged(e)}))}))),this.toUnhook.add(e.onDidFocusEditorText((e=>{"off"!==this.occurrencesHighlight&&(this.workerRequest||this.runDelayer.trigger((()=>{this._run()})))}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{(0,v.v$)(this.model.uri,"output")||this._stopAll()}))),this.toUnhook.add(e.onDidChangeModel((e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():E.query&&this._run()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(81);if(this.occurrencesHighlight!==t)switch(this.occurrencesHighlight=t,t){case"off":this._stopAll();break;case"singleFile":this._stopAll(E.query?.modelInfo?.model);break;case"multiFile":E.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",t)}}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,E.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){"off"!==this.occurrencesHighlight&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(u.Q.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){const o=this.editor.getModel().getLineContent(n.startLineNumber);(0,s.xE)(`${o}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){const o=this.editor.getModel().getLineContent(n.startLineNumber);(0,s.xE)(`${o}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=E.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),E.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const n of t){if(!n.hasModel()||(0,C.n4)(n.getModel().uri,e?.uri))continue;const t=E.storedDecorationIDs.get(n.getModel().uri);if(!t)continue;n.removeDecorations(t),i.push(n.getModel().uri);const s=W.get(n);s?.wordHighlighter&&s.wordHighlighter.decorations.length>0&&(s.wordHighlighter.decorations.clear(),s.wordHighlighter.workerRequest=null,s.wordHighlighter._hasWordHighlights.set(!1))}for(const e of i)E.storedDecorationIDs.delete(e)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==v.ny.vscodeNotebookCell&&E.query?.modelInfo?.model.uri.scheme!==v.ny.vscodeNotebookCell?(E.query=null,this._run()):E.query?.modelInfo&&(E.query.modelInfo=null)),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){"off"===this.occurrencesHighlight||3!==e.reason&&this.editor.getModel()?.uri.scheme!==v.ny.vscodeNotebookCell?this._stopAll():this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===v.ny.vscodeNotebookCell){const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){const i=n.getModel();i&&i!==e&&i.uri.scheme===v.ny.vscodeNotebookCell&&t.push(i)}return t}const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){if(!(0,c.Np)(n))continue;const i=n.getModel();i&&e===i.modified&&t.push(i.modified)}if(t.length)return t;if("singleFile"===this.occurrencesHighlight)return[];for(const n of i){const i=n.getModel();i&&i!==e&&t.push(i)}return t}_run(e){let t;if(this.editor.hasTextFocus()){const e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber)return E.query=null,void this._stopAll();const i=e.startColumn,n=e.endColumn,s=this._getWord();if(!s||s.startColumn>i||s.endColumn{t===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations())}),a.dz)}}computeWithModel(e,t,i,n){return n.length?function(e,t,i,n,s,o){return new F(t,i,s,e,o)}(this.multiDocumentProviders,e,t,0,this.editor.getOption(132),n):function(e,t,i,n,s){return new O(t,i,s,e)}(this.providers,e,t,0,this.editor.getOption(132))}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=this.codeEditorService.listCodeEditors();for(const t of e){const e=W.get(t);if(!e)continue;const i=[],n=t.getModel()?.uri;if(n&&this.workerRequestValue.has(n)){const s=E.storedDecorationIDs.get(n),o=this.workerRequestValue.get(n);if(o)for(const e of o)e.range&&i.push({range:e.range,options:(0,m.P)(e.kind)});let r=[];t.changeDecorations((e=>{r=e.deltaDecorations(s??[],i)})),E.storedDecorationIDs=E.storedDecorationIDs.set(n,r),i.length>0&&(e.wordHighlighter?.decorations.set(i),e.wordHighlighter?._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};B=E=M([T(4,h.T)],B);let W=class extends l.jG{static{N=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(N.ID)}constructor(e,t,i,n){super(),this._wordHighlighter=null;const s=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new B(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,n))};this._register(e.onDidChangeModel((e=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),s()}))),s()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!(!this._wordHighlighter||!this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};W=N=M([T(1,_.fN),T(2,f.ILanguageFeaturesService),T(3,h.T)],W);class H extends d.ks{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=W.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class V extends d.ks{constructor(){super({id:"editor.action.wordHighlight.trigger",label:n.kg("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:g.R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=W.get(t);n&&n.restoreViewState(!0)}}(0,d.HW)(W.ID,W,0),(0,d.Fl)(class extends H{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:n.kg("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:R,kbOpts:{kbExpr:g.R.editorTextFocus,primary:65,weight:100}})}}),(0,d.Fl)(class extends H{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:n.kg("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:R,kbOpts:{kbExpr:g.R.editorTextFocus,primary:1089,weight:100}})}}),(0,d.Fl)(V),(0,I.x)(x)},81188:function(e,t,i){"use strict";i.d(t,{Jk:function(){return v},R7:function(){return C}});var n=i(52694),s=i(24608),o=i(3520),r=i(30699),a=i(40469),l=i(59810),c=i(62993),d=i(40393),h=i(56218),u=i(49678),g=i(8494),p=i(14374),f=i(68745),m=i(97848),_=i(56614);class v extends n.DX{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.i)(t.getOption(132),t.getOption(131)),s=t.getModel(),o=t.getSelections(),a=o.length>1,d=o.map((e=>{const t=new c.y(e.positionLineNumber,e.positionColumn),i=this._move(n,s,t,this._wordNavigationType,a);return this._moveTo(e,i,this._inSelectionMode)}));if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,d.map((e=>r.MF.fromModelSelection(e)))),1===d.length){const e=new c.y(d[0].positionLineNumber,d[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new h.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new h.L(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends v{_move(e,t,i,n,s){return a.z.moveWordLeft(e,t,i,n,s)}}class w extends v{_move(e,t,i,n,s){return a.z.moveWordRight(e,t,i,n)}}class C extends n.DX{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(g.JZ);if(!t.hasModel())return;const o=(0,l.i)(t.getOption(132),t.getOption(131)),r=t.getModel(),a=t.getSelections(),c=t.getOption(6),d=t.getOption(11),h=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),p=a.map((e=>{const i=this._delete({wordSeparators:o,model:r,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:c,autoClosingQuotes:d,autoClosingPairs:h,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new s.iu(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,p),t.pushUndoStop()}}class y extends C{_delete(e,t){return a.z.deleteWordLeft(e,t)||new d.Q(1,1,1,1)}}class S extends C{_delete(e,t){const i=a.z.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new d.Q(n,s,n,s)}}class k extends n.ks{constructor(){super({id:"deleteInsideWord",precondition:u.R.writable,label:p.kg("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.i)(t.getOption(132),t.getOption(131)),o=t.getModel(),r=t.getSelections().map((e=>{const t=a.z.deleteInsideWord(n,o,e);return new s.iu(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:m.M$.and(u.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:m.M$.and(u.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:m.M$.and(u.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:m.M$.and(u.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,l.i)(o.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,l.i)(o.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,l.i)(o.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,l.i)(o.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}),(0,n.E_)(new class extends y{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:u.R.writable})}}),(0,n.E_)(new class extends y{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:u.R.writable})}}),(0,n.E_)(new class extends y{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:u.R.writable,kbOpts:{kbExpr:u.R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}),(0,n.E_)(new class extends S{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:u.R.writable})}}),(0,n.E_)(new class extends S{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:u.R.writable})}}),(0,n.E_)(new class extends S{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:u.R.writable,kbOpts:{kbExpr:u.R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}),(0,n.Fl)(k)},138:function(e,t,i){"use strict";var n=i(52694),s=i(40469),o=i(40393),r=i(49678),a=i(81188),l=i(21335);class c extends a.R7{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:r.R.writable,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return s.c.deleteWordPartLeft(e)||new o.Q(1,1,1,1)}}class d extends a.R7{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:r.R.writable,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=s.c.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),r=e.model.getLineMaxColumn(n);return new o.Q(n,r,n,r)}}class h extends a.Jk{_move(e,t,i,n,o){return s.c.moveWordPartLeft(e,t,i,o)}}l.w.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft"),l.w.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class u extends a.Jk{_move(e,t,i,n,o){return s.c.moveWordPartRight(e,t,i)}}(0,n.E_)(new c),(0,n.E_)(new d),(0,n.E_)(new class extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}),(0,n.E_)(new class extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}),(0,n.E_)(new class extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}),(0,n.E_)(new class extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}})},41158:function(e,t,i){"use strict";var n=i(84201),s=i(35114),o=i(52694),r=i(79783);class a extends s.jG{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,r.un&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(92);!this.widget&&e?this.widget=new l(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}class l extends s.jG{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(n.ko(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(n.ko(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return l.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}(0,o.HW)(a.ID,a,3)},80540:function(e,t,i){"use strict";var n,s=i(84201),o=i(59321),r=i(35114),a=i(52694),l=i(35720),c=i(36138),d=i(5032),h=i(41750),u=i(86100),g=i(47025),p=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends r.jG{static{n=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(l.dG.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new _(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};f=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([p(1,u.L),p(2,h.L)],f);class m extends a.ks{constructor(){super({id:"editor.action.inspectTokens",label:g.YN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=f.get(t);i?.launch()}}class _ extends r.jG{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){const i=l.dG.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>d.r3,tokenize:(e,i,n)=>(0,d.$H)(t,n),tokenizeEncoded:(e,t,i)=>(0,d.Lh)(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return _._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let n=t.tokens1.length-1;n>=0;n--){const s=t.tokens1[n];if(e.column-1>=s.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}const r=this._model.getLineContent(e.lineNumber);let a="";if(i0&&s.push({key:e,score:o})}}return s}static termFrequencies(e){return function(e){const t=new Map;for(const i of e)t.set(i,(t.get(i)??0)+1);return t}(f.splitTerms(e))}static*splitTerms(e){const t=e=>e.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(const i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const e=[];for(const i of t.textChunks){const t=f.termFrequencies(i);for(const e of t.keys())this.chunkOccurrences.set(e,(this.chunkOccurrences.get(e)??0)+1);e.push({text:i,tf:t})}this.chunkCount+=e.length,this.documents.set(t.key,{chunks:e})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const e of t.chunks)for(const t of e.tf.keys()){const e=this.chunkOccurrences.get(t);if("number"==typeof e){const i=e-1;i<=0?this.chunkOccurrences.delete(t):this.chunkOccurrences.set(t,i)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,o]of Object.entries(t)){const t=e.tf.get(s);if(!t)continue;let r=i.get(s);"number"!=typeof r&&(r=this.computeIdf(s),i.set(s,r)),n+=t*r*o}return n}computeEmbedding(e){const t=f.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}var m,_=i(14374),v=i(21335),b=i(47901),w=i(13675),C=i(63619),y=i(87163),S=i(76925),k=i(90890),x=i(76611),L=i(24219);function D(e){const t=e;return Array.isArray(t.items)}function E(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(m||(m={}));class N extends g.jG{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){const n=new g.Cm;let s;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new g.HE),r=async()=>{const n=o.value=new g.Cm;s?.dispose(!0),e.busy=!1,s=new x.Qi(t);const r=s.token;let a=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(a=a.trim());const l=this._getPicks(a,n,r,i),c=(t,i)=>{let n,s;if(D(t)?(n=t.items,s=t.active):n=t,0===n.length){if(i)return!1;(a.length>0||e.hideInput)&&this.options?.noResultsPick&&(n=(0,L.Tn)(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=n,s&&(e.activeItems=[s]),!0},d=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{"number"==typeof t.mergeDelay&&(await(0,k.wR)(t.mergeDelay),r.isCancellationRequested)||n||(i=c(t.picks,!0))})(),(async()=>{e.busy=!0;try{const n=await t.additionalPicks;if(r.isCancellationRequested)return;let s,o,a,l;if(D(t.picks)?(s=t.picks.items,o=t.picks.active):s=t.picks,D(n)?(a=n.items,l=n.active):a=n,a.length>0||!i){let t;if(!o&&!l){const i=e.activeItems[0];i&&-1!==s.indexOf(i)&&(t=i)}c({items:[...s,...a],active:o||l||t})}}finally{r.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===l);else if(E(l))await d(l);else if(l instanceof Promise){e.busy=!0;try{const e=await l;if(r.isCancellationRequested)return;E(e)?await d(e):c(e)}finally{r.isCancellationRequested||(e.busy=!1)}}else c(l)};n.add(e.onDidChangeValue((()=>r()))),r(),n.add(e.onDidAccept((t=>{if(i?.handleAccept)return t.inBackground||e.hide(),void i.handleAccept?.(e.activeItems[0]);const[n]=e.selectedItems;"function"==typeof n?.accept&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))})));const a=async(i,n)=>{if("function"!=typeof n.trigger)return;const s=n.buttons?.indexOf(i)??-1;if(s>=0){const i=n.trigger(s,e.keyMods),o="number"==typeof i?i:await i;if(t.isCancellationRequested)return;switch(o){case m.NO_ACTION:break;case m.CLOSE_PICKER:e.hide();break;case m.REFRESH_PICKER:r();break;case m.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),s=e.activeItems.filter((e=>e!==n[0])),o=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,s&&(e.activeItems=s),e.keepScrollPosition=o}break}}}};return n.add(e.onDidTriggerItemButton((({button:e,item:t})=>a(e,t)))),n.add(e.onDidTriggerSeparatorButton((({button:e,separator:t})=>a(e,t)))),n}}var I,M,T=i(87332),R=i(2727),P=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};let O=class extends N{static{I=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=(0,h.or)(h.WP,h.J1,h.Tt)}constructor(e,t,i,n,s,o){super(I.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(this.instantiationService.createInstance(F)),this.options=e}async _getPicks(e,t,i,n){const s=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const o=(0,u.P)((()=>{const t=new f;return t.updateDocuments(s.map((e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]})))),function(e){const t=e.slice(0);t.sort(((e,t)=>t.score-e.score));const i=t[0]?.score??0;if(i>0)for(const e of t)e.score/=i;return t}(t.calculateScores(e,i)).filter((e=>e.score>I.TFIDF_THRESHOLD)).slice(0,I.TFIDF_MAX_RESULTS)})),r=[];for(const t of s){const n=I.WORD_FILTER(e,t.label)??void 0,s=t.commandAlias?I.WORD_FILTER(e,t.commandAlias)??void 0:void 0;if(n||s)t.highlights={label:n,detail:this.options.showAlias?s:void 0},r.push(t);else if(e===t.commandId)r.push(t);else if(e.length>=3){const e=o();if(i.isCancellationRequested)return[];const n=e.find((e=>e.key===t.commandId));n&&(t.tfIdfScore=n.score,r.push(t))}}const a=new Map;for(const e of r){const t=a.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):a.set(e.label,e)}r.sort(((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return-1;const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const l=[];let c=!1,d=!0,h=!!this.options.suggestedCommandIds;for(let e=0;e{const t=await this.getAdditionalCommandPicks(s,r,e,i);if(i.isCancellationRequested)return[];const o=t.map((e=>this.toCommandPick(e,n)));return d&&"separator"!==o[0]?.type&&o.unshift({type:"separator",label:(0,_.kg)("suggested","similar commands")}),o})()}:l}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,_.kg)("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(t){(0,d.MB)(t)||this.dialogService.error((0,_.kg)("canNotRun","Command '{0}' resulted in an error",e.label),(0,c.r)(t))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};O=I=P([A(1,C._Y),A(2,y.b),A(3,v.d),A(4,R.k),A(5,w.X)],O);let F=class extends g.jG{static{M=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>this.updateConfiguration(e)))),this._register(this.storageService.onWillSaveState((e=>{e.reason===T.LP.SHUTDOWN&&this.saveState()})))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=M.getConfiguredCommandHistoryLength(this.configurationService),M.cache&&M.cache.limit!==this.configuredCommandsHistoryLength&&(M.cache.limit=this.configuredCommandsHistoryLength,M.hasChanges=!0))}load(){const e=this.storageService.get(M.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(e){this.logService.error(`[CommandsHistory] invalid data: ${e}`)}const i=M.cache=new p.qK(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}M.counter=this.storageService.getNumber(M.PREF_KEY_COUNTER,0,M.counter)}push(e){M.cache&&(M.cache.set(e,M.counter++),M.hasChanges=!0)}peek(e){return M.cache?.peek(e)}saveState(){if(!M.cache)return;if(!M.hasChanges)return;const e={usesLRU:!0,entries:[]};M.cache.forEach(((t,i)=>e.entries.push({key:i,value:t}))),this.storageService.store(M.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(M.PREF_KEY_COUNTER,M.counter,0,0),M.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const t=e.getValue(),i=t.workbench?.commandPalette?.history;return"number"==typeof i?i:M.DEFAULT_COMMANDS_HISTORY_LENGTH}};F=M=P([A(0,T.CS),A(1,b.pG),A(2,S.rr)],F);class B extends O{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions()){let e;i.metadata?.description&&(e=(0,l.f)(i.metadata.description)?i.metadata.description:{original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:e,label:(0,a.pS)(i.label)||i.id})}return t}}var W=i(52694),H=i(49678),V=i(43575),z=function(e,t){return function(i,n){t(i,n,e)}};let U=class extends B{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};U=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([z(0,C._Y),z(1,r.T),z(2,y.b),z(3,v.d),z(4,R.k),z(5,w.X)],U);class j extends W.ks{static{this.ID="editor.action.quickCommand"}constructor(){super({id:j.ID,label:o.gf.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:H.R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(V.GK).quickAccess.show(U.PREFIX)}}(0,W.Fl)(j),n.O.as(s.Fd.Quickaccess).registerQuickAccessProvider({ctor:U,prefix:U.PREFIX,helpEntries:[{description:o.gf.quickCommandHelp,commandId:j.ID}]})},85210:function(e,t,i){"use strict";var n=i(35114),s=i(47010),o=i(769),r=i(14374);class a extends o.o{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,r.kg)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,n.jG.None}provideWithTextEditor(e,t,i){const o=e.editor,r=new n.Cm;r.add(t.onDidAccept((i=>{const[n]=t.selectedItems;if(n){if(!this.isValidLineNumber(o,n.lineNumber))return;this.gotoLocation(e,{range:this.toRange(n.lineNumber,n.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(o,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(o,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(o,e.lineNumber))return void this.clearDecorations(o);const n=this.toRange(e.lineNumber,e.column);o.revealRangeInCenter(n,0),this.addDecorations(o,n)};l(),r.add(t.onDidChangeValue((()=>l())));const c=(0,s.jA)(o);return c&&2===c.getOptions().get(68).renderType&&(c.updateOptions({lineNumbers:"on"}),r.add((0,n.s)((()=>c.updateOptions({lineNumbers:"relative"}))))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,r.kg)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,r.kg)("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?(0,r.kg)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):(0,r.kg)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}var l=i(56419),c=i(6209),d=i(72777),h=i(47025),u=i(80670),g=i(52694),p=i(49678),f=i(43575);let m=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=u.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};var _,v;m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(_=0,v=d.T,function(e,t){v(e,t,_)})],m);class b extends g.ks{static{this.ID="editor.action.gotoLine"}constructor(){super({id:b.ID,label:h.Hw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(f.GK).quickAccess.show(m.PREFIX)}}(0,g.Fl)(b),l.O.as(c.Fd.Quickaccess).registerQuickAccessProvider({ctor:m,prefix:m.PREFIX,helpEntries:[{description:h.Hw.gotoLineActionLabel,commandId:b.ID}]})},71246:function(e,t,i){"use strict";i(83172);var n=i(90890),s=i(76611),o=i(93231),r=i(56613),a=i(17793),l=i(68847),c=i(79783),d=i(43920);const h=[void 0,[]];function u(e,t,i=0,n=0){const s=t;return s.values&&s.values.length>1?function(e,t,i,n){let s=0;const o=[];for(const r of t){const[t,a]=g(e,r,i,n);if("number"!=typeof t)return h;s+=t,o.push(...a)}return[s,p(o)]}(e,s.values,i,n):g(e,t,i,n)}function g(e,t,i,n){const s=(0,a.dt)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],(0,a.WJ)(s)]:h}function p(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(o=e,(s=n).end=0,r=f(e);let a;const c=e.split(" ");if(c.length>1)for(const e of c){const t=f(e),{pathNormalized:i,normalized:n,normalizedLowercase:s}=_(e);n&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:i,normalized:n,normalizedLowercase:s,expectContiguousMatch:t}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:s,values:a,containsPathSeparator:o,expectContiguousMatch:r}}function _(e){let t;t=c.uF?e.replace(/\//g,l.Vn):e.replace(/\\/g,l.Vn);const i=(0,d.wB)(t).replace(/\s|"/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function v(e){return Array.isArray(e)?m(e.map((e=>e.original)).join(" ")):m(e.original)}Object.freeze({score:0});var b,w=i(35114),C=i(40393),y=i(35720),S=i(51099),k=i(769),x=i(14374),L=i(69122),D=i(64429),E=function(e,t){return function(i,n){t(i,n,e)}};let N=class extends k.o{static{b=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,x.kg)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),w.jG.None}provideWithTextEditor(e,t,i,n){const s=e.editor,o=this.getModel(s);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i,n):this.doProvideWithoutEditorSymbols(e,o,t,i):w.jG.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new w.Cm;return this.provideLabelPick(i,(0,x.kg)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>{await this.waitForLanguageSymbolRegistry(t,s)&&!n.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new n.Zv,s=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),i.complete(!0))})));return t.add((0,w.s)((()=>i.complete(!1)))),i.p}doProvideWithEditorSymbols(e,t,i,n,o){const r=e.editor,a=new w.Cm;a.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),o?.handleAccept?.(n),t.inBackground||i.hide())}))),a.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const l=this.getDocumentSymbols(t,n);let c;const d=async e=>{c?.dispose(!0),i.busy=!1,c=new s.Qi(n),i.busy=!0;try{const s=m(i.value.substr(b.PREFIX.length).trim()),o=await this.doGetSymbolPicks(l,s,void 0,c.token,t);if(n.isCancellationRequested)return;if(o.length>0){if(i.items=o,e&&0===s.original.length){const t=(0,D.Uk)(o,(t=>Boolean("separator"!==t.type&&t.range&&C.Q.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else s.original.length>0?this.provideLabelPick(i,(0,x.kg)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,x.kg)("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue((()=>d(void 0)))),d(r.getSelection()?.getPosition()),a.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(r.revealRangeInCenter(e.range.selection,0),this.addDecorations(r,e.range.decoration))}))),a}async doGetSymbolPicks(e,t,i,n,s){const a=await e;if(n.isCancellationRequested)return[];const l=0===t.original.indexOf(b.SCOPE_PREFIX),c=l?1:0;let h,g,p;t.values&&t.values.length>1?(h=v(t.values[0]),g=v(t.values.slice(1))):h=t;const f=this.options?.openSideBySideDirection?.();f&&(p=[{iconClass:"right"===f?r.L.asClassName(o.W.splitHorizontal):r.L.asClassName(o.W.splitVertical),tooltip:"right"===f?(0,x.kg)("openToSide","Open to the Side"):(0,x.kg)("openToBottom","Open to the Bottom")}]);const m=[];for(let S=0;Sc){let F=!1;if(h!==t&&([N,T]=u(D,{...t,values:void 0},c,E),"number"==typeof N&&(F=!0)),"number"!=typeof N&&([N,T]=u(D,h,c,E),"number"!=typeof N))continue;if(!F&&g){if(A&&g.original.length>0&&([R,P]=u(A,g)),"number"!=typeof R)continue;"number"==typeof N&&(N+=R)}}const O=k.tags&&k.tags.indexOf(1)>=0;m.push({index:S,kind:k.kind,score:N,label:D,ariaLabel:(0,y.PK)(k.name,k.kind),description:A,highlights:O?void 0:{label:T,description:P},range:{selection:C.Q.collapseToStart(k.selectionRange),decoration:k.range},uri:s.uri,symbolName:L,strikethrough:O,buttons:p})}const _=m.sort(((e,t)=>l?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let w=[];if(l){let B,W,H=0;function V(){W&&"number"==typeof B&&H>0&&(W.label=(0,d.GP)(M[B]||I,H))}for(const z of _)B!==z.kind?(V(),B=z.kind,H=1,W={type:"separator"},w.push(W)):H++,w.push(z);V()}else _.length>0&&(w=[{label:(0,x.kg)("symbols","symbols ({0})",m.length),type:"separator"},..._]);return w}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=M[e.kind]||I,n=M[t.kind]||I,s=i.localeCompare(n);return 0===s?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};N=b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([E(0,L.ILanguageFeaturesService),E(1,S.gW)],N);const I=(0,x.kg)("property","properties ({0})"),M={5:(0,x.kg)("method","methods ({0})"),11:(0,x.kg)("function","functions ({0})"),8:(0,x.kg)("_constructor","constructors ({0})"),12:(0,x.kg)("variable","variables ({0})"),4:(0,x.kg)("class","classes ({0})"),22:(0,x.kg)("struct","structs ({0})"),23:(0,x.kg)("event","events ({0})"),24:(0,x.kg)("operator","operators ({0})"),10:(0,x.kg)("interface","interfaces ({0})"),2:(0,x.kg)("namespace","namespaces ({0})"),3:(0,x.kg)("package","packages ({0})"),25:(0,x.kg)("typeParameter","type parameters ({0})"),1:(0,x.kg)("modules","modules ({0})"),6:(0,x.kg)("property","properties ({0})"),9:(0,x.kg)("enum","enumerations ({0})"),21:(0,x.kg)("enumMember","enumeration members ({0})"),14:(0,x.kg)("string","strings ({0})"),0:(0,x.kg)("file","files ({0})"),17:(0,x.kg)("array","arrays ({0})"),15:(0,x.kg)("number","numbers ({0})"),16:(0,x.kg)("boolean","booleans ({0})"),18:(0,x.kg)("object","objects ({0})"),19:(0,x.kg)("key","keys ({0})"),7:(0,x.kg)("field","fields ({0})"),13:(0,x.kg)("constant","constants ({0})")};var T=i(56419),R=i(6209),P=i(72777),A=i(47025),O=i(80670),F=i(52694),B=i(49678),W=i(43575),H=function(e,t){return function(i,n){t(i,n,e)}};let V=class extends N{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=O.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};V=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([H(0,P.T),H(1,L.ILanguageFeaturesService),H(2,S.gW)],V);class z extends F.ks{static{this.ID="editor.action.quickOutline"}constructor(){super({id:z.ID,label:A.n9.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:B.R.hasDocumentSymbolProvider,kbOpts:{kbExpr:B.R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(W.GK).quickAccess.show(N.PREFIX,{itemActivation:W.C1.NONE})}}(0,F.Fl)(z),T.O.as(R.Fd.Quickaccess).registerQuickAccessProvider({ctor:V,prefix:N.PREFIX,helpEntries:[{description:A.n9.quickOutlineActionLabel,prefix:N.PREFIX,commandId:z.ID},{description:A.n9.quickOutlineByCategoryActionLabel,prefix:N.PREFIX_BY_CATEGORY}]})},97273:function(e,t,i){"use strict";var n,s=i(56419),o=i(6209),r=i(47025),a=i(14374),l=i(35114),c=i(87163),d=i(43575),h=function(e,t){return function(i,n){t(i,n,e)}};let u=class{static{n=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=s.O.as(o.Fd.Quickaccess)}provide(e){const t=new l.Cm;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(n.PREFIX.length));t&&t.prefix&&t.prefix!==n.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==n.PREFIX)),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)))}createPicks(e){return e.helpEntries.map((t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:(0,a.kg)("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}}))}};u=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([h(0,d.GK),h(1,c.b)],u),s.O.as(o.Fd.Quickaccess).registerQuickAccessProvider({ctor:u,prefix:"",helpEntries:[{description:r.oq.helpQuickAccessActionLabel}]})},76973:function(e,t,i){"use strict";var n=i(52694),s=i(72777),o=i(68625),r=i(47901),a=i(97848),l=i(63619),c=i(31835),d=i(87332),h=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends o.X{constructor(e,t,i,n,s,o,r){super(!0,e,t,i,n,s,o,r)}};u=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([h(1,a.fN),h(2,s.T),h(3,c.Ot),h(4,l._Y),h(5,d.CS),h(6,r.pG)],u),(0,n.HW)(o.X.ID,u,4)},28954:function(e,t,i){"use strict";i.d(t,{aQ:function(){return T},nr:function(){return R},Sx:function(){return H},po:function(){return M},tj:function(){return I}});var n=i(84201),s=i(75969),o=i(59321),r=i(80670),a=i(35720),l=i(36138);class c{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}const d=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class h{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(d);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=o.Q1.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class u{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,s=e.length;n{const i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",s="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(s=t.background)}const o=new h;for(const e of t)o.getId(e);const r=o.getId(n),a=o.getId(s),l=new p(i,r,a),c=new f(l);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e)>>>0}}const g=/\b(comment|string|regex|regexp)\b/;class p{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new p(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class f{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return void 0!==s?s.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const s=e.indexOf(".");let o,r;-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);void 0===a&&(a=new f(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,i,n)}}var m=i(99851),_=i(4195);const v={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_.YtV]:"#FFFFFE",[_.By2]:"#000000",[_.tan]:"#E5EBF1",[m.vV]:"#D3D3D3",[m.H0]:"#939393",[_.QwA]:"#ADD6FF4D"}},b={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_.YtV]:"#1E1E1E",[_.By2]:"#D4D4D4",[_.tan]:"#3A3D41",[m.vV]:"#404040",[m.H0]:"#707070",[_.QwA]:"#ADD6FF26"}},w={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_.YtV]:"#000000",[_.By2]:"#FFFFFF",[m.vV]:"#FFFFFF",[m.H0]:"#FFFFFF"}},C={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_.YtV]:"#FFFFFF",[_.By2]:"#292929",[m.vV]:"#292929",[m.H0]:"#292929"}};var y=i(56419),S=i(40616),k=i(35114),x=i(39679),L=i(56613),D=i(51310);class E{getIcon(e){const t=(0,D.HT)();let i=e.defaults;for(;L.L.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}var N=i(95601);const I="vs",M="vs-dark",T="hc-black",R="hc-light",P=y.O.as(_.FdG.ColorContribution),A=y.O.as(S.Fd.ThemingContribution);class O{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(F(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,o.Q1.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=B(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,o.Q1.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=P.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case I:return x.zM.LIGHT;case T:return x.zM.HIGH_CONTRAST_DARK;case R:return x.zM.HIGH_CONTRAST_LIGHT;default:return x.zM.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=B(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=u.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=l.x.getForeground(n),o=l.x.getFontStyle(n);return{foreground:s,italic:Boolean(1&o),bold:Boolean(2&o),underline:Boolean(4&o),strikethrough:Boolean(8&o)}}}function F(e){return e===I||e===M||e===T||e===R}function B(e){switch(e){case I:return v;case M:return b;case T:return w;case R:return C}}function W(e){const t=B(e);return new O(e,t)}class H extends k.jG{constructor(){super(),this._onColorThemeChange=this._register(new r.vl),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new r.vl),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new E,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(I,W(I)),this._knownThemes.set(M,W(M)),this._knownThemes.set(T,W(T)),this._knownThemes.set(R,W(R));const e=this._register(function(e){const t=new k.Cm,i=t.add(new r.vl),s=(0,D.HT)();return t.add(s.onDidChange((()=>i.fire()))),e&&t.add(e.onDidProductIconThemeChange((()=>i.fire()))),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){const t=e?e.getProductIconTheme():new E,i={},o=[],r=[];for(const e of s.getIcons()){const s=t.getIcon(e);if(!s)continue;const a=s.font,l=`--vscode-icon-${e.id}-font-family`,c=`--vscode-icon-${e.id}-content`;a?(i[a.id]=a.definition,r.push(`${l}: ${(0,n.yt)(a.id)};`,`${c}: '${s.fontCharacter}';`),o.push(`.codicon-${e.id}:before { content: '${s.fontCharacter}'; font-family: ${(0,n.yt)(a.id)}; }`)):(r.push(`${c}: '${s.fontCharacter}'; ${l}: 'codicon';`),o.push(`.codicon-${e.id}:before { content: '${s.fontCharacter}'; }`))}for(const e in i){const t=i[e],s=t.weight?`font-weight: ${t.weight};`:"",r=t.style?`font-style: ${t.style};`:"",a=t.src.map((e=>`${(0,n.Tf)(e.location)} format('${e.format}')`)).join(", ");o.push(`@font-face { src: ${a}; font-family: ${(0,n.yt)(e)};${s}${r} font-display: block; }`)}return o.push(`:root { ${r.join(" ")} }`),o.join("\n")}}}(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(I),this._onOSSchemeChanged(),this._register(e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}))),(0,s.Dy)(N.G,"(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return n.Cl(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=n.li(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),k.jG.None}_registerShadowDomContainer(e){const t=n.li(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(I),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=N.G.matchMedia("(forced-colors: active)").matches;if(e!==(0,x.Bb)(this._theme.type)){let t;t=(0,x.HD)(this._theme.type)?e?T:M:e?R:I,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};A.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of P.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${(0,_.Bbc)(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join("\n")} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},67742:function(e,t,i){"use strict";var n=i(52694),s=i(86100),o=i(47025),r=i(39679),a=i(28954);class l extends n.ks{constructor(){super({id:"editor.action.toggleHighContrast",label:o.E6.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(s.L),n=i.getColorTheme();(0,r.Bb)(n.type)?(i.setTheme(this._originalThemeName||((0,r.HD)(n.type)?a.po:a.tj)),this._originalThemeName=null):(i.setTheme((0,r.HD)(n.type)?a.aQ:a.nr),this._originalThemeName=n.themeName)}}(0,n.Fl)(l)},86100:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=(0,i(63619).u1)("themeService")},95380:function(e,t,i){"use strict";var n=i(47091),s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||s(e,l,{get:()=>t[l],enumerable:!(n=o(t,l))||n.enumerable});return e},c={};l(c,n,"default");var d=class{constructor(e,t,i){this._onDidChange=new c.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},h={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},u={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},g=new d("css",h,u),p=new d("scss",h,u),f=new d("less",h,u);function m(){return i.e(6173).then(i.bind(i,26173))}c.languages.css={cssDefaults:g,lessDefaults:f,scssDefaults:p},c.languages.onLanguage("less",(()=>{m().then((e=>e.setupMode(f)))})),c.languages.onLanguage("scss",(()=>{m().then((e=>e.setupMode(p)))})),c.languages.onLanguage("css",(()=>{m().then((e=>e.setupMode(g)))}))},13028:function(e,t,i){"use strict";i.d(t,{IF:function(){return _}});var n=i(47091),s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||s(e,l,{get:()=>t[l],enumerable:!(n=o(t,l))||n.enumerable});return e},c={};l(c,n,"default");var d=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(d||{}),h=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(h||{}),u=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(u||{}),g=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(g||{}),p=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(p||{}),f=class{constructor(e,t,i,n,s){this._onDidChange=new c.Emitter,this._onDidExtraLibsChange=new c.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i=void 0===t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content;let n=1;this._removedExtraLibs[e]&&(n=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)}),0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},m={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},_=new f({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},m),v=new f({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},m);function b(){return i.e(9679).then(i.bind(i,29679))}c.languages.typescript={ModuleKind:d,JsxEmit:h,NewLineKind:u,ScriptTarget:g,ModuleResolutionKind:p,typescriptVersion:"5.4.5",typescriptDefaults:_,javascriptDefaults:v,getTypeScriptWorker:()=>b().then((e=>e.getTypeScriptWorker())),getJavaScriptWorker:()=>b().then((e=>e.getJavaScriptWorker()))},c.languages.onLanguage("typescript",(()=>b().then((e=>e.setupTypeScript(_))))),c.languages.onLanguage("javascript",(()=>b().then((e=>e.setupJavaScript(v)))))},14374:function(e,t,i){"use strict";function n(){return globalThis._VSCODE_NLS_MESSAGES}function s(){return globalThis._VSCODE_NLS_LANGUAGE}i.d(t,{i8:function(){return s},Ec:function(){return n},kg:function(){return a},aS:function(){return c}});const o="pseudo"===s()||"undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function r(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],s=t[n];let o=e;return"string"==typeof s?o=s:"number"!=typeof s&&"boolean"!=typeof s&&null!=s||(o=String(s)),o})),o&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function a(e,t,...i){return r("number"==typeof e?l(e,t):t,i)}function l(e,t){const i=n()?.[e];if("string"!=typeof i){if("string"==typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return i}function c(e,t,...i){let n;n="number"==typeof e?l(e,t):t;const s=r(n,i);return{value:s,original:t===n?s:r(t,i)}}},92998:function(e,t,i){"use strict";i.d(t,{Z:function(){return n}});const n=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const t=this._implementations.indexOf(e);-1!==t&&this._implementations.splice(t,1)}}}getImplementations(){return this._implementations}}},68745:function(e,t,i){"use strict";i.d(t,{f:function(){return o},j:function(){return s}});var n=i(97848);const s=(0,i(63619).u1)("accessibilityService"),o=new n.N1("accessibilityModeEnabled",!1)},54673:function(e,t,i){"use strict";i.d(t,{Nt:function(){return s},Rh:function(){return a}});var n=i(14374);const s=(0,i(63619).u1)("accessibilitySignalService");Symbol("AcknowledgeDocCommentsToken");class o{static register(e){return new o(e.fileName)}static{this.error=o.register({fileName:"error.mp3"})}static{this.warning=o.register({fileName:"warning.mp3"})}static{this.success=o.register({fileName:"success.mp3"})}static{this.foldedArea=o.register({fileName:"foldedAreas.mp3"})}static{this.break=o.register({fileName:"break.mp3"})}static{this.quickFixes=o.register({fileName:"quickFixes.mp3"})}static{this.taskCompleted=o.register({fileName:"taskCompleted.mp3"})}static{this.taskFailed=o.register({fileName:"taskFailed.mp3"})}static{this.terminalBell=o.register({fileName:"terminalBell.mp3"})}static{this.diffLineInserted=o.register({fileName:"diffLineInserted.mp3"})}static{this.diffLineDeleted=o.register({fileName:"diffLineDeleted.mp3"})}static{this.diffLineModified=o.register({fileName:"diffLineModified.mp3"})}static{this.chatRequestSent=o.register({fileName:"chatRequestSent.mp3"})}static{this.chatResponseReceived1=o.register({fileName:"chatResponseReceived1.mp3"})}static{this.chatResponseReceived2=o.register({fileName:"chatResponseReceived2.mp3"})}static{this.chatResponseReceived3=o.register({fileName:"chatResponseReceived3.mp3"})}static{this.chatResponseReceived4=o.register({fileName:"chatResponseReceived4.mp3"})}static{this.clear=o.register({fileName:"clear.mp3"})}static{this.save=o.register({fileName:"save.mp3"})}static{this.format=o.register({fileName:"format.mp3"})}static{this.voiceRecordingStarted=o.register({fileName:"voiceRecordingStarted.mp3"})}static{this.voiceRecordingStopped=o.register({fileName:"voiceRecordingStopped.mp3"})}static{this.progress=o.register({fileName:"progress.mp3"})}constructor(e){this.fileName=e}}class r{constructor(e){this.randomOneOf=e}}class a{constructor(e,t,i,n,s,o){this.sound=e,this.name=t,this.legacySoundSettingsKey=i,this.settingsKey=n,this.legacyAnnouncementSettingsKey=s,this.announcementMessage=o}static{this._signals=new Set}static register(e){const t=new r("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new a(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return a._signals.add(i),i}static{this.errorAtPosition=a.register({name:(0,n.kg)("accessibilitySignals.positionHasError.name","Error at Position"),sound:o.error,announcementMessage:(0,n.kg)("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"})}static{this.warningAtPosition=a.register({name:(0,n.kg)("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:o.warning,announcementMessage:(0,n.kg)("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"})}static{this.errorOnLine=a.register({name:(0,n.kg)("accessibilitySignals.lineHasError.name","Error on Line"),sound:o.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:(0,n.kg)("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"})}static{this.warningOnLine=a.register({name:(0,n.kg)("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:o.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:(0,n.kg)("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"})}static{this.foldedArea=a.register({name:(0,n.kg)("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:o.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:(0,n.kg)("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"})}static{this.break=a.register({name:(0,n.kg)("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:o.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:(0,n.kg)("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"})}static{this.inlineSuggestion=a.register({name:(0,n.kg)("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:o.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"})}static{this.terminalQuickFix=a.register({name:(0,n.kg)("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:o.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:(0,n.kg)("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"})}static{this.onDebugBreak=a.register({name:(0,n.kg)("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:o.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:(0,n.kg)("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"})}static{this.noInlayHints=a.register({name:(0,n.kg)("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:o.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:(0,n.kg)("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"})}static{this.taskCompleted=a.register({name:(0,n.kg)("accessibilitySignals.taskCompleted","Task Completed"),sound:o.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:(0,n.kg)("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"})}static{this.taskFailed=a.register({name:(0,n.kg)("accessibilitySignals.taskFailed","Task Failed"),sound:o.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:(0,n.kg)("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"})}static{this.terminalCommandFailed=a.register({name:(0,n.kg)("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:o.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:(0,n.kg)("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"})}static{this.terminalCommandSucceeded=a.register({name:(0,n.kg)("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:o.success,announcementMessage:(0,n.kg)("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"})}static{this.terminalBell=a.register({name:(0,n.kg)("accessibilitySignals.terminalBell","Terminal Bell"),sound:o.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:(0,n.kg)("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"})}static{this.notebookCellCompleted=a.register({name:(0,n.kg)("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:o.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:(0,n.kg)("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"})}static{this.notebookCellFailed=a.register({name:(0,n.kg)("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:o.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:(0,n.kg)("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"})}static{this.diffLineInserted=a.register({name:(0,n.kg)("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:o.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"})}static{this.diffLineDeleted=a.register({name:(0,n.kg)("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:o.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"})}static{this.diffLineModified=a.register({name:(0,n.kg)("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:o.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"})}static{this.chatRequestSent=a.register({name:(0,n.kg)("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:o.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:(0,n.kg)("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"})}static{this.chatResponseReceived=a.register({name:(0,n.kg)("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[o.chatResponseReceived1,o.chatResponseReceived2,o.chatResponseReceived3,o.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"})}static{this.progress=a.register({name:(0,n.kg)("accessibilitySignals.progress","Progress"),sound:o.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:(0,n.kg)("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"})}static{this.clear=a.register({name:(0,n.kg)("accessibilitySignals.clear","Clear"),sound:o.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:(0,n.kg)("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"})}static{this.save=a.register({name:(0,n.kg)("accessibilitySignals.save","Save"),sound:o.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:(0,n.kg)("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"})}static{this.format=a.register({name:(0,n.kg)("accessibilitySignals.format","Format"),sound:o.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:(0,n.kg)("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"})}static{this.voiceRecordingStarted=a.register({name:(0,n.kg)("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:o.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"})}static{this.voiceRecordingStopped=a.register({name:(0,n.kg)("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:o.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"})}}},47755:function(e,t,i){"use strict";function n(e){return e&&"object"==typeof e&&"string"==typeof e.original&&"string"==typeof e.value}function s(e){return!!e&&void 0!==e.condition}i.d(t,{N:function(){return s},f:function(){return n}})},42574:function(e,t,i){"use strict";i.d(t,{$u:function(){return N},Ot:function(){return I},oq:function(){return T},rN:function(){return F},rr:function(){return R}});var n=i(84201),s=i(40478),o=i(9306),r=i(99457),a=i(30981),l=i(92479),c=i(35114),d=i(79783),h=i(14374),u=i(93223),g=i(47755),p=i(97848),f=i(14280),m=i(63619),_=i(87163),v=i(31835),b=i(87332),w=i(40616),C=i(56613),y=i(39679),S=i(24219),k=i(4195),x=i(52010),L=i(68745),D=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},E=function(e,t){return function(i,n){t(i,n,e)}};function N(e,t,i,s){let o,r,a;if(Array.isArray(e))a=e,o=t,r=i;else{const n=t;a=e.getActions(n),o=i,r=s}const l=n.Di.getInstance();M(a,o,l.keyStatus.altKey||(d.uF||d.j9)&&l.keyStatus.shiftKey,r?e=>e===r:e=>"navigation"===e)}function I(e,t,i,n,s,o){let r,a,l,c,d;if(Array.isArray(e))d=e,r=t,a=i,l=n,c=s;else{const h=t;d=e.getActions(h),r=i,a=n,l=s,c=o}M(d,r,!1,"string"==typeof a?e=>e===a:a,l,c)}function M(e,t,i,n=e=>"navigation"===e,s=()=>!1,o=!1){let r,l;Array.isArray(t)?(r=t,l=t):(r=t.primary,l=t.secondary);const c=new Set;for(const[t,s]of e){let e;n(t)?(e=r,e.length>0&&o&&e.push(new a.wv)):(e=l,e.length>0&&e.push(new a.wv));for(let n of s){i&&(n=n instanceof u.Xe&&n.alt?n.alt:n);const s=e.push(n);n instanceof a.YH&&c.add({group:t,action:n,index:s-1})}}for(const{group:e,action:t,index:i}of c){const o=n(e)?r:l,a=t.actions;s(t,e,o.length)&&o.splice(i,1,...a)}}let T=class extends o.Z4{constructor(e,t,i,s,o,r,a,l){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._options=t,this._keybindingService=i,this._notificationService=s,this._contextKeyService=o,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new c.HE),this._altKey=n.Di.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{const e=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register((0,n.ko)(e,"mouseleave",(e=>{t=!1,i()}))),this._register((0,n.ko)(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?(0,h.kg)("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),s=i?(0,h.kg)("titleAndKb","{0} ({1})",e,i):e;n=(0,h.kg)("titleAndKbAndAlt","{0}\n[{1}] {2}",n,l.Of.modifierLabels[d.OS].altKey,s)}return n}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const s=this._commandAction.checked&&(0,g.N)(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(s)if(C.L.isThemeIcon(s)){const e=C.L.asClassNameArray(s);i.classList.add(...e),this._itemClassDispose.value=(0,c.s)((()=>{i.classList.remove(...e)}))}else i.style.backgroundImage=(0,y.HD)(this._themeService.getColorTheme().type)?(0,n.Tf)(s.dark):(0,n.Tf)(s.light),i.classList.add("icon"),this._itemClassDispose.value=(0,c.qE)((0,c.s)((()=>{i.style.backgroundImage="",i.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}};T=D([E(2,_.b),E(3,v.Ot),E(4,p.fN),E(5,w.Gy),E(6,f.Z),E(7,L.j)],T);class R extends T{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=R._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=(0,h.kg)({key:"content2",comment:['A label with keybindg like "ESC to dismiss"']},"{1} to {0}",this._action.label,t):this.label.textContent=(0,h.kg)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let P=class extends r.d{constructor(e,t,i,n,s){const o={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(C.L.isThemeIcon(e.item.icon)?C.L.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(e=>i.lookupKeybinding(e.id))};super(e,{getActions:()=>e.actions},n,o),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),(0,S.j)(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!C.L.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=(0,y.HD)(this._themeService.getColorTheme().type)?(0,n.Tf)(i.dark):(0,n.Tf)(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};P=D([E(2,_.b),E(3,f.Z),E(4,w.Gy)],P);let A=class extends o.EH{constructor(e,t,i,n,s,o,l,c){let d;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=o,this._instaService=l,this._storageService=c,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const h=t?.persistLastActionId?c.get(this._storageKey,1):void 0;h&&(d=e.actions.find((e=>h===e.id))),d||(d=e.actions[0]),this._defaultAction=this._instaService.createInstance(T,d,{keybinding:this._getDefaultActionKeybindingLabel(d)});const g={keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??new a.LN};this._dropdown=new r.d(e,e.actions,this._contextMenuService,g),this._register(this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof u.Xe&&this.update(e.action)})))}update(e){this._options?.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(T,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends a.LN{async runAction(e,t){await e.run(void 0)}},this._container&&this._defaultAction.render((0,n.Hs)(this._container,(0,n.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(t=`(${i.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=(0,n.$)(".action-container");this._defaultAction.render((0,n.BC)(this._container,t)),this._register((0,n.ko)(t,n.Bx.KEY_DOWN,(e=>{const t=new s.Z(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=(0,n.$)(".dropdown-action-container");this._dropdown.render((0,n.BC)(this._container,i)),this._register((0,n.ko)(i,n.Bx.KEY_DOWN,(e=>{const t=new s.Z(e);t.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),t.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};A=D([E(2,_.b),E(3,v.Ot),E(4,f.Z),E(5,u.ez),E(6,m._Y),E(7,b.CS)],A);let O=class extends o.XF{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===a.wv.ID?"─────────":e.label,isDisabled:!e.enabled}))),0,t,x.RE,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=(0,k.GuP)(k.HcB)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function F(e,t,i){return t instanceof u.Xe?e.createInstance(T,t,i):t instanceof u.nI?t.item.isSelection?e.createInstance(O,t):t.item.rememberDefaultAction?e.createInstance(A,t,{...i,persistLastActionId:!0}):e.createInstance(P,t,i):void 0}O=D([E(1,f.l)],O)},86051:function(e,t,i){"use strict";i.d(t,{m:function(){return M},p:function(){return I}});var n=i(84201),s=i(34287),o=i(98099),r=i(99457),a=i(30981),l=i(93231),c=i(56613),d=i(80670),h=i(35114),u=i(14374),g=i(24764);class p extends h.jG{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new d._B),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new h.Cm),i.hoverDelegate=i.hoverDelegate??this._register((0,g.bW)()),this.options=i,this.toggleMenuAction=this._register(new f((()=>this.toggleMenuActionViewItem?.show()),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new o.E(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(e,n)=>{if(e.id===f.ID)return this.toggleMenuActionViewItem=new r.d(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:c.L.asClassNameArray(i.moreIcon??l.W.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof a.YH){const i=new r.d(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){const t=this.options.getKeyBinding?.(e);return t?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class f extends a.rc{static{this.ID="toolbar.toggle.more"}constructor(e,t){t=t||u.kg("moreActions","More Actions..."),super(f.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}var m=i(97358),_=i(34027),v=i(20187),b=i(26182),w=i(42574),C=i(93223),y=i(79126),S=i(21335),k=i(97848),x=i(14280),L=i(87163),D=i(2727),E=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};let I=class extends p{constructor(e,t,i,n,s,o,r,a){super(e,s,{getKeyBinding:e=>o.lookupKeybinding(e.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:"string"==typeof t?.telemetrySource}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._keybindingService=o,this._commandService=r,this._sessionDisposables=this._store.add(new h.Cm);const l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun((e=>a.publicLog2("workbenchActionExecuted",{id:e.action.id,from:l}))))}setActions(e,t=[],i){this._sessionDisposables.clear();const o=e.slice(),r=t.slice(),l=[];let c=0;const d=[];let h=!1;if(-1!==this._options?.hiddenItemStrategy)for(let e=0;ee?.id))),t=this._options.overflowBehavior.maxItems-e.size;let i=0;for(let n=0;n=t&&(o[n]=void 0,d[n]=s))}}(0,m.SK)(o),(0,m.SK)(d),super.setActions(o,a.wv.join(d,r)),(l.length>0||o.length>0)&&this._sessionDisposables.add((0,n.ko)(this.getElement(),"contextmenu",(e=>{const t=new s.P((0,n.zk)(this.getElement()),e),o=this.getItemAction(t.target);if(!o)return;t.preventDefault(),t.stopPropagation();const r=[];if(o instanceof C.Xe&&o.menuKeybinding)r.push(o.menuKeybinding);else if(!(o instanceof C.nI||o instanceof f)){const e=!!this._keybindingService.lookupKeybinding(o.id);r.push((0,y.D)(this._commandService,this._keybindingService,o.id,void 0,e))}if(l.length>0){let e=!1;if(1===c&&0===this._options?.hiddenItemStrategy){e=!0;for(let e=0;ethis._menuService.resetHiddenStates(i)}))),0!==d.length&&this._contextMenuService.showContextMenu({getAnchor:()=>t,getActions:()=>d,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:"string"==typeof this._options?.telemetrySource,contextKeyService:this._contextKeyService})})))}};I=E([N(2,C.ez),N(3,k.fN),N(4,x.Z),N(5,L.b),N(6,S.d),N(7,D.k)],I);let M=class extends I{constructor(e,t,i,n,s,o,r,a,l){super(e,{resetMenu:t,...i},n,s,o,r,a,l),this._onDidChangeMenuItems=this._store.add(new d.vl),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const c=this._store.add(n.createMenu(t,s,{emitEventsForSubmenuChanges:!0})),h=()=>{const t=[],n=[];(0,w.Ot)(c,i?.menuOptions,{primary:t,secondary:n},i?.toolbarOptions?.primaryGroup,i?.toolbarOptions?.shouldInlineSubmenu,i?.toolbarOptions?.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",0===t.length&&0===n.length),super.setActions(t,n)};this._store.add(c.onDidChange((()=>{h(),this._onDidChangeMenuItems.fire(this)}))),h()}setActions(){throw new v.D7("This toolbar is populated from a menu.")}};M=E([N(3,C.ez),N(4,k.fN),N(5,x.Z),N(6,L.b),N(7,S.d),N(8,D.k)],M)},93223:function(e,t,i){"use strict";i.d(t,{D8:function(){return m},L:function(){return y},Xe:function(){return C},ZG:function(){return b},ez:function(){return _},i1:function(){return f},is:function(){return p},nI:function(){return w},ug:function(){return S}});var n,s=i(30981),o=i(56613),r=i(80670),a=i(35114),l=i(54409),c=i(21335),d=i(97848),h=i(63619),u=i(19561),g=function(e,t){return function(i,n){t(i,n,e)}};function p(e){return void 0!==e.command}function f(e){return void 0!==e.submenu}class m{static{this._instances=new Map}static{this.CommandPalette=new m("CommandPalette")}static{this.DebugBreakpointsContext=new m("DebugBreakpointsContext")}static{this.DebugCallStackContext=new m("DebugCallStackContext")}static{this.DebugConsoleContext=new m("DebugConsoleContext")}static{this.DebugVariablesContext=new m("DebugVariablesContext")}static{this.NotebookVariablesContext=new m("NotebookVariablesContext")}static{this.DebugHoverContext=new m("DebugHoverContext")}static{this.DebugWatchContext=new m("DebugWatchContext")}static{this.DebugToolBar=new m("DebugToolBar")}static{this.DebugToolBarStop=new m("DebugToolBarStop")}static{this.DebugCallStackToolbar=new m("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new m("DebugCreateConfiguration")}static{this.EditorContext=new m("EditorContext")}static{this.SimpleEditorContext=new m("SimpleEditorContext")}static{this.EditorContent=new m("EditorContent")}static{this.EditorLineNumberContext=new m("EditorLineNumberContext")}static{this.EditorContextCopy=new m("EditorContextCopy")}static{this.EditorContextPeek=new m("EditorContextPeek")}static{this.EditorContextShare=new m("EditorContextShare")}static{this.EditorTitle=new m("EditorTitle")}static{this.EditorTitleRun=new m("EditorTitleRun")}static{this.EditorTitleContext=new m("EditorTitleContext")}static{this.EditorTitleContextShare=new m("EditorTitleContextShare")}static{this.EmptyEditorGroup=new m("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new m("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new m("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new m("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new m("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new m("EditorActionsPositionSubmenu")}static{this.ExplorerContext=new m("ExplorerContext")}static{this.ExplorerContextShare=new m("ExplorerContextShare")}static{this.ExtensionContext=new m("ExtensionContext")}static{this.GlobalActivity=new m("GlobalActivity")}static{this.CommandCenter=new m("CommandCenter")}static{this.CommandCenterCenter=new m("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new m("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new m("LayoutControlMenu")}static{this.MenubarMainMenu=new m("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new m("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new m("MenubarDebugMenu")}static{this.MenubarEditMenu=new m("MenubarEditMenu")}static{this.MenubarCopy=new m("MenubarCopy")}static{this.MenubarFileMenu=new m("MenubarFileMenu")}static{this.MenubarGoMenu=new m("MenubarGoMenu")}static{this.MenubarHelpMenu=new m("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new m("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new m("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new m("PanelAlignmentMenu")}static{this.PanelPositionMenu=new m("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new m("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new m("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new m("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new m("MenubarSelectionMenu")}static{this.MenubarShare=new m("MenubarShare")}static{this.MenubarSwitchEditorMenu=new m("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new m("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new m("MenubarTerminalMenu")}static{this.MenubarViewMenu=new m("MenubarViewMenu")}static{this.MenubarHomeMenu=new m("MenubarHomeMenu")}static{this.OpenEditorsContext=new m("OpenEditorsContext")}static{this.OpenEditorsContextShare=new m("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new m("ProblemsPanelContext")}static{this.SCMInputBox=new m("SCMInputBox")}static{this.SCMChangesSeparator=new m("SCMChangesSeparator")}static{this.SCMChangesContext=new m("SCMChangesContext")}static{this.SCMIncomingChanges=new m("SCMIncomingChanges")}static{this.SCMIncomingChangesContext=new m("SCMIncomingChangesContext")}static{this.SCMIncomingChangesSetting=new m("SCMIncomingChangesSetting")}static{this.SCMOutgoingChanges=new m("SCMOutgoingChanges")}static{this.SCMOutgoingChangesContext=new m("SCMOutgoingChangesContext")}static{this.SCMOutgoingChangesSetting=new m("SCMOutgoingChangesSetting")}static{this.SCMIncomingChangesAllChangesContext=new m("SCMIncomingChangesAllChangesContext")}static{this.SCMIncomingChangesHistoryItemContext=new m("SCMIncomingChangesHistoryItemContext")}static{this.SCMOutgoingChangesAllChangesContext=new m("SCMOutgoingChangesAllChangesContext")}static{this.SCMOutgoingChangesHistoryItemContext=new m("SCMOutgoingChangesHistoryItemContext")}static{this.SCMChangeContext=new m("SCMChangeContext")}static{this.SCMResourceContext=new m("SCMResourceContext")}static{this.SCMResourceContextShare=new m("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new m("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new m("SCMResourceGroupContext")}static{this.SCMSourceControl=new m("SCMSourceControl")}static{this.SCMSourceControlInline=new m("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new m("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new m("SCMHistoryTitle")}static{this.SCMTitle=new m("SCMTitle")}static{this.SearchContext=new m("SearchContext")}static{this.SearchActionMenu=new m("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new m("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new m("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new m("StickyScrollContext")}static{this.TestItem=new m("TestItem")}static{this.TestItemGutter=new m("TestItemGutter")}static{this.TestProfilesContext=new m("TestProfilesContext")}static{this.TestMessageContext=new m("TestMessageContext")}static{this.TestMessageContent=new m("TestMessageContent")}static{this.TestPeekElement=new m("TestPeekElement")}static{this.TestPeekTitle=new m("TestPeekTitle")}static{this.TestCallStack=new m("TestCallStack")}static{this.TouchBarContext=new m("TouchBarContext")}static{this.TitleBarContext=new m("TitleBarContext")}static{this.TitleBarTitleContext=new m("TitleBarTitleContext")}static{this.TunnelContext=new m("TunnelContext")}static{this.TunnelPrivacy=new m("TunnelPrivacy")}static{this.TunnelProtocol=new m("TunnelProtocol")}static{this.TunnelPortInline=new m("TunnelInline")}static{this.TunnelTitle=new m("TunnelTitle")}static{this.TunnelLocalAddressInline=new m("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new m("TunnelOriginInline")}static{this.ViewItemContext=new m("ViewItemContext")}static{this.ViewContainerTitle=new m("ViewContainerTitle")}static{this.ViewContainerTitleContext=new m("ViewContainerTitleContext")}static{this.ViewTitle=new m("ViewTitle")}static{this.ViewTitleContext=new m("ViewTitleContext")}static{this.CommentEditorActions=new m("CommentEditorActions")}static{this.CommentThreadTitle=new m("CommentThreadTitle")}static{this.CommentThreadActions=new m("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new m("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new m("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new m("CommentThreadCommentContext")}static{this.CommentTitle=new m("CommentTitle")}static{this.CommentActions=new m("CommentActions")}static{this.CommentsViewThreadActions=new m("CommentsViewThreadActions")}static{this.InteractiveToolbar=new m("InteractiveToolbar")}static{this.InteractiveCellTitle=new m("InteractiveCellTitle")}static{this.InteractiveCellDelete=new m("InteractiveCellDelete")}static{this.InteractiveCellExecute=new m("InteractiveCellExecute")}static{this.InteractiveInputExecute=new m("InteractiveInputExecute")}static{this.InteractiveInputConfig=new m("InteractiveInputConfig")}static{this.ReplInputExecute=new m("ReplInputExecute")}static{this.IssueReporter=new m("IssueReporter")}static{this.NotebookToolbar=new m("NotebookToolbar")}static{this.NotebookStickyScrollContext=new m("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new m("NotebookCellTitle")}static{this.NotebookCellDelete=new m("NotebookCellDelete")}static{this.NotebookCellInsert=new m("NotebookCellInsert")}static{this.NotebookCellBetween=new m("NotebookCellBetween")}static{this.NotebookCellListTop=new m("NotebookCellTop")}static{this.NotebookCellExecute=new m("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new m("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new m("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new m("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new m("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new m("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new m("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new m("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new m("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new m("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new m("NotebookKernelSource")}static{this.BulkEditTitle=new m("BulkEditTitle")}static{this.BulkEditContext=new m("BulkEditContext")}static{this.TimelineItemContext=new m("TimelineItemContext")}static{this.TimelineTitle=new m("TimelineTitle")}static{this.TimelineTitleContext=new m("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new m("TimelineFilterSubMenu")}static{this.AccountsContext=new m("AccountsContext")}static{this.SidebarTitle=new m("SidebarTitle")}static{this.PanelTitle=new m("PanelTitle")}static{this.AuxiliaryBarTitle=new m("AuxiliaryBarTitle")}static{this.AuxiliaryBarHeader=new m("AuxiliaryBarHeader")}static{this.TerminalInstanceContext=new m("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new m("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new m("TerminalNewDropdownContext")}static{this.TerminalTabContext=new m("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new m("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new m("TerminalStickyScrollContext")}static{this.WebviewContext=new m("WebviewContext")}static{this.InlineCompletionsActions=new m("InlineCompletionsActions")}static{this.InlineEditsActions=new m("InlineEditsActions")}static{this.InlineEditActions=new m("InlineEditActions")}static{this.NewFile=new m("NewFile")}static{this.MergeInput1Toolbar=new m("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new m("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new m("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new m("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new m("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new m("InlineEditToolbar")}static{this.ChatContext=new m("ChatContext")}static{this.ChatCodeBlock=new m("ChatCodeblock")}static{this.ChatCompareBlock=new m("ChatCompareBlock")}static{this.ChatMessageTitle=new m("ChatMessageTitle")}static{this.ChatExecute=new m("ChatExecute")}static{this.ChatExecuteSecondary=new m("ChatExecuteSecondary")}static{this.ChatInputSide=new m("ChatInputSide")}static{this.AccessibleView=new m("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new m("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new m("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new m("DiffEditorSelectionToolbar")}constructor(e){if(m._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);m._instances.set(e,this),this.id=e}}const _=(0,h.u1)("menuService");class v{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new v(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof v&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}const b=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new r.QT({merge:v.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(v.for(m.CommandPalette)),(0,a.s)((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(v.for(m.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new l.w,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(v.for(e)),(0,a.s)((()=>{n(),this._onDidChangeMenu.fire(v.for(e))}))}appendMenuItems(e){const t=new a.Cm;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===m.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)p(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class w extends s.YH{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let C=n=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,s,r,a,l){let c;if(this.hideActions=s,this.menuKeybinding=r,this._commandService=l,this.id=e.id,this.label=n.label(e,i),this.tooltip=("string"==typeof e.tooltip?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||a.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=a.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&o.L.isThemeIcon(t.icon)&&(c=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}c||(c=o.L.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,s,void 0,a,l):void 0,this._options=i,this.class=c&&o.L.asClassName(c)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};C=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([g(5,d.fN),g(6,c.d)],C);class y{constructor(e){this.desc=e}}function S(e){const t=[],i=new e,{f1:n,menu:s,keybinding:o,...r}=i.desc;if(c.w.getCommand(r.id))throw new Error(`Cannot register two commands with the same id: ${r.id}`);if(t.push(c.w.registerCommand({id:r.id,handler:(e,...t)=>i.run(e,...t),metadata:r.metadata})),Array.isArray(s))for(const e of s)t.push(b.appendMenuItem(e.id,{command:{...r,precondition:null===e.precondition?void 0:r.precondition},...e}));else s&&t.push(b.appendMenuItem(s.id,{command:{...r,precondition:null===s.precondition?void 0:r.precondition},...s}));if(n&&(t.push(b.appendMenuItem(m.CommandPalette,{command:r,when:r.precondition})),t.push(b.addCommand(r))),Array.isArray(o))for(const e of o)t.push(u.f.registerKeybindingRule({...e,id:r.id,when:r.precondition?d.M$.and(r.precondition,e.when):e.when}));else o&&t.push(u.f.registerKeybindingRule({...o,id:r.id,when:r.precondition?d.M$.and(r.precondition,o.when):o.when}));return{dispose(){(0,a.AS)(t)}}}},79126:function(e,t,i){"use strict";i.d(t,{$:function(){return v},D:function(){return k}});var n,s,o=i(90890),r=i(80670),a=i(35114),l=i(93223),c=i(21335),d=i(97848),h=i(30981),u=i(87332),g=i(97358),p=i(14374),f=i(87163),m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new b(i)}createMenu(e,t,i){return new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){const n=new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),s=n.getActions(i);return n.dispose(),s}resetHiddenStates(e){this._hiddenStates.reset(e)}};v=m([_(0,c.d),_(1,f.b),_(2,u.CS)],v);let b=class{static{n=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new a.Cm,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,n._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){const i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const n=this._data[e.id];if(i)n?n.indexOf(t)<0&&n.push(t):this._data[e.id]=[t];else if(n){const i=n.indexOf(t);i>=0&&(0,g.UH)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(n._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};b=n=m([_(0,u.CS)],b);class w{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=this._sort(l.ZG.getMenuItems(this._id));let t;for(const i of e){const e=i.group||"";t&&t[0]===e||(t=[e,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeysAndSubmenuIds(i)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(w._fillInKbExprKeys(e.when,this._structureContextKeys),(0,l.is)(e)){if(e.command.precondition&&w._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;w._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(l.ZG.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}}let C=s=class extends w{constructor(e,t,i,n,s,o){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=s,this._contextKeyService=o,this.refresh()}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,o]=i;let r;for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,l.is)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);const n=S(this._id,i?t.command:t,this._hiddenStates);if(i){const i=k(this._commandService,this._keybindingService,t.command.id,t.when);(r??=[]).push(new l.Xe(t.command,t.alt,e,n,i,this._contextKeyService,this._commandService))}else{const i=new s(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),o=h.wv.join(...i.map((e=>e[1])));o.length>0&&(r??=[]).push(new l.nI(t,n,o))}}r&&r.length>0&&t.push([n,r])}return t}_sort(e){return e.sort(s._compareMenuItems)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const o=e.order||0,r=t.order||0;return or?1:s._compareTitles((0,l.is)(e)?e.command.title:e.title,(0,l.is)(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};C=s=m([_(3,c.d),_(4,f.b),_(5,d.fN)],C);let y=class{constructor(e,t,i,n,s,c){this._disposables=new a.Cm,this._menuInfo=new C(e,t,i.emitEventsForSubmenuChanges,n,s,c);const d=new o.uC((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(d),this._disposables.add(l.ZG.onDidChangeMenu((e=>{for(const t of this._menuInfo.allMenuIds)if(e.has(t)){d.schedule();break}})));const h=this._disposables.add(new a.Cm);this._onDidChange=new r.uI({onWillAddFirstListener:()=>{h.add(c.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),h.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))},onDidRemoveLastListener:h.clear.bind(h),delay:i.eventDebounceDelay,merge:e=>{let t=!1,i=!1,n=!1;for(const s of e)if(t=t||s.isStructuralChange,i=i||s.isEnablementChange,n=n||s.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}}}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function S(e,t,i){const n=(0,l.i1)(t)?t.submenu.id:t.id,s="string"==typeof t.title?t.title:t.title.value,o=(0,h.ih)({id:`hide/${e.id}/${n}`,label:(0,p.kg)("hide.label","Hide '{0}'",s),run(){i.updateHidden(e,n,!0)}}),r=(0,h.ih)({id:`toggle/${e.id}/${n}`,label:s,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:o,toggle:r,get isHidden(){return!r.checked}}}function k(e,t,i,n=void 0,s=!0){return(0,h.ih)({id:`configureKeybinding/${i}`,label:(0,p.kg)("configure keybinding","Configure Keybinding"),enabled:s,run(){const s=!t.lookupKeybinding(i)&&n?n.serialize():void 0;e.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(s?` +when:${s}`:""))}})}y=m([_(3,c.d),_(4,f.b),_(5,d.fN)],y)},42558:function(e,t,i){"use strict";i.d(t,{h:function(){return n}});const n=(0,i(63619).u1)("clipboardService")},21335:function(e,t,i){"use strict";i.d(t,{d:function(){return l},w:function(){return c}});var n=i(80670),s=i(26182),o=i(35114),r=i(54409),a=i(24219);const l=(0,i(63619).u1)("commandService"),c=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.vl,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.metadata&&Array.isArray(e.metadata.args)){const t=[];for(const i of e.metadata.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,a.jx)(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new r.w,this._commands.set(i,n));const s=n.unshift(e),l=(0,o.s)((()=>{s();const e=this._commands.get(i);e?.isEmpty()&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return c.registerCommand(e,((e,...i)=>e.get(l).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return s.f.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};c.registerCommand("noop",(()=>{}))},47901:function(e,t,i){"use strict";i.d(t,{Mo:function(){return c},ad:function(){return s},gD:function(){return l},iB:function(){return r},kW:function(){return o},pG:function(){return n}});const n=(0,i(63619).u1)("configurationService");function s(e,t){const i=Object.create(null);for(const n in e)o(i,n,e[n],t);return i}function o(e,t,i,n){const s=t.split("."),o=s.pop();let r=e;for(let e=0;e{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,s=3,r){s=o.z(e.scope)?s:e.scope;const a=e.properties;if(a)for(const e in a){const l=a[e];t&&x(e,l)?delete a[e]:(l.source=i,l.defaultDefaultValue=a[e].default,this.updatePropertyDefaultValue(e,l),y.test(e)?l.scope=void 0:(l.scope=o.z(l.scope)?s:l.scope,l.restricted=o.z(l.restricted)?!!n?.includes(e):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],a[e].policy?.name&&this.policyConfigurations.set(a[e].policy.name,e),!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),r.add(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e]))}const l=e.allOf;if(l)for(const e of l)this.validateAndRegisterProperties(e,t,i,n,s,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);const n=e.allOf;n?.forEach(t)};t(e)}updateSchema(e,t){switch(h.properties[e]=t,t.scope){case 1:u.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:f.properties[e]=t;break;case 4:m.properties[e]=t;break;case 5:m.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:r.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,i),h.properties[t]=i,u.properties[t]=i,g.properties[t]=i,p.properties[t]=i,f.properties[t]=i,m.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:r.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};h.patternProperties[C]=e,u.patternProperties[C]=e,g.patternProperties[C]=e,p.patternProperties[C]=e,f.patternProperties[C]=e,m.patternProperties[C]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let n,s;!i||t.disallowConfigurationDefault&&i.source||(n=i.value,s=i.source),o.b0(n)&&(n=t.defaultDefaultValue,s=void 0),o.b0(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=s}};function x(e,t){return e.trim()?y.test(e)?r.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==k.getConfigurationProperties()[e]?r.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==k.getPolicyConfigurations().get(t.policy?.name)?r.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,k.getPolicyConfigurations().get(t.policy?.name)):null:r.kg("config.property.empty","Cannot register an empty property")}c.O.add(d.Configuration,k)},97848:function(e,t,i){"use strict";i.d(t,{f1:function(){return I},M$:function(){return k},fN:function(){return K},N1:function(){return q},jQ:function(){return x},M0:function(){return Q}});var n=i(79783),s=i(43920),o=i(20187),r=i(14374);function a(...e){switch(e.length){case 1:return(0,r.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,r.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,r.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const l=(0,r.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),c=(0,r.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class d{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw(0,o.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(a("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(a("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(a("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&this._input.charCodeAt(this._current)===e&&(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=d._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(l):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(c);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}for(;e=this._input.length}}var h=i(63619);const u=new Map;u.set("false",!1),u.set("true",!0),u.set("isMac",n.zx),u.set("isLinux",n.j9),u.set("isWindows",n.uF),u.set("isWeb",n.HZ),u.set("isMacNative",n.zx&&!n.HZ),u.set("isEdge",n.UP),u.set("isFirefox",n.gm),u.set("isChrome",n.H8),u.set("isSafari",n.nr);const g=Object.prototype.hasOwnProperty,p={regexParsingWithErrorRecovery:!0},f=(0,r.kg)("contextkey.parser.error.emptyString","Empty context key expression"),m=(0,r.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),_=(0,r.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),v=(0,r.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),b=(0,r.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),w=(0,r.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),C=(0,r.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),y=(0,r.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class S{static{this._parseError=new Error}constructor(e=p){this._config=e,this._scanner=new d,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?w:void 0;throw this._parsingErrors.push({message:b,offset:e.offset,lexeme:d.getLexeme(e),additionalInfo:t}),S._parseError}return e}catch(e){if(e!==S._parseError)throw e;return}}else this._parsingErrors.push({message:f,offset:0,lexeme:"",additionalInfo:m})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:k.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:k.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),D.INSTANCE;case 12:return this._advance(),E.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,v),e?.negate()}case 17:return this._advance(),P.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),k.true();case 12:return this._advance(),k.false();case 0:{this._advance();const e=this._expr();return this._consume(1,v),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,n=i.lastIndexOf("/"),s=n===i.length-1?void 0:this._removeFlagsGY(i.substring(n+1));let o;try{o=new RegExp(i.substring(1,n),s)}catch(t){throw this._errExpectedButGot("REGEX",e)}return H.create(t,o)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let n=this._peek(),s=0;for(let t=0;t=0){const o=i.slice(t+1,s),r="i"===i[s+1]?"i":"";try{n=new RegExp(o,r)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===n)throw this._errExpectedButGot("REGEX",e);return H.create(t,n)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,_);const e=this._value();return k.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return k.equals(t,e);switch(e){case"true":return k.has(t);case"false":return k.not(t);default:return k.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return k.notEquals(t,e);switch(e){case"true":return k.not(t);case"false":return k.has(t);default:return k.notEquals(t,e)}}case 5:return this._advance(),B.create(t,this._value());case 6:return this._advance(),W.create(t,this._value());case 7:return this._advance(),O.create(t,this._value());case 8:return this._advance(),F.create(t,this._value());case 13:return this._advance(),k.in(t,this._value());default:return k.has(t)}}case 20:throw this._parsingErrors.push({message:C,offset:e.offset,lexeme:"",additionalInfo:y}),S._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=(0,r.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,d.getLexeme(t)),s=t.offset,o=d.getLexeme(t);return this._parsingErrors.push({message:n,offset:s,lexeme:o,additionalInfo:i}),S._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class k{static false(){return D.INSTANCE}static true(){return E.INSTANCE}static has(e){return N.create(e)}static equals(e,t){return I.create(e,t)}static notEquals(e,t){return R.create(e,t)}static regex(e,t){return H.create(e,t)}static in(e,t){return M.create(e,t)}static notIn(e,t){return T.create(e,t)}static not(e){return P.create(e)}static and(...e){return U.create(e,null,!0)}static or(...e){return j.create(e,null,!0)}static{this._parser=new S({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(null!=e)return this._parser.parse(e)}}function x(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}function L(e,t){return e.cmp(t)}class D{static{this.INSTANCE=new D}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return E.INSTANCE}}class E{static{this.INSTANCE=new E}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return D.INSTANCE}}class N{static create(e,t=null){const i=u.get(e);return"boolean"==typeof i?i?E.INSTANCE:D.INSTANCE:new N(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=u.get(this.key);return"boolean"==typeof e?e?E.INSTANCE:D.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this)),this.negated}}class I{static create(e,t,i=null){if("boolean"==typeof t)return t?N.create(e,i):P.create(e,i);const n=u.get(e);return"boolean"==typeof n?t===(n?"true":"false")?E.INSTANCE:D.INSTANCE:new I(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=u.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?E.INSTANCE:D.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class M{static create(e,t){return new M(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&g.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=T.create(this.key,this.valueKey)),this.negated}}class T{static create(e,t){return new T(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=M.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class R{static create(e,t,i=null){if("boolean"==typeof t)return t?P.create(e,i):N.create(e,i);const n=u.get(e);return"boolean"==typeof n?t===(n?"true":"false")?D.INSTANCE:E.INSTANCE:new R(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=u.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?D.INSTANCE:E.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this.value,this)),this.negated}}class P{static create(e,t=null){const i=u.get(e);return"boolean"==typeof i?i?D.INSTANCE:E.INSTANCE:new P(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=u.get(this.key);return"boolean"==typeof e?e?D.INSTANCE:E.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this)),this.negated}}function A(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):D.INSTANCE}class O{static create(e,t,i=null){return A(t,(t=>new O(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,i=null){return A(t,(t=>new F(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class B{static create(e,t,i=null){return A(t,(t=>new B(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new W(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class H{static create(e,t){return new H(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this)),this.negated}}class V{static create(e){return new V(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function z(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),s=0===n.length,o=j.create(e.expr.map((e=>U.create([e,t],null,i))),null,s);o&&(n.push(o),n.sort(L))}if(1===n.length)return n[0];if(i){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=j.create(e,this,!0)}return this.negated}}class j{static create(e,t,i){return j._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of Z(t))for(const t of Z(i))n.push(U.create([e,t],null,!1));e.unshift(j.create(n,null,!1))}this.negated=j.create(e,this,!0)}return this.negated}}class q extends N{static{this._info=[]}static all(){return q._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?q._info.push({...i,key:e}):!0!==i&&q._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return I.create(this.key,e)}}const K=(0,h.u1)("contextKeyService");function $(e,t){return et?1:0}function G(e,t,i,n){return ei?1:tn?1:0}function Q(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&Y(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(Q(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return Y(t.expr,e.expr);for(const i of e.expr)if(Q(i,t))return!0;return!1}return e.equals(t)}function Y(e,t){let i=0,n=0;for(;i{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const g=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=g.indexOf(this.domNode.ownerDocument.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%g.length:e.equals(15)&&(i=0===t?g.length-1:t-1),e.equals(9)?(g[t].blur(),this.inputBox.focus()):i>=0&&g[i].focus(),s.fs.stop(e,!0)}}}));const f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.preserveCase.domNode),this.domNode.appendChild(f),e?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox?.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var m=i(97848),_=i(19561),v=i(35114),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};const C=new m.N1("suggestWidgetVisible",!1,(0,d.kg)("suggestWidgetVisible","Whether suggestion are visible")),y="historyNavigationWidgetFocus",S="historyNavigationForwardsEnabled",k="historyNavigationBackwardsEnabled";let x;const L=[];function D(e,t){if(L.includes(t))throw new Error("Cannot register the same widget multiple times");L.push(t);const i=new v.Cm,n=new m.N1(y,!1).bindTo(e),o=new m.N1(S,!0).bindTo(e),r=new m.N1(k,!0).bindTo(e),a=()=>{n.set(!0),x=t},l=()=>{n.set(!1),x===t&&(x=void 0)};return(0,s.X7)(t.element)&&a(),i.add(t.onDidFocus((()=>a()))),i.add(t.onDidBlur((()=>l()))),i.add((0,v.s)((()=>{L.splice(L.indexOf(t),1),l()}))),{historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:r,dispose(){i.dispose()}}}let E=class extends n.c{constructor(e,t,i,n){super(e,t,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(D(s,this.inputBox))}};E=b([w(3,m.fN)],E);let N=class extends f{constructor(e,t,i,n,s=!1){super(e,t,s,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(D(o,this.inputBox))}};N=b([w(3,m.fN)],N),_.f.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:m.M$.and(m.M$.has(y),m.M$.equals(k,!0),m.M$.not("isComposing"),C.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{x?.showPreviousValue()}}),_.f.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:m.M$.and(m.M$.has(y),m.M$.equals(S,!0),m.M$.not("isComposing"),C.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{x?.showNextValue()}})},74856:function(e,t,i){"use strict";i.d(t,{TN:function(){return l},fO:function(){return c}});var n=i(63619),s=i(35114),o=i(47901),r=i(84201),a=function(e,t){return function(i,n){t(i,n,e)}};const l=(0,n.u1)("hoverService");let c=class extends s.jG{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,t,i={},n,o){super(),this.placement=e,this.instantHover=t,this.overrideOptions=i,this.configurationService=n,this.hoverService=o,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new s.Cm),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))})))}showHover(e,t){const i="function"==typeof this.overrideOptions?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();const n=(0,r.sb)(e.target)?[e.target]:e.target.targetElements;for(const e of n)this.hoverDisposables.add((0,r.b2)(e,"keydown",(e=>{e.equals(9)&&this.hoverService.hideHover()})));const s=(0,r.sb)(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...i,persistence:{hideOnKeyDown:!0,...i.persistence},id:s,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...i.appearance}},t)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([a(3,o.pG),a(4,l)],c)},44204:function(e,t,i){"use strict";i.d(t,{d:function(){return n}});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},48682:function(e,t,i){"use strict";i.d(t,{N:function(){return r},v:function(){return o}});var n=i(44204);const s=[];function o(e,t,i){t instanceof n.d||(t=new n.d(t,[],Boolean(i))),s.push([e,t])}function r(){return s}},63619:function(e,t,i){"use strict";var n;i.d(t,{_$:function(){return n},_Y:function(){return s},u1:function(){return o}}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(n||(n={}));const s=o("instantiationService");function o(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,s){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i}],t[n.DI_TARGET]=t)}(t,e,s)};return t.toString=()=>e,n.serviceIds.set(e,t),t}},24813:function(e,t,i){"use strict";i.d(t,{a:function(){return n}});class n{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}},97248:function(e,t,i){"use strict";i.d(t,{F:function(){return o}});var n=i(80670),s=i(56419);const o={JSONContribution:"base.contributions.json"},r=new class{constructor(){this._onDidChangeSchema=new n.vl,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};s.O.add(o.JSONContribution,r)},87163:function(e,t,i){"use strict";i.d(t,{b:function(){return n}});const n=(0,i(63619).u1)("keybindingService")},19561:function(e,t,i){"use strict";i.d(t,{f:function(){return d}});var n=i(99559),s=i(79783),o=i(21335),r=i(56419),a=i(35114),l=i(54409);class c{constructor(){this._coreKeybindings=new l.w,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===s.OS){if(e&&e.win)return e.win}else if(2===s.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=c.bindToCurrentPlatform(e),i=new a.Cm;if(t&&t.primary){const o=(0,n.Zv)(t.primary,s.OS);o&&i.add(this._registerDefaultKeybinding(o,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let o=0,r=t.secondary.length;o{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(h)),this._cachedMergedKeybindings.slice(0)}}const d=new c;function h(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}r.O.add("platform.keybindingsRegistry",d)},41517:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=(0,i(63619).u1)("labelService")},76432:function(e,t,i){"use strict";i.d(t,{PE:function(){return ve},aG:function(){return be},er:function(){return ft},YD:function(){return ke},zL:function(){return ut},Nf:function(){return Ie},cH:function(){return Te}});var n=i(84201),s=i(97358),o=i(76611),r=i(80670),a=i(35114),l=i(67334);class c{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:a.jG.None}}renderElement(e,t,i,n){if(i.disposable?.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const r=new o.Qi,a=s.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class d{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class h{constructor(e,t,i,n,s={}){const o=()=>this.model,r=n.map((e=>new c(e,o)));this.list=new l.B8(e,t,i,r,function(e,t){return{...t,accessibilityProvider:t.accessibilityProvider&&new d(e,t.accessibilityProvider)}}(o,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return r.Jh.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return r.Jh.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return r.Jh.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,s.y1)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var u=i(12048),g=i(24764),p=i(50815);class f{static{this.TemplateId="row"}constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=f.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.BC)(e,(0,n.$)(".monaco-table-tr")),i=[],s=[];for(let e=0;ethis.disposables.add(new m(e,t)))),h={size:d.reduce(((e,t)=>e+t.column.weight),0),views:d.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new p.U(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:h})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const u=new f(s,o,(e=>this.splitview.getViewSize(e)));var g;this.list=this.disposables.add(new l.B8(e,this.domNode,(g=i,{getHeight(e){return g.getHeight(e)},getTemplateId(){return f.TemplateId}}),[u],c)),r.Jh.any(...d.map((e=>e.onDidLayout)))((([e,t])=>u.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=s.reduce(((e,t)=>e+t.weight),0),i=s[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=(0,n.li)(this.domNode),this.style(l.bG)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}var v=i(41703),b=i(26914),w=i(64476),C=i(37345),y=i(26182);class S{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new w.G6(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(e,t){return i.sorter.compare(e.element,t.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=y.f.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=y.f.empty(),i){const n=new Set,s=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:e=>{if(null===e.element)return;const t=e;if(n.add(t.element),this.nodes.set(t.element,t),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();s.add(e),this.nodesByIdentity.set(e,t)}i.onDidCreateNode?.(t)},onDidDeleteNode:e=>{if(null===e.element)return;const t=e;if(n.has(t.element)||this.nodes.delete(t.element),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();s.has(e)||this.nodesByIdentity.delete(e)}i.onDidDeleteNode?.(t)}})}preserveCollapseState(e=y.f.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),y.f.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t=void 0===e.collapsed?void 0:e.collapsed===C.Yo.Collapsed||e.collapsed===C.Yo.PreserveOrCollapsed||e.collapsed!==C.Yo.Expanded&&e.collapsed!==C.Yo.PreserveOrExpanded&&Boolean(e.collapsed),{...e,children:this.preserveCollapseState(e.children),collapsed:t}}const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible;let n;return n=void 0===e.collapsed||e.collapsed===C.Yo.PreserveOrCollapsed||e.collapsed===C.Yo.PreserveOrExpanded?t.collapsed:e.collapsed===C.Yo.Collapsed||e.collapsed!==C.Yo.Expanded&&Boolean(e.collapsed),{...e,collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)}}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new C.jh(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new C.jh(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new C.jh(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new C.jh(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function k(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:y.f.map(y.f.from(e.children),k),collapsible:e.collapsible,collapsed:e.collapsed}}function x(e){const t=[e.element],i=e.incompressible||!1;let n,s;for(;[s,n]=y.f.consume(y.f.from(e.children),2),1===s.length&&!s[0].incompressible;)e=s[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:y.f.map(y.f.concat(s,n),x),collapsible:e.collapsible,collapsed:e.collapsed}}function L(e,t=0){let i;return i=tL(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function D(e){return L(e,0)}function E(e,t,i){return e.element===t?{...e,children:i}:{...e,children:y.f.map(y.f.from(e.children),(e=>E(e,t,i)))}}class N{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new S(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=y.f.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId(e){return e.elements.map((e=>o.getId(e).toString())).join("\0")}});var o;if(null===e){const e=y.f.map(t,this.enabled?x:k);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const r=this.nodes.get(e);if(!r)throw new C.jh(this.user,"Unknown compressed tree node");const a=this.model.getNode(r),l=this.model.getParentNodeLocation(r),c=this.model.getNode(l),d=E(D(a),e,t),h=(this.enabled?x:k)(d),u=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if((0,s.aI)(h.element.elements,a.element.elements,u))return void this._setChildren(r,h.children||y.f.empty(),{diffIdentityProvider:n,diffDepth:1});const g=c.children.map((e=>e===a?h:e));this._setChildren(c.element,g,{diffIdentityProvider:n,diffDepth:a.depth-c.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=y.f.map(t,D),n=y.f.map(i,e?x:k);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,{...i,onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new C.jh(this.user,`Tree element not found: ${e}`);return t}}const I=e=>e[e.length-1];class M{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new M(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}class T{get onDidSplice(){return r.Jh.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return r.Jh.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return r.Jh.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||I;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new C.y2((e=>new M(n,e))),this.model=new N(e,function(e,t){return{splice(i,n,s){t.splice(i,n,s.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return{...t,identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(e(i))}},sorter:t.sorter&&{compare(e,i){return t.sorter.compare(e.elements[0],i.elements[0])}},filter:t.filter&&{filter(i,n){return t.filter.filter(e(i),n)}}}}(n,i))}setChildren(e,t=y.f.empty(),i={}){this.model.setChildren(e,t,i)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var R=i(95578);class P extends v.DO{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}setChildren(e,t=y.f.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new S(e,t,i)}}class A{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,i){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){let s=this.stickyScrollDelegate.getCompressedNode(e);s||(s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),1===s.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements?.(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement?.(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)}([R.B],A.prototype,"compressedTreeNodeProvider",null);class O{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,i){if(this.compressedStickyNodes.clear(),0===e.length)return[];for(let n=0;ni||n>=t-1&&tthis,r=new O((()=>this.model));super(e,t,i,n.map((e=>new A(o,r,e))),{...F(o,s),stickyScrollDelegate:r})}setChildren(e,t=y.f.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new T(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var W=i(90890),H=i(93231),V=i(56613),z=i(20187),U=i(24219);function j(e){return{...e,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function q(e,t){return!!t.parent&&(t.parent===e||q(e,t.parent))}class K{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new K(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class ${constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...V.L.asClassNameArray(H.W.treeItemLoading)),!0):(t.classList.remove(...V.L.asClassNameArray(H.W.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function G(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function Q(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class Y extends b.ur{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function Z(e){return e instanceof b.ur?new Y(e):e}class X{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart?.(Z(e),t)}onDragOver(e,t,i,n,s,o=!0){return this.dnd.onDragOver(Z(e),t&&t.element,i,n,s)}drop(e,t,i,n,s){this.dnd.drop(Z(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.dnd.dispose()}}function J(e){return e&&{...e,collapseByDefault:!0,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new X(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>!!e.accessibilityProvider?.isChecked(t.element):void 0,getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},filter:e.filter&&{filter(t,i){return e.filter.filter(t.element,i)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}},sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"==typeof e.defaultFindVisibility?e.defaultFindVisibility:void 0===e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)}}function ee(e,t){t(e),e.children.forEach((e=>ee(e,t)))}class te{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return r.Jh.map(this.tree.onDidChangeFocus,G)}get onDidChangeSelection(){return r.Jh.map(this.tree.onDidChangeSelection,G)}get onMouseDblClick(){return r.Jh.map(this.tree.onMouseDblClick,Q)}get onPointer(){return r.Jh.map(this.tree.onPointer,Q)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,s,o={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.vl,this._onDidChangeNodeSlowState=new r.vl,this.nodeMapper=new C.y2((e=>new K(e))),this.disposables=new a.Cm,this.identityProvider=o.identityProvider,this.autoExpandSingleChildren=void 0!==o.autoExpandSingleChildren&&o.autoExpandSingleChildren,this.sorter=o.sorter,this.getDefaultCollapseState=e=>o.collapseByDefault?o.collapseByDefault(e)?C.Yo.PreserveOrCollapsed:C.Yo.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,i,n,o),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=j({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,s){const o=new v.w0(i),r=n.map((e=>new $(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=J(s)||{};return new P(e,t,o,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,i=!1,n,s){if(void 0===this.root.element)throw new C.jh(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(await this.refreshAndRenderNode(o,t,n,s),i)try{this.tree.rerender(o)}catch{}}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if(void 0===this.root.element)throw new C.jh(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new C.jh(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i,n){await this.refreshNode(e,t,i),this.disposables.isDisposed||this.render(e,i,n)}async refreshNode(e,t,i){let n;return this.subTreeRefreshPromises.forEach(((s,o)=>{!n&&function(e,t){return e===t||q(e,t)||q(t,e)}(o,e)&&(n=s.then((()=>this.refreshNode(e,t,i))))})),n||(e!==this.root&&this.tree.getNode(e).collapsed?(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,void this.setChildren(e,[],t,i)):this.doRefreshSubTree(e,t,i))}async doRefreshSubTree(e,t,i){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=await this.doRefreshNode(e,t,i);e.stale=!1,await W.HC.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}async doRefreshNode(e,t,i){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if((0,U.xZ)(t))n=Promise.resolve(t);else{const i=(0,W.wR)(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(y.f.empty());try{const s=await n;return this.setChildren(e,s,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,z.MB)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return(0,U.xZ)(i)?this.processChildren(i):(t=(0,W.SS)((async()=>this.processChildren(await i))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(z.dz))}setChildren(e,t,i,n){const s=[...t];if(0===e.children.length&&0===s.length)return[];const o=new Map,r=new Map;for(const t of e.children)o.set(t.element,t),this.identityProvider&&r.set(t.id,{node:t,collapsed:this.tree.hasElement(t)&&this.tree.isCollapsed(t)});const a=[],l=s.map((t=>{const s=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=j({element:t,parent:e,hasChildren:s,defaultCollapseState:this.getDefaultCollapseState(t)});return s&&i.defaultCollapseState===C.Yo.PreserveOrExpanded&&a.push(i),i}const l=this.identityProvider.getId(t).toString(),c=r.get(l);if(c){const e=c.node;return o.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=s,i?c.collapsed?(e.children.forEach((e=>ee(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):s&&!c.collapsed&&a.push(e),e}const d=j({element:t,parent:e,id:l,hasChildren:s,defaultCollapseState:this.getDefaultCollapseState(t)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1||s&&d.defaultCollapseState===C.Yo.PreserveOrExpanded)&&a.push(d),d}));for(const e of o.values())ee(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].forceExpanded=!0,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),s=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(e){return i.diffIdentityProvider.getId(e.element)}}};this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?y.f.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class ie{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new ie(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class ne{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...V.L.asClassNameArray(H.W.treeItemLoading)),!0):(t.classList.remove(...V.L.asClassNameArray(H.W.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,a.AS)(this.disposables)}}class se extends te{constructor(e,t,i,n,s,o,r={}){super(e,t,i,s,o,r),this.compressionDelegate=n,this.compressibleNodeMapper=new C.y2((e=>new ie(e))),this.filter=r.filter}createTree(e,t,i,n,s){const o=new v.w0(i),r=n.map((e=>new ne(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&J(e);return t&&{...t,keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))}}}}(s)||{};return new B(e,t,o,r,a)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,i){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),s=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},o=s(this.tree.getSelection()),r=s(this.tree.getFocus());super.render(e,t,i);const a=this.getSelection();let l=!1;const c=this.getFocus();let d=!1;const h=e=>{const t=e.element;if(t)for(let e=0;e{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:(0,w.iZ)(i)?(0,w.Mn)(i.visibility):(0,w.Mn)(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class oe extends v.DO{constructor(e,t,i,n,s,o={}){super(e,t,i,n,o),this.user=e,this.dataSource=s,this.identityProvider=o.identityProvider}createModel(e,t,i){return new S(e,t,i)}}var re=i(14374),ae=i(47901),le=i(16434),ce=i(97848),de=i(56614),he=i(14280),ue=i(63619),ge=i(87163),pe=i(56419),fe=i(52010),me=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_e=function(e,t){return function(i,n){t(i,n,e)}};const ve=(0,ue.u1)("listService");class be{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new a.Cm,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){e!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new l.hb((0,n.li)(),"").style(fe.IN)),this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),(0,n.X7)(e.getHTMLElement())&&this.setLastFocusedList(e),(0,a.qE)(e.onDidFocus((()=>this.setLastFocusedList(e))),(0,a.s)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}}const we=new ce.N1("listScrollAtBoundary","none"),Ce=(ce.M$.or(we.isEqualTo("top"),we.isEqualTo("both")),ce.M$.or(we.isEqualTo("bottom"),we.isEqualTo("both")),new ce.N1("listFocus",!0)),ye=new ce.N1("treestickyScrollFocused",!1),Se=new ce.N1("listSupportsMultiselect",!0),ke=ce.M$.and(Ce,ce.M$.not(de.aV),ye.negate()),xe=new ce.N1("listHasSelectionOrFocus",!1),Le=new ce.N1("listDoubleSelection",!1),De=new ce.N1("listMultiSelection",!1),Ee=new ce.N1("listSelectionNavigation",!1),Ne=new ce.N1("listSupportsFind",!0),Ie=new ce.N1("treeElementCanCollapse",!1),Me=new ce.N1("treeElementHasParent",!1),Te=new ce.N1("treeElementCanExpand",!1),Re=new ce.N1("treeElementHasChild",!1),Pe=new ce.N1("treeFindOpen",!1),Ae="listTypeNavigationMode",Oe="listAutomaticKeyboardNavigation";function Fe(e,t){const i=e.createScoped(t.getHTMLElement());return Ce.bindTo(i),i}function Be(e,t){const i=we.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const We="workbench.list.multiSelectModifier",He="workbench.list.openMode",Ve="workbench.list.horizontalScrolling",ze="workbench.list.defaultFindMode",Ue="workbench.list.typeNavigationMode",je="workbench.list.keyboardNavigation",qe="workbench.list.scrollByPage",Ke="workbench.list.defaultFindMatchType",$e="workbench.tree.indent",Ge="workbench.tree.renderIndentGuides",Qe="workbench.list.smoothScrolling",Ye="workbench.list.mouseWheelScrollSensitivity",Ze="workbench.list.fastScrollSensitivity",Xe="workbench.tree.expandMode",Je="workbench.tree.enableStickyScroll",et="workbench.tree.stickyScrollMaxItemCount";function tt(e){return"alt"===e.getValue(We)}class it extends a.jG{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=tt(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(We)&&(this.useAltAsMultipleSelectionModifier=tt(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,l.tX)(e)}isSelectionRangeChangeEvent(e){return(0,l.mh)(e)}}function nt(e,t){const i=e.get(ae.pG),n=e.get(ge.b),s=new a.Cm;return[{...t,keyboardNavigationDelegate:{mightProducePrintableCharacter(e){return n.mightProducePrintableCharacter(e)}},smoothScrolling:Boolean(i.getValue(Qe)),mouseWheelScrollSensitivity:i.getValue(Ye),fastScrollSensitivity:i.getValue(Ze),multipleSelectionController:t.multipleSelectionController??s.add(new it(i)),keyboardNavigationEventFilter:ht(n),scrollByPage:Boolean(i.getValue(qe))},s]}let st=class extends l.B8{constructor(e,t,i,n,s,o,r,a,l){const c=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(a.getValue(Ve)),[d,h]=l.invokeFunction(nt,s);super(e,t,i,n,{keyboardSupport:!1,...d,horizontalScrolling:c}),this.disposables.add(h),this.contextKeyService=Fe(o,this),this.disposables.add(Be(this.contextKeyService,this)),this.listSupportsMultiSelect=Se.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),Ee.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=xe.bindTo(this.contextKeyService),this.listDoubleSelection=Le.bindTo(this.contextKeyService),this.listMultiSelection=De.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=tt(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(We)&&(this._useAltAsMultipleSelectionModifier=tt(a));let t={};if(e.affectsConfiguration(Ve)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(Ve));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qe)){const e=Boolean(a.getValue(qe));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Qe)){const e=Boolean(a.getValue(Qe));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Ye)){const e=a.getValue(Ye);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Ze)){const e=a.getValue(Ze);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new lt(this,{configurationService:a,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,fe.t8)(e):fe.IN)}};st=me([_e(5,ce.fN),_e(6,ve),_e(7,ae.pG),_e(8,ue._Y)],st);let ot=class extends h{constructor(e,t,i,n,s,o,r,l,c){const d=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(l.getValue(Ve)),[h,u]=c.invokeFunction(nt,s);super(e,t,i,n,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables=new a.Cm,this.disposables.add(u),this.contextKeyService=Fe(o,this),this.disposables.add(Be(this.contextKeyService,this.widget)),this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=Se.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),Ee.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=tt(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(We)&&(this._useAltAsMultipleSelectionModifier=tt(l));let t={};if(e.affectsConfiguration(Ve)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Ve));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qe)){const e=Boolean(l.getValue(qe));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Qe)){const e=Boolean(l.getValue(Qe));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Ye)){const e=l.getValue(Ye);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Ze)){const e=l.getValue(Ze);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new lt(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,fe.t8)(e):fe.IN)}dispose(){this.disposables.dispose(),super.dispose()}};ot=me([_e(5,ce.fN),_e(6,ve),_e(7,ae.pG),_e(8,ue._Y)],ot);let rt=class extends _{constructor(e,t,i,n,s,o,r,a,l,c){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(Ve)),[h,u]=c.invokeFunction(nt,o);super(e,t,i,n,s,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables.add(u),this.contextKeyService=Fe(r,this),this.disposables.add(Be(this.contextKeyService,this)),this.listSupportsMultiSelect=Se.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),Ee.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=xe.bindTo(this.contextKeyService),this.listDoubleSelection=Le.bindTo(this.contextKeyService),this.listMultiSelection=De.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=tt(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(We)&&(this._useAltAsMultipleSelectionModifier=tt(l));let t={};if(e.affectsConfiguration(Ve)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Ve));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qe)){const e=Boolean(l.getValue(qe));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Qe)){const e=Boolean(l.getValue(Qe));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Ye)){const e=l.getValue(Ye);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Ze)){const e=l.getValue(Ze);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new ct(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,fe.t8)(e):fe.IN)}dispose(){this.disposables.dispose(),super.dispose()}};rt=me([_e(6,ce.fN),_e(7,ve),_e(8,ae.pG),_e(9,ue._Y)],rt);class at extends a.jG{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new r.vl),this.onDidOpen=this._onDidOpen.event,this._register(r.Jh.filter(this.widget.onDidChangeSelection,(e=>(0,n.kx)(e.browserEvent)))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof t?.openOnSingleClick&&t?.configurationService?(this.openOnSingleClick="doubleClick"!==t?.configurationService.getValue(He),this._register(t?.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(He)&&(this.openOnSingleClick="doubleClick"!==t?.configurationService.getValue(He))})))):this.openOnSingleClick=t?.openOnSingleClick??!0}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class lt extends at{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ct extends at{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class dt extends at{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function ht(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let ut=class extends P{constructor(e,t,i,n,s,o,r,a,l){const{options:c,getTypeNavigationMode:d,disposable:h}=o.invokeFunction(bt,s);super(e,t,i,n,c),this.disposables.add(h),this.internals=new wt(this,s,d,s.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};ut=me([_e(5,ue._Y),_e(6,ce.fN),_e(7,ve),_e(8,ae.pG)],ut);let gt=class extends B{constructor(e,t,i,n,s,o,r,a,l){const{options:c,getTypeNavigationMode:d,disposable:h}=o.invokeFunction(bt,s);super(e,t,i,n,c),this.disposables.add(h),this.internals=new wt(this,s,d,s.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};gt=me([_e(5,ue._Y),_e(6,ce.fN),_e(7,ve),_e(8,ae.pG)],gt);let pt=class extends oe{constructor(e,t,i,n,s,o,r,a,l,c){const{options:d,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(bt,o);super(e,t,i,n,s,d),this.disposables.add(u),this.internals=new wt(this,o,h,o.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};pt=me([_e(6,ue._Y),_e(7,ce.fN),_e(8,ve),_e(9,ae.pG)],pt);let ft=class extends te{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,o,r,a,l,c){const{options:d,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(bt,o);super(e,t,i,n,s,d),this.disposables.add(u),this.internals=new wt(this,o,h,o.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};ft=me([_e(6,ue._Y),_e(7,ce.fN),_e(8,ve),_e(9,ae.pG)],ft);let mt=class extends se{constructor(e,t,i,n,s,o,r,a,l,c,d){const{options:h,getTypeNavigationMode:u,disposable:g}=a.invokeFunction(bt,r);super(e,t,i,n,s,o,h),this.disposables.add(g),this.internals=new wt(this,r,u,r.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function _t(e){const t=e.getValue(ze);if("highlight"===t)return v.vD.Highlight;if("filter"===t)return v.vD.Filter;const i=e.getValue(je);return"simple"===i||"highlight"===i?v.vD.Highlight:"filter"===i?v.vD.Filter:void 0}function vt(e){const t=e.getValue(Ke);return"fuzzy"===t?v.RD.Fuzzy:"contiguous"===t?v.RD.Contiguous:void 0}function bt(e,t){const i=e.get(ae.pG),n=e.get(he.l),s=e.get(ce.fN),o=e.get(ue._Y),r=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(i.getValue(Ve)),[a,c]=o.invokeFunction(nt,t),d=t.paddingBottom,h=void 0!==t.renderIndentGuides?t.renderIndentGuides:i.getValue(Ge);return{getTypeNavigationMode:()=>{const e=s.getContextKeyValue(Ae);if("automatic"===e)return l._C.Automatic;if("trigger"===e)return l._C.Trigger;if(!1===s.getContextKeyValue(Oe))return l._C.Trigger;const t=i.getValue(Ue);return"automatic"===t?l._C.Automatic:"trigger"===t?l._C.Trigger:void 0},disposable:c,options:{keyboardSupport:!1,...a,indent:"number"==typeof i.getValue($e)?i.getValue($e):void 0,renderIndentGuides:h,smoothScrolling:Boolean(i.getValue(Qe)),defaultFindMode:_t(i),defaultFindMatchType:vt(i),horizontalScrolling:r,scrollByPage:Boolean(i.getValue(qe)),paddingBottom:d,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:t.expandOnlyOnTwistieClick??"doubleClick"===i.getValue(Xe),contextViewProvider:n,findWidgetStyles:fe.Dk,enableStickyScroll:Boolean(i.getValue(Je)),stickyScrollMaxItemCount:Number(i.getValue(et))}}}mt=me([_e(7,ue._Y),_e(8,ce.fN),_e(9,ve),_e(10,ae.pG)],mt);let wt=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,s,o,r){this.tree=e,this.disposables=[],this.contextKeyService=Fe(s,e),this.disposables.push(Be(this.contextKeyService,e)),this.listSupportsMultiSelect=Se.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),Ee.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=Ne.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=xe.bindTo(this.contextKeyService),this.hasDoubleSelection=Le.bindTo(this.contextKeyService),this.hasMultiSelection=De.bindTo(this.contextKeyService),this.treeElementCanCollapse=Ie.bindTo(this.contextKeyService),this.treeElementHasParent=Me.bindTo(this.contextKeyService),this.treeElementCanExpand=Te.bindTo(this.contextKeyService),this.treeElementHasChild=Re.bindTo(this.contextKeyService),this.treeFindOpen=Pe.bindTo(this.contextKeyService),this.treeStickyScrollFocused=ye.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=tt(r),this.updateStyleOverrides(n);const a=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},l=new Set;l.add(Ae),l.add(Oe),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),a()})),e.onDidChangeCollapseState(a),e.onDidChangeModel(a),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),e.onDidChangeStickyScrollFocused((e=>this.treeStickyScrollFocused.set(e))),r.onDidChangeConfiguration((n=>{let s={};if(n.affectsConfiguration(We)&&(this._useAltAsMultipleSelectionModifier=tt(r)),n.affectsConfiguration($e)){const e=r.getValue($e);s={...s,indent:e}}if(n.affectsConfiguration(Ge)&&void 0===t.renderIndentGuides){const e=r.getValue(Ge);s={...s,renderIndentGuides:e}}if(n.affectsConfiguration(Qe)){const e=Boolean(r.getValue(Qe));s={...s,smoothScrolling:e}}if(n.affectsConfiguration(ze)||n.affectsConfiguration(je)){const e=_t(r);s={...s,defaultFindMode:e}}if(n.affectsConfiguration(Ue)||n.affectsConfiguration(je)){const e=i();s={...s,typeNavigationMode:e}}if(n.affectsConfiguration(Ke)){const e=vt(r);s={...s,defaultFindMatchType:e}}if(n.affectsConfiguration(Ve)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(Ve));s={...s,horizontalScrolling:e}}if(n.affectsConfiguration(qe)){const e=Boolean(r.getValue(qe));s={...s,scrollByPage:e}}if(n.affectsConfiguration(Xe)&&void 0===t.expandOnlyOnTwistieClick&&(s={...s,expandOnlyOnTwistieClick:"doubleClick"===r.getValue(Xe)}),n.affectsConfiguration(Je)){const e=r.getValue(Je);s={...s,enableStickyScroll:e}}if(n.affectsConfiguration(et)){const e=Math.max(1,r.getValue(et));s={...s,stickyScrollMaxItemCount:e}}if(n.affectsConfiguration(Ye)){const e=r.getValue(Ye);s={...s,mouseWheelScrollSensitivity:e}}if(n.affectsConfiguration(Ze)){const e=r.getValue(Ze);s={...s,fastScrollSensitivity:e}}Object.keys(s).length>0&&e.updateOptions(s)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(l)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new dt(e,{configurationService:r,...t}),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?(0,fe.t8)(e):fe.IN)}dispose(){this.disposables=(0,a.AS)(this.disposables)}};wt=me([_e(4,ce.fN),_e(5,ve),_e(6,ae.pG)],wt),pe.O.as(le.Fd.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,re.kg)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[We]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,re.kg)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,re.kg)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,re.kg)({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.")},[He]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,re.kg)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Ve]:{type:"boolean",default:!1,description:(0,re.kg)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[qe]:{type:"boolean",default:!1,description:(0,re.kg)("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[$e]:{type:"number",default:8,minimum:4,maximum:40,description:(0,re.kg)("tree indent setting","Controls tree indentation in pixels.")},[Ge]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,re.kg)("render tree indent guides","Controls whether the tree should render indent guides.")},[Qe]:{type:"boolean",default:!1,description:(0,re.kg)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Ye]:{type:"number",default:1,markdownDescription:(0,re.kg)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Ze]:{type:"number",default:5,markdownDescription:(0,re.kg)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[ze]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,re.kg)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,re.kg)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,re.kg)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[je]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,re.kg)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,re.kg)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,re.kg)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,re.kg)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,re.kg)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[Ke]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,re.kg)("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),(0,re.kg)("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:(0,re.kg)("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[Xe]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,re.kg)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Je]:{type:"boolean",default:!0,description:(0,re.kg)("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[et]:{type:"number",minimum:1,default:7,markdownDescription:(0,re.kg)("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[Ue]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:(0,re.kg)("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})},76925:function(e,t,i){"use strict";i.d(t,{$b:function(){return a},Cr:function(){return d},Dk:function(){return h},rr:function(){return r}});var n=i(80670),s=i(35114),o=i(97848);const r=(0,i(63619).u1)("logService");var a;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(a||(a={}));const l=a.Info;class c extends s.jG{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new n.vl),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==a.Off&&this.level<=e}}class d extends c{constructor(e=l,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(a.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(a.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(a.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(a.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(a.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}}class h extends c{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}new o.N1("logLevel",function(e){switch(e){case a.Trace:return"trace";case a.Debug:return"debug";case a.Info:return"info";case a.Warning:return"warn";case a.Error:return"error";case a.Off:return"off"}}(a.Info))},84119:function(e,t,i){"use strict";i.d(t,{DR:function(){return l},cj:function(){return n},oc:function(){return s}});var n,s,o=i(64159),r=i(14374),a=i(63619);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(n||(n={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,r.kg)("sev.error","Error"),t[e.Warning]=(0,r.kg)("sev.warning","Warning"),t[e.Info]=(0,r.kg)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case o.A.Error:return e.Error;case o.A.Warning:return e.Warning;case o.A.Info:return e.Info;case o.A.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return o.A.Error;case e.Warning:return o.A.Warning;case e.Info:return o.A.Info;case e.Hint:return o.A.Ignore}}}(n||(n={})),function(e){const t="";function i(e,i){const s=[t];return e.source?s.push(e.source.replace("¦","\\¦")):s.push(t),e.code?"string"==typeof e.code?s.push(e.code.replace("¦","\\¦")):s.push(e.code.value.replace("¦","\\¦")):s.push(t),void 0!==e.severity&&null!==e.severity?s.push(n.toString(e.severity)):s.push(t),e.message&&i?s.push(e.message.replace("¦","\\¦")):s.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?s.push(e.startLineNumber.toString()):s.push(t),void 0!==e.startColumn&&null!==e.startColumn?s.push(e.startColumn.toString()):s.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?s.push(e.endLineNumber.toString()):s.push(t),void 0!==e.endColumn&&null!==e.endColumn?s.push(e.endColumn.toString()):s.push(t),s.push(t),s.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(s||(s={}));const l=(0,a.u1)("markerService")},31835:function(e,t,i){"use strict";i.d(t,{AI:function(){return o},Kz:function(){return a},Ot:function(){return r}});var n=i(64159),s=i(63619),o=n.A;const r=(0,s.u1)("notificationService");class a{}},74827:function(e,t,i){"use strict";i.d(t,{V:function(){return o},w:function(){return r}});var n=i(73755),s=i(84230);function o(e,t,i){return(0,s.eP)({debugName:()=>`Configuration Key "${e}"`},(t=>i.onDidChangeConfiguration((i=>{i.affectsConfiguration(e)&&t(i)}))),(()=>i.getValue(e)??t))}function r(e,t,i){const s=e.bindTo(t);return(0,n.zL)({debugName:()=>`Set Context Key "${e.key}"`},(e=>{s.set(i(e))}))}},95607:function(e,t,i){"use strict";i.d(t,{C:function(){return n},e:function(){return s}});const n=(0,i(63619).u1)("openerService");function s(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},86171:function(e,t,i){"use strict";i.d(t,{G5:function(){return s},N8:function(){return r},ke:function(){return o}});var n=i(63619);const s=(0,n.u1)("progressService");Object.freeze({total(){},worked(){},done(){}});class o{static{this.None=Object.freeze({report(){}})}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}const r=(0,n.u1)("editorProgressService")},6209:function(e,t,i){"use strict";i.d(t,{Fd:function(){return a},aJ:function(){return n}});var n,s=i(97358),o=i(35114),r=i(56419);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};r.O.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,o.s)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,s.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},43575:function(e,t,i){"use strict";i.d(t,{C1:function(){return r},Fp:function(){return a},GK:function(){return c},Ym:function(){return s},dH:function(){return l},kF:function(){return o}});var n=i(63619);const s={ctrlCmd:!1,alt:!1};var o,r,a,l;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(o||(o={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={})),function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage",e[e.NextSeparator=8]="NextSeparator",e[e.PreviousSeparator=9]="PreviousSeparator"}(a||(a={})),function(e){e[e.Title=1]="Title",e[e.Inline=2]="Inline"}(l||(l={})),new class{constructor(e){this.options=e}};const c=(0,n.u1)("quickInputService")},56419:function(e,t,i){"use strict";i.d(t,{O:function(){return o}});var n=i(93066),s=i(24219);const o=new class{constructor(){this.data=new Map}add(e,t){n.ok(s.Kg(e)),n.ok(s.Gv(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},87332:function(e,t,i){"use strict";i.d(t,{CS:function(){return p},pc:function(){return _},LP:function(){return f}});var n,s,o=i(80670),r=i(35114),a=i(24219),l=i(90890),c=i(23560);!function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",e[e.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(s||(s={}));class d extends r.jG{static{this.DEFAULT_FLUSH_DELAY=100}constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new o.fV),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=s.None,this.cache=new Map,this.flushDelayer=this._register(new l.Th(d.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach(((e,t)=>this.acceptExternal(t,e))),e.deleted?.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===s.Closed)return;let i=!1;(0,a.z)(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return(0,a.z)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.z)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.z)(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===s.Closed)return;if((0,a.z)(t))return this.delete(e,i);const n=(0,a.Gv)(t)||Array.isArray(t)?(0,c.As)(t):String(t);return this.cache.get(e)!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}async delete(e,t=!1){if(this.state!==s.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()}))}async doFlush(e){return this.options.hint===n.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger((()=>this.flushPending()),e)}}class h{constructor(){this.onDidChangeItemsExternal=o.Jh.None,this.items=new Map}async updateItems(e){e.insert?.forEach(((e,t)=>this.items.set(t,e))),e.delete?.forEach((e=>this.items.delete(e)))}}var u=i(63619);const g="__$__targetStorageMarker",p=(0,u.u1)("storageService");var f;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(f||(f={}));class m extends r.jG{static{this.DEFAULT_FLUSH_INTERVAL=6e4}constructor(e={flushInterval:m.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new o.fV),this._onDidChangeTarget=this._register(new o.fV),this._onWillSaveState=this._register(new o.vl),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return o.Jh.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===g){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){return this.getStorage(t)?.get(e,i)}getBoolean(e,t,i){return this.getStorage(t)?.getBoolean(e,i)}getNumber(e,t,i){return this.getStorage(t)?.getNumber(e,i)}store(e,t,i,n,s=!1){(0,a.z)(t)?this.remove(e,i,s):this.withPausedEmitters((()=>{this.updateKeyTarget(e,i,n),this.getStorage(i)?.set(e,t,s)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,i)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){const s=this.getKeyTargets(t);"number"==typeof i?s[e]!==i&&(s[e]=i,this.getStorage(t)?.set(g,JSON.stringify(s),n)):"number"==typeof s[e]&&(delete s[e],this.getStorage(t)?.set(g,JSON.stringify(s),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?function(e){const t=e.get(g);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}(t):Object.create(null)}}class _ extends m{constructor(){super(),this.applicationStorage=this._register(new d(new h,{hint:n.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new d(new h,{hint:n.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new d(new h,{hint:n.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},2727:function(e,t,i){"use strict";i.d(t,{k:function(){return n}});const n=(0,i(63619).u1)("telemetryService")},52010:function(e,t,i){"use strict";i.d(t,{Dk:function(){return d},IN:function(){return u},RE:function(){return p},XS:function(){return f},cv:function(){return r},ho:function(){return c},ir:function(){return o},m$:function(){return h},mk:function(){return l},oJ:function(){return a},t8:function(){return g}});var n=i(4195),s=i(59321);const o={keybindingLabelBackground:(0,n.GuP)(n.HDX),keybindingLabelForeground:(0,n.GuP)(n.eUu),keybindingLabelBorder:(0,n.GuP)(n.zUX),keybindingLabelBottomBorder:(0,n.GuP)(n.Qfh),keybindingLabelShadow:(0,n.GuP)(n.f9l)},r={buttonForeground:(0,n.GuP)(n.G_h),buttonSeparator:(0,n.GuP)(n.Q1$),buttonBackground:(0,n.GuP)(n.XJc),buttonHoverBackground:(0,n.GuP)(n.T9h),buttonSecondaryForeground:(0,n.GuP)(n.Inn),buttonSecondaryBackground:(0,n.GuP)(n.xOA),buttonSecondaryHoverBackground:(0,n.GuP)(n.nZG),buttonBorder:(0,n.GuP)(n.raQ)},a={progressBarBackground:(0,n.GuP)(n.BTi)},l={inputActiveOptionBorder:(0,n.GuP)(n.uNK),inputActiveOptionForeground:(0,n.GuP)(n.$$0),inputActiveOptionBackground:(0,n.GuP)(n.c1f)},c=((0,n.GuP)(n.jOE),(0,n.GuP)(n.Ukx),(0,n.GuP)(n.Ips),(0,n.GuP)(n.kPT),(0,n.GuP)(n.xWN),(0,n.GuP)(n.ZBU),(0,n.GuP)(n.jr9),(0,n.GuP)(n.OcU),(0,n.GuP)(n.C5U),(0,n.GuP)(n.t0B),(0,n.GuP)(n.CgL),(0,n.GuP)(n.FiB),(0,n.GuP)(n.f9l),(0,n.GuP)(n.b1q),(0,n.GuP)(n.tYX),(0,n.GuP)(n.JPj),(0,n.GuP)(n.bNw),(0,n.GuP)(n.vwp),{inputBackground:(0,n.GuP)(n.L4c),inputForeground:(0,n.GuP)(n.cws),inputBorder:(0,n.GuP)(n.Zgs),inputValidationInfoBorder:(0,n.GuP)(n.YSW),inputValidationInfoBackground:(0,n.GuP)(n.I$A),inputValidationInfoForeground:(0,n.GuP)(n.L9Z),inputValidationWarningBorder:(0,n.GuP)(n.C1n),inputValidationWarningBackground:(0,n.GuP)(n.ULt),inputValidationWarningForeground:(0,n.GuP)(n.T5N),inputValidationErrorBorder:(0,n.GuP)(n.eYZ),inputValidationErrorBackground:(0,n.GuP)(n._$n),inputValidationErrorForeground:(0,n.GuP)(n.h9z)}),d={listFilterWidgetBackground:(0,n.GuP)(n.pnl),listFilterWidgetOutline:(0,n.GuP)(n.fiM),listFilterWidgetNoMatchesOutline:(0,n.GuP)(n.P9Z),listFilterWidgetShadow:(0,n.GuP)(n.H8q),inputBoxStyles:c,toggleStyles:l},h={badgeBackground:(0,n.GuP)(n.WMx),badgeForeground:(0,n.GuP)(n.zRE),badgeBorder:(0,n.GuP)(n.b1q)},u=((0,n.GuP)(n.vV$),(0,n.GuP)(n.mc0),(0,n.GuP)(n.etE),(0,n.GuP)(n.etE),(0,n.GuP)(n.sAS),{listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.GuP)(n.VFX),listFocusForeground:(0,n.GuP)(n.efJ),listFocusOutline:(0,n.GuP)(n.p7Y),listActiveSelectionBackground:(0,n.GuP)(n.Rjz),listActiveSelectionForeground:(0,n.GuP)(n.GVV),listActiveSelectionIconForeground:(0,n.GuP)(n.fED),listFocusAndSelectionOutline:(0,n.GuP)(n.gtq),listFocusAndSelectionBackground:(0,n.GuP)(n.Rjz),listFocusAndSelectionForeground:(0,n.GuP)(n.GVV),listInactiveSelectionBackground:(0,n.GuP)(n.uNx),listInactiveSelectionIconForeground:(0,n.GuP)(n.C9U),listInactiveSelectionForeground:(0,n.GuP)(n.f4y),listInactiveFocusBackground:(0,n.GuP)(n.CQ3),listInactiveFocusOutline:(0,n.GuP)(n.ijf),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listDropOverBackground:(0,n.GuP)(n.Yoe),listDropBetweenBackground:(0,n.GuP)(n.yIp),listSelectionOutline:(0,n.GuP)(n.buw),listHoverOutline:(0,n.GuP)(n.buw),treeIndentGuidesStroke:(0,n.GuP)(n.U4U),treeInactiveIndentGuidesStroke:(0,n.GuP)(n.pft),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:(0,n.GuP)(n.bXl),tableColumnsBorder:(0,n.GuP)(n.k5u),tableOddRowsBackgroundColor:(0,n.GuP)(n.sbQ)});function g(e){return function(e,t){const i={...t};for(const t in e){const s=e[t];i[t]=void 0!==s?(0,n.GuP)(s):void 0}return i}(e,u)}const p={selectBackground:(0,n.GuP)(n.rvE),selectListBackground:(0,n.GuP)(n.lWP),selectForeground:(0,n.GuP)(n.yqq),decoratorRightForeground:(0,n.GuP)(n.NBf),selectBorder:(0,n.GuP)(n.HcB),focusBorder:(0,n.GuP)(n.tAP),listFocusBackground:(0,n.GuP)(n.AlL),listInactiveSelectionIconForeground:(0,n.GuP)(n.c7i),listFocusForeground:(0,n.GuP)(n.nH),listFocusOutline:(0,n.HP_)(n.buw,s.Q1.transparent.toString()),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listHoverOutline:(0,n.GuP)(n.buw),selectListBorder:(0,n.GuP)(n.sIe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},f={shadowColor:(0,n.GuP)(n.f9l),borderColor:(0,n.GuP)(n.g$2),foregroundColor:(0,n.GuP)(n.dd_),backgroundColor:(0,n.GuP)(n.c6Y),selectionForegroundColor:(0,n.GuP)(n.pmr),selectionBackgroundColor:(0,n.GuP)(n.Ux$),selectionBorderColor:(0,n.GuP)(n.SNb),separatorColor:(0,n.GuP)(n.D7X),scrollbarShadow:(0,n.GuP)(n.bXl),scrollbarSliderBackground:(0,n.GuP)(n.gnV),scrollbarSliderHoverBackground:(0,n.GuP)(n.cI_),scrollbarSliderActiveBackground:(0,n.GuP)(n.mhZ)}},4195:function(e,t,i){"use strict";i.d(t,{FdG:function(){return n.Fd},buw:function(){return d},GuP:function(){return n.Gu},Bbc:function(){return n.Bb},HP_:function(){return n.HP},WMx:function(){return u},zRE:function(){return g},sAS:function(){return ce},vV$:function(){return ae},etE:function(){return le},mc0:function(){return re},XJc:function(){return Xe},raQ:function(){return et},G_h:function(){return Ye},T9h:function(){return Je},xOA:function(){return it},Inn:function(){return tt},nZG:function(){return nt},Q1$:function(){return Ze},OcU:function(){return ht},C5U:function(){return gt},t0B:function(){return ut},b1q:function(){return c},EY1:function(){return Z},ZEf:function(){return X},Gj6:function(){return J},ld8:function(){return te},$BZ:function(){return ie},GNm:function(){return ee},Ztu:function(){return T},YtV:function(){return b},AN$:function(){return x},Rbi:function(){return k},f3U:function(){return F},Ubg:function(){return B},ECk:function(){return H},p8Y:function(){return W},S5J:function(){return V},By2:function(){return w},i61:function(){return M},WfR:function(){return z},oZ8:function(){return U},tan:function(){return A},IIb:function(){return I},pOz:function(){return N},WL6:function(){return q},P6i:function(){return j},B2L:function(){return Q},sjA:function(){return G},_pU:function(){return $},HwT:function(){return K},seu:function(){return R},rm4:function(){return P},QwA:function(){return O},whs:function(){return L},Stt:function(){return E},Hng:function(){return D},CgL:function(){return C},sIe:function(){return S},FiB:function(){return y},tAP:function(){return l},CU6:function(){return r},t4B:function(){return a},c1f:function(){return Ae},uNK:function(){return Re},$$0:function(){return Oe},L4c:function(){return Ie},Zgs:function(){return Te},cws:function(){return Me},_$n:function(){return Ue},eYZ:function(){return qe},h9z:function(){return je},I$A:function(){return Fe},YSW:function(){return We},L9Z:function(){return Be},ULt:function(){return He},C1n:function(){return ze},T5N:function(){return Ve},HDX:function(){return pt},zUX:function(){return mt},Qfh:function(){return _t},eUu:function(){return ft},Rjz:function(){return yt},GVV:function(){return St},fED:function(){return kt},yIp:function(){return Rt},Yoe:function(){return Tt},pnl:function(){return Ot},P9Z:function(){return Bt},fiM:function(){return Ft},H8q:function(){return Wt},gtq:function(){return Ct},VFX:function(){return vt},efJ:function(){return bt},eMz:function(){return At},p7Y:function(){return wt},QI5:function(){return Pt},lO1:function(){return It},QRv:function(){return Mt},CQ3:function(){return Et},ijf:function(){return Nt},uNx:function(){return xt},f4y:function(){return Lt},C9U:function(){return Dt},c6Y:function(){return Kt},g$2:function(){return jt},dd_:function(){return qt},Ux$:function(){return Gt},SNb:function(){return Qt},pmr:function(){return $t},D7X:function(){return Yt},ILr:function(){return Ee},yLC:function(){return De},AjU:function(){return ye},K1Z:function(){return Ne},KoI:function(){return xe},yr0:function(){return ke},Xp1:function(){return Se},uMG:function(){return Le},yLr:function(){return n.yL},fAP:function(){return _e},z5H:function(){return ve},iwL:function(){return ti},NBf:function(){return ei},tYX:function(){return be},bNw:function(){return Ce},JPj:function(){return we},BTi:function(){return v},ELA:function(){return Zt},HJZ:function(){return Xt},AlL:function(){return oi},nH:function(){return ni},c7i:function(){return si},er1:function(){return Jt},Ukx:function(){return ot},Ips:function(){return rt},jOE:function(){return st},xWN:function(){return lt},ZBU:function(){return ct},kPT:function(){return at},jr9:function(){return dt},x1A:function(){return n.x1},bXl:function(){return p},mhZ:function(){return _},gnV:function(){return f},cI_:function(){return m},rvE:function(){return Ke},HcB:function(){return Qe},yqq:function(){return Ge},lWP:function(){return $e},k5u:function(){return zt},sbQ:function(){return Ut},vwp:function(){return h},JO0:function(){return n.JO},pft:function(){return Vt},U4U:function(){return Ht},DSL:function(){return se},f9l:function(){return ne}});var n=i(8552),s=i(14374),o=i(59321);const r=(0,n.x1)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},s.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),a=((0,n.x1)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},s.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),(0,n.x1)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},s.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),(0,n.x1)("descriptionForeground",{light:"#717171",dark:(0,n.JO)(r,.7),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},s.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),(0,n.x1)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},s.kg("iconForeground","The default color for icons in the workbench."))),l=(0,n.x1)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},s.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),c=(0,n.x1)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},s.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),d=(0,n.x1)("contrastActiveBorder",{light:null,dark:null,hcDark:l,hcLight:l},s.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),h=((0,n.x1)("selection.background",null,s.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),(0,n.x1)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},s.kg("textLinkForeground","Foreground color for links in text."))),u=((0,n.x1)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},s.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),(0,n.x1)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:o.Q1.black,hcLight:"#292929"},s.kg("textSeparatorForeground","Color for text separators.")),(0,n.x1)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},s.kg("textPreformatForeground","Foreground color for preformatted text segments.")),(0,n.x1)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},s.kg("textPreformatBackground","Background color for preformatted text segments.")),(0,n.x1)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},s.kg("textBlockQuoteBackground","Background color for block quotes in text.")),(0,n.x1)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:o.Q1.white,hcLight:"#292929"},s.kg("textBlockQuoteBorder","Border color for block quotes in text.")),(0,n.x1)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:o.Q1.black,hcLight:"#F2F2F2"},s.kg("textCodeBlockBackground","Background color for code blocks in text.")),(0,n.x1)("sash.hoverBorder",l,s.kg("sashActiveBorder","Border color of active sashes.")),(0,n.x1)("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:o.Q1.black,hcLight:"#0F4A85"},s.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),g=(0,n.x1)("badge.foreground",{dark:o.Q1.white,light:"#333",hcDark:o.Q1.white,hcLight:o.Q1.white},s.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),p=(0,n.x1)("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},s.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),f=(0,n.x1)("scrollbarSlider.background",{dark:o.Q1.fromHex("#797979").transparent(.4),light:o.Q1.fromHex("#646464").transparent(.4),hcDark:(0,n.JO)(c,.6),hcLight:(0,n.JO)(c,.4)},s.kg("scrollbarSliderBackground","Scrollbar slider background color.")),m=(0,n.x1)("scrollbarSlider.hoverBackground",{dark:o.Q1.fromHex("#646464").transparent(.7),light:o.Q1.fromHex("#646464").transparent(.7),hcDark:(0,n.JO)(c,.8),hcLight:(0,n.JO)(c,.8)},s.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),_=(0,n.x1)("scrollbarSlider.activeBackground",{dark:o.Q1.fromHex("#BFBFBF").transparent(.4),light:o.Q1.fromHex("#000000").transparent(.6),hcDark:c,hcLight:c},s.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),v=(0,n.x1)("progressBar.background",{dark:o.Q1.fromHex("#0E70C0"),light:o.Q1.fromHex("#0E70C0"),hcDark:c,hcLight:c},s.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),b=(0,n.x1)("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("editorBackground","Editor background color.")),w=(0,n.x1)("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:o.Q1.white,hcLight:r},s.kg("editorForeground","Editor default foreground color.")),C=((0,n.x1)("editorStickyScroll.background",b,s.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),(0,n.x1)("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),(0,n.x1)("editorStickyScroll.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),(0,n.x1)("editorStickyScroll.shadow",p,s.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),(0,n.x1)("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:o.Q1.white},s.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),y=(0,n.x1)("editorWidget.foreground",r,s.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),S=(0,n.x1)("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:c,hcLight:c},s.kg("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.")),k=((0,n.x1)("editorWidget.resizeBorder",null,s.kg("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.")),(0,n.x1)("editorError.background",null,s.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},s.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),x=(0,n.x1)("editorError.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},s.kg("errorBorder","If set, color of double underlines for errors in the editor.")),L=(0,n.x1)("editorWarning.background",null,s.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),D=(0,n.x1)("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},s.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),E=(0,n.x1)("editorWarning.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#FFCC00").transparent(.8),hcLight:o.Q1.fromHex("#FFCC00").transparent(.8)},s.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),N=((0,n.x1)("editorInfo.background",null,s.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},s.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),I=(0,n.x1)("editorInfo.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},s.kg("infoBorder","If set, color of double underlines for infos in the editor.")),M=(0,n.x1)("editorHint.foreground",{dark:o.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},s.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),T=((0,n.x1)("editorHint.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},s.kg("hintBorder","If set, color of double underlines for hints in the editor.")),(0,n.x1)("editorLink.activeForeground",{dark:"#4E94CE",light:o.Q1.blue,hcDark:o.Q1.cyan,hcLight:"#292929"},s.kg("activeLinkForeground","Color of active links."))),R=(0,n.x1)("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},s.kg("editorSelectionBackground","Color of the editor selection.")),P=(0,n.x1)("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:o.Q1.white},s.kg("editorSelectionForeground","Color of the selected text for high contrast.")),A=(0,n.x1)("editor.inactiveSelectionBackground",{light:(0,n.JO)(R,.5),dark:(0,n.JO)(R,.5),hcDark:(0,n.JO)(R,.7),hcLight:(0,n.JO)(R,.5)},s.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),O=(0,n.x1)("editor.selectionHighlightBackground",{light:(0,n.oG)(R,b,.3,.6),dark:(0,n.oG)(R,b,.3,.6),hcDark:null,hcLight:null},s.kg("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),F=((0,n.x1)("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:d,hcLight:d},s.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),(0,n.x1)("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},s.kg("editorFindMatch","Color of the current search match.")),(0,n.x1)("editor.findMatchForeground",null,s.kg("editorFindMatchForeground","Text color of the current search match."))),B=(0,n.x1)("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},s.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),W=(0,n.x1)("editor.findMatchHighlightForeground",null,s.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),H=((0,n.x1)("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},s.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editor.findMatchBorder",{light:null,dark:null,hcDark:d,hcLight:d},s.kg("editorFindMatchBorder","Border color of the current search match.")),(0,n.x1)("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:d,hcLight:d},s.kg("findMatchHighlightBorder","Border color of the other search matches."))),V=(0,n.x1)("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:(0,n.JO)(d,.4),hcLight:(0,n.JO)(d,.4)},s.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),z=((0,n.x1)("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},s.kg("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),(0,n.x1)("editorHoverWidget.background",C,s.kg("hoverBackground","Background color of the editor hover."))),U=((0,n.x1)("editorHoverWidget.foreground",y,s.kg("hoverForeground","Foreground color of the editor hover.")),(0,n.x1)("editorHoverWidget.border",S,s.kg("hoverBorder","Border color of the editor hover."))),j=((0,n.x1)("editorHoverWidget.statusBarBackground",{dark:(0,n.a)(z,.2),light:(0,n.e$)(z,.05),hcDark:C,hcLight:C},s.kg("statusBarBackground","Background color of the editor hover status bar.")),(0,n.x1)("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:o.Q1.white,hcLight:o.Q1.black},s.kg("editorInlayHintForeground","Foreground color of inline hints"))),q=(0,n.x1)("editorInlayHint.background",{dark:(0,n.JO)(u,.1),light:(0,n.JO)(u,.1),hcDark:(0,n.JO)(o.Q1.white,.1),hcLight:(0,n.JO)(u,.1)},s.kg("editorInlayHintBackground","Background color of inline hints")),K=(0,n.x1)("editorInlayHint.typeForeground",j,s.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),$=(0,n.x1)("editorInlayHint.typeBackground",q,s.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),G=(0,n.x1)("editorInlayHint.parameterForeground",j,s.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Q=(0,n.x1)("editorInlayHint.parameterBackground",q,s.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),Y=(0,n.x1)("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},s.kg("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Z=((0,n.x1)("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},s.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),(0,n.x1)("editorLightBulbAi.foreground",Y,s.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),(0,n.x1)("editor.snippetTabstopHighlightBackground",{dark:new o.Q1(new o.bU(124,124,124,.3)),light:new o.Q1(new o.bU(10,50,100,.2)),hcDark:new o.Q1(new o.bU(124,124,124,.3)),hcLight:new o.Q1(new o.bU(10,50,100,.2))},s.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),(0,n.x1)("editor.snippetTabstopHighlightBorder",null,s.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBackground",null,s.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Q1(new o.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},s.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new o.Q1(new o.bU(155,185,85,.2))),X=new o.Q1(new o.bU(255,0,0,.2)),J=(0,n.x1)("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},s.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ee=(0,n.x1)("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},s.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),te=((0,n.x1)("diffEditor.insertedLineBackground",{dark:Z,light:Z,hcDark:null,hcLight:null},s.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditor.removedLineBackground",{dark:X,light:X,hcDark:null,hcLight:null},s.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditorGutter.insertedLineBackground",null,s.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),(0,n.x1)("diffEditorGutter.removedLineBackground",null,s.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),(0,n.x1)("diffEditorOverview.insertedForeground",null,s.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content."))),ie=(0,n.x1)("diffEditorOverview.removedForeground",null,s.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),ne=((0,n.x1)("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},s.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),(0,n.x1)("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},s.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),(0,n.x1)("diffEditor.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("diffEditorBorder","Border color between the two text editors.")),(0,n.x1)("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},s.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),(0,n.x1)("diffEditor.unchangedRegionBackground","sideBar.background",s.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedRegionForeground","foreground",s.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},s.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),(0,n.x1)("widget.shadow",{dark:(0,n.JO)(o.Q1.black,.36),light:(0,n.JO)(o.Q1.black,.16),hcDark:null,hcLight:null},s.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),se=(0,n.x1)("widget.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),oe=(0,n.x1)("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},s.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),re=((0,n.x1)("toolbar.hoverOutline",{dark:null,light:null,hcDark:d,hcLight:d},s.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),(0,n.x1)("toolbar.activeBackground",{dark:(0,n.a)(oe,.1),light:(0,n.e$)(oe,.1),hcDark:null,hcLight:null},s.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),(0,n.x1)("breadcrumb.foreground",(0,n.JO)(r,.8),s.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items."))),ae=(0,n.x1)("breadcrumb.background",b,s.kg("breadcrumbsBackground","Background color of breadcrumb items.")),le=(0,n.x1)("breadcrumb.focusForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},s.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),ce=(0,n.x1)("breadcrumb.activeSelectionForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},s.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),de=((0,n.x1)("breadcrumbPicker.background",C,s.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),o.Q1.fromHex("#40C8AE").transparent(.5)),he=o.Q1.fromHex("#40A6FF").transparent(.5),ue=o.Q1.fromHex("#606060").transparent(.4),ge=(0,n.x1)("merge.currentHeaderBackground",{dark:de,light:de,hcDark:null,hcLight:null},s.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),pe=((0,n.x1)("merge.currentContentBackground",(0,n.JO)(ge,.4),s.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.incomingHeaderBackground",{dark:he,light:he,hcDark:null,hcLight:null},s.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),fe=((0,n.x1)("merge.incomingContentBackground",(0,n.JO)(pe,.4),s.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.commonHeaderBackground",{dark:ue,light:ue,hcDark:null,hcLight:null},s.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),me=((0,n.x1)("merge.commonContentBackground",(0,n.JO)(fe,.4),s.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},s.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),_e=((0,n.x1)("editorOverviewRuler.currentContentForeground",{dark:(0,n.JO)(ge,1),light:(0,n.JO)(ge,1),hcDark:me,hcLight:me},s.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.incomingContentForeground",{dark:(0,n.JO)(pe,1),light:(0,n.JO)(pe,1),hcDark:me,hcLight:me},s.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.commonContentForeground",{dark:(0,n.JO)(fe,1),light:(0,n.JO)(fe,1),hcDark:me,hcLight:me},s.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},s.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),ve=(0,n.x1)("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",s.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),be=(0,n.x1)("problemsErrorIcon.foreground",k,s.kg("problemsErrorIconForeground","The color used for the problems error icon.")),we=(0,n.x1)("problemsWarningIcon.foreground",D,s.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),Ce=(0,n.x1)("problemsInfoIcon.foreground",N,s.kg("problemsInfoIconForeground","The color used for the problems info icon.")),ye=(0,n.x1)("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},s.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Se=(0,n.x1)("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},s.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),ke=(0,n.x1)("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},s.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),xe=(0,n.x1)("minimap.infoHighlight",{dark:N,light:N,hcDark:I,hcLight:I},s.kg("minimapInfo","Minimap marker color for infos.")),Le=(0,n.x1)("minimap.warningHighlight",{dark:D,light:D,hcDark:E,hcLight:E},s.kg("overviewRuleWarning","Minimap marker color for warnings.")),De=(0,n.x1)("minimap.errorHighlight",{dark:new o.Q1(new o.bU(255,18,18,.7)),light:new o.Q1(new o.bU(255,18,18,.7)),hcDark:new o.Q1(new o.bU(255,50,50,1)),hcLight:"#B5200D"},s.kg("minimapError","Minimap marker color for errors.")),Ee=(0,n.x1)("minimap.background",null,s.kg("minimapBackground","Minimap background color.")),Ne=(0,n.x1)("minimap.foregroundOpacity",o.Q1.fromHex("#000f"),s.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Ie=((0,n.x1)("minimapSlider.background",(0,n.JO)(f,.5),s.kg("minimapSliderBackground","Minimap slider background color.")),(0,n.x1)("minimapSlider.hoverBackground",(0,n.JO)(m,.5),s.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),(0,n.x1)("minimapSlider.activeBackground",(0,n.JO)(_,.5),s.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),(0,n.x1)("charts.foreground",r,s.kg("chartsForeground","The foreground color used in charts.")),(0,n.x1)("charts.lines",(0,n.JO)(r,.5),s.kg("chartsLines","The color used for horizontal lines in charts.")),(0,n.x1)("charts.red",k,s.kg("chartsRed","The red color used in chart visualizations.")),(0,n.x1)("charts.blue",N,s.kg("chartsBlue","The blue color used in chart visualizations.")),(0,n.x1)("charts.yellow",D,s.kg("chartsYellow","The yellow color used in chart visualizations.")),(0,n.x1)("charts.orange",ye,s.kg("chartsOrange","The orange color used in chart visualizations.")),(0,n.x1)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},s.kg("chartsGreen","The green color used in chart visualizations.")),(0,n.x1)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},s.kg("chartsPurple","The purple color used in chart visualizations.")),(0,n.x1)("input.background",{dark:"#3C3C3C",light:o.Q1.white,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("inputBoxBackground","Input box background."))),Me=(0,n.x1)("input.foreground",r,s.kg("inputBoxForeground","Input box foreground.")),Te=(0,n.x1)("input.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("inputBoxBorder","Input box border.")),Re=(0,n.x1)("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:c,hcLight:c},s.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Pe=(0,n.x1)("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},s.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),Ae=(0,n.x1)("inputOption.activeBackground",{dark:(0,n.JO)(l,.4),light:(0,n.JO)(l,.2),hcDark:o.Q1.transparent,hcLight:o.Q1.transparent},s.kg("inputOption.activeBackground","Background hover color of options in input fields.")),Oe=(0,n.x1)("inputOption.activeForeground",{dark:o.Q1.white,light:o.Q1.black,hcDark:r,hcLight:r},s.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),Fe=((0,n.x1)("input.placeholderForeground",{light:(0,n.JO)(r,.5),dark:(0,n.JO)(r,.5),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},s.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),(0,n.x1)("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("inputValidationInfoBackground","Input validation background color for information severity."))),Be=(0,n.x1)("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),We=(0,n.x1)("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:c,hcLight:c},s.kg("inputValidationInfoBorder","Input validation border color for information severity.")),He=(0,n.x1)("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),Ve=(0,n.x1)("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),ze=(0,n.x1)("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:c,hcLight:c},s.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),Ue=(0,n.x1)("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("inputValidationErrorBackground","Input validation background color for error severity.")),je=(0,n.x1)("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),qe=(0,n.x1)("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:c,hcLight:c},s.kg("inputValidationErrorBorder","Input validation border color for error severity.")),Ke=(0,n.x1)("dropdown.background",{dark:"#3C3C3C",light:o.Q1.white,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("dropdownBackground","Dropdown background.")),$e=(0,n.x1)("dropdown.listBackground",{dark:null,light:null,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("dropdownListBackground","Dropdown list background.")),Ge=(0,n.x1)("dropdown.foreground",{dark:"#F0F0F0",light:r,hcDark:o.Q1.white,hcLight:r},s.kg("dropdownForeground","Dropdown foreground.")),Qe=(0,n.x1)("dropdown.border",{dark:Ke,light:"#CECECE",hcDark:c,hcLight:c},s.kg("dropdownBorder","Dropdown border.")),Ye=(0,n.x1)("button.foreground",o.Q1.white,s.kg("buttonForeground","Button foreground color.")),Ze=(0,n.x1)("button.separator",(0,n.JO)(Ye,.4),s.kg("buttonSeparator","Button separator color.")),Xe=(0,n.x1)("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},s.kg("buttonBackground","Button background color.")),Je=(0,n.x1)("button.hoverBackground",{dark:(0,n.a)(Xe,.2),light:(0,n.e$)(Xe,.2),hcDark:Xe,hcLight:Xe},s.kg("buttonHoverBackground","Button background color when hovering.")),et=(0,n.x1)("button.border",c,s.kg("buttonBorder","Button border color.")),tt=(0,n.x1)("button.secondaryForeground",{dark:o.Q1.white,light:o.Q1.white,hcDark:o.Q1.white,hcLight:r},s.kg("buttonSecondaryForeground","Secondary button foreground color.")),it=(0,n.x1)("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:o.Q1.white},s.kg("buttonSecondaryBackground","Secondary button background color.")),nt=(0,n.x1)("button.secondaryHoverBackground",{dark:(0,n.a)(it,.2),light:(0,n.e$)(it,.2),hcDark:null,hcLight:null},s.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),st=(0,n.x1)("radio.activeForeground",Oe,s.kg("radioActiveForeground","Foreground color of active radio option.")),ot=(0,n.x1)("radio.activeBackground",Ae,s.kg("radioBackground","Background color of active radio option.")),rt=(0,n.x1)("radio.activeBorder",Re,s.kg("radioActiveBorder","Border color of the active radio option.")),at=(0,n.x1)("radio.inactiveForeground",null,s.kg("radioInactiveForeground","Foreground color of inactive radio option.")),lt=(0,n.x1)("radio.inactiveBackground",null,s.kg("radioInactiveBackground","Background color of inactive radio option.")),ct=(0,n.x1)("radio.inactiveBorder",{light:(0,n.JO)(st,.2),dark:(0,n.JO)(st,.2),hcDark:(0,n.JO)(st,.4),hcLight:(0,n.JO)(st,.2)},s.kg("radioInactiveBorder","Border color of the inactive radio option.")),dt=(0,n.x1)("radio.inactiveHoverBackground",Pe,s.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),ht=(0,n.x1)("checkbox.background",Ke,s.kg("checkbox.background","Background color of checkbox widget.")),ut=((0,n.x1)("checkbox.selectBackground",C,s.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),(0,n.x1)("checkbox.foreground",Ge,s.kg("checkbox.foreground","Foreground color of checkbox widget."))),gt=(0,n.x1)("checkbox.border",Qe,s.kg("checkbox.border","Border color of checkbox widget.")),pt=((0,n.x1)("checkbox.selectBorder",a,s.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),(0,n.x1)("keybindingLabel.background",{dark:new o.Q1(new o.bU(128,128,128,.17)),light:new o.Q1(new o.bU(221,221,221,.4)),hcDark:o.Q1.transparent,hcLight:o.Q1.transparent},s.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut."))),ft=(0,n.x1)("keybindingLabel.foreground",{dark:o.Q1.fromHex("#CCCCCC"),light:o.Q1.fromHex("#555555"),hcDark:o.Q1.white,hcLight:r},s.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),mt=(0,n.x1)("keybindingLabel.border",{dark:new o.Q1(new o.bU(51,51,51,.6)),light:new o.Q1(new o.bU(204,204,204,.4)),hcDark:new o.Q1(new o.bU(111,195,223)),hcLight:c},s.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),_t=(0,n.x1)("keybindingLabel.bottomBorder",{dark:new o.Q1(new o.bU(68,68,68,.6)),light:new o.Q1(new o.bU(187,187,187,.4)),hcDark:new o.Q1(new o.bU(111,195,223)),hcLight:r},s.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),vt=(0,n.x1)("list.focusBackground",null,s.kg("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.")),bt=(0,n.x1)("list.focusForeground",null,s.kg("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.")),wt=(0,n.x1)("list.focusOutline",{dark:l,light:l,hcDark:d,hcLight:d},s.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ct=(0,n.x1)("list.focusAndSelectionOutline",null,s.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),yt=(0,n.x1)("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg("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.")),St=(0,n.x1)("list.activeSelectionForeground",{dark:o.Q1.white,light:o.Q1.white,hcDark:null,hcLight:null},s.kg("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.")),kt=(0,n.x1)("list.activeSelectionIconForeground",null,s.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),xt=(0,n.x1)("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg("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.")),Lt=(0,n.x1)("list.inactiveSelectionForeground",null,s.kg("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.")),Dt=(0,n.x1)("list.inactiveSelectionIconForeground",null,s.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Et=(0,n.x1)("list.inactiveFocusBackground",null,s.kg("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.")),Nt=(0,n.x1)("list.inactiveFocusOutline",null,s.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),It=(0,n.x1)("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:o.Q1.white.transparent(.1),hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Mt=(0,n.x1)("list.hoverForeground",null,s.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Tt=(0,n.x1)("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},s.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),Rt=(0,n.x1)("list.dropBetweenBackground",{dark:a,light:a,hcDark:null,hcLight:null},s.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),Pt=(0,n.x1)("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:l,hcLight:l},s.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),At=(0,n.x1)("list.focusHighlightForeground",{dark:Pt,light:(0,n.Hz)(yt,Pt,"#BBE7FF"),hcDark:Pt,hcLight:Pt},s.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),Ot=((0,n.x1)("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},s.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),(0,n.x1)("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},s.kg("listErrorForeground","Foreground color of list items containing errors.")),(0,n.x1)("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},s.kg("listWarningForeground","Foreground color of list items containing warnings.")),(0,n.x1)("listFilterWidget.background",{light:(0,n.e$)(C,0),dark:(0,n.a)(C,0),hcDark:C,hcLight:C},s.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees."))),Ft=(0,n.x1)("listFilterWidget.outline",{dark:o.Q1.transparent,light:o.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},s.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Bt=(0,n.x1)("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:c,hcLight:c},s.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Wt=(0,n.x1)("listFilterWidget.shadow",ne,s.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),Ht=((0,n.x1)("list.filterMatchBackground",{dark:B,light:B,hcDark:null,hcLight:null},s.kg("listFilterMatchHighlight","Background color of the filtered match.")),(0,n.x1)("list.filterMatchBorder",{dark:H,light:H,hcDark:c,hcLight:d},s.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),(0,n.x1)("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},s.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),(0,n.x1)("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},s.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),Vt=(0,n.x1)("tree.inactiveIndentGuidesStroke",(0,n.JO)(Ht,.4),s.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),zt=(0,n.x1)("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},s.kg("tableColumnsBorder","Table border color between columns.")),Ut=(0,n.x1)("tree.tableOddRowsBackground",{dark:(0,n.JO)(r,.04),light:(0,n.JO)(r,.04),hcDark:null,hcLight:null},s.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),jt=((0,n.x1)("editorActionList.background",C,s.kg("editorActionListBackground","Action List background color.")),(0,n.x1)("editorActionList.foreground",y,s.kg("editorActionListForeground","Action List foreground color.")),(0,n.x1)("editorActionList.focusForeground",St,s.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),(0,n.x1)("editorActionList.focusBackground",yt,s.kg("editorActionListFocusBackground","Action List background color for the focused item.")),(0,n.x1)("menu.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("menuBorder","Border color of menus."))),qt=(0,n.x1)("menu.foreground",Ge,s.kg("menuForeground","Foreground color of menu items.")),Kt=(0,n.x1)("menu.background",Ke,s.kg("menuBackground","Background color of menu items.")),$t=(0,n.x1)("menu.selectionForeground",St,s.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Gt=(0,n.x1)("menu.selectionBackground",yt,s.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),Qt=(0,n.x1)("menu.selectionBorder",{dark:null,light:null,hcDark:d,hcLight:d},s.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),Yt=(0,n.x1)("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:c,hcLight:c},s.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),Zt=(0,n.x1)("quickInput.background",C,s.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),Xt=(0,n.x1)("quickInput.foreground",y,s.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Jt=(0,n.x1)("quickInputTitle.background",{dark:new o.Q1(new o.bU(255,255,255,.105)),light:new o.Q1(new o.bU(0,0,0,.06)),hcDark:"#000000",hcLight:o.Q1.white},s.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),ei=(0,n.x1)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:o.Q1.white,hcLight:"#0F4A85"},s.kg("pickerGroupForeground","Quick picker color for grouping labels.")),ti=(0,n.x1)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:o.Q1.white,hcLight:"#0F4A85"},s.kg("pickerGroupBorder","Quick picker color for grouping borders.")),ii=(0,n.x1)("quickInput.list.focusBackground",null,"",void 0,s.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),ni=(0,n.x1)("quickInputList.focusForeground",St,s.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),si=(0,n.x1)("quickInputList.focusIconForeground",kt,s.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),oi=(0,n.x1)("quickInputList.focusBackground",{dark:(0,n.yL)(ii,yt),light:(0,n.yL)(ii,yt),hcDark:null,hcLight:null},s.kg("quickInput.listFocusBackground","Quick picker background color for the focused item."));(0,n.x1)("search.resultsInfoForeground",{light:r,dark:(0,n.JO)(r,.65),hcDark:r,hcLight:r},s.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),(0,n.x1)("searchEditor.findMatchBackground",{light:(0,n.JO)(B,.66),dark:(0,n.JO)(B,.66),hcDark:B,hcLight:B},s.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),(0,n.x1)("searchEditor.findMatchBorder",{light:(0,n.JO)(H,.66),dark:(0,n.JO)(H,.66),hcDark:H,hcLight:H},s.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},8552:function(e,t,i){"use strict";i.d(t,{Bb:function(){return d},Fd:function(){return g},Gu:function(){return h},HP:function(){return u},Hz:function(){return w},JO:function(){return v},a:function(){return _},e$:function(){return m},oG:function(){return C},x1:function(){return f},yL:function(){return b}});var n=i(93066),s=i(90890),o=i(59321),r=i(80670),a=i(97248),l=i(56419),c=i(14374);function d(e){return`--vscode-${e.replace(/\./g,"-")}`}function h(e){return`var(${d(e)})`}function u(e,t){return`var(${d(e)}, ${t})`}const g={ColorContribution:"base.contributions.colors"},p=new class{constructor(){this._onDidChangeSchema=new r.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,s){const o={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=o;const r={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(r.deprecationMessage=s),n&&(r.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",r.patternErrorMessage=c.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:i,oneOf:[r,{type:"string",const:"default",description:c.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i?.defaults)return y(null!==(n=i.defaults)&&"object"==typeof n&&"light"in n&&"dark"in n?i.defaults[t.type]:i.defaults,t);var n}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function f(e,t,i,n,s){return p.registerColor(e,t,i,n,s)}function m(e,t){return{op:0,value:e,factor:t}}function _(e,t){return{op:1,value:e,factor:t}}function v(e,t){return{op:2,value:e,factor:t}}function b(...e){return{op:4,values:e}}function w(e,t,i){return{op:6,if:e,then:t,else:i}}function C(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function y(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?o.Q1.fromHex(e):t.getColor(e):e instanceof o.Q1?e:"object"==typeof e?function(e,t){switch(e.op){case 0:return y(e.value,t)?.darken(e.factor);case 1:return y(e.value,t)?.lighten(e.factor);case 2:return y(e.value,t)?.transparent(e.factor);case 3:{const i=y(e.background,t);return i?y(e.value,t)?.makeOpaque(i):y(e.value,t)}case 4:for(const i of e.values){const e=y(i,t);if(e)return e}return;case 6:return y(t.defines(e.if)?e.then:e.else,t);case 5:{const i=y(e.value,t);if(!i)return;const n=y(e.background,t);return n?i.isDarkerThan(n)?o.Q1.getLighterColor(i,n,e.factor).transparent(e.transparency):o.Q1.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw(0,n.xb)(e)}}(e,t):void 0}l.O.add(g.ColorContribution,p);const S="vscode://schemas/workbench-colors",k=l.O.as(a.F.JSONContribution);k.registerSchema(S,p.getColorSchema());const x=new s.uC((()=>k.notifySchemaChanged(S)),200);p.onDidChangeSchema((()=>{x.isScheduled()||x.schedule()}))},51310:function(e,t,i){"use strict";i.d(t,{$_:function(){return C},HT:function(){return _},pU:function(){return m}});var n,s,o=i(90890),r=i(93231),a=i(81040),l=i(56613),c=i(80670),d=i(24219),h=i(54244),u=i(14374),g=i(97248),p=i(56419);!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;l.L.isThemeIcon(i);){const e=f.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(n||(n={})),function(e){e.toJSONObject=function(e){return{weight:e.weight,style:e.style,src:e.src.map((e=>({format:e.format,location:e.location.toString()})))}},e.fromJSONObject=function(e){const t=e=>(0,d.Kg)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>(0,d.Kg)(e.format)&&(0,d.Kg)(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:h.r.parse(e.location)})))}}}(s||(s={}));const f=new class{constructor(){this._onDidChange=new c.vl,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,u.kg)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,u.kg)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${l.L.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return s}const o={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=o;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;l.L.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const s of n.filter((e=>!!e.description)).sort(e))i.push(`||${s.id}|${l.L.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter((e=>!l.L.isThemeIcon(e.defaults))).sort(e))i.push(`||${s.id}|`);return i.join("\n")}};function m(e,t,i,n){return f.registerIcon(e,t,i,n)}function _(){return f}p.O.add("base.contributions.icons",f),function(){const e=(0,a.J)();for(const t in e){const i="\\"+e[t].toString(16);f.registerIcon(t,{fontCharacter:i})}}();const v="vscode://schemas/icons",b=p.O.as(g.F.JSONContribution);b.registerSchema(v,f.getIconSchema());const w=new o.uC((()=>b.notifySchemaChanged(v)),200);f.onDidChange((()=>{w.isScheduled()||w.schedule()}));const C=m("widget-close",r.W.close,(0,u.kg)("widgetClose","Icon for the close action in widgets."));m("goto-previous-location",r.W.arrowUp,(0,u.kg)("previousChangeIcon","Icon for goto previous editor location.")),m("goto-next-location",r.W.arrowDown,(0,u.kg)("nextChangeIcon","Icon for goto next editor location.")),l.L.modify(r.W.sync,"spin"),l.L.modify(r.W.loading,"spin")},39679:function(e,t,i){"use strict";var n;function s(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function o(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{Bb:function(){return s},HD:function(){return o},zM:function(){return n}}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(n||(n={}))},40616:function(e,t,i){"use strict";i.d(t,{Fd:function(){return h},Gy:function(){return l},Pz:function(){return d},Yf:function(){return c},lR:function(){return p},zy:function(){return g}});var n=i(80670),s=i(35114),o=i(63619),r=i(56419),a=i(39679);const l=(0,o.u1)("themeService");function c(e){return{id:e}}function d(e){switch(e){case a.zM.DARK:return"vs-dark";case a.zM.HIGH_CONTRAST_DARK:return"hc-black";case a.zM.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const h={ThemingContribution:"base.contributions.theming"},u=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new n.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,s.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function g(e){return u.onColorThemeChange(e)}r.O.add(h.ThemingContribution,u);class p extends s.jG{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},79911:function(e,t,i){"use strict";i.d(t,{$D:function(){return n},I_:function(){return o},To:function(){return s},Ym:function(){return r}});const n=(0,i(63619).u1)("undoRedoService");class s{constructor(e,t){this.resource=e,this.elements=t}}class o{static{this._ID=0}constructor(){this.id=o._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new o}}class r{static{this._ID=0}constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new r}}},1255:function(e,t,i){"use strict";i.d(t,{A7:function(){return l},Q_:function(){return h},VR:function(){return r},cn:function(){return p},ct:function(){return f},jB:function(){return a},kF:function(){return g},mX:function(){return u}});var n=i(14374),s=i(68847),o=(i(80945),i(54244));const r=(0,i(63619).u1)("contextService");function a(e){const t=e;return"string"==typeof t?.id&&o.r.isUri(t.uri)}function l(e){const t=e;return"string"==typeof t?.id&&!a(e)&&!function(e){const t=e;return"string"==typeof t?.id&&o.r.isUri(t.configPath)}(e)}const c={id:"ext-dev"},d={id:"empty-window"};function h(e,t){if("string"==typeof e||void 0===e)return"string"==typeof e?{id:(0,s.P8)(e)}:t?c:d;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}class u{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const g="code-workspace",p=((0,n.kg)("codeWorkspace","Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");function f(e){return e.id===p}},35477:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=(0,i(63619).u1)("workspaceTrustManagementService")},43251:function(e){var t=String,i=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=i(),e.exports.createColors=i},17640:function(e,t,i){"use strict";let n=i(26637);class s extends n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=s,s.default=s,n.registerAtRule(s)},39167:function(e,t,i){"use strict";let n=i(56876);class s extends n{constructor(e){super(e),this.type="comment"}}e.exports=s,s.default=s},26637:function(e,t,i){"use strict";let n,s,o,r,{isClean:a,my:l}=i(6115),c=i(25130),d=i(39167),h=i(56876);function u(e){return e.map((e=>(e.nodes&&(e.nodes=u(e.nodes)),delete e.source,e)))}function g(e){if(e[a]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)g(t)}class p extends h{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,i,n=this.getIterator();for(;this.indexes[n]e[t](...i.map((e=>"function"==typeof e?(t,i)=>e(t.toProxy(),i):e))):"every"===t||"some"===t?i=>e[t](((e,...t)=>i(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let i,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)i=this.indexes[e],n(e[l]||p.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[a]&&g(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,i))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,i)=>{let n;try{n=e(t,i)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("atrule"===i.type&&e.test(i.name))return t(i,n)})):this.walk(((i,n)=>{if("atrule"===i.type&&i.name===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("atrule"===e.type)return t(e,i)})))}walkComments(e){return this.walk(((t,i)=>{if("comment"===t.type)return e(t,i)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("decl"===i.type&&e.test(i.prop))return t(i,n)})):this.walk(((i,n)=>{if("decl"===i.type&&i.prop===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("decl"===e.type)return t(e,i)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("rule"===i.type&&e.test(i.selector))return t(i,n)})):this.walk(((i,n)=>{if("rule"===i.type&&i.selector===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("rule"===e.type)return t(e,i)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}p.registerParse=e=>{n=e},p.registerRule=e=>{s=e},p.registerAtRule=e=>{o=e},p.registerRoot=e=>{r=e},e.exports=p,p.default=p,p.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,s.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,d.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[l]=!0,e.nodes&&e.nodes.forEach((e=>{p.rebuild(e)}))}},52378:function(e,t,i){"use strict";let n=i(43251),s=i(30078);class o extends Error{constructor(e,t,i,n,s,r){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),r&&(this.plugin=r),void 0!==t&&void 0!==i&&("number"==typeof t?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,o)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=n.isColorSupported),s&&e&&(t=s(t));let i,o,r=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,r.length),c=String(l).length;if(e){let{bold:e,gray:t,red:s}=n.createColors(!0);i=t=>e(s(t)),o=e=>t(e)}else i=o=e=>e;return r.slice(a,l).map(((e,t)=>{let n=a+1+t,s=" "+(" "+n).slice(-c)+" | ";if(n===this.line){let t=o(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+o(s)+e+"\n "+t+i("^")}return" "+o(s)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=o,o.default=o},25130:function(e,t,i){"use strict";let n=i(56876);class s extends n{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=s,s.default=s},2037:function(e,t,i){"use strict";let n,s,o=i(26637);class r extends o{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new s,this,e).stringify()}}r.registerLazyResult=e=>{n=e},r.registerProcessor=e=>{s=e},e.exports=r,r.default=r},3346:function(e,t,i){"use strict";let n=i(25130),s=i(56274),o=i(39167),r=i(17640),a=i(83022),l=i(49056),c=i(39026);function d(e,t){if(Array.isArray(e))return e.map((e=>d(e)));let{inputs:i,...h}=e;if(i){t=[];for(let e of i){let i={...e,__proto__:a.prototype};i.map&&(i.map={...i.map,__proto__:s.prototype}),t.push(i)}}if(h.nodes&&(h.nodes=e.nodes.map((e=>d(e,t)))),h.source){let{inputId:e,...i}=h.source;h.source=i,null!=e&&(h.source.input=t[e])}if("root"===h.type)return new l(h);if("decl"===h.type)return new n(h);if("rule"===h.type)return new c(h);if("comment"===h.type)return new o(h);if("atrule"===h.type)return new r(h);throw new Error("Unknown node type: "+e.type)}e.exports=d,d.default=d},83022:function(e,t,i){"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(85598),{fileURLToPath:o,pathToFileURL:r}=i(58119),{isAbsolute:a,resolve:l}=i(85833),{nanoid:c}=i(80953),d=i(30078),h=i(52378),u=i(56274),g=Symbol("fromOffsetCache"),p=Boolean(n&&s),f=Boolean(l&&a);class m{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||a(t.from)?this.file=t.from:this.file=l(t.from)),f&&p){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,i,n={}){let s,o,a;if(t&&"object"==typeof t){let e=t,n=i;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,i=n.col}else t=e.line,i=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);o=e.line,a=e.col}else o=n.line,a=n.column}else if(!i){let e=this.fromOffset(t);t=e.line,i=e.col}let l=this.origin(t,i,o,a);return s=l?new h(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,n.plugin):new h(e,void 0===o?t:{column:i,line:t},void 0===o?i:{column:a,line:o},this.css,this.file,n.plugin),s.input={column:i,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(r&&(s.input.url=r(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,i;if(this[g])i=this[g];else{let e=this.css.split("\n");i=new Array(e.length);let t=0;for(let n=0,s=e.length;n=t)n=i.length-1;else{let t,s=i.length-2;for(;n>1),e=i[t+1])){n=t;break}n=t+1}}return{col:e-i[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:l(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,n){if(!this.map)return!1;let s,l,c=this.map.consumer(),d=c.originalPositionFor({column:t,line:e});if(!d.source)return!1;"number"==typeof i&&(s=c.originalPositionFor({column:n,line:i})),l=a(d.source)?r(d.source):new URL(d.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let h={column:d.column,endColumn:s&&s.column,endLine:s&&s.line,line:d.line,url:l.toString()};if("file:"===l.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");h.file=o(l)}let u=c.sourceContentFor(d.source);return u&&(h.source=u),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=m,m.default=m,d&&d.registerInput&&d.registerInput(m)},14554:function(e,t,i){"use strict";let{isClean:n,my:s}=i(6115),o=i(32792),r=i(44491),a=i(26637),l=i(2037),c=(i(1568),i(48737)),d=i(22549),h=i(49056);const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},g={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function m(e){let t=!1,i=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[i,i+"-"+t,0,i+"Exit",i+"Exit-"+t]:t?[i,i+"-"+t,i+"Exit",i+"Exit-"+t]:e.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function _(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:m(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){return e[n]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let b={};class w{constructor(e,t,i){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof w||t instanceof c)n=v(t.root),t.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let e=d;i.syntax&&(e=i.syntax.parse),i.parser&&(e=i.parser),e.parse&&(e=e.parse);try{n=e(t,i)}catch(e){this.processed=!0,this.error=e}n&&!n[s]&&a.rebuild(n)}else n=v(t);this.result=new c(e,n,i),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?i.postcssVersion:(e.plugin=i.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,i)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,i])};for(let t of this.plugins)if("object"==typeof t)for(let i in t){if(!g[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[i])if("object"==typeof t[i])for(let n in t[i])e(t,"*"===n?i:i+"-"+n.toLowerCase(),t[i][n]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let i=t[t.length-1].node;throw this.handleError(e,i)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>i(e,this.helpers)));await Promise.all(t)}else await i(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new o(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];)e[n]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,n]of e){let e;this.result.lastPlugin=i;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:s}=t;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void e.pop();if(s.length>0&&t.visitorIndex{e[n]||this.walkSync(e)}));else{let t=this.listeners[i];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}w.registerPostcss=e=>{b=e},e.exports=w,w.default=w,h.registerLazyResult(w),l.registerLazyResult(w)},13764:function(e){"use strict";let t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(e,t,i){let n=[],s="",o=!1,r=0,a=!1,l="",c=!1;for(let i of e)c?c=!1:"\\"===i?c=!0:a?i===l&&(a=!1):'"'===i||"'"===i?(a=!0,l=i):"("===i?r+=1:")"===i?r>0&&(r-=1):0===r&&t.includes(i)&&(o=!0),o?(""!==s&&n.push(s.trim()),s="",o=!1):s+=i;return(i||""!==s)&&n.push(s.trim()),n}};e.exports=t,t.default=t},32792:function(e,t,i){"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(85598),{dirname:o,relative:r,resolve:a,sep:l}=i(85833),{pathToFileURL:c}=i(58119),d=i(83022),h=Boolean(n&&s),u=Boolean(o&&a&&r&&l);e.exports=class{constructor(e,t,i,n){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,i=this.toUrl(this.path(e.file)),s=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new n(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=s.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,i=1,n=1,o="",r={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,l)=>{if(this.css+=s,a&&"end"!==l&&(r.generated.line=i,r.generated.column=n-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=o,r.original.line=1,r.original.column=0,this.map.addMapping(r))),e=s.match(/\n/g),e?(i+=e.length,t=s.lastIndexOf("\n"),n=s.length-t):n+=s.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=i,r.generated.column=n-2,this.map.addMapping(r)):(r.source=o,r.original.line=1,r.original.column=0,r.generated.line=i,r.generated.column=n-1,this.map.addMapping(r)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?o(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=o(a(i,this.mapOpts.annotation)));let n=r(i,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new d(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===l&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}}},10527:function(e,t,i){"use strict";let n=i(32792),s=i(44491),o=(i(1568),i(22549));const r=i(48737);class a{constructor(e,t,i){let o;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let a=s;this.result=new r(this._processor,o,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let c=new n(a,o,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=o;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=a,a.default=a},56876:function(e,t,i){"use strict";let{isClean:n,my:s}=i(6115),o=i(52378),r=i(9152),a=i(44491);function l(e,t){let i=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],o=typeof s;"parent"===n&&"object"===o?t&&(i[n]=t):"source"===n?i[n]=s:Array.isArray(s)?i[n]=s.map((e=>l(e,i))):("object"===o&&null!==s&&(s=l(s)),i[n]=s)}return i}class c{constructor(e={}){this.raws={},this[n]=!1,this[s]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let i of e[t])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=l(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},t)}return new o(e)}getProxyProcessor(){return{get(e,t){return"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]},set(e,t,i){return e[t]===i||(e[t]=i,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}markDirty(){if(this[n]){this[n]=!1;let e=this;for(;e=e.parent;)e[n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let i=this.source.start;if(e.index)i=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(i=this.positionInside(n,t))}return i}positionInside(e,t){let i=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)i[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=s,t.set(n.input,s),s++),i[e]={end:n.end,inputId:o,start:n.start}}else i[e]=n}return n&&(i.inputs=[...t.keys()].map((e=>e.toJSON()))),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=a){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,i){let n={node:this};for(let e in i)n[e]=i[e];return e.warn(t,n)}get proxyOf(){return this}}e.exports=c,c.default=c},22549:function(e,t,i){"use strict";let n=i(26637),s=i(61367),o=i(83022);function r(e,t){let i=new o(e,t),n=new s(i);try{n.parse()}catch(e){throw e}return n.root}e.exports=r,r.default=r,n.registerParse(r)},61367:function(e,t,i){"use strict";let n=i(25130),s=i(10185),o=i(39167),r=i(17640),a=i(49056),l=i(39026);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,i,n,s=new r;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,i=l[n];i&&"space"===i[0];)i=l[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(s.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(s,"params",l),o&&(e=l[l.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let i,n=0;for(let s=t-1;s>=0&&(i=e[s],"space"===i[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(e){let t,i,n,s=0;for(let[o,r]of e.entries()){if(t=r,i=t[0],"("===i&&(s+=1),")"===i&&(s-=1),0===s&&":"===i){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(t)}n=t}return!1}comment(e){let t=new o;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let e=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(e,t){let i=new n;this.init(i,e[0][2]);let s,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let i=e[t],n=i[3]||i[2];if(n)return n}}(e)),i.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;i.prop+=e.shift()[1]}for(i.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){i.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let r,a=[];for(;e.length&&(r=e[0][0],"space"===r||"comment"===r);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){i.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(i.raws.important=n);break}if("important"===s[1].toLowerCase()){let n=e.slice(0),s="";for(let e=t;e>0;e--){let t=n[e][0];if(0===s.trim().indexOf("!")&&"space"!==t)break;s=n.pop()[1]+s}0===s.trim().indexOf("!")&&(i.important=!0,i.raws.important=s,e=n)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(i.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(i,"value",a.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,i=null,n=!1,s=null,o=[],r=e[1].startsWith("--"),a=[],l=e;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)s||(s=l),o.push("("===i?")":"]");else if(r&&n&&"{"===i)s||(s=l),o.push("}");else if(0===o.length){if(";"===i){if(n)return void this.decl(a,r);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),t=!0;break}":"===i&&(n=!0)}else i===o[o.length-1]&&(o.pop(),0===o.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&n){if(!r)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,r)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,n){let s,o,r,a,l=i.length,d="",h=!0;for(let e=0;ee+t[1]),"");e.raws[t]={raw:n,value:d}}e[t]=d}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let n=t;nnew u(e),C.atRule=e=>new g(e),C.decl=e=>new s(e),C.rule=e=>new v(e),C.root=e=>new b(e),C.document=e=>new d(e),C.CssSyntaxError=n,C.Declaration=s,C.Container=r,C.Processor=a,C.Document=d,C.Comment=u,C.Warning=h,C.AtRule=g,C.Result=p,C.Input=f,C.Rule=v,C.Root=b,C.Node=w,o.registerPostcss(C),e.exports=C,C.default=C},56274:function(e,t,i){"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(85598),{existsSync:o,readFileSync:r}=i(21917),{dirname:a,join:l}=i(85833);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,n=this.loadMap(t.from,i);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=a(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let i=e.lastIndexOf(t.pop()),n=e.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,n)))}loadFile(e){if(this.root=a(e),o(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return s.fromSourceMap(t).toString();if(t instanceof s)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let i=t(e);if(i){let e=this.loadFile(i);if(!e)throw new Error("Unable to load previous source map: "+i.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(a(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},97274:function(e,t,i){"use strict";let n=i(10527),s=i(14554),o=i(2037),r=i(49056);class a{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)t.push(i);else if("function"==typeof i)t.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new s(this,e,t):new n(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=a,a.default=a,r.registerProcessor(a),o.registerProcessor(a)},48737:function(e,t,i){"use strict";let n=i(70378);class s{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let i=new n(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=s,s.default=s},49056:function(e,t,i){"use strict";let n,s,o=i(26637);class r extends o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let n=super.normalize(e);if(t)if("prepend"===i)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let i=this.index(e);return!t&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new n(new s,this,e).stringify()}}r.registerLazyResult=e=>{n=e},r.registerProcessor=e=>{s=e},e.exports=r,r.default=r,o.registerRoot(r)},39026:function(e,t,i){"use strict";let n=i(26637),s=i(13764);class o extends n{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return s.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}}e.exports=o,o.default=o,n.registerRule(o)},9152:function(e){"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class i{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(i+n+s,e)}}beforeAfter(e,t){let i;i="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(i.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let i=this.raw(e,"semicolon");for(let n=0;n{if(s=e.raws[i],void 0!==s)return!1}))}var a;return void 0===s&&(s=t[n]),r.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let i;return e.walkComments((e=>{if(void 0!==e.raws.before)return i=e.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1})),void 0===i?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls((e=>{if(void 0!==e.raws.before)return i=e.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1})),void 0===i?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&void 0!==i.raws.before)return t=i.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==i.raws.before){let e=i.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let i=e[t],n=e.raws[t];return n&&n.value===i?n.raw:i}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=i,i.default=i},44491:function(e,t,i){"use strict";let n=i(9152);function s(e,t){new n(t).stringify(e)}e.exports=s,s.default=s},6115:function(e){"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},10185:function(e){"use strict";const t="'".charCodeAt(0),i='"'.charCodeAt(0),n="\\".charCodeAt(0),s="/".charCodeAt(0),o="\n".charCodeAt(0),r=" ".charCodeAt(0),a="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),d="[".charCodeAt(0),h="]".charCodeAt(0),u="(".charCodeAt(0),g=")".charCodeAt(0),p="{".charCodeAt(0),f="}".charCodeAt(0),m=";".charCodeAt(0),_="*".charCodeAt(0),v=":".charCodeAt(0),b="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,S=/[\da-f]/i;e.exports=function(e,k={}){let x,L,D,E,N,I,M,T,R,P,A=e.css.valueOf(),O=k.ignoreErrors,F=A.length,B=0,W=[],H=[];function V(t){throw e.error("Unclosed "+t,B)}return{back:function(e){H.push(e)},endOfFile:function(){return 0===H.length&&B>=F},nextToken:function(e){if(H.length)return H.pop();if(B>=F)return;let k=!!e&&e.ignoreUnclosed;switch(x=A.charCodeAt(B),x){case o:case r:case l:case c:case a:L=B;do{L+=1,x=A.charCodeAt(L)}while(x===r||x===o||x===l||x===c||x===a);P=["space",A.slice(B,L)],B=L-1;break;case d:case h:case p:case f:case v:case m:case g:{let e=String.fromCharCode(x);P=[e,e,B];break}case u:if(T=W.length?W.pop()[1]:"",R=A.charCodeAt(B+1),"url"===T&&R!==t&&R!==i&&R!==r&&R!==o&&R!==l&&R!==a&&R!==c){L=B;do{if(I=!1,L=A.indexOf(")",L+1),-1===L){if(O||k){L=B;break}V("bracket")}for(M=L;A.charCodeAt(M-1)===n;)M-=1,I=!I}while(I);P=["brackets",A.slice(B,L+1),B,L],B=L}else L=A.indexOf(")",B+1),E=A.slice(B,L+1),-1===L||y.test(E)?P=["(","(",B]:(P=["brackets",E,B,L],B=L);break;case t:case i:D=x===t?"'":'"',L=B;do{if(I=!1,L=A.indexOf(D,L+1),-1===L){if(O||k){L=B+1;break}V("string")}for(M=L;A.charCodeAt(M-1)===n;)M-=1,I=!I}while(I);P=["string",A.slice(B,L+1),B,L],B=L;break;case b:w.lastIndex=B+1,w.test(A),L=0===w.lastIndex?A.length-1:w.lastIndex-2,P=["at-word",A.slice(B,L+1),B,L],B=L;break;case n:for(L=B,N=!0;A.charCodeAt(L+1)===n;)L+=1,N=!N;if(x=A.charCodeAt(L+1),N&&x!==s&&x!==r&&x!==o&&x!==l&&x!==c&&x!==a&&(L+=1,S.test(A.charAt(L)))){for(;S.test(A.charAt(L+1));)L+=1;A.charCodeAt(L+1)===r&&(L+=1)}P=["word",A.slice(B,L+1),B,L],B=L;break;default:x===s&&A.charCodeAt(B+1)===_?(L=A.indexOf("*/",B+2)+1,0===L&&(O||k?L=A.length:V("comment")),P=["comment",A.slice(B,L+1),B,L],B=L):(C.lastIndex=B+1,C.test(A),L=0===C.lastIndex?A.length-1:C.lastIndex-2,P=["word",A.slice(B,L+1),B,L],W.push(P),B=L)}return B++,P},position:function(){return B}}}},1568:function(e){"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},70378:function(e){"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},21727:function(e,t,i){"use strict";var n=i(23556),s=i(58101),o=i(96049);function r(e){var t="https://react.dev/errors/"+e;if(1)":-1--s||l[n]!==c[s]){var d="\n"+l[n].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}}while(1<=n&&0<=s);break}}}finally{T=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?M(i):""}function P(e){switch(e.tag){case 26:case 27:case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 15:return R(e.type,!1);case 11:return R(e.type.render,!1);case 1:return R(e.type,!0);default:return""}}function A(e){try{var t="";do{t+=P(e),e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function O(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(i=t.return),e=t.return}while(e)}return 3===t.tag?i:null}function F(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function B(e){if(O(e)!==e)throw Error(r(188))}function W(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=W(e)))return t;e=e.sibling}return null}var H=Array.isArray,V=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},U=[],j=-1;function q(e){return{current:e}}function K(e){0>j||(e.current=U[j],U[j]=null,j--)}function $(e,t){j++,U[j]=e.current,e.current=t}var G=q(null),Q=q(null),Y=q(null),Z=q(null);function X(e,t){switch($(Y,t),$(Q,e),$(G,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Qd(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Yd(e=Qd(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}K(G),$(G,t)}function J(){K(G),K(Q),K(Y)}function ee(e){null!==e.memoizedState&&$(Z,e);var t=G.current,i=Yd(t,e.type);t!==i&&($(Q,e),$(G,i))}function te(e){Q.current===e&&(K(G),K(Q)),Z.current===e&&(K(Z),Ah._currentValue=z)}var ie=Object.prototype.hasOwnProperty,ne=n.unstable_scheduleCallback,se=n.unstable_cancelCallback,oe=n.unstable_shouldYield,re=n.unstable_requestPaint,ae=n.unstable_now,le=n.unstable_getCurrentPriorityLevel,ce=n.unstable_ImmediatePriority,de=n.unstable_UserBlockingPriority,he=n.unstable_NormalPriority,ue=n.unstable_LowPriority,ge=n.unstable_IdlePriority,pe=n.log,fe=n.unstable_setDisableYieldValue,me=null,_e=null;function ve(e){if("function"==typeof pe&&fe(e),_e&&"function"==typeof _e.setStrictMode)try{_e.setStrictMode(me,e)}catch(e){}}var be=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(we(e)/Ce|0)|0},we=Math.log,Ce=Math.LN2,ye=128,Se=4194304;function ke(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function xe(e,t){var i=e.pendingLanes;if(0===i)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,r=e.warmLanes;e=0!==e.finishedLanes;var a=134217727&i;return 0!==a?0!=(i=a&~s)?n=ke(i):0!=(o&=a)?n=ke(o):e||0!=(r=a&~r)&&(n=ke(r)):0!=(a=i&~s)?n=ke(a):0!==o?n=ke(o):e||0!=(r=i&~r)&&(n=ke(r)),0===n?0:0===t||t===n||t&s||!((s=n&-n)>=(r=t&-t)||32===s&&4194176&r)?n:t}function Le(e,t){return!(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function De(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ee(){var e=ye;return!(4194176&(ye<<=1))&&(ye=128),e}function Ne(){var e=Se;return!(62914560&(Se<<=1))&&(Se=4194304),e}function Ie(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Me(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Te(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-be(t);e.entangledLanes|=t,e.entanglements[n]=1073741824|e.entanglements[n]|4194218&i}function Re(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var n=31-be(i),s=1<=wi),Si=String.fromCharCode(32),ki=!1;function xi(e,t){switch(e){case"keyup":return-1!==vi.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Li(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Di=!1,Ei={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ni(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ei[e.type]:"textarea"===t}function Ii(e,t,i,n){Mt?Tt?Tt.push(n):Tt=[n]:Mt=n,0<(t=Ad(t,"onChange")).length&&(i=new Zt("onChange","change",null,i,n),e.push({event:i,listeners:t}))}var Mi=null,Ti=null;function Ri(e){Dd(e,0)}function Pi(e){if(ht(Ge(e)))return e}function Ai(e,t){if("change"===e)return t}var Oi=!1;if(tt){var Fi;if(tt){var Bi="oninput"in document;if(!Bi){var Wi=document.createElement("div");Wi.setAttribute("oninput","return;"),Bi="function"==typeof Wi.oninput}Fi=Bi}else Fi=!1;Oi=Fi&&(!document.documentMode||9=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gi(n)}}function Yi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Yi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Zi(e){for(var t=ut((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var i="string"==typeof t.contentWindow.location.href}catch(e){i=!1}if(!i)break;t=ut((e=t.contentWindow).document)}return t}function Xi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Ji(e,t){var i=Zi(t);t=e.focusedElem;var n=e.selectionRange;if(i!==t&&t&&t.ownerDocument&&Yi(t.ownerDocument.documentElement,t)){if(null!==n&&Xi(t))if(e=n.start,void 0===(i=n.end)&&(i=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(i,t.value.length);else if((i=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){i=i.getSelection();var s=t.textContent.length,o=Math.min(n.start,s);n=void 0===n.end?o:Math.min(n.end,s),!i.extend&&o>n&&(s=n,n=o,o=s),s=Qi(t,o);var r=Qi(t,n);s&&r&&(1!==i.rangeCount||i.anchorNode!==s.node||i.anchorOffset!==s.offset||i.focusNode!==r.node||i.focusOffset!==r.offset)&&((e=e.createRange()).setStart(s.node,s.offset),i.removeAllRanges(),o>n?(i.addRange(e),i.extend(r.node,r.offset)):(e.setEnd(r.node,r.offset),i.addRange(e)))}for(e=[],i=t;i=i.parentNode;)1===i.nodeType&&e.push({element:i,left:i.scrollLeft,top:i.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t=document.documentMode,tn=null,nn=null,sn=null,on=!1;function rn(e,t,i){var n=i.window===i?i.document:9===i.nodeType?i:i.ownerDocument;on||null==tn||tn!==ut(n)||(n="selectionStart"in(n=tn)&&Xi(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},sn&&$i(sn,n)||(sn=n,0<(n=Ad(nn,"onSelect")).length&&(t=new Zt("onSelect","select",null,t,i),e.push({event:t,listeners:n}),t.target=tn)))}function an(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ln={animationend:an("Animation","AnimationEnd"),animationiteration:an("Animation","AnimationIteration"),animationstart:an("Animation","AnimationStart"),transitionrun:an("Transition","TransitionRun"),transitionstart:an("Transition","TransitionStart"),transitioncancel:an("Transition","TransitionCancel"),transitionend:an("Transition","TransitionEnd")},cn={},dn={};function hn(e){if(cn[e])return cn[e];if(!ln[e])return e;var t,i=ln[e];for(t in i)if(i.hasOwnProperty(t)&&t in dn)return cn[e]=i[t];return e}tt&&(dn=document.createElement("div").style,"AnimationEvent"in window||(delete ln.animationend.animation,delete ln.animationiteration.animation,delete ln.animationstart.animation),"TransitionEvent"in window||delete ln.transitionend.transition);var un=hn("animationend"),gn=hn("animationiteration"),pn=hn("animationstart"),fn=hn("transitionrun"),mn=hn("transitionstart"),_n=hn("transitioncancel"),vn=hn("transitionend"),bn=new Map,wn="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function Cn(e,t){bn.set(e,t),Je(t,[e])}var yn=[],Sn=0,kn=0;function xn(){for(var e=Sn,t=kn=Sn=0;t>=r,s-=r,Vn=1<<32-be(t)+s|i<u?(g=h,h=null):g=h.sibling;var p=_(s,h,a[u],l);if(null===p){null===h&&(h=g);break}e&&h&&null===p.alternate&&t(s,h),r=o(p,r,u),null===d?c=p:d.sibling=p,d=p,h=g}if(u===a.length)return i(s,h),Qn&&Un(s,u),c;if(null===h){for(;ug?(p=u,u=null):p=u.sibling;var b=_(s,u,f.value,c);if(null===b){null===u&&(u=p);break}e&&u&&null===b.alternate&&t(s,u),a=o(b,a,g),null===h?d=b:h.sibling=b,h=b,u=p}if(f.done)return i(s,u),Qn&&Un(s,g),d;if(null===u){for(;!f.done;g++,f=l.next())null!==(f=m(s,f.value,c))&&(a=o(f,a,g),null===h?d=f:h.sibling=f,h=f);return Qn&&Un(s,g),d}for(u=n(u);!f.done;g++,f=l.next())null!==(f=v(u,s,g,f.value,c))&&(e&&null!==f.alternate&&u.delete(null===f.key?g:f.key),a=o(f,a,g),null===h?d=f:h.sibling=f,h=f);return e&&u.forEach((function(e){return t(s,e)})),Qn&&Un(s,g),d}(h,u,g=C.call(g),p)}if("function"==typeof g.then)return b(h,u,fs(g),p);if(g.$$typeof===f)return b(h,u,xa(h,g),p);_s(h,g)}return"string"==typeof g&&""!==g||"number"==typeof g||"bigint"==typeof g?(g=""+g,null!==u&&6===u.tag?(i(h,u.sibling),(p=s(u,g)).return=h,h=p):(i(h,u),(p=Vl(g,h.mode,p)).return=h,h=p),a(h)):i(h,u)}return function(e,t,i,n){try{ps=0;var s=b(e,t,i,n);return gs=null,s}catch(t){if(t===os)throw t;var o=Pl(29,t,null,e.mode);return o.lanes=n,o.return=e,o}}}var ws=bs(!0),Cs=bs(!1),ys=q(null),Ss=q(0);function ks(e,t){$(Ss,e=lc),$(ys,t),lc=e|t.baseLanes}function xs(){$(Ss,lc),$(ys,ys.current)}function Ls(){lc=Ss.current,K(ys),K(Ss)}var Ds=q(null),Es=null;function Ns(e){var t=e.alternate;$(Rs,1&Rs.current),$(Ds,e),null===Es&&(null===t||null!==ys.current||null!==t.memoizedState)&&(Es=e)}function Is(e){if(22===e.tag){if($(Rs,Rs.current),$(Ds,e),null===Es){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Es=e)}}else Ms()}function Ms(){$(Rs,Rs.current),$(Ds,Ds.current)}function Ts(e){K(Ds),Es===e&&(Es=null),K(Rs)}var Rs=q(0);function Ps(e){for(var t=e;null!==t;){if(13===t.tag){var i=t.memoizedState;if(null!==i&&(null===(i=i.dehydrated)||"$?"===i.data||"$!"===i.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var As="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},Os=n.unstable_scheduleCallback,Fs=n.unstable_NormalPriority,Bs={$$typeof:f,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ws(){return{controller:new As,data:new Map,refCount:0}}function Hs(e){e.refCount--,0===e.refCount&&Os(Fs,(function(){e.controller.abort()}))}var Vs=null,zs=0,Us=0,js=null;function qs(){if(0==--zs&&null!==Vs){null!==js&&(js.status="fulfilled");var e=Vs;Vs=null,Us=0,js=null;for(var t=0;to?o:8;var r,a,l,c=N.T,d={};N.T=d,wr(e,!1,t,i);try{var h=s(),u=N.S;null!==u&&u(d,h),null!==h&&"object"==typeof h&&"function"==typeof h.then?br(e,t,(r=n,a=[],l={status:"pending",value:null,reason:null,then:function(e){a.push(e)}},h.then((function(){l.status="fulfilled",l.value=r;for(var e=0;e title"))),qd(o,n,i),o[Fe]=e,Ye(o),n=o;break e;case"link":var a=Lh("link","href",s).get(n+(i.href||""));if(a)for(var l=0;l<\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof n.is?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e="string"==typeof n.is?s.createElement(i,{is:n.is}):s.createElement(i)}}e[Fe]=t,e[Be]=n;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)e.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=e;e:switch(qd(e,i,n),i){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ul(t)}}return $l(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==n&&Ul(t);else{if("string"!=typeof n&&null===t.stateNode)throw Error(r(166));if(e=Y.current,is(t)){if(e=t.stateNode,i=t.memoizedProps,n=null,null!==(s=$n))switch(s.tag){case 27:case 5:n=s.memoizedProps}e[Fe]=t,(e=!!(e.nodeValue===i||null!==n&&!0===n.suppressHydrationWarning||Vd(e.nodeValue,i)))||Jn(t)}else(e=Gd(e).createTextNode(n))[Fe]=t,t.stateNode=e}return $l(t),null;case 13:if(n=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(s=is(t),null!==n&&null!==n.dehydrated){if(null===e){if(!s)throw Error(r(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(r(317));s[Fe]=t}else ns(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;$l(t),s=!1}else null!==Yn&&(Rc(Yn),Yn=null),s=!0;if(!s)return 256&t.flags?(Ts(t),t):(Ts(t),null)}if(Ts(t),128&t.flags)return t.lanes=i,t;if(i=null!==n,e=null!==e&&null!==e.memoizedState,i){s=null,null!==(n=t.child).alternate&&null!==n.alternate.memoizedState&&null!==n.alternate.memoizedState.cachePool&&(s=n.alternate.memoizedState.cachePool.pool);var o=null;null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(o=n.memoizedState.cachePool.pool),o!==s&&(n.flags|=2048)}return i!==e&&i&&(t.child.flags|=8192),ql(t,t.updateQueue),$l(t),null;case 4:return J(),null===e&&Md(t.stateNode.containerInfo),$l(t),null;case 10:return va(t.type),$l(t),null;case 19:if(K(Rs),null===(s=t.memoizedState))return $l(t),null;if(n=!!(128&t.flags),null===(o=s.rendering))if(n)Kl(s,!1);else{if(0!==cc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Ps(e))){for(t.flags|=128,Kl(s,!1),e=o.updateQueue,t.updateQueue=e,ql(t,e),t.subtreeFlags=0,e=i,i=t.child;null!==i;)Fl(i,e),i=i.sibling;return $(Rs,1&Rs.current|2),t.child}e=e.sibling}null!==s.tail&&ae()>bc&&(t.flags|=128,n=!0,Kl(s,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=Ps(o))){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ql(t,e),Kl(s,!0),null===s.tail&&"hidden"===s.tailMode&&!o.alternate&&!Qn)return $l(t),null}else 2*ae()-s.renderingStartTime>bc&&536870912!==i&&(t.flags|=128,n=!0,Kl(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=s.last)?e.sibling=o:t.child=o,s.last=o)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ae(),t.sibling=null,e=Rs.current,$(Rs,n?1&e|2:1&e),t):($l(t),null);case 22:case 23:return Ts(t),Ls(),n=null!==t.memoizedState,null!==e?null!==e.memoizedState!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?!!(536870912&i)&&!(128&t.flags)&&($l(t),6&t.subtreeFlags&&(t.flags|=8192)):$l(t),null!==(i=t.updateQueue)&&ql(t,i.retryQueue),i=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(i=e.memoizedState.cachePool.pool),n=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(n=t.memoizedState.cachePool.pool),n!==i&&(t.flags|=2048),null!==e&&K($s),null;case 24:return i=null,null!==e&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),va(Bs),$l(t),null;case 25:return null}throw Error(r(156,t.tag))}function Ql(e,t){switch(Kn(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return va(Bs),J(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return te(t),null;case 13:if(Ts(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));ns()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return K(Rs),null;case 4:return J(),null;case 10:return va(t.type),null;case 22:case 23:return Ts(t),Ls(),null!==e&&K($s),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return va(Bs),null;default:return null}}function Yl(e,t){switch(Kn(t),t.tag){case 3:va(Bs),J();break;case 26:case 27:case 5:te(t);break;case 4:J();break;case 13:Ts(t);break;case 19:K(Rs);break;case 10:va(t.type);break;case 22:case 23:Ts(t),Ls(),null!==e&&K($s);break;case 24:va(Bs)}}var Zl={getCacheForType:function(e){var t=ka(Bs),i=t.data.get(e);return void 0===i&&(i=e(),t.data.set(e,i)),i}},Xl="function"==typeof WeakMap?WeakMap:Map,Jl=0,ec=null,tc=null,ic=0,nc=0,sc=null,oc=!1,rc=!1,ac=!1,lc=0,cc=0,dc=0,hc=0,uc=0,gc=0,pc=0,fc=null,mc=null,_c=!1,vc=0,bc=1/0,wc=null,Cc=null,yc=!1,Sc=null,kc=0,xc=0,Lc=null,Dc=0,Ec=null;function Nc(){return 2&Jl&&0!==ic?ic&-ic:null!==N.T?0!==Us?Us:wd():Ae()}function Ic(){0===gc&&(gc=536870912&ic&&!Qn?536870912:Ee());var e=Ds.current;return null!==e&&(e.flags|=32),gc}function Mc(e,t,i){(e===ec&&2===nc||null!==e.cancelPendingCommit)&&(Wc(e,0),Oc(e,ic,gc,!1)),Me(e,i),2&Jl&&e===ec||(e===ec&&(!(2&Jl)&&(hc|=i),4===cc&&Oc(e,ic,gc,!1)),pd(e))}function Tc(e,t,i){if(6&Jl)throw Error(r(327));for(var n=!i&&!(60&t)&&!(t&e.expiredLanes)||Le(e,t),s=n?function(e,t){var i=Jl;Jl|=2;var n=Vc(),s=zc();ec!==e||ic!==t?(wc=null,bc=ae()+500,Wc(e,t)):rc=Le(e,t);e:for(;;)try{if(0!==nc&&null!==tc){t=tc;var o=sc;t:switch(nc){case 1:nc=0,sc=null,Qc(e,t,o,1);break;case 2:if(ls(o)){nc=0,sc=null,Gc(t);break}t=function(){2===nc&&ec===e&&(nc=7),pd(e)},o.then(t,t);break e;case 3:nc=7;break e;case 4:nc=5;break e;case 7:ls(o)?(nc=0,sc=null,Gc(t)):(nc=0,sc=null,Qc(e,t,o,7));break;case 5:var a=null;switch(tc.tag){case 26:a=tc.memoizedState;case 5:case 27:var l=tc;if(!a||Eh(a)){nc=0,sc=null;var c=l.sibling;if(null!==c)tc=c;else{var d=l.return;null!==d?(tc=d,Yc(d)):tc=null}break t}}nc=0,sc=null,Qc(e,t,o,5);break;case 6:nc=0,sc=null,Qc(e,t,o,6);break;case 8:Bc(),cc=6;break e;default:throw Error(r(462))}}Kc();break}catch(t){Hc(e,t)}return ma=fa=null,N.H=n,N.A=s,Jl=i,null!==tc?0:(ec=null,ic=0,xn(),cc)}(e,t):jc(e,t,!0),o=n;;){if(0===s){rc&&!n&&Oc(e,t,0,!1);break}if(6===s)Oc(e,t,0,!oc);else{if(i=e.current.alternate,o&&!Ac(i)){s=jc(e,t,!1),o=!1;continue}if(2===s){if(o=t,e.errorRecoveryDisabledLanes&o)var a=0;else a=0!=(a=-536870913&e.pendingLanes)?a:536870912&a?536870912:0;if(0!==a){t=a;e:{var l=e;s=fc;var c=l.current.memoizedState.isDehydrated;if(c&&(Wc(l,a).flags|=256),2!==(a=jc(l,a,!1))){if(ac&&!c){l.errorRecoveryDisabledLanes|=o,hc|=o,s=4;break e}o=mc,mc=s,null!==o&&Rc(o)}s=a}if(o=!1,2!==s)continue}}if(1===s){Wc(e,0),Oc(e,t,0,!0);break}e:{switch(n=e,s){case 0:case 1:throw Error(r(345));case 4:if((4194176&t)===t){Oc(n,t,gc,!oc);break e}break;case 2:mc=null;break;case 3:case 5:break;default:throw Error(r(329))}if(n.finishedWork=i,n.finishedLanes=t,(62914560&t)===t&&10<(o=vc+300-ae())){if(Oc(n,t,gc,!oc),0!==xe(n,0))break e;n.timeoutHandle=Jd(Pc.bind(null,n,i,mc,wc,_c,t,gc,hc,pc,oc,2,-0,0),o)}else Pc(n,i,mc,wc,_c,t,gc,hc,pc,oc,0,-0,0)}}break}pd(e)}function Rc(e){null===mc?mc=e:mc.push.apply(mc,e)}function Pc(e,t,i,n,s,o,a,l,c,d,h,u,g){var p=t.subtreeFlags;if((8192&p||!(16785408&~p))&&(Nh={stylesheets:null,count:0,unsuspend:Ih},Dl(t),null!==(t=function(){if(null===Nh)throw Error(r(475));var e=Nh;return e.stylesheets&&0===e.count&&Rh(e,e.stylesheets),0i?32:i,N.T=null,null===Sc)var o=!1;else{i=Lc,Lc=null;var a=Sc,l=kc;if(Sc=null,kc=0,6&Jl)throw Error(r(331));var c=Jl;if(Jl|=4,Il(a.current),yl(a,a.current,l,i),Jl=c,fd(0,!1),_e&&"function"==typeof _e.onPostCommitFiberRoot)try{_e.onPostCommitFiberRoot(me,a)}catch(e){}o=!0}return o}finally{V.p=s,N.T=n,Jc(e,t)}}return!1}function td(e,t,i){t=Rn(i,t),null!==(e=Ma(e,t=Wr(e.stateNode,t,2),2))&&(Me(e,2),pd(e))}function id(e,t,i){if(3===e.tag)td(e,e,i);else for(;null!==t;){if(3===t.tag){td(t,e,i);break}if(1===t.tag){var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===Cc||!Cc.has(n))){e=Rn(i,e),null!==(n=Ma(t,i=Hr(2),2))&&(Vr(i,n,t,e),Me(n,2),pd(n));break}}t=t.return}}function nd(e,t,i){var n=e.pingCache;if(null===n){n=e.pingCache=new Xl;var s=new Set;n.set(t,s)}else void 0===(s=n.get(t))&&(s=new Set,n.set(t,s));s.has(i)||(ac=!0,s.add(i),e=sd.bind(null,e,t,i),t.then(e,e))}function sd(e,t,i){var n=e.pingCache;null!==n&&n.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ec===e&&(ic&i)===i&&(4===cc||3===cc&&(62914560&ic)===ic&&300>ae()-vc?!(2&Jl)&&Wc(e,0):uc|=i,pc===ic&&(pc=0)),pd(e)}function od(e,t){0===t&&(t=Ne()),null!==(e=En(e,t))&&(Me(e,t),pd(e))}function rd(e){var t=e.memoizedState,i=0;null!==t&&(i=t.retryLane),od(e,i)}function ad(e,t){var i=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;null!==s&&(i=s.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==n&&n.delete(t),od(e,i)}var ld=null,cd=null,dd=!1,hd=!1,ud=!1,gd=0;function pd(e){var t;e!==cd&&null===e.next&&(null===cd?ld=cd=e:cd=cd.next=e),hd=!0,dd||(dd=!0,t=md,ih((function(){6&Jl?ne(ce,t):t()})))}function fd(e,t){if(!ud&&hd){ud=!0;do{for(var i=!1,n=ld;null!==n;){if(!t)if(0!==e){var s=n.pendingLanes;if(0===s)var o=0;else{var r=n.suspendedLanes,a=n.pingedLanes;o=(1<<31-be(42|e)+1)-1,o=201326677&(o&=s&~(r&~a))?201326677&o|1:o?2|o:0}0!==o&&(i=!0,bd(n,o))}else o=ic,!(3&(o=xe(n,n===ec?o:0)))||Le(n,o)||(i=!0,bd(n,o));n=n.next}}while(i);ud=!1}}function md(){hd=dd=!1;var e,t=0;0!==gd&&(((e=window.event)&&"popstate"===e.type?e!==Xd&&(Xd=e,!0):(Xd=null,!1))&&(t=gd),gd=0);for(var i=ae(),n=null,s=ld;null!==s;){var o=s.next,r=_d(s,i);0===r?(s.next=null,null===n?ld=o:n.next=o,null===o&&(cd=n)):(n=s,(0!==t||3&r)&&(hd=!0)),s=o}fd(t,!1)}function _d(e,t){for(var i=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=-62914561&e.pendingLanes;0 title"):null)}function Eh(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var Nh=null;function Ih(){}function Mh(){if(this.count--,0===this.count)if(this.stylesheets)Rh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Th=null;function Rh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Th=new Map,t.forEach(Ph,e),Th=null,Mh.call(e))}function Ph(e,t){if(!(4&t.state.loading)){var i=Th.get(e);if(i)var n=i.get(null);else{i=new Map,Th.set(e,i);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oe.priority-t.priority))}e.exports.configure=(e={},t=[],i={})=>{const r={...s,...e};return r.stringMap=function(e){if(!Array.isArray(e))return;let t=!1,i=!1;for(const n of e){if(t&&i)break;"left-right"===n.name?t=!0:"ltr-rtl"===n.name&&(i=!0)}return t||e.push({name:"left-right",priority:100,exclusive:!1,search:["left","Left","LEFT"],replace:["right","Right","RIGHT"],options:{scope:"*",ignoreCase:!1}}),i||e.push({name:"ltr-rtl",priority:100,exclusive:!1,search:["ltr","Ltr","LTR"],replace:["rtl","Rtl","RTL"],options:{scope:"*",ignoreCase:!1}}),o(e)}(r.stringMap),r.plugins=function(e){const t=[];return e&&e.some((e=>"rtlcss"===e.name))||t.push(n),o([...t,...e])}(t),r.hooks=function(e){const t={pre(){},post(){}};return"function"==typeof e.pre&&(t.pre=e.pre),"function"==typeof e.post&&(t.post=e.post),t}(i),r}},52517:function(e){"use strict";e.exports=e=>{const t=e.text.match(/^\s*!?\s*rtl:/);if(!t)return;let i=e.text.slice(t[0].length),n=i.indexOf(":");const s={source:e,name:"",param:"",begin:!0,end:!0,blacklist:!1,preserve:!1};return-1!==n?(s.name=i.slice(0,n),s.begin="end"!==s.name,s.end="begin"!==s.name,"begin"===s.name||"end"===s.name?(i=i.slice(s.name.length+1),n=i.indexOf(":"),-1!==n?(s.name=i.slice(0,n),s.param=i.slice(n+1)):s.name=i):s.param=i.slice(n+1)):s.name=i,s}},38685:function(module,__unused_webpack_exports,__webpack_require__){"use strict";const config=__webpack_require__(72740),util=__webpack_require__(35946);module.exports={name:"rtlcss",priority:100,directives:{control:{ignore:{expect:{atrule:!0,comment:!0,decl:!0,rule:!0},endNode:null,begin(e,t,i){if(null===this.endNode&&t.begin&&t.end){let t=e;for(;t&&t.nodes;)t=t.nodes[t.nodes.length-1];this.endNode=t}return"comment"!==e.type||!/^\s*!?\s*rtl:end:ignore/.test(e.text)},end(e,t,i){return!!(t.begin!==t.end&&"comment"===e.type||t.begin&&t.end&&e===this.endNode)&&(this.endNode=null,!0)}},rename:{expect:{rule:!0},begin(e,t,i){return e.selector=i.util.applyStringMap(e.selector,!1),!1},end(e,t){return!0}},raw:{expect:{self:!0},begin(e,t,i){const n=i.postcss.parse(t.param,{from:e.source.input.from});return n.walk((e=>{e[i.symbol]=!0})),e.parent.insertBefore(e,n),!0},end(e,t){return!0}},remove:{expect:{atrule:!0,rule:!0,decl:!0},begin(e,t,i){let n=!1;switch(e.type){case"atrule":case"rule":case"decl":n=!0,e.remove()}return n},end(e,t,i){return!0}},options:{expect:{self:!0},stack:[],begin(e,t,i){let n;this.stack.push(util.extend({},i.config));try{n=JSON.parse(t.param)}catch(t){throw e.error("Invalid options object",{details:t})}return i.config=config.configure(n,i.config.plugins),i.util=util.configure(i.config),!0},end(e,t,i){const n=this.stack.pop();return n&&!t.begin&&(i.config=n,i.util=util.configure(i.config)),!0}},config:{expect:{self:!0},stack:[],begin(node,metadata,context){let configuration;this.stack.push(util.extend({},context.config));try{configuration=eval(`(${metadata.param})`)}catch(e){throw node.error("Invalid config object",{details:e})}return context.config=config.configure(configuration.options,configuration.plugins),context.util=util.configure(context.config),!0},end(e,t,i){const n=this.stack.pop();return n&&!t.begin&&(i.config=n,i.util=util.configure(i.config)),!0}}},value:[{name:"ignore",action(e,t,i){return!0}},{name:"prepend",action(e,t,i){let n="";const s=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${s?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>{n+=t})),e.value=s?e.raws.value.raw=n+e.raws.value.raw:n+e.value,!0}},{name:"append",action(e,t,i){let n="";const s=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${s?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>{n=t+n})),e.value=s?e.raws.value.raw+=n:e.value+n,!0}},{name:"insert",action(e,t,i){const n=e.raws.value&&e.raws.value.raw,s=`${e.raws.between.substr(1).trim()}${n?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>t+e));return e.value=n?e.raws.value.raw=s:s,!0}},{name:"",action(e,t,i){const n=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${n?e.raws.value.raw:""}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((t,i)=>{e.value=n?e.raws.value.raw=i+t:i})),!0}}]},processors:[{name:"variable",expr:/^--/im,action(e,t){return{prop:e,value:t}}},{name:"direction",expr:/direction/im,action(e,t,i){return{prop:e,value:i.util.swapLtrRtl(t)}}},{name:"left",expr:/left/im,action(e,t,i){return{prop:e.replace(this.expr,"right"),value:t}}},{name:"right",expr:/right/im,action(e,t,i){return{prop:e.replace(this.expr,"left"),value:t}}},{name:"four-value syntax",expr:/^(margin|padding|border-(color|style|width))$/gi,cache:null,action(e,t,i){null===this.cache&&(this.cache={match:/[^\s\uFFFD]+/g});const n=i.util.guardFunctions(t),s=n.value.match(this.cache.match);if(s&&4===s.length&&(n.store.length>0||s[1]!==s[3])){let e=0;n.value=n.value.replace(this.cache.match,(()=>s[(4-e++)%4]))}return{prop:e,value:i.util.unguardFunctions(n)}}},{name:"border radius",expr:/border-radius/gi,cache:null,flip(e){const t=e.match(this.cache.match);if(!t)return e;let i;switch(t.length){case 2:i=1,t[0]!==t[1]&&(e=e.replace(this.cache.match,(()=>t[i--])));break;case 3:e=e.replace(this.cache.white,(e=>`${e+t[1]} `));break;case 4:i=0,t[0]===t[1]&&t[2]===t[3]||(e=e.replace(this.cache.match,(()=>t[(5-i++)%4])))}return e},action(e,t,i){null===this.cache&&(this.cache={match:/[^\s\uFFFD]+/g,slash:/[^/]+/g,white:/(^\s*)/});const n=i.util.guardFunctions(t);return n.value=n.value.replace(this.cache.slash,(e=>this.flip(e))),{prop:e,value:i.util.unguardFunctions(n)}}},{name:"shadow",expr:/shadow/gi,cache:null,action(e,t,i){null===this.cache&&(this.cache={replace:/[^,]+/g});const n=i.util.guardHexColors(t),s=i.util.guardFunctions(n.value);return s.value=s.value.replace(this.cache.replace,(e=>i.util.negate(e))),n.value=i.util.unguardFunctions(s),{prop:e,value:i.util.unguardHexColors(n)}}},{name:"transform and perspective origin",expr:/(?:transform|perspective)-origin/gi,cache:null,flip(e,t){return"0"===e?e="100%":e.match(this.cache.percent)?e=t.util.complement(e):e.match(this.cache.length)&&(e=t.util.flipLength(e)),e},action(e,t,i){if(null===this.cache&&(this.cache={match:i.util.regex(["func","percent","length"],"g"),percent:i.util.regex(["func","percent"],"i"),length:i.util.regex(["length"],"gi"),xKeyword:/(left|right|center)/i}),t.match(this.cache.xKeyword))t=i.util.swapLeftRight(t);else{const e=i.util.guardFunctions(t),n=e.value.match(this.cache.match);n&&n.length>0&&(n[0]=this.flip(n[0],i),e.value=e.value.replace(this.cache.match,(()=>n.shift())),t=i.util.unguardFunctions(e))}return{prop:e,value:t}}},{name:"transform",expr:/^(?!text-).*?transform$/gi,cache:null,flip(e,t,i){let n=0;return e.replace(this.cache.unit,(e=>t(++n,e)))},flipMatrix(e,t){return this.flip(e,((e,i)=>2===e||3===e||5===e?t.util.negate(i):i),t)},flipMatrix3D(e,t){return this.flip(e,((e,i)=>2===e||4===e||5===e||13===e?t.util.negate(i):i),t)},flipRotate3D(e,t){return this.flip(e,((e,i)=>1===e||4===e?t.util.negate(i):i),t)},action(e,t,i){null===this.cache&&(this.cache={negatable:/((translate)(x|3d)?|rotate(z|y)?)$/gi,unit:i.util.regex(["func","number"],"g"),matrix:/matrix$/i,matrix3D:/matrix3d$/i,skewXY:/skew(x|y)?$/i,rotate3D:/rotate3d$/i});const n=i.util.guardFunctions(t);return{prop:e,value:i.util.unguardFunctions(n,((e,t)=>(0===t.length||(t.match(this.cache.matrix3D)?e=this.flipMatrix3D(e,i):t.match(this.cache.matrix)?e=this.flipMatrix(e,i):t.match(this.cache.rotate3D)?e=this.flipRotate3D(e,i):t.match(this.cache.skewXY)?e=i.util.negateAll(e):t.match(this.cache.negatable)&&(e=i.util.negate(e))),e)))}}},{name:"transition",expr:/transition(-property)?$/i,action(e,t,i){return{prop:e,value:i.util.swapLeftRight(t)}}},{name:"background",expr:/(background|object)(-position(-x)?|-image)?$/i,cache:null,flip(e,t,i){const n=util.saveTokens(e,!0),s=n.value.match(this.cache.match);if(!s||0===s.length)return util.restoreTokens(n);const o=(n.value.match(this.cache.position)||"").length;return s.length>=3||2===o?n.value=util.swapLeftRight(n.value):("0"===s[0]?s[0]="100%":s[0].match(this.cache.percent)?s[0]=t.util.complement(s[0]):s[0].match(this.cache.length)?i?s[0]=t.util.flipLength(s[0]):1===s.length?s[0]=`right ${s[0]} top 50%`:o||2!==s.length||(s[0]=`right ${s[0]}`,s[1]=`top ${s[1]}`):s[0]=t.util.swapLeftRight(s[0]),n.value=n.value.replace(this.cache.match,(()=>s.shift()))),util.restoreTokens(n)},update(e,t,i){return i.match(this.cache.gradient)?(t=e.util.swapLeftRight(t)).match(this.cache.angle)&&(t=e.util.negate(t)):!0!==e.config.processUrls&&!0!==e.config.processUrls.decl||!i.match(this.cache.url)||(t=e.util.applyStringMap(t,!0)),t},action(e,t,i){null===this.cache&&(this.cache={match:i.util.regex(["position","percent","length","calc"],"ig"),percent:i.util.regex(["func","percent"],"i"),position:i.util.regex(["position"],"g"),length:i.util.regex(["length"],"gi"),gradient:/gradient$/i,angle:/\d+(deg|g?rad|turn)/i,url:/^url/i});const n=i.util.guardHexColors(t),s=i.util.guardFunctions(n.value),o=s.value.split(","),r=e.toLowerCase();if("background-image"!==r)for(let e=0;ee.replace(t,t.replace(this.cache.e,"*").replace(this.cache.w,"e").replace(this.cache.star,"w"))))},action(e,t,i){null===this.cache&&(this.cache={replace:/\b(ne|nw|se|sw|nesw|nwse)-resize/gi,url:/^url/i,e:/e/i,w:/w/i,star:/\*/i});const n=i.util.guardFunctions(t);return n.value=n.value.split(",").map((e=>this.flip(e))).join(","),{prop:e,value:i.util.unguardFunctions(n,this.update.bind(this,i))}}}]}},32535:function(e,t,i){"use strict";const n=i(15571),s=i(94817),o=i(72740),r=i(35946);e.exports=(e,t,i)=>{const a=Symbol("processed"),l=o.configure(e,t,i),c={postcss:n,config:l,util:r.configure(l),symbol:a};let d=0;const h={};function u(e,t){if(e[a])return!1;let i=!1;return s.walk((t=>{!t.metadata.blacklist&&t.directive.expect[e.type]&&(t.directive.begin(e,t.metadata,c)&&(i=!0),t.metadata.end&&t.directive.end(e,t.metadata,c)&&s.pop(t))})),e[a]=!0,!i}return{postcssPlugin:"rtlcss",Once(e){c.config.hooks.pre(e,n),u(e)},Rule(e){u(e)&&(d=0)},AtRule(e){!u(e)||!0!==c.config.processUrls&&!0!==c.config.processUrls.atrule||(e.params=c.util.applyStringMap(e.params,!0))},Comment(e,{result:t}){u(e)&&s.parse(e,t,(i=>{let n=!0;return null===i.directive&&(i.preserve=!c.config.clean,c.util.each(c.config.plugins,(e=>{const s=c.config.blacklist[e.name];return s&&!0===s[i.metadata.name]?(i.metadata.blacklist=!0,i.metadata.end&&(n=!1),i.metadata.begin&&t.warn(`directive "${e.name}.${i.metadata.name}" is blacklisted.`,{node:i.source}),!1):(i.directive=e.directives.control[i.metadata.name],!i.directive&&void 0)}))),i.directive?!i.metadata.begin&&i.metadata.end?(i.directive.end(e,i.metadata,c)&&s.pop(i),n=!1):i.directive.expect.self&&i.directive.begin(e,i.metadata,c)&&i.metadata.end&&i.directive.end(e,i.metadata,c)&&(n=!1):i.metadata.blacklist||(n=!1,t.warn(`unsupported directive "${i.metadata.name}".`,{node:i.source})),n}))},Declaration(e,{result:t}){if(!u(e))return;if(!c.util.each(c.config.plugins,(t=>c.util.each(t.directives.value,(t=>{const i=e.raws.value&&e.raws.value.raw,n=c.util.regexDirective(t.name);if(n.test(`${e.raws.between}${i?e.raws.value.raw:e.value}${e.important&&e.raws.important?e.raws.important:""}`)&&(n.lastIndex=0,t.action(e,n,c)))return c.config.clean&&(e.raws.between=c.util.trimDirective(e.raws.between),e.important&&e.raws.important&&(e.raws.important=c.util.trimDirective(e.raws.important)),e.value=i?e.raws.value.raw=c.util.trimDirective(e.raws.value.raw):c.util.trimDirective(e.value)),d++,!1})))))return;if(c.util.each(c.config.plugins,(t=>c.util.each(t.processors,(t=>{const i=c.config.aliases[e.prop];if((i||e.prop).match(t.expr)){const n=e.raws.value&&e.raws.value.raw?e.raws.value.raw:e.value,s=c.util.saveComments(n);c.config.processEnv&&(s.value=c.util.swap(s.value,"safe-area-inset-left","safe-area-inset-right",{ignoreCase:!1}));const o=t.action(e.prop,s.value,c);return s.value=o.value,o.value=c.util.restoreComments(s),(!i&&o.prop!==e.prop||o.value!==n)&&(d++,e.prop=o.prop,e.value=o.value),!1}})))),!c.config.autoRename||d||"rule"!==e.parent.type||!c.util.isLastOfType(e))return;const i=c.util.applyStringMap(e.parent.selector);if(!0===c.config.autoRenameStrict){const t=h[i];t?(t.selector=e.parent.selector,e.parent.selector=i):h[e.parent.selector]=e.parent}else e.parent.selector=i},OnceExit(e,{result:t}){s.walk((e=>{t.warn(`unclosed directive "${e.metadata.name}".`,{node:e.source})}));for(const e of Object.values(h))t.warn("renaming skipped due to lack of a matching pair.",{node:e});c.config.hooks.post(e,n)}}},e.exports.postcss=!0,e.exports.process=function(e,t,i,s){return n([this(t,i,s)]).process(e).css},e.exports.configure=function(e={}){return n([this(e.options,e.plugins,e.hooks)])}},94817:function(e,t,i){"use strict";const n=i(52517);e.exports={stack:[],pop(e){const t=this.stack.indexOf(e);-1!==t&&this.stack.splice(t,1),e.preserve||e.source.remove()},parse(e,t,i){const s=n(e);if(!s)return;let o;!s.begin&&s.end?this.walk((t=>{if(s.name===t.metadata.name)return this.pop(t),o={metadata:s,directive:t.directive,source:e,preserve:t.preserve},!1})):o={metadata:s,directive:null,source:e,preserve:null},void 0===o?t.warn(`found end "${s.name}" without a matching begin.`,{node:e}):i(o)?this.stack.push(o):o.preserve||o.source.remove()},walk(e){let t=this.stack.length;for(;--t>-1&&e(this.stack[t]););}}},35946:function(e){"use strict";let t,i=0;const n=new RegExp("�","ig"),s=new RegExp("¤","ig"),o="\\-?(\\d*?\\.\\d+|\\d+)",r="(calc¤)|("+o+")(?!d\\()",a="«\\d+:\\d+»",l=/\/\*[^]*?\*\//gim,c=/\/\*\s*!?\s*rtl:[^]*?\*\//gim,d=/[.*+?^${}()|[\]\\]/g,h=/\([^()]+\)/i,u=/#[a-f0-9]{3,8}/gi,g=/calc/,p=new RegExp(a,"ig"),f=new RegExp("\\w*?«\\d+:\\d+»","ig"),m=new RegExp(r,"i"),_=new RegExp(r,"ig"),v=new RegExp(r,"i"),b={scope:"*",ignoreCase:!0};function w(e){return e.replace(d,"\\$&")}e.exports={extend(e,t){void 0!==e&&"object"==typeof e||(e={});for(const i in t)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=t[i]);return e},swap(e,i,n,s=b){let o=`${w(i)}|${w(n)}`;(Object.prototype.hasOwnProperty.call(s,"greedy")?s.greedy:t.greedy)||(o=`\\b(${o})\\b`);const r=s.ignoreCase?"img":"mg";return e.replace(new RegExp(o,r),(e=>{return t=e,o=i,(s.ignoreCase?t.toLowerCase()===o.toLowerCase():t===o)?n:i;var t,o}))},swapLeftRight(e){return this.swap(e,"left","right")},swapLtrRtl(e){return this.swap(e,"ltr","rtl")},applyStringMap(e,i){let n=e;for(const e of t.stringMap){const t=this.extend(e.options,b);if("*"===t.scope||i&&"url"===t.scope||!i&&"selector"===t.scope){if(Array.isArray(e.search)&&Array.isArray(e.replace))for(let i=0;is.test(e)?e.replace(s,(e=>"(-1*"+e+")")):-1*Number.parseFloat(e))),this.restoreTokens(t)},negateAll(e){const t=this.saveTokens(e);return t.value=t.value.replace(_,(e=>s.test(e)?e.replace(s,(e=>"(-1*"+e+")")):-1*Number.parseFloat(e))),this.restoreTokens(t)},complement(e){const t=this.saveTokens(e);return t.value=t.value.replace(m,(e=>s.test(e)?e.replace(s,(e=>"(100% - "+e+")")):100-Number.parseFloat(e))),this.restoreTokens(t)},flipLength(e){return t.useCalc?`calc(100% - ${e})`:e},save(e,t,i,n,s){const o={value:t,store:[],replacement:i,restorer:n};return o.value=o.value.replace(e,(e=>s&&s.test(e)?e:(o.store.push(e),o.replacement))),o},restore(e){let t=0;const i=e.value.replace(e.restorer,(()=>e.store[t++]));return e.store.length=0,i},saveComments(e){return this.save(l,e,"�",n)},restoreComments(e){return this.restore(e)},saveTokens(e,t){return!0===t?this.save(f,e,"¤",s,g):this.save(p,e,"¤",s)},restoreTokens(e){return this.restore(e)},guard(e,t){const n={value:t,store:[],offset:i++,token:"«"+i};for(;e.test(n.value);)n.value=n.value.replace(e,(e=>(n.store.push(e),`${n.token}:${n.store.length}»`)));return n},unguard(e,t){const i=new RegExp("(\\w*?)"+e.token+":(\\d+)»","i");for(;i.test(e.value);)e.value=e.value.replace(i,((i,n,s)=>{const o=e.store[s-1];return"function"==typeof t?n+t(o,n):n+o}));return e.value},guardHexColors(e){return this.guard(u,e)},unguardHexColors(e,t){return this.unguard(e,t)},guardFunctions(e){return this.guard(h,e)},unguardFunctions(e,t){return this.unguard(e,t)},trimDirective(e){return e.replace(c,"")},regexCache:{},regexDirective(e){return this.regexCache[e]=this.regexCache[e]||new RegExp("(?:\\/\\*\\s*(?:!)?\\s*rtl:"+(e?w(e)+"(?::)?":"")+")([^]*?)(?:\\*\\/)","img"),this.regexCache[e]},regex(e,t){let i="";for(const t of e)switch(t){case"percent":i+=`|(${o}%)`;break;case"length":i+=`|(${o})(?:ex|ch|r?em|vh|vw|vmin|vmax|px|mm|cm|in|pt|pc)?`;break;case"number":i+=`|(${o})`;break;case"position":i+="|(left|center|right|top|bottom)";break;case"calc":i+=`|(calc${a})`;break;case"func":i+=`|(\\w+${a})`}return new RegExp(i.slice(1),t)},isLastOfType(e){let t=!0,i=e.next();for(;i;){if(i.type===e.type){t=!1;break}i=i.next()}return t},each(e,t){return!e.some((e=>!1===t(e)))}},e.exports.configure=function(e){return t=e,this}},42231:function(e,t){"use strict";function i(e,t){var i=e.length;e.push(t);e:for(;0>>1,s=e[n];if(!(0>>1;no(l,i))co(d,l)?(e[n]=d,e[c]=i,n=c):(e[n]=l,e[a]=i,n=a);else{if(!(co(d,i)))break e;e[n]=d,e[c]=i,n=c}}}return t}function o(e,t){var i=e.sortIndex-t.sortIndex;return 0!==i?i:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var r=performance;t.unstable_now=function(){return r.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],d=[],h=1,u=null,g=3,p=!1,f=!1,m=!1,_="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=n(d);null!==t;){if(null===t.callback)s(d);else{if(!(t.startTime<=e))break;s(d),t.sortIndex=t.expirationTime,i(c,t)}t=n(d)}}function C(e){if(m=!1,w(e),!f)if(null!==n(c))f=!0,M();else{var t=n(d);null!==t&&T(C,t.startTime-e)}}var y,S=!1,k=-1,x=5,L=-1;function D(){return!(t.unstable_now()-Le&&D());){var r=u.callback;if("function"==typeof r){u.callback=null,g=u.priorityLevel;var a=r(u.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof a){u.callback=a,w(e),i=!0;break t}u===n(c)&&s(c),w(e)}else s(c);u=n(c)}if(null!==u)i=!0;else{var l=n(d);null!==l&&T(C,l.startTime-e),i=!1}}break e}finally{u=null,g=o,p=!1}i=void 0}}finally{i?y():S=!1}}}if("function"==typeof b)y=function(){b(E)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,I=N.port2;N.port1.onmessage=E,y=function(){I.postMessage(null)}}else y=function(){_(E,0)};function M(){S||(S=!0,y())}function T(e,i){k=_((function(){e(t.unstable_now())}),i)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||p||(f=!0,M())},t.unstable_forceFrameRate=function(e){0>e||125r?(e.sortIndex=o,i(d,e),null===n(c)&&e===n(d)&&(m?(v(k),k=-1):m=!0,T(C,o-r))):(e.sortIndex=a,i(c,e),f||p||(f=!0,M())),e},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(e){var t=g;return function(){var i=g;g=t;try{return e.apply(this,arguments)}finally{g=i}}}},23556:function(e,t,i){"use strict";e.exports=i(42231)},30078:function(){},21917:function(){},85833:function(){},85598:function(){},58119:function(){},97500:function(e,t){var i;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e="",t=0;t{let t="",i=0|e;for(;i--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(i=t)=>{let n="",s=0|i;for(;s--;)n+=e[Math.random()*e.length|0];return n}}}},__webpack_module_cache__={},inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](i,i.exports,__webpack_require__),i.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(t,i){return __webpack_require__.f[i](e,t),t}),[]))},__webpack_require__.u=function(e){return"scripts/"+e+".index.js"},__webpack_require__.miniCssF=function(e){},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},inProgress={},dataWebpackPrefix="postcss-rtlcss-playground:",__webpack_require__.l=function(e,t,i,n){if(inProgress[e])inProgress[e].push(t);else{var s,o;if(void 0!==i)for(var r=document.getElementsByTagName("script"),a=0;a-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e+"../"}(),function(){var e={8792:0};__webpack_require__.f.j=function(t,i){var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var s=new Promise((function(i,s){n=e[t]=[i,s]}));i.push(n[2]=s);var o=__webpack_require__.p+__webpack_require__.u(t),r=new Error;__webpack_require__.l(o,(function(i){if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var s=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;r.message="Loading chunk "+t+" failed.\n("+s+": "+o+")",r.name="ChunkLoadError",r.type=s,r.request=o,n[1](r)}}),"chunk-"+t,t)}};var t=function(t,i){var n,s,o=i[0],r=i[1],a=i[2],l=0;if(o.some((function(t){return 0!==e[t]}))){for(n in r)__webpack_require__.o(r,n)&&(__webpack_require__.m[n]=r[n]);a&&a(__webpack_require__)}for(t&&t(i);l{const t={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}};if(e){const i=Object.entries(e).map((e=>{let[t,i]=e;return`${t}=${encodeURIComponent(i)}`})).join("&");t.body=i}return new Promise(((e,i)=>{fetch("https://xprimiendo.com/snippet",t).then((t=>{t.ok?t.json().then((t=>e(t))):t.text().then((e=>i(e)))})).catch((()=>{i(null)}))}))},n=()=>{const e=window.innerHeight,t=window.innerWidth,i=t<576;return{windowHeight:e,windowWidth:t,panelHeight:i?(e-150)/2:e-120,panelWidth:i?t-10:Math.floor((t-30)/2),isSmallScreen:i}},s={},o=n(),r=(0,e.createContext)({}),a=t=>{let a;const[l,c]=(0,e.useState)(null),[d,h]=(0,e.useState)(s),[u,g]=(0,e.useState)(o),[p,f]=(0,e.useState)(!1),{canShare:m,ready:_,token:v,fetchCode:b,fetchOptions:w,share:C}=(()=>{const[t,n]=(0,e.useState)(null),[s,o]=(0,e.useState)(null),[r,a]=(0,e.useState)(null),[l,c]=(0,e.useState)(null),[d,h]=(0,e.useState)(!1),u=(0,e.useMemo)((()=>{const e="undefined",t="function";return typeof window!==e&&typeof window.fetch===t&&typeof window.location!==e&&typeof window.history!==e&&typeof navigator!==e&&typeof navigator.clipboard!==e&&typeof navigator.clipboard.writeText===t}),[]),g=(0,e.useCallback)(((e,t)=>{s&&((e,t,n)=>new Promise(((s,o)=>{i({code:e,options:t,token:n}).then((e=>{e.success&&e.id?s(e.id):o()})).catch((()=>{console.log("Error sharing code")}))})))(e,t,s).then((e=>{history.replaceState("","",`#${e}`),navigator.clipboard&&navigator.clipboard.writeText(window.location.href)})).catch((()=>{o(null)}))}),[s]);return(0,e.useEffect)((()=>{s?"undefined"!=typeof window&&window.location&&window.location.hash?n(window.location.hash.slice(1)):h(!0):new Promise(((e,t)=>{i().then((i=>{i.success&&i.token?e(i.token):t()})).catch((()=>t()))})).then((e=>{o(e)})).catch((()=>h(!0)))}),[s]),(0,e.useEffect)((()=>{t&&s&&i({id:t,token:s}).then((e=>{if(e.success&&e.code&&(a(e.code),e.options))try{const t=JSON.parse(e.options);c(t)}catch{console.error("Wrong options retrieved")}h(!0)})).catch((()=>h(!0)))}),[t,s]),{canShare:u,token:s,fetchCode:r,fetchOptions:l,ready:d,share:g}})();(0,e.useEffect)((()=>(window.removeEventListener("resize",y),window.addEventListener("resize",y),()=>{window.removeEventListener("resize",y)})),[]);const y=()=>{a&&window.clearTimeout(a),a=window.setTimeout((()=>{const e=n();g(e)}),100)},S={canShare:m,ready:_,token:v,fetchCode:b,fetchOptions:w,code:l,options:d,optionsOpen:p,setCode:c,share:C,setOptions:h,setOptionsOpen:f,changeOptionsMode:e=>h({...d,mode:e}),changeOptionsSource:e=>h({...d,source:e}),changeOptionsSafeBothPrefix:e=>h({...d,safeBothPrefix:e}),changeOptionsIgnorePrefixedRules:e=>h({...d,ignorePrefixedRules:e}),changeOptionsProcessUrls:e=>h({...d,processUrls:e}),changeOptionsProcessRuleNames:e=>h({...d,processRuleNames:e}),changeOptionsProcessKeyframes:e=>h({...d,processKeyFrames:e}),changeOptionsProcessEnv:e=>h({...d,processEnv:e}),changeOptionsUseCalc:e=>h({...d,useCalc:e}),changeOptionsGreedy:e=>h({...d,greedy:e}),windowSizes:u};return e.createElement(r.Provider,{value:S},t.children)},l=()=>(0,e.useContext)(r),c=()=>{const{optionsOpen:t,setOptionsOpen:i}=l();return e.createElement("div",{className:"MKhy6uqH0Of5Tc0IZMDN","data-opened":t},e.createElement("div",{className:"kB1goqcZZcf_dhFwJA51",onClick:()=>i(!t)},e.createElement("div",{className:"QVnHeWJl_G9LJ7iBTK4y"})))},d=t=>{const{color:i="#FFF",size:n=30}=t;return e.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 30 30",height:n,width:n},e.createElement("path",{fill:i,d:"M24.6,0c-3,0-5.4,2.4-5.4,5.4c0,0.1,0,0.3,0,0.4l-10,4.7C8.2,9.6,6.9,9,5.4,9C2.4,9,0,11.4,0,14.4c0,3,2.4,5.4,5.4,5.4 c0.9,0,1.8-0.2,2.6-0.7l4.3,3.7c-0.2,0.6-0.3,1.1-0.3,1.8c0,3,2.4,5.4,5.4,5.4c3,0,5.4-2.4,5.4-5.4s-2.4-5.4-5.4-5.4 c-0.9,0-1.8,0.2-2.6,0.7l-4.3-3.7c0.2-0.6,0.3-1.1,0.3-1.8c0-0.1,0-0.2,0-0.4l10-4.7c1,0.9,2.3,1.5,3.7,1.5c3,0,5.4-2.4,5.4-5.4 S27.6,0,24.6,0z"}))},h='.test1, .test2 {\n background: url("/folder/subfolder/icons/ltr/chevron-left.png");\n background-color: #FFF;\n background-position: 10px 20px;\n border-radius: 0 2px 0 8px;\n color: #666;\n padding-right: 20px;\n text-align: left;\n transform: translate(-50%, 50%);\n width: 100%;\n}\n\n.test3:hover,\n.test4:active {\n font-family: Arial, Helvetica /*rtl:prepend:"Droid Arabic Kufi", */;\n font-size: 20px /*rtl:30px*/;\n color: \'#FFF\' /*rtl:#000*/;\n transform: translateY(10px) /*rtl:append:scaleX(-1)*/;\n padding: 10px /*rtl:insert:20px*/;\n}\n\n/*rtl:begin:ignore*/\n#test5, #test6 {\n left: 10px;\n position: relative;\n text-align: right;\n}\n\n.test7 .test8 span {\n border-left-color: #777;\n margin: 10px 20px 30px 40px;\n transform: translate(100%, 10%);\n}\n/*rtl:end:ignore*/\n\n.test9 {\n animation: 5s flip 1s ease-in-out,\n 3s my-animation 6s ease-in-out;\n font-size: 10px;\n padding: 10px 20px 40px 10px;\n}\n\n@keyframes flip {\n from {\n transform: translateX(100px);\n }\n to {\n transform: translateX(0);\n }\n}\n\n@keyframes my-animation {\n from {\n left: 0%;\n }\n to {\n left: 100%;\n }\n}\n\n.test10-ltr {\n color: #000;\n width: 100%;\n}\n\n.test11-left::before {\n background-image: url("/icons/icon-l.png");\n}\n\n.test11-right::before {\n background-image: url("/icons/icon-r.png");\n}\n\n.testleft12 {\n content: "\\f007";\n}\n\n.testright12 {\n content: "\\f010";\n}\n\n.testltr13 {\n content: "keyboard_arrow_left";\n}\n\n.testrtl13 {\n content: "keyboard_arrow_right";\n}\n\n.test14 {\n .test14-ltr {\n content: "left content";\n }\n .test14-rtl {\n content: "right content";\n }\n}\n\n.test15 {\n color: #EFEFEF;\n left: 10px;\n /*rtl:raw:\n height: 50px;\n width: 100px;*/\n}\n \n/*rtl:raw:.test16 {\n color: #EFEFEF;\n left: 10px;\n width: 100%; \n}\n \n.test17 {\n transform: translate(10px, 20px);\n}\n*/\n\n.test18 {\n left: 10px;\n &.test19 {\n color: black;\n margin-left: 20px;\n }\n &.test20 {\n padding: 5px;\n span {\n text-align: left;\n }\n }\n}\n\n/*rtl:source:rtl*/\n.test19 {\n left: 10px;\n text-align: left;\n width: 50%;\n}\n\n.test20[dir="ltr"] {\n text-align: left;\n}\n\n.test20[dir="rtl"] {\n text-align: right;\n}\n\n.test21 {\n padding:\n env(safe-area-inset-top, 10px)\n env(safe-area-inset-right, 20px)\n env(safe-area-inset-bottom, 30px)\n env(safe-area-inset-left, 40px)\n ;\n}\n\n.test22 {\n /*rtl:urls*/\n background: url("/folder/icons/icon-ltr.png");\n margin-right: env(safe-area-inset-right, 10px);\n margin-left: env(safe-area-inset-left, 20px);\n}\n',u=()=>{const{canShare:t,token:i,share:n,code:s,options:o}=l(),r=(0,e.useCallback)((()=>{const e=JSON.stringify(o);n(s,e)}),[n,s,o]),a=t&&i&&s&&s!==h;return e.createElement("header",{className:"S898CJNNo9cb_xQn4FBI"},e.createElement("div",{className:"AQj0qjGusBKgpXIQViBm"},e.createElement("span",null,"{"," "),e.createElement("h1",{className:"X77jCI7sgjXhRwLBzrnp"},"PostCSS-RTLCSS online"),e.createElement("span",null," ","}")),e.createElement("div",{className:"dryWkrIcVdcnYq0GDkpH"},a&&e.createElement("button",{className:"IecoVAa_Qe9dqaN_PYMF",onClick:r},e.createElement(d,{size:20}))))};var g,p,f;function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{labels:i,checkbox:n=!0,attributes:s={},onChange:o}=t,{checked:r,...a}=s,[l,c]=(0,e.useState)(!!r),d="string"==typeof i?i:l?i[1]:i[0];return(0,e.useEffect)((()=>{c(!!r)}),[r]),e.createElement("label",{className:"zeQpT5nNQMf0kYt2lzbr"},e.createElement("input",m({type:n?"checkbox":"radio",className:"t3qyo0zGhoQ5RB_jPHeS",checked:l,onChange:e=>{const t=e.currentTarget.checked;c(t),o&&o(t)},"aria-checked":l},a)),e.createElement("div",{className:"GGyqZ8P4uPCx1FpPyNAN","data-checked":l}),e.createElement("span",{className:"D0Oh8xQ8a0cfpmDAHJpy"},d))};var v=__webpack_require__(97500),b=__webpack_require__.n(v);function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{label:i,name:n,values:s,horizontal:o=!0,attributes:r={},active:a,onChange:l}=t,[c,d]=(0,e.useState)(s[0]);(0,e.useEffect)((()=>{a&&d(a)}),[a]);const h=e=>{const t=e.currentTarget.value;d(t),l&&l(t)};return e.createElement("div",{className:"eVPAZqC4UdLE8mRba0fK"},e.createElement("span",{className:"RaSPIpBxqh2TgPf7jz5e"},i),e.createElement("div",{className:b()("iitlcU1_uTWihXnHWTdq",!o&&"dxpfGhcCsrV4Hqe58aCc")},s.map((t=>{const i=t===c;return e.createElement("div",{key:t,className:b()("DmjZFD2uQPpsnMQ8V8Vx",i&&"_IF0tYvKUzNJVB0X_ybI")},e.createElement("input",w({id:t,type:"radio",name:n,value:t,checked:i,onChange:h},r)),e.createElement("label",{htmlFor:t},t))}))))},y=e=>"boolean"==typeof e;var S="SPTLFg5XT6cLQ90JDCvW";const k=()=>{const{setOptions:t,optionsOpen:i,changeOptionsMode:n,changeOptionsSource:s,changeOptionsSafeBothPrefix:o,changeOptionsIgnorePrefixedRules:r,changeOptionsProcessUrls:a,changeOptionsProcessRuleNames:c,changeOptionsProcessKeyframes:d,changeOptionsProcessEnv:h,changeOptionsUseCalc:u,changeOptionsGreedy:f,fetchOptions:m}=l();return(0,e.useEffect)((()=>{m&&t(m)}),[m]),e.createElement("div",{className:"vBA5t8Ic4h9Y4UVUvt9n","data-opened":i},e.createElement("div",{className:"ZhutTa37RqfOGMsLQJxO"},"Options"),e.createElement("div",{className:"EGp4ZY1m59c2fBaAtoAp"},e.createElement("div",{className:S},e.createElement(C,{label:"Mode",name:"mode",values:["combined","override","diff"],onChange:e=>{n("combined"===e?g.combined:"override"===e?g.override:g.diff)},active:m?.mode||"combined"})),e.createElement("div",{className:S},e.createElement(_,{labels:["source: ltr","source: rtl"],onChange:e=>s(e?p.rtl:p.ltr),attributes:{checked:"rtl"===m?.source}})),e.createElement("div",{className:S},e.createElement(_,{labels:["safeBothPrefix: false","safeBothPrefix: true"],onChange:e=>o(e),attributes:{checked:!!m?.safeBothPrefix}})),e.createElement("div",{className:S},e.createElement(_,{labels:["ignorePrefixedRules: false","ignorePrefixedRules: true"],onChange:e=>r(e),attributes:{checked:!(y(m?.ignorePrefixedRules)&&!m.ignorePrefixedRules)}})),e.createElement("div",{className:S},e.createElement(_,{labels:["processUrls: false","processUrls: true"],onChange:e=>a(e),attributes:{checked:!!m?.processUrls}})),e.createElement("div",{className:S},e.createElement(_,{labels:["processRuleNames: false","processRuleNames: true"],onChange:e=>c(e),attributes:{checked:!!m?.processRuleNames}})),e.createElement("div",{className:S},e.createElement(_,{labels:["processKeyFrames: false","processKeyFrames: true"],onChange:e=>d(e),attributes:{checked:!!m?.processKeyFrames}})),e.createElement("div",{className:S},e.createElement(_,{labels:["processEnv: false","processEnv: true"],onChange:e=>h(e),attributes:{checked:!(y(m?.processEnv)&&!m.processEnv)}})),e.createElement("div",{className:S},e.createElement(_,{labels:["useCalc: false","useCalc: true"],onChange:e=>u(e),attributes:{checked:!!m?.useCalc}})),e.createElement("div",{className:S},e.createElement(_,{labels:["greedy: false","greedy: true"],onChange:e=>f(e),attributes:{checked:!!m?.greedy}}))))};var x=__webpack_require__(15571),L=x;x.stringify,x.fromJSON,x.plugin,x.parse,x.list,x.document,x.comment,x.atRule,x.rule,x.decl,x.root,x.CssSyntaxError,x.Declaration,x.Container,x.Processor,x.Document,x.Comment,x.Warning,x.AtRule,x.Result,x.Input,x.Rule,x.Root,x.Node;var D,E,N=__webpack_require__(32535),I=function(){return I=Object.assign||function(e){for(var t,i=1,n=arguments.length;i=0})),K=m[A]?Ue(m[A],k):Ue(A,k),$=!!c&&(m[A]?!!Fe[m[A]]:!!Fe[A]),G=fe(x,i),Q=!G||G===l||a===D.diff;if(pe(x,P.FREEZE)||n)a===D.combined&&(Ve(t,b),k.push(A),v.push(t));else if((R!==V||O!==U||q||K||$||H)&&!(S[t.prop].ignore&&!$||function(e,t,i,n){var s=e.index(t),o=n[t.prop],r=Object.keys(o.indexes).map(Number).sort();if(1===r.length)return!1;var a=r.filter((function(e){return e>s}));if(a.length){if(z.test(t.prop)){if(n[i.prop]){var l=n[i.prop],c=Object.keys(l.indexes).map(Number).sort().slice(-1)[0],d=a.slice(-1)[0];return o.indexes[d].value===l.indexes[c].value&&(o.ignore=!0,l.ignore=!0),!0}return!1}return!0}return!1}(e,t,T,S)))if(H)if(R!==V||O!==U||0!==de.keyframes.length&&de.keyframesRegExp.test(O)){var Y=t.value.replace(de.keyframesRegExp,(function(e,t,i,n){return t+de.keyframesStringMap[i].name+n})),Z=t.value.replace(de.keyframesRegExp,(function(e,t,i,n){return t+de.keyframesStringMap[i].nameFlipped+n})),X=t.clone();a===D.combined?((J=t.clone()).value=Y,X.value=Z,Q?(b.append(J),w.append(X)):(b.append(X),w.append(J)),v.push(t)):(t.value=Y,X.value=Z,Q?b.append(X):w.append(X),c&&a!==D.diff&&(Ve(t,y),v.push(t)))}else c&&!ze(t)&&(a===D.diff?Ve(t,b):Ve(t,y),v.push(t));else{if(R===V&&O===U)return void((q||$||K)&&!ze(t)&&(a===D.diff?Ve(t,b):Ve(t,q||K?C:y),v.push(t)));if(function(e,t,i){return!!i[t.prop]&&Object.entries(i[t.prop].indexes).some((function(n){return n[1].value===t.value.trim()&&!function(e,t,i){var n=e.index(t),s=Object.keys(i[t.prop].indexes).map(Number);return 1!==s.length&&s.some((function(e){return e>n}))}(e,n[1].decl,i)}))}(e,T,S))return E=!0,void($&&!ze(t)&&(a===D.diff?Ve(t,b):Ve(t,y),v.push(t)));var J;a===D.combined?(Q?(Ve(t,b),w.append(T)):(Ve(t,w),b.append(T)),v.push(t)):(z.test(t.prop)&&!S[T.prop]&&e.index(t)===W[0]&&((J=t.clone()).value=Be[t.prop]||"unset",Q?b.append(J):w.append(J)),$&&!ze(t)&&a!==D.diff&&(Ve(t,y),v.push(t)),Q?b.append(T):w.append(T)),k.push(A)}}})),v.length&&v.forEach((function(e){return e.remove()})),b.nodes.length||w.nodes.length||C.nodes.length||y.nodes.length?t?xe(e,b,w,C,y):ke(e,b,w,C,y):Z(e)&&(h||s)&&!E?de.unmodifiedRules.push({rule:e,hasParentRule:t}):a===D.diff&&de.containersToRemove.push(e)}};function qe(e){return void 0===e&&(e={}),{postcssPlugin:"postcss-rtlcss",Once:function(t){(function(e){de.options=function(e){var t,i=I({},ce());return e.mode&&oe.includes(e.mode)&&(i.mode=e.mode),e.source&&re.includes(e.source)&&(i.source=e.source),X(e.ignorePrefixedRules)&&(i.ignorePrefixedRules=e.ignorePrefixedRules),X(e.greedy)&&(i.greedy=e.greedy),ae(e.ltrPrefix)||(i.ltrPrefix=e.ltrPrefix),ae(e.rtlPrefix)||(i.rtlPrefix=e.rtlPrefix),ae(e.bothPrefix)||(i.bothPrefix=e.bothPrefix),J(e.prefixSelectorTransformer)&&(i.prefixSelectorTransformer=e.prefixSelectorTransformer),X(e.safeBothPrefix)&&(i.safeBothPrefix=e.safeBothPrefix),X(e.processUrls)&&(i.processUrls=e.processUrls),X(e.processRuleNames)&&(i.processRuleNames=e.processRuleNames),X(e.processKeyFrames)&&(i.processKeyFrames=e.processKeyFrames),X(e.processEnv)&&(i.processEnv=e.processEnv),X(e.useCalc)&&(i.useCalc=e.useCalc),function(e){return!Array.isArray(e)||e.some((function(e){return typeof e.search!=typeof e.replace||ae(e.search)||ae(e.replace)||Array.isArray(e.search)&&Array.isArray(e.replace)&&e.search.length!==e.replace.length}))}(e.stringMap)||se(e.stringMap).forEach((function(e){e.name===ie[0].name?i.stringMap.splice(0,1,e):e.name===ie[1].name?i.stringMap.splice(1,1,e):i.stringMap.push(e)})),function(e){return Array.isArray(e)&&e.every((function(e){return ee(e.name)&&typeof e.priority===R.NUMBER&&Array.isArray(e.processors)&&e.processors.every((function(e){return e.expr instanceof RegExp&&J(e.action)}))}))}(e.processDeclarationPlugins)&&(i.plugins=e.processDeclarationPlugins.map((function(e){return I(I({},e),{directives:{control:{},value:[]}})}))),e.aliases&&(t=e.aliases,!Object.entries(t).some((function(e){return!ee(e[1])})))&&(i.aliases=e.aliases),i}(e),de.keyframes=[],de.keyframesToRemove=[],de.keyframesStringMap={},de.keyframesRegExp=te,de.rules=[],de.containersToRemove=[],de.rulesPrefixRegExp=function(e){var t=e.ltrPrefix,i=e.rtlPrefix,n=e.bothPrefix;if(!e.ignorePrefixedRules)return te;var s=[];return s=le(s,t),s=le(s,i),s=(s=le(s,n)).map((function(e){var t=e.replace(K,"\\$&");return $.test(e)?"".concat(t,"(?:\\W|$)"):t})),new RegExp("(".concat(s.join("|"),")"))}(de.options),de.unmodifiedRules=[]})(e),Te(t),be(je,t),Ie(je,t),function(){if(de.unmodifiedRules.length){var e=de.options.stringMap.reduce((function(e,t){var i=ee(t.search)?[t.search]:t.search,n=ee(t.replace)?[t.replace]:t.replace;return i.forEach((function(t,i){e[t]=n[i],e[n[i]]=t})),e}),{}),t=Object.keys(e).join("|"),i=de.options.greedy?new RegExp("(".concat(t,")"),"g"):new RegExp("\\b(".concat(t,")\\b"),"g"),n={},s=[];de.unmodifiedRules.forEach((function(e){var t=!1;e.rule.selectors.forEach((function(s){i.test(s)&&(n[s]=e.rule.clone(),t=!0),i.lastIndex=0})),t?s.push(e):de.options.mode===D.diff&&de.containersToRemove.push(e.rule)})),s.forEach((function(t){for(var s=t.rule,o=t.hasParentRule,r=s.clone(),a=s.clone().removeAll(),l=void 0,c=0,d=s.selectors;c__webpack_require__.e(336).then(__webpack_require__.bind(__webpack_require__,40336))}),(0,$e.K)({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>__webpack_require__.e(4764).then(__webpack_require__.bind(__webpack_require__,94764))}),(0,$e.K)({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>__webpack_require__.e(7690).then(__webpack_require__.bind(__webpack_require__,7690))}),(0,$e.K)({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>__webpack_require__.e(8378).then(__webpack_require__.bind(__webpack_require__,58378))}),(0,$e.K)({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>__webpack_require__.e(6842).then(__webpack_require__.bind(__webpack_require__,96842))}),(0,$e.K)({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>__webpack_require__.e(9746).then(__webpack_require__.bind(__webpack_require__,49746))}),(0,$e.K)({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>__webpack_require__.e(2834).then(__webpack_require__.bind(__webpack_require__,72834))}),(0,$e.K)({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>__webpack_require__.e(4316).then(__webpack_require__.bind(__webpack_require__,24316))}),(0,$e.K)({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>__webpack_require__.e(2102).then(__webpack_require__.bind(__webpack_require__,22102))}),(0,$e.K)({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>__webpack_require__.e(2102).then(__webpack_require__.bind(__webpack_require__,22102))}),(0,$e.K)({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>__webpack_require__.e(9490).then(__webpack_require__.bind(__webpack_require__,69490))}),(0,$e.K)({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>__webpack_require__.e(3386).then(__webpack_require__.bind(__webpack_require__,13386))}),__webpack_require__(55172),(0,$e.K)({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>__webpack_require__.e(930).then(__webpack_require__.bind(__webpack_require__,70930))}),(0,$e.K)({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>__webpack_require__.e(3178).then(__webpack_require__.bind(__webpack_require__,93178))}),(0,$e.K)({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>__webpack_require__.e(1320).then(__webpack_require__.bind(__webpack_require__,21320))}),(0,$e.K)({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>__webpack_require__.e(3194).then(__webpack_require__.bind(__webpack_require__,33194))}),(0,$e.K)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>__webpack_require__.e(194).then(__webpack_require__.bind(__webpack_require__,194))}),(0,$e.K)({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>__webpack_require__.e(1186).then(__webpack_require__.bind(__webpack_require__,21186))}),(0,$e.K)({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>__webpack_require__.e(7752).then(__webpack_require__.bind(__webpack_require__,47752))}),(0,$e.K)({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAutoInterpolationDollar))}),(0,$e.K)({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAngleInterpolationDollar))}),(0,$e.K)({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagBracketInterpolationDollar))}),(0,$e.K)({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAngleInterpolationBracket))}),(0,$e.K)({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagBracketInterpolationBracket))}),(0,$e.K)({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAutoInterpolationDollar))}),(0,$e.K)({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAutoInterpolationBracket))}),(0,$e.K)({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>__webpack_require__.e(7896).then(__webpack_require__.bind(__webpack_require__,37896))}),(0,$e.K)({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>__webpack_require__.e(266).then(__webpack_require__.bind(__webpack_require__,70266))}),(0,$e.K)({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>__webpack_require__.e(848).then(__webpack_require__.bind(__webpack_require__,40848))}),(0,$e.K)({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>__webpack_require__.e(8578).then(__webpack_require__.bind(__webpack_require__,58578))}),(0,$e.K)({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>__webpack_require__.e(8374).then(__webpack_require__.bind(__webpack_require__,88374))}),(0,$e.K)({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>__webpack_require__.e(322).then(__webpack_require__.bind(__webpack_require__,70322))}),(0,$e.K)({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>__webpack_require__.e(1684).then(__webpack_require__.bind(__webpack_require__,1684))}),(0,$e.K)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>__webpack_require__.e(1682).then(__webpack_require__.bind(__webpack_require__,41682))}),(0,$e.K)({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>__webpack_require__.e(918).then(__webpack_require__.bind(__webpack_require__,30918))}),(0,$e.K)({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>__webpack_require__.e(9818).then(__webpack_require__.bind(__webpack_require__,59818))}),(0,$e.K)({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>__webpack_require__.e(5561).then(__webpack_require__.bind(__webpack_require__,77942))}),(0,$e.K)({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>__webpack_require__.e(5230).then(__webpack_require__.bind(__webpack_require__,75230))}),(0,$e.K)({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>__webpack_require__.e(9046).then(__webpack_require__.bind(__webpack_require__,79046))}),(0,$e.K)({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>__webpack_require__.e(1004).then(__webpack_require__.bind(__webpack_require__,11004))}),(0,$e.K)({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>__webpack_require__.e(1164).then(__webpack_require__.bind(__webpack_require__,21164))}),(0,$e.K)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>__webpack_require__.e(2914).then(__webpack_require__.bind(__webpack_require__,72914))}),(0,$e.K)({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>__webpack_require__.e(8434).then(__webpack_require__.bind(__webpack_require__,8434))}),(0,$e.K)({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>__webpack_require__.e(162).then(__webpack_require__.bind(__webpack_require__,20162))}),(0,$e.K)({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>__webpack_require__.e(3374).then(__webpack_require__.bind(__webpack_require__,73374))}),(0,$e.K)({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>__webpack_require__.e(7006).then(__webpack_require__.bind(__webpack_require__,97006))}),(0,$e.K)({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>__webpack_require__.e(658).then(__webpack_require__.bind(__webpack_require__,40658))}),(0,$e.K)({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>__webpack_require__.e(2e3).then(__webpack_require__.bind(__webpack_require__,2e3))}),(0,$e.K)({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>__webpack_require__.e(9066).then(__webpack_require__.bind(__webpack_require__,89066))}),(0,$e.K)({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>__webpack_require__.e(1058).then(__webpack_require__.bind(__webpack_require__,11058))}),(0,$e.K)({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>__webpack_require__.e(1394).then(__webpack_require__.bind(__webpack_require__,1394))}),(0,$e.K)({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>__webpack_require__.e(1762).then(__webpack_require__.bind(__webpack_require__,71762))}),(0,$e.K)({id:"pla",extensions:[".pla"],loader:()=>__webpack_require__.e(2122).then(__webpack_require__.bind(__webpack_require__,32122))}),(0,$e.K)({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>__webpack_require__.e(5309).then(__webpack_require__.bind(__webpack_require__,47690))}),(0,$e.K)({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>__webpack_require__.e(4194).then(__webpack_require__.bind(__webpack_require__,74194))}),(0,$e.K)({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>__webpack_require__.e(2718).then(__webpack_require__.bind(__webpack_require__,92718))}),(0,$e.K)({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>__webpack_require__.e(1330).then(__webpack_require__.bind(__webpack_require__,11330))}),(0,$e.K)({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>__webpack_require__.e(2766).then(__webpack_require__.bind(__webpack_require__,82766))}),(0,$e.K)({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>__webpack_require__.e(256).then(__webpack_require__.bind(__webpack_require__,20256))}),(0,$e.K)({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>__webpack_require__.e(3830).then(__webpack_require__.bind(__webpack_require__,13830))}),(0,$e.K)({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>__webpack_require__.e(2014).then(__webpack_require__.bind(__webpack_require__,42014))}),(0,$e.K)({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>__webpack_require__.e(7942).then(__webpack_require__.bind(__webpack_require__,67942))}),(0,$e.K)({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>__webpack_require__.e(8034).then(__webpack_require__.bind(__webpack_require__,98034))}),(0,$e.K)({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>__webpack_require__.e(9810).then(__webpack_require__.bind(__webpack_require__,69810))}),(0,$e.K)({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>__webpack_require__.e(6114).then(__webpack_require__.bind(__webpack_require__,16114))}),(0,$e.K)({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>__webpack_require__.e(4796).then(__webpack_require__.bind(__webpack_require__,4796))}),(0,$e.K)({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>__webpack_require__.e(9292).then(__webpack_require__.bind(__webpack_require__,79292))}),(0,$e.K)({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>__webpack_require__.e(310).then(__webpack_require__.bind(__webpack_require__,20310))}),(0,$e.K)({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>__webpack_require__.e(4402).then(__webpack_require__.bind(__webpack_require__,4402))}),(0,$e.K)({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>__webpack_require__.e(4946).then(__webpack_require__.bind(__webpack_require__,44946))}),(0,$e.K)({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>__webpack_require__.e(1636).then(__webpack_require__.bind(__webpack_require__,1636))}),(0,$e.K)({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>__webpack_require__.e(350).then(__webpack_require__.bind(__webpack_require__,70350))}),(0,$e.K)({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>__webpack_require__.e(8038).then(__webpack_require__.bind(__webpack_require__,18038))}),(0,$e.K)({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>__webpack_require__.e(1504).then(__webpack_require__.bind(__webpack_require__,31504))}),(0,$e.K)({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>__webpack_require__.e(118).then(__webpack_require__.bind(__webpack_require__,60118))}),(0,$e.K)({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>__webpack_require__.e(4670).then(__webpack_require__.bind(__webpack_require__,54670))}),(0,$e.K)({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>__webpack_require__.e(3794).then(__webpack_require__.bind(__webpack_require__,93794))}),(0,$e.K)({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>__webpack_require__.e(1882).then(__webpack_require__.bind(__webpack_require__,81882))}),(0,$e.K)({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>__webpack_require__.e(1458).then(__webpack_require__.bind(__webpack_require__,91458))}),(0,$e.K)({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>__webpack_require__.e(1458).then(__webpack_require__.bind(__webpack_require__,91458))}),(0,$e.K)({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>__webpack_require__.e(8386).then(__webpack_require__.bind(__webpack_require__,98386))}),(0,$e.K)({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>__webpack_require__.e(3454).then(__webpack_require__.bind(__webpack_require__,73454))}),(0,$e.K)({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>__webpack_require__.e(1650).then(__webpack_require__.bind(__webpack_require__,71650))}),(0,$e.K)({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>__webpack_require__.e(9970).then(__webpack_require__.bind(__webpack_require__,39970))}),(0,$e.K)({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>__webpack_require__.e(1840).then(__webpack_require__.bind(__webpack_require__,81840))}),(0,$e.K)({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>__webpack_require__.e(2922).then(__webpack_require__.bind(__webpack_require__,42922))}),(0,$e.K)({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\__webpack_require__.e(4466).then(__webpack_require__.bind(__webpack_require__,44466))}),(0,$e.K)({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>__webpack_require__.e(8114).then(__webpack_require__.bind(__webpack_require__,8114))}),__webpack_require__(95380);var Ge=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ye=Object.getOwnPropertyNames,Ze=Object.prototype.hasOwnProperty,Xe=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of Ye(t))Ze.call(e,s)||s===i||Ge(e,s,{get:()=>t[s],enumerable:!(n=Qe(t,s))||n.enumerable});return e},Je={};Xe(Je,Ke,"default");var et=class{constructor(e,t,i){this._onDidChange=new Je.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},tt={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function it(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===nt,documentFormattingEdits:e===nt,documentRangeFormattingEdits:e===nt}}var nt="html",st="handlebars",ot="razor",rt=ut(nt,tt,it(nt)),at=rt.defaults,lt=ut(st,tt,it(st)),ct=lt.defaults,dt=ut(ot,tt,it(ot)),ht=dt.defaults;function ut(e,t=tt,i=it(e)){const n=new et(e,t,i);let s;const o=Je.languages.onLanguage(e,(async()=>{s=(await __webpack_require__.e(7857).then(__webpack_require__.bind(__webpack_require__,37857))).setupMode(n)}));return{defaults:n,dispose(){o.dispose(),s?.dispose(),s=void 0}}}Je.languages.html={htmlDefaults:at,razorDefaults:ht,handlebarDefaults:ct,htmlLanguageService:rt,handlebarLanguageService:lt,razorLanguageService:dt,registerHTMLLanguageService:ut};var gt=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,ft=Object.getOwnPropertyNames,mt=Object.prototype.hasOwnProperty,_t=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of ft(t))mt.call(e,s)||s===i||gt(e,s,{get:()=>t[s],enumerable:!(n=pt(t,s))||n.enumerable});return e},vt={};((e,t)=>{_t(e,t,"default")})(vt,Ke);var bt,wt=new class{constructor(e,t,i){this._onDidChange=new vt.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function Ct(){return __webpack_require__.e(9867).then(__webpack_require__.bind(__webpack_require__,39867))}vt.languages.json={jsonDefaults:wt,getWorker:()=>Ct().then((e=>e.getWorker()))},vt.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),vt.languages.onLanguage("json",(()=>{Ct().then((e=>e.setupMode(wt)))})),__webpack_require__(13028),__webpack_require__(47025),self.MonacoEnvironment=(bt={editorWorkerService:"editor.worker.js",css:"css.worker.js",less:"css.worker.js",scss:"css.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var i=__webpack_require__.p,n=(i?i.replace(/\/$/,"")+"/":"")+bt[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(n)){var s=String(window.location),o=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(n.substring(0,o.length)!==o){/^(\/\/)/.test(n)&&(n=window.location.protocol+n);var r=new Blob(["/*"+t+'*/importScripts("'+n+'");'],{type:"application/javascript"});return URL.createObjectURL(r)}}return n}});const yt=t=>{const{title:i,height:n,width:s,lines:o="",readOnly:r=!1,isMobile:a=!1,onChange:l}=t,c=(0,e.useRef)(null),d=(0,e.useRef)(null);return(0,e.useEffect)((()=>{Ke.languages.css.cssDefaults.setModeConfiguration({colors:!1}),c.current=Ke.editor.create(d.current,{value:o,minimap:{enabled:!1},readOnly:r,scrollbar:{alwaysConsumeMouseWheel:!0},theme:"vs-dark",contextmenu:!a,selectionHighlight:!a,hover:{enabled:!1},scrollBeyondLastLine:!1,language:"scss"}),c.current.onDidChangeModelContent((()=>{l&&l(c.current.getValue())}))}),[]),(0,e.useEffect)((()=>{n&&c.current&&c.current.layout({height:n,width:s})}),[n,s,c]),(0,e.useEffect)((()=>{c.current&&c.current.setValue(o)}),[o,c]),e.createElement("div",{className:"qACNvsTy_KdDyPtLyGJk"},e.createElement("div",{className:"ug_NesGzRw8WJcgFV3UI"},i),e.createElement("div",{className:"vsX2Z6j6SQhCKuMjpHae",ref:d}))};function St(){return St=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{ready:t,fetchCode:i,setCode:n,options:s,windowSizes:o}=l(),{isSmallScreen:r,panelHeight:a,panelWidth:c}=o,[d,u]=(0,e.useState)(h),[g,p]=(0,e.useState)("");(0,e.useEffect)((()=>{(function(e){return L([qe(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})]).process(e)})(d,s).then((e=>{p(e.css)})).catch((e=>{p(`/* ${e.name}: ${e.message} */`)})),n(d)}),[d,s]);const f={isMobile:r,height:a,width:c};return e.createElement("div",{className:"BKPY2vLMNuO0LfNJoooe"},e.createElement(yt,St({title:"css input",lines:t?i||h:"",readOnly:r,onChange:e=>{u(e)}},f)),e.createElement(yt,St({title:"css output",lines:g,readOnly:!0},f)))};class xt extends e.PureComponent{constructor(t){super(t),this.$=e.createRef(),this._=e.createRef()}render(){return e.createElement("span",{ref:this.$},e.createElement("a",{...this.props,ref:this._},this.props.children))}componentDidMount(){this.paint()}getSnapshotBeforeUpdate(){return this.reset(),null}componentDidUpdate(){this.paint()}componentWillUnmount(){this.reset()}paint(){const e=this.$.current.appendChild(document.createElement("span"));Promise.resolve().then(__webpack_require__.bind(__webpack_require__,76793)).then((({render:t})=>{null!=this._.current&&t(e.appendChild(this._.current),(function(t){try{e.parentNode.replaceChild(t,e)}catch(e){}}))}))}reset(){this.$.current.replaceChild(this._.current,this.$.current.lastChild)}}var Lt=xt;const Dt=t=>{const{href:i,children:n}=t;return e.createElement("a",{className:"bnulRprlvqQD_NUXOpgc",href:i,target:"_blank",rel:"noopener noreferrer"},n)};var Et="G2ehhaF_DOM3PMmkFH9S";const Nt=()=>e.createElement("footer",{className:"OXEahmEOMbEHWGJs6uwj"},e.createElement("div",{className:Et},e.createElement(Lt,{href:"https://github.com/elchininet/postcss-rtlcss/fork","data-size":"small","aria-label":"Fork elchininet/postcss-rtlcss on GitHub","data-color-scheme":"no-preference: dark; light: dark; dark: dark;"},"Fork me on Github")),e.createElement("div",{className:b()(Et,"Vqh3m1RGv8ssQXlWiddZ")},e.createElement("span",null,"Playground powered by ",e.createElement(Dt,{href:"https://microsoft.github.io/monaco-editor/"},"Monaco Editor")))),It=()=>e.createElement(a,null,e.createElement("div",{className:"vhn2SJWlxSMhnHtIJaLb"},e.createElement(u,null),e.createElement(kt,null),e.createElement(Nt,null)),e.createElement(k,null),e.createElement(c,null)),Mt=document.getElementById("app");(0,t.createRoot)(Mt).render(e.createElement(It,null))}()})(); \ No newline at end of file +(function(){var __webpack_modules__={76793:function(e,t,i){"use strict";i.r(t),i.d(t,{render:function(){return E}});var n=window.document,s=window.Math,o=window.HTMLElement,r=window.XMLHttpRequest,a=function(e,t){for(var i=0,n=e.length;i
    '}}},download:{heights:{16:{width:16,path:''}}},eye:{heights:{16:{width:16,path:''}}},heart:{heights:{16:{width:16,path:''}}},"issue-opened":{heights:{16:{width:16,path:''}}},"mark-github":{heights:{16:{width:16,path:''}}},package:{heights:{16:{width:16,path:''}}},play:{heights:{16:{width:16,path:''}}},"repo-forked":{heights:{16:{width:16,path:''}}},"repo-template":{heights:{16:{width:16,path:''}}},star:{heights:{16:{width:16,path:''}}}},C=function(e,t){e=h(e).replace(/^octicon-/,""),d(w,e)||(e="mark-github");var i=t>=24&&24 in w[e].heights?24:16,n=w[e].heights[i];return'"},y={},S=function(e,t){var i=y[e]||(y[e]=[]);if(!(i.push(t)>1)){var n=function(e){var t;return function(){t||(t=1,e.apply(this,arguments))}}((function(){for(delete y[e];t=i.shift();)t.apply(null,arguments)}));if(p){var s=new r;m(s,"abort",n),m(s,"error",n),m(s,"load",(function(){var e;try{e=JSON.parse(this.responseText)}catch(e){return void n(e)}n(200!==this.status,e)})),s.open("GET",e),s.send()}else{var o=this||window;o._=function(e){o._=null,n(200!==e.meta.status,e.data)};var a=l(o.document)("script",{async:!0,src:e+(-1!==e.indexOf("?")?"&":"?")+"callback=_"}),c=function(){o._&&o._({meta:{}})};m(a,"load",c),m(a,"error",c),function(e,t,i){if(null!=e.readyState){var n="readystatechange",s=function(){if(t.test(e.readyState))return _(e,n,s),i.apply(this,arguments)};m(e,n,s)}}(a,/de|m/,c),o.document.getElementsByTagName("head")[0].appendChild(a)}}},k=function(e,t,i){var n=l(e.ownerDocument),s=e.appendChild(n("style",{type:"text/css"})),o="body{margin:0}a{text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:0;line-height:0;white-space:nowrap}.btn,.social-count{position:relative;display:inline-block;display:inline-flex;height:14px;padding:2px 5px;font-size:11px;font-weight:600;line-height:14px;vertical-align:bottom;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-repeat:repeat-x;background-position:-1px -1px;background-size:110% 110%;border:1px solid}.btn{border-radius:.25em}.btn:not(:last-child){border-radius:.25em 0 0 .25em}.social-count{border-left:0;border-radius:0 .25em .25em 0}.widget-lg .btn,.widget-lg .social-count{height:16px;padding:5px 10px;font-size:12px;line-height:16px}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor;overflow:visible}"+function(e){if(null==e)return v.light;if(d(v,e))return v[e];var t=function(e,t,i,n){null==t&&(t="&"),null==i&&(i="="),null==n&&(n=window.decodeURIComponent);var s={};return a(e.split(t),(function(e){if(""!==e){var t=e.split(i);s[n(t[0])]=null!=t[1]?n(t.slice(1).join(i)):void 0}})),s}(e,";",":",(function(e){return e.replace(/^[ \t\n\f\r]+|[ \t\n\f\r]+$/g,"")}));return v[d(v,t["no-preference"])?t["no-preference"]:"light"]+b("light",t.light)+b("dark",t.dark)}(t["data-color-scheme"]);s.styleSheet?s.styleSheet.cssText=o:s.appendChild(e.ownerDocument.createTextNode(o));var r="large"===h(t["data-size"]),c=n("a",{className:"btn",href:t.href,rel:"noopener",target:"_blank",title:t.title||void 0,"aria-label":t["aria-label"]||void 0,innerHTML:C(t["data-icon"],r?16:14)+" "},[n("span",{},[t["data-text"]||""])]),p=e.appendChild(n("div",{className:"widget"+(r?" widget-lg":"")},[c])),f=c.hostname.replace(/\.$/,"");if(("."+f).substring(f.length-10)!=="."+u)return c.removeAttribute("href"),void i(p);var m=(" /"+c.pathname).split(/\/+/);if(((f===u||f==="gist."+u)&&"archive"===m[3]||f===u&&"releases"===m[3]&&("download"===m[4]||"latest"===m[4]&&"download"===m[5])||f==="codeload."+u)&&(c.target="_top"),"true"===h(t["data-show-count"])&&f===u&&"marketplace"!==m[1]&&"sponsors"!==m[1]&&"orgs"!==m[1]&&"users"!==m[1]&&"-"!==m[1]){var _,w;if(!m[2]&&m[1])w="followers",_="?tab=followers";else if(!m[3]&&m[2])w="stargazers_count",_="/stargazers";else if(m[4]||"subscription"!==m[3])if(m[4]||"fork"!==m[3]){if("issues"!==m[3])return void i(p);w="open_issues_count",_="/issues"}else w="forks_count",_="/forks";else w="subscribers_count",_="/watchers";var y=m[2]?"/repos/"+m[1]+"/"+m[2]:"/users/"+m[1];S.call(this,g+y,(function(e,t){if(!e){var s=t[w];p.appendChild(n("a",{className:"social-count",href:t.html_url+_,rel:"noopener",target:"_blank","aria-label":s+" "+w.replace(/_count$/,"").replace("_"," ").slice(0,s<2?-1:void 0)+" on GitHub"},[(""+s).replace(/\B(?=(\d{3})+(?!\d))/g,",")]))}i(p)}))}else i(p)},x=window.devicePixelRatio||1,L=function(e){return(x>1?s.ceil(s.round(e*x)/x*2)/2:s.ceil(e))||0},D=function(e,t){e.style.width=t[0]+"px",e.style.height=t[1]+"px"},E=function(e,t){if(null!=e&&null!=t)if(e.getAttribute&&(e=function(e){var t={href:e.href,title:e.title,"aria-label":e.getAttribute("aria-label")};return a(["icon","color-scheme","text","size","show-count"],(function(i){var n="data-"+i;t[n]=e.getAttribute(n)})),null==t["data-text"]&&(t["data-text"]=e.textContent||e.innerText),t}(e)),f){var i=c("span");k(i.attachShadow({mode:"closed"}),e,(function(){t(i)}))}else{var o=c("iframe",{src:"javascript:0",title:e.title||void 0,allowtransparency:!0,scrolling:"no",frameBorder:0});D(o,[0,0]),o.style.border="none";var r=function(){var i,a=o.contentWindow;try{i=a.document.body}catch(e){return void n.body.appendChild(o.parentNode.removeChild(o))}_(o,"load",r),k.call(a,i,e,(function(i){var n=function(e){var t=e.offsetWidth,i=e.offsetHeight;if(e.getBoundingClientRect){var n=e.getBoundingClientRect();t=s.max(t,L(n.width)),i=s.max(i,L(n.height))}return[t,i]}(i);o.parentNode.removeChild(o),function(e,t,i){var n=function(){return _(e,t,n),i.apply(this,arguments)};m(e,t,n)}(o,"load",(function(){D(o,n)})),o.src="https://unpkg.com/github-buttons@2.27.0/dist/buttons.html#"+(o.name=function(e,t,i,n){null==t&&(t="&"),null==i&&(i="="),null==n&&(n=window.encodeURIComponent);var s=[];for(var o in e){var r=e[o];null!=r&&s.push(n(o)+i+n(r))}return s.join(t)}(e)),t(o)}))};m(o,"load",r),n.body.appendChild(o)}}},47091:function(e,t,i){"use strict";i.r(t),i.d(t,{CancellationTokenSource:function(){return Gr},Emitter:function(){return Qr},KeyCode:function(){return Yr},KeyMod:function(){return Zr},MarkerSeverity:function(){return ia},MarkerTag:function(){return na},Position:function(){return Xr},Range:function(){return Jr},Selection:function(){return ea},SelectionDirection:function(){return ta},Token:function(){return oa},Uri:function(){return sa},default:function(){return da},editor:function(){return ra},languages:function(){return aa}});var n={};i.r(n),i.d(n,{CancellationTokenSource:function(){return Gr},Emitter:function(){return Qr},KeyCode:function(){return Yr},KeyMod:function(){return Zr},MarkerSeverity:function(){return ia},MarkerTag:function(){return na},Position:function(){return Xr},Range:function(){return Jr},Selection:function(){return ea},SelectionDirection:function(){return ta},Token:function(){return oa},Uri:function(){return sa},editor:function(){return ra},languages:function(){return aa}}),i(97078),i(53732),i(34157),i(22550),i(88314),i(50568),i(62082);var s=i(16827),o=(i(21991),i(55999),i(90581),i(77334),i(1452),i(61856),i(71955),i(98068),i(52783),i(40756),i(3191),i(23623),i(23793),i(69904),i(16116),i(59587),i(28557),i(85210),i(35620),i(53720),i(31986),i(41158),i(10965),i(64043),i(62124),i(60224),i(95392),i(91720),i(57972),i(80540),i(37052),i(23982),i(4812),i(69143),i(84956),i(36988),i(22400),i(90098),i(76585),i(97273),i(71246),i(18615),i(76973),i(49204),i(57698),i(19933),i(58722),i(42452),i(83012),i(65450),i(6503),i(43370),i(67742),i(59396),i(99842),i(39923),i(8438),i(24035),i(81188),i(138),i(3520)),r=i(32919),a=i(95601),l=i(35114),c=i(43920),d=i(54244),h=i(57614),u=i(52694),g=i(72777),p=i(49134),f=i(90890),m=i(79757),_=i(38945),v=i(20187),b=i(84756),w=i(97358),C=i(14374);let y;y="object"==typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name&&void 0!==globalThis.workerttPolicy?globalThis.workerttPolicy:(0,_.H)("defaultWorkerFactory",{createScriptURL:e=>e});class S extends l.jG{constructor(e,t,i,n,s,o){super(),this.id=i,this.label=n;const r=function(e,t){const i=globalThis.MonacoEnvironment;if(i){if("function"==typeof i.getWorker)return i.getWorker("workerMain.js",t);if("function"==typeof i.getWorkerUrl){const e=i.getWorkerUrl("workerMain.js",t);return new Worker(y?y.createScriptURL(e):e,{name:t,type:"module"})}}if(e){const i=function(e,t){if(/^((http:)|(https:)|(file:)|(vscode-file:))/.test(t)&&t.substring(0,globalThis.origin.length)!==globalThis.origin);else{const i=t.lastIndexOf("?"),n=t.lastIndexOf("#",i),s=i>0?new URLSearchParams(t.substring(i+1,~n?n:void 0)):new URLSearchParams;b.SJ.addSearchParam(s,!0,!0),t=s.toString()?`${t}?${s.toString()}#${e}`:`${t}#${e}`}const i=new Blob([(0,w.Yc)([`/*${e}*/`,void 0,`globalThis._VSCODE_NLS_MESSAGES = ${JSON.stringify((0,C.Ec)())};`,`globalThis._VSCODE_NLS_LANGUAGE = ${JSON.stringify((0,C.i8)())};`,`globalThis._VSCODE_FILE_ROOT = '${globalThis._VSCODE_FILE_ROOT}';`,"const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });","globalThis.workerttPolicy = ttPolicy;",`await import(ttPolicy?.createScriptURL('${t}') ?? '${t}');`,"globalThis.postMessage({ type: 'vscode-worker-ready' });",`/*${e}*/`]).join("")],{type:"application/javascript"});return URL.createObjectURL(i)}(t,e.toString(!0));return n=new Worker(y?y.createScriptURL(i):i,{name:t,type:"module"}),new Promise(((e,t)=>{n.onmessage=function(t){"vscode-worker-ready"===t.data.type&&(n.onmessage=null,e(n))},n.onerror=t}))}var n;throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(e,n);"function"==typeof r.then?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(t,[]),this.worker.then((e=>{e.onmessage=function(e){s(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)})),this._register((0,l.s)((()=>{this.worker?.then((e=>{e.onmessage=null,e.onmessageerror=null,e.removeEventListener("error",o),e.terminate()})),this.worker=null})))}getId(){return this.id}postMessage(e,t){this.worker?.then((i=>{try{i.postMessage(e,t)}catch(e){(0,v.dz)(e),(0,v.dz)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:e}))}}))}}class k{constructor(e,t){this.amdModuleId=e,this.label=t,this.esmModuleLocation=b.zl.asBrowserUri(`${e}.esm.js`)}}class x{static{this.LAST_WORKER_ID=0}constructor(){this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++x.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new S(e.esmModuleLocation,e.amdModuleId,n,e.label||"anonymous"+n,t,(e=>{(0,m.logOnceWebWorkerWarning)(e),this._webWorkerFailedBeforeError=e,i(e)}))}}var L=i(40393),D=i(8494),E=i(79075),N=i(59266),I=i(17492),M=i(76925),T=i(43857),R=i(69122),P=i(52049),A=i(17191),O=i(80487),F=i(84201),B=i(45148),W=i(8482),H=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},V=function(e,t){return function(i,n){t(i,n,e)}};function z(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let U=class extends l.jG{constructor(e,t,i,n,s,o){super(),this._languageConfigurationService=s,this._modelService=t,this._workerManager=this._register(new q(e,this._modelService)),this._logService=n,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:async(e,t)=>{if(!z(this._modelService,e.uri))return Promise.resolve({links:[]});const i=await this._workerWithResources([e.uri]),n=await i.$computeLinks(e.uri.toString());return n&&{links:n}}})),this._register(o.completionProvider.register("*",new j(this._workerManager,i,this._modelService,this._languageConfigurationService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return z(this._modelService,e)}async computedUnicodeHighlights(e,t,i){return(await this._workerWithResources([e])).$computeUnicodeHighlights(e.toString(),t,i)}async computeDiff(e,t,i,n){const s=await this._workerWithResources([e,t],!0),o=await s.$computeDiff(e.toString(),t.toString(),i,n);return o?{identical:o.identical,quitEarly:o.quitEarly,changes:r(o.changes),moves:o.moves.map((e=>new P.t(new A.WL(new O.M(e[0],e[1]),new O.M(e[2],e[3])),r(e[4]))))}:null;function r(e){return e.map((e=>new A.wm(new O.M(e[0],e[1]),new O.M(e[2],e[3]),e[4]?.map((e=>new A.q6(new L.Q(e[0],e[1],e[2],e[3]),new L.Q(e[4],e[5],e[6],e[7])))))))}}async computeMoreMinimalEdits(e,t,i=!1){if((0,w.EI)(t)){if(!z(this._modelService,e))return Promise.resolve(t);const n=T.W.create(),s=this._workerWithResources([e]).then((n=>n.$computeMoreMinimalEdits(e.toString(),t,i)));return s.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed()))),Promise.race([s,(0,f.wR)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return z(this._modelService,e)}async navigateValueSet(e,t,i){const n=this._modelService.getModel(e);if(!n)return null;const s=this._languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),o=s.source,r=s.flags;return(await this._workerWithResources([e])).$navigateValueSet(e.toString(),t,i,o,r)}canComputeWordRanges(e){return z(this._modelService,e)}async computeWordRanges(e,t){const i=this._modelService.getModel(e);if(!i)return Promise.resolve(null);const n=this._languageConfigurationService.getLanguageConfiguration(i.getLanguageId()).getWordDefinition(),s=n.source,o=n.flags;return(await this._workerWithResources([e])).$computeWordRanges(e.toString(),t,s,o)}async findSectionHeaders(e,t){return(await this._workerWithResources([e])).$findSectionHeaders(e.toString(),t)}async computeDefaultDocumentColors(e){return(await this._workerWithResources([e])).$computeDefaultDocumentColors(e.toString())}async _workerWithResources(e,t=!1){const i=await this._workerManager.withWorker();return await i.workerWithSyncedResources(e,t)}};U=H([V(1,N.IModelService),V(2,I.ITextResourceConfigurationService),V(3,M.rr),V(4,D.JZ),V(5,R.ILanguageFeaturesService)],U);class j{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}async provideCompletionItems(e,t){const i=this._configurationService.getValue(e.uri,t,"editor");if("off"===i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestions)z(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())z(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestions&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const s=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),o=e.getWordAtPosition(t),r=o?new L.Q(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):L.Q.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=await this._workerManager.withWorker(),c=await l.textualSuggest(n,o?.word,s);return c?{duration:c.duration,suggestions:c.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}}let q=class extends l.jG{constructor(e,t){super(),this._workerDescriptor=e,this._modelService=t,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new F.Be).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4),a.G),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new $(this._workerDescriptor,!1,this._modelService)),Promise.resolve(this._editorWorkerClient)}};q=H([V(1,N.IModelService)],q);class K{constructor(e){this._instance=e,this.proxy=this._instance}dispose(){this._instance.dispose()}setChannel(e,t){throw new Error("Not supported")}}let $=class extends l.jG{constructor(e,t,i){super(),this._workerDescriptor=e,this._disposed=!1,this._modelService=i,this._keepIdleModels=t,this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(function(e){const t="string"==typeof e?new k(e,void 0):e;return new m.SimpleWorkerClient(new x,t)}(this._workerDescriptor)),W.EditorWorkerHost.setChannel(this._worker,this._createEditorWorkerHost())}catch(e){(0,m.logOnceWebWorkerWarning)(e),this._worker=this._createFallbackLocalWorker()}return this._worker}async _getProxy(){try{const e=this._getOrCreateWorker().proxy;return await e.$ping(),e}catch(e){return(0,m.logOnceWebWorkerWarning)(e),this._worker=this._createFallbackLocalWorker(),this._worker.proxy}}_createFallbackLocalWorker(){return new K(new E.EditorSimpleWorker(this._createEditorWorkerHost(),null))}_createEditorWorkerHost(){return{$fhr:(e,t)=>this.fhr(e,t)}}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new B.WorkerTextModelSyncClient(e,this._modelService,this._keepIdleModels))),this._modelManager}async workerWithSyncedResources(e,t=!1){if(this._disposed)return Promise.reject((0,v.aD)());const i=await this._getProxy();return this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i}async textualSuggest(e,t,i){const n=await this.workerWithSyncedResources(e),s=i.source,o=i.flags;return n.$textualSuggest(e.map((e=>e.toString())),t,s,o)}dispose(){super.dispose(),this._disposed=!0}};$=H([V(2,N.IModelService)],$);var G=i(80670),Q=i(54409),Y=i(40616);let Z=class extends l.jG{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new G.vl),this._onCodeEditorAdd=this._register(new G.vl),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new G.vl),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new G.vl),this._onDiffEditorAdd=this._register(new G.vl),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new G.vl),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new Q.w,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}async openCodeEditor(e,t,i){for(const n of this._codeEditorOpenHandlers){const s=await n(e,t,i);if(null!==s)return s}return null}registerCodeEditorOpenHandler(e){const t=this._codeEditorOpenHandlers.unshift(e);return(0,l.s)(t)}};var X,J;Z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(X=0,J=Y.Gy,function(e,t){J(e,t,X)})],Z);var ee=i(97848),te=i(48682),ie=function(e,t){return function(i,n){t(i,n,e)}};let ne=class extends Z{constructor(e,t){super(t),this._register(this.onCodeEditorAdd((()=>this._checkContextKey()))),this._register(this.onCodeEditorRemove((()=>this._checkContextKey()))),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler((async(e,t,i)=>t?this.doOpenEditor(t,e):null)))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===b.ny.http||i===b.ny.https)return(0,F.CE)(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};ne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ie(0,ee.fN),ie(1,Y.Gy)],ne),(0,te.v)(g.T,ne,0);var se=i(63619);const oe=(0,se.u1)("layoutService");var re=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ae=function(e,t){return function(i,n){t(i,n,e)}};let le=class{get mainContainer(){return(0,w.Fy)(this._codeEditorService.listCodeEditors())?.getContainerDomNode()??a.G.document.body}get activeContainer(){const e=this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor();return e?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return F.tG(this.mainContainer)}get activeContainerDimension(){return F.tG(this.activeContainer)}get containers(){return(0,w.Yc)(this._codeEditorService.listCodeEditors().map((e=>e.getContainerDomNode())))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=G.Jh.None,this.onDidLayoutActiveContainer=G.Jh.None,this.onDidLayoutContainer=G.Jh.None,this.onDidChangeActiveContainer=G.Jh.None,this.onDidAddContainer=G.Jh.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};le=re([ae(0,g.T)],le);let ce=class extends le{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};ce=re([ae(1,g.T)],ce),(0,te.v)(oe,le,1);var de=i(64159),he=i(13675),ue=i(31835),ge=i(79911),pe=function(e,t){return function(i,n){t(i,n,e)}};function fe(e){return e.scheme===b.ny.file?e.fsPath:e.path}let me=0;class _e{constructor(e,t,i,n,s,o,r){this.id=++me,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class ve{constructor(e,t){this.resourceLabel=e,this.reason=t}}class be{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);const i=[];return e.length>0&&i.push(C.kg({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(C.kg({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class we{constructor(e,t,i,n,s,o,r){this.id=++me,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new be),this.removedResources.has(t)||this.removedResources.set(t,new ve(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new be),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new ve(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Ce{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new ge.To(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let o=0,r=this._past.length;o=t||r.id!==e.elements[n])&&(i=!1,s=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let s=this._future.length-1;s>=0;s--,n++){const r=this._future[s];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,o=s),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==s&&(this._past=this._past.slice(0,s)),-1!==o&&(this._future=this._future.slice(o+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class ye{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=o,i=n)}return[t,i]}canUndo(e){if(e instanceof ge.Ym){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,v.dz)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const o=this._acquireLocks(i);let r;try{r=t()}catch(t){return o(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(o(),n.dispose(),s())),(t=>(o(),n.dispose(),this._onError(t,e)))):(o(),n.dispose(),s())}async _invokeWorkspacePrepare(e){if(void 0===e.actual.prepareUndoRedo)return l.jG.None;const t=e.actual.prepareUndoRedo();return void 0===t?l.jG.None:t}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(l.jG.None);const i=e.actual.prepareUndoRedo();return i?(0,l.Xm)(i)?t(i):i.then((e=>t(e))):t(l.jG.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Se);return new ye(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new xe(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new xe}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,C.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,C.kg({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&s.push(e.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,C.kg({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const e of i.editStacks)e.locked&&o.push(e.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,C.kg({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,C.kg({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let s;!function(e){e[e.All=0]="All",e[e.This=1]="This",e[e.Cancel=2]="Cancel"}(s||(s={}));const{result:o}=await this._dialogService.prompt({type:de.A.Info,message:C.kg("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),buttons:[{label:C.kg({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",i.editStacks.length),run:()=>s.All},{label:C.kg({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>s.This}],cancelButton:{run:()=>s.Cancel}});if(o===s.Cancel)return;if(o===s.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let s;try{s=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceUndo(e,t,i,!0);if(o)return s.dispose(),o.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,s,(()=>this._continueUndoInGroup(t.groupId,n)))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new ye([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=C.kg({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestPastElement();o&&o.groupId===e&&(!t||o.groupOrder>t.groupOrder)&&(t=o,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof ge.Ym){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(s){if(s.groupId){const[e,n]=this._findClosestUndoElementInGroup(s.groupId);if(s!==e&&n)return this._undo(n,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return 1===s.type?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{}}}async _confirmAndContinueUndo(e,t,i){if((await this._dialogService.confirm({message:C.kg("confirmDifferentSource","Would you like to undo '{0}'?",i.label),primaryButton:C.kg({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:C.kg("confirmDifferentSource.no","No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&o.sourceId===e&&(!t||o.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,C.kg({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const e of i.editStacks)e.locked&&o.push(e.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,C.kg({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,C.kg({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new ye([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=C.kg({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&o.groupId===e&&(!t||o.groupOrder=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([pe(0,he.X),pe(1,ue.Ot)],ke);class xe{constructor(e){this.returnValue=e}}(0,te.v)(ge.$D,ke,1),i(82688),i(54560),i(18289);var Le=i(4195),De=i(74856),Ee=i(14280),Ne=i(87163),Ie=i(47901),Me=i(49943),Te=i(6770),Re=i(95607),Pe=i(69498),Ae=i(85584),Oe=i(79783),Fe=i(68745),Be=i(15075),We=function(e,t){return function(i,n){t(i,n,e)}};const He=F.$;let Ve=class extends Te.x{get _targetWindow(){return F.zk(this._target.targetElements[0])}get _targetDocumentElement(){return F.zk(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return 2===this._hoverPosition?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,i,n,s,r){super(),this._keybindingService=t,this._configurationService=i,this._openerService=n,this._instantiationService=s,this._accessibilityService=r,this._messageListeners=new l.Cm,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new G.vl),this._onRequestLayout=this._register(new G.vl),this._linkHandler=e.linkHandler||(t=>(0,Pe.i)(this._openerService,t,(0,Ae.VS)(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new Ue(e.target),this._hoverPointer=e.appearance?.showPointer?He("div.workbench-hover-pointer"):void 0,this._hover=this._register(new Me.N4),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),e.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),e.appearance?.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),e.position?.forcePosition&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=e.position?.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,(e=>e.stopPropagation())),this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.dispose()})),this._register(F.ko(this._targetWindow,"blur",(()=>this.dispose())));const a=He("div.hover-row.markdown-hover"),c=He("div.hover-contents");if("string"==typeof e.content)c.textContent=e.content,c.style.whiteSpace="pre-wrap";else if(F.sb(e.content))c.appendChild(e.content),c.classList.add("html-hover-contents");else{const t=e.content,i=this._instantiationService.createInstance(Pe.T,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||o.jU.fontFamily}),{element:n}=i.render(t,{actionHandler:{callback:e=>this._linkHandler(e),disposables:this._messageListeners},asyncRenderCallback:()=>{c.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});c.appendChild(n)}if(a.appendChild(c),this._hover.contentsDomNode.appendChild(a),e.actions&&e.actions.length>0){const t=He("div.hover-row.status-bar"),i=He("div.actions");e.actions.forEach((e=>{const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;Me.jQ.render(i,{label:e.label,commandId:e.commandId,run:t=>{e.run(t),this.dispose()},iconClass:e.iconClass},n)})),t.appendChild(i),this._hover.containerDomNode.appendChild(t)}let d;if(this._hoverContainer=He("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode),d=!(e.actions&&e.actions.length>0)&&(void 0===e.persistence?.hideOnHover?"string"==typeof e.content||(0,Ae.VS)(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):e.persistence.hideOnHover),e.appearance?.showHoverHint){const e=He("div.hover-row.status-bar"),t=He("div.info");t.textContent=(0,C.kg)("hoverhint","Hold {0} key to mouse over",Oe.zx?"Option":"Alt"),e.appendChild(t),this._hover.containerDomNode.appendChild(e)}const h=[...this._target.targetElements];d||h.push(this._hoverContainer);const u=this._register(new ze(h));if(this._register(u.onMouseOut((()=>{this._isLocked||this.dispose()}))),d){const e=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new ze(e)),this._register(this._lockMouseTracker.onMouseOut((()=>{this._isLocked||this.dispose()})))}else this._lockMouseTracker=u}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){const i=F.Hs(this._hoverContainer,He("div")),n=F.BC(this._hoverContainer,He("div"));i.tabIndex=0,n.tabIndex=0,this._register(F.ko(n,"focus",(t=>{e.focus(),t.preventDefault()}))),this._register(F.ko(i,"focus",(e=>{t.focus(),e.preventDefault()})))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return e}const n=this.findLastFocusableChild(i);if(n)return n}}render(e){e.appendChild(this._hoverContainer);const t=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&(0,Me.vr)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel());t&&(0,Be.h5)(t),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=this._target.targetElements.map((e=>(e=>{const t=F.mU(e),i=e.getBoundingClientRect();return{top:i.top*t,bottom:i.bottom*t,right:i.right*t,left:i.left*t}})(e))),{top:t,right:i,bottom:n,left:s}=e[0],o=i-s,r=n-t,a={top:t,right:i,bottom:n,left:s,width:o,height:r,center:{x:s+o/2,y:t+r/2}};if(this.adjustHorizontalHoverPosition(a),this.adjustVerticalHoverPosition(a),this.adjustHoverMaxHeight(a),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:a.left+=3,a.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:a.left-=3,a.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:a.top+=3,a.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:a.top-=3,a.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px"}a.center.x=a.left+o/2,a.center.y=a.top+r/2}this.computeXCordinate(a),this.computeYCordinate(a),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(a)),this._hover.onContentsChanged()}computeXCordinate(e){const t=this._hover.containerDomNode.clientWidth+2;void 0!==this._target.x?this._x=this._target.x:1===this._hoverPosition?this._x=e.right:0===this._hoverPosition?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(void 0!==this._target.x)return;const t=this._hoverPointer?3:0;if(this._forcePosition){const i=t+2;1===this._hoverPosition?this._hover.containerDomNode.style.maxWidth=this._targetDocumentElement.clientWidth-e.right-i+"px":0===this._hoverPosition&&(this._hover.containerDomNode.style.maxWidth=e.left-i+"px")}else 1===this._hoverPosition?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2):0===this._hoverPosition&&(e.left=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(void 0!==this._target.y||this._forcePosition)return;const t=this._hoverPointer?3:0;3===this._hoverPosition?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):2===this._hoverPosition&&e.bottom+this._hover.containerDomNode.clientHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){const i=2+(this._hoverPointer?3:0);3===this._hoverPosition?t=Math.min(t,e.top-i):2===this._hoverPosition&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-i))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=e.center.y-(this._y-t)-3+"px":this._hoverPointer.style.top=Math.round(t/2)-3+"px";break}case 3:case 2:{this._hoverPointer.classList.add(3===this._hoverPosition?"bottom":"top");const t=this._hover.containerDomNode.clientWidth;let i=Math.round(t/2)-3;const n=this._x+i;(ne.right)&&(i=e.center.x-this._x-3),this._hoverPointer.style.left=`${i}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};Ve=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([We(1,Ne.b),We(2,Ie.pG),We(3,Re.C),We(4,se._Y),We(5,Fe.j)],Ve);class ze extends Te.x{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new G.vl),this._elements.forEach((e=>this.onmouseover(e,(()=>this._onTargetMouseOver(e))))),this._elements.forEach((e=>this.onmouseleave(e,(()=>this._onTargetMouseLeave(e)))))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=F.zk(e).setTimeout((()=>this._fireIfMouseOutside()),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(F.zk(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class Ue{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var je,qe=i(40478),Ke=i(19621),$e=i(69627);function Ge(e,t,i){const n=i.mode===je.ALIGN?i.offset:i.offset+i.size,s=i.mode===je.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=s?s-t:Math.max(e-t,0):t<=s?s-t:t<=e-n?n:0}!function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(je||(je={}));class Qe extends l.jG{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=l.jG.None,this.toDisposeOnSetContainer=l.jG.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=F.$(".context-view"),F.jD(this.view),this.setContainer(e,t),this._register((0,l.s)((()=>this.setContainer(null,1))))}setContainer(e,t){this.useFixedPosition=1!==t;const i=this.useShadowDOM;if(this.useShadowDOM=3===t,(e!==this.container||i!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=F.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Ye,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(F.$("slot"))}else this.container.appendChild(this.view);const t=new l.Cm;Qe.BUBBLE_UP_EVENTS.forEach((e=>{t.add(F.b2(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),Qe.BUBBLE_DOWN_EVENTS.forEach((e=>{t.add(F.b2(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=t}}show(e){this.isVisible()&&this.hide(),F.w_(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(e.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",F.WU(this.view),this.toDisposeOnClean=e.render(this.view)||l.jG.None,this.delegate=e,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||Oe.un&&Ke.e.pointerEvents?(this.delegate?.layout?.(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(F.sb(e)){const i=F.BK(e),n=F.mU(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=function(e){const t=e;return!!t&&"number"==typeof t.x&&"number"==typeof t.y}(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=F.Tr(this.view),n=F.OK(this.view),s=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,r=this.delegate.anchorAxisAlignment||0;let a,l;const c=F.fz();if(0===r){const e={offset:t.top-c.pageYOffset,size:t.height,position:0===s?0:1},r={offset:t.left,size:t.width,position:0===o?0:1,mode:je.ALIGN};a=Ge(c.innerHeight,n,e)+c.pageYOffset,$e.Q.intersects({start:a,end:a+n},{start:e.offset,end:e.offset+e.size})&&(r.mode=je.AVOID),l=Ge(c.innerWidth,i,r)}else{const e={offset:t.left,size:t.width,position:0===o?0:1},r={offset:t.top,size:t.height,position:0===s?0:1,mode:je.ALIGN};l=Ge(c.innerWidth,i,e),$e.Q.intersects({start:l,end:l+i},{start:e.offset,end:e.offset+e.size})&&(r.mode=je.AVOID),a=Ge(c.innerHeight,n,r)+c.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===s?"bottom":"top"),this.view.classList.add(0===o?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=F.BK(this.container);this.view.style.top=a-(this.useFixedPosition?F.BK(this.view).top:d.top)+"px",this.view.style.left=l-(this.useFixedPosition?F.BK(this.view).left:d.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),F.jD(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,F.zk(e).document.activeElement):t&&!F.QX(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}const Ye='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';let Ze=class extends l.jG{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new Qe(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer((()=>this.layout())))}showContextView(e,t,i){let n;n=t?t===this.layoutService.getContainer((0,F.zk)(t))?1:i?3:2:1,this.contextView.setContainer(t??this.layoutService.activeContainer,n),this.contextView.show(e);const s={close:()=>{this.openContextView===s&&this.hideContextView()}};return this.openContextView=s,s}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};Ze=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,oe)],Ze);class Xe extends Ze{getContextViewElement(){return this.contextView.getViewElement()}}var Je=i(76611),et=i(24219);class tt{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(void 0===e||(0,et.Kg)(e)||(0,F.sb)(e))n=e;else if((0,et.Tn)(e.markdown)){this._hoverWidget||this.show((0,C.kg)("iconLabel.loading","Loading..."),t,i),this._cancellationTokenSource=new Je.Qi;const s=this._cancellationTokenSource.token;if(n=await e.markdown(s),void 0===n&&(n=e.markdownNotSupportedFallback),this.isDisposed||s.isCancellationRequested)return}else n=e.markdown??e.markdownNotSupportedFallback;this.show(n,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const s={content:e,target:this.target,actions:i?.actions,linkHandler:i?.linkHandler,trapFocus:i?.trapFocus,appearance:{showPointer:"element"===this.hoverDelegate.placement,skipFadeInAnimation:!this.fadeInAnimation||!!n,showHoverHint:i?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(s,t)}n?.dispose()}hasContent(e){return!(!e||(0,Ae.VS)(e)&&!e.value)}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}var it=function(e,t){return function(i,n){t(i,n,e)}};let nt=class extends l.jG{constructor(e,t,i,n,s){super(),this._instantiationService=e,this._keybindingService=i,this._layoutService=n,this._accessibilityService=s,this._managedHovers=new Map,t.onDidShowContextMenu((()=>this.hideHover())),this._contextViewHandler=this._register(new Ze(this._layoutService))}showHover(e,t,i){if(st(this._currentHoverOptions)===st(e))return;if(this._currentHover&&this._currentHoverOptions?.persistence?.sticky)return;this._currentHoverOptions=e,this._lastHoverOptions=e;const n=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),s=(0,F.bq)();i||(n&&s?s.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=s):this._lastFocusedElementBeforeOpen=void 0);const o=new l.Cm,r=this._instantiationService.createInstance(Ve,e);if(e.persistence?.sticky&&(r.isLocked=!0),r.onDispose((()=>{this._currentHover?.domNode&&(0,F.nR)(this._currentHover.domNode)&&this._lastFocusedElementBeforeOpen?.focus(),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),o.dispose()}),void 0,o),!e.container){const t=(0,F.sb)(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer((0,F.zk)(t))}if(this._contextViewHandler.showContextView(new ot(r,t),e.container),r.onRequestLayout((()=>this._contextViewHandler.layout()),void 0,o),e.persistence?.sticky)o.add((0,F.ko)((0,F.zk)(e.container).document,F.Bx.MOUSE_DOWN,(e=>{(0,F.QX)(e.target,r.domNode)||this.doHideHover()})));else{if("targetElements"in e.target)for(const t of e.target.targetElements)o.add((0,F.ko)(t,F.Bx.CLICK,(()=>this.hideHover())));else o.add((0,F.ko)(e.target,F.Bx.CLICK,(()=>this.hideHover())));const t=(0,F.bq)();if(t){const i=(0,F.zk)(t).document;o.add((0,F.ko)(t,F.Bx.KEY_DOWN,(t=>this._keyDown(t,r,!!e.persistence?.hideOnKeyDown)))),o.add((0,F.ko)(i,F.Bx.KEY_DOWN,(t=>this._keyDown(t,r,!!e.persistence?.hideOnKeyDown)))),o.add((0,F.ko)(t,F.Bx.KEY_UP,(e=>this._keyUp(e,r)))),o.add((0,F.ko)(i,F.Bx.KEY_UP,(e=>this._keyUp(e,r))))}}if("IntersectionObserver"in a.G){const t=new IntersectionObserver((e=>this._intersectionChange(e,r)),{threshold:0}),i="targetElements"in e.target?e.target.targetElements[0]:e.target;t.observe(i),o.add((0,l.s)((()=>t.disconnect())))}return this._currentHover=r,r}hideHover(){!this._currentHover?.isLocked&&this._currentHoverOptions&&this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,t,i){if("Alt"===e.key)return void(t.isLocked=!0);const n=new qe.Z(e);this._keybindingService.resolveKeyboardEvent(n).getSingleModifierDispatchChords().some((e=>!!e))||0!==this._keybindingService.softDispatch(n,n.target).kind||!i||this._currentHoverOptions?.trapFocus&&"Tab"===e.key||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus())}_keyUp(e,t){"Alt"===e.key&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),this._lastFocusedElementBeforeOpen?.focus()))}setupManagedHover(e,t,i,n){let s,o;t.setAttribute("custom-hover","true"),""!==t.title&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",t.title),t.title="");const r=(t,i)=>{const n=void 0!==o;t&&(o?.dispose(),o=void 0),i&&(s?.dispose(),s=void 0),n&&(e.onDidHideHover?.(),o=void 0)},a=(s,r,a,l)=>new f.pc((async()=>{o&&!o.isDisposed||(o=new tt(e,a||t,s>0),await o.update("function"==typeof i?i():i,r,{...n,trapFocus:l}))}),s);let c=!1;const d=(0,F.ko)(t,F.Bx.MOUSE_DOWN,(()=>{c=!0,r(!0,!0)}),!0),h=(0,F.ko)(t,F.Bx.MOUSE_UP,(()=>{c=!1}),!0),u=(0,F.ko)(t,F.Bx.MOUSE_LEAVE,(e=>{c=!1,r(!1,e.fromElement===t)}),!0),g=(0,F.ko)(t,F.Bx.MOUSE_OVER,(i=>{if(s)return;const n=new l.Cm,o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{o.x=e.x+10,(0,F.sb)(e.target)&&rt(e.target,t)!==t&&r(!0,!0)};n.add((0,F.ko)(t,F.Bx.MOUSE_MOVE,e,!0))}s=n,(0,F.sb)(i.target)&&rt(i.target,t)!==t||n.add(a(e.delay,!1,o))}),!0);let p;const m=t.tagName.toLowerCase();"input"!==m&&"textarea"!==m&&(p=(0,F.ko)(t,F.Bx.FOCUS,(()=>{if(c||s)return;const i={targetElements:[t],dispose:()=>{}},n=new l.Cm;n.add((0,F.ko)(t,F.Bx.BLUR,(()=>r(!0,!0)),!0)),n.add(a(e.delay,!1,i)),s=n}),!0));const _={show:e=>{r(!1,!0),a(0,e,void 0,e)},hide:()=>{r(!0,!0)},update:async(e,t)=>{i=e,await(o?.update(i,void 0,t))},dispose:()=>{this._managedHovers.delete(t),g.dispose(),u.dispose(),d.dispose(),h.dispose(),p?.dispose(),r(!0,!0)}};return this._managedHovers.set(t,_),_}showManagedHover(e){const t=this._managedHovers.get(e);t&&t.show(!0)}dispose(){this._managedHovers.forEach((e=>e.dispose())),super.dispose()}};function st(e){if(void 0!==e)return e?.id??e}nt=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([it(0,se._Y),it(1,Ee.Z),it(2,Ne.b),it(3,oe),it(4,Fe.j)],nt);class ot{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function rt(e,t){for(t=t??(0,F.zk)(e).document.body;!e.hasAttribute("custom-hover")&&e!==t;)e=e.parentElement;return e}(0,te.v)(De.TN,nt,1),(0,Y.zy)(((e,t)=>{const i=e.getColor(Le.oZ8);i&&(t.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`))}));var at=i(99559),lt=i(98325),ct=i(38047),dt=i(48905),ht=i(62993),ut=i(20878),gt=i(21335),pt=i(52732),ft=i(16434),mt=i(56419);function _t(e){return Object.isFrozen(e)?e:p.ol(e)}class vt{static createEmptyModel(e){return new vt({},[],[],void 0,e)}constructor(e,t,i,n,s){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.logService=s,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const e=this.raw.map((e=>{if(e instanceof vt)return e;const t=new bt("",this.logService);return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,Ie.gD)(this.contents,e):this.contents}inspect(e,t){const i=this;return{get value(){return _t(i.rawConfiguration.getValue(e))},get override(){return t?_t(i.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return _t(t?i.rawConfiguration.override(t).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){const t=[];for(const{contents:n,identifiers:s,keys:o}of i.rawConfiguration.overrides){const r=new vt(n,o,[],void 0,i.logService).getValue(e);void 0!==r&&t.push({identifiers:s,value:r})}return t.length?_t(t):void 0}}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?(0,Ie.gD)(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=p.Go(this.contents),i=p.Go(this.overrides),n=[...this.keys],s=this.raw?.length?[...this.raw]:[this];for(const o of e)if(s.push(...o.raw?.length?o.raw:[o]),!o.isEmpty()){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=i.filter((t=>w.aI(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=w.dM(t.keys)):i.push(p.Go(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new vt(t,n,i,s.every((e=>e instanceof vt))?void 0:s,this.logService)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;const i={};for(const e of w.dM([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e];const s=t[e];s&&("object"==typeof n&&"object"==typeof s?(n=p.Go(n),this.mergeContents(n,s)):n=s),i[e]=n}return new vt(i,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&et.Gv(e[i])&&et.Gv(t[i])?this.mergeContents(e[i],t[i]):e[i]=p.Go(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=p.Go(e))};for(const i of this.overrides)1===i.identifiers.length&&i.identifiers[0]===e?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),(0,Ie.iB)(this.contents,e),ft.rC.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>w.aI(t.identifiers,(0,ft.Gv)(e)))),1))}updateValue(e,t,i){if((0,Ie.kW)(this.contents,e,t,(e=>this.logService.error(e))),(i=i||-1===this.keys.indexOf(e))&&this.keys.push(e),ft.rC.test(e)){const t=(0,ft.Gv)(e),i={identifiers:t,keys:Object.keys(this.contents[e]),contents:(0,Ie.ad)(this.contents[e],(e=>this.logService.error(e)))},n=this.overrides.findIndex((e=>w.aI(e.identifiers,t)));-1!==n?this.overrides[n]=i:this.overrides.push(i)}}}class bt{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||vt.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:s,restricted:o,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new vt(i,n,s,r?[e]:void 0,this.logService),this._restrictedConfigurations=o||[]}doParseRaw(e,t){const i=mt.O.as(ft.Fd.Configuration).getConfigurationProperties(),n=this.filter(e,i,!0,t);return e=n.raw,{contents:(0,Ie.ad)(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`))),keys:Object.keys(e),overrides:this.toOverrides(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`))),restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){let s=!1;if(!n?.scopes&&!n?.skipRestricted&&!n?.exclude?.length)return{raw:e,restricted:[],hasExcludedProperties:s};const o={},r=[];for(const a in e)if(ft.rC.test(a)&&i){const i=this.filter(e[a],t,!1,n);o[a]=i.raw,s=s||i.hasExcludedProperties,r.push(...i.restricted)}else{const i=t[a],l=i?void 0!==i.scope?i.scope:3:void 0;i?.restricted&&r.push(a),n.exclude?.includes(a)||!n.include?.includes(a)&&(void 0!==l&&void 0!==n.scopes&&!n.scopes.includes(l)||n.skipRestricted&&i?.restricted)?s=!0:o[a]=e[a]}return{raw:o,restricted:r,hasExcludedProperties:s}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(ft.rC.test(n)){const s={};for(const t in e[n])s[t]=e[n][t];i.push({identifiers:(0,ft.Gv)(n),keys:Object.keys(s),contents:(0,Ie.ad)(s,t)})}return i}}class wt{constructor(e,t,i,n,s,o,r,a,l,c,d,h,u){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=s,this.policyConfiguration=o,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=c,this.workspaceConfiguration=d,this.folderConfigurationModel=h,this.memoryConfigurationModel=u}toInspectValue(e){return void 0!==e?.value||void 0!==e?.override||void 0!==e?.overrides?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class Ct{constructor(e,t,i,n,s,o,r,a,l,c){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=s,this._workspaceConfiguration=o,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this.logService=c,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new pt.fT,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=vt.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),s=this.getFolderConfigurationModelForResource(t.resource,i),o=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const t of n.overrides)for(const i of t.identifiers)void 0!==n.getOverrideValue(e,i)&&r.add(i);return new wt(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,s||void 0,o)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e}),[])}}static parse(e,t){const i=this.parseConfigurationModel(e.defaults,t),n=this.parseConfigurationModel(e.policy,t),s=this.parseConfigurationModel(e.application,t),o=this.parseConfigurationModel(e.user,t),r=this.parseConfigurationModel(e.workspace,t),a=e.folders.reduce(((e,i)=>(e.set(d.r.revive(i[0]),this.parseConfigurationModel(i[1],t)),e)),new pt.fT);return new Ct(i,n,s,o,vt.createEmptyModel(t),r,a,vt.createEmptyModel(t),new pt.fT,t)}static parseConfigurationModel(e,t){return new vt(e.contents,e.keys,e.overrides,void 0,t)}}class yt{constructor(e,t,i,n,s){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this.logService=s,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const t of e.keys)this.affectedKeys.add(t);for(const[,t]of e.overrides)for(const e of t)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const e of this.affectedKeys)this._affectsConfigStr+=e+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Ct.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){const i=this._marker+e,n=this._affectsConfigStr.indexOf(i);if(n<0)return!1;const s=n+i.length;if(s>=this._affectsConfigStr.length)return!1;const o=this._affectsConfigStr.charCodeAt(s);if(o!==this._markerCode1&&o!==this._markerCode2)return!1;if(t){const i=this.previousConfiguration?this.previousConfiguration.getValue(e,t,this.previous?.workspace):void 0,n=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!p.aI(i,n)}return!0}}var St=i(80175);const kt={kind:0},xt={kind:1};class Lt{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Lt.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e=0;e--){const n=i[e];if(n.command===t.command)continue;let s=!0;for(let e=1;e=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const s=this._map.get(n[0]);if(void 0===s)return this._log("\\ No keybinding entries."),kt;let o=null;if(n.length<2)o=s;else{o=[];for(let e=0,t=s.length;et.chords.length)continue;let i=!0;for(let e=1;e=0;i--){const n=t[i];if(Lt._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function Dt(e){return e?`${e.serialize()}`:"no when condition"}function Et(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const Nt=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class It extends l.jG{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:G.Jh.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new G.vl),this._currentChords=[],this._currentChordChecker=new f.vb,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Mt.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new f.pc,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),kt;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),kt;const s=this._contextKeyService.getContext(t),o=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(s,o,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw(0,v.iH)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(C.kg("first.chord","({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(C.kg("next.chord","({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),St.M.enabled&&St.M.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],St.M.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Mt.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Mt.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[s]=i.getChords();return this._ignoreSingleModifiers=new Mt(s),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,o=null;if(i){const[t]=e.getSingleModifierDispatchChords();s=t,o=t?[t]:[]}else[s]=e.getDispatchChords(),o=this._currentChords.map((({keypress:e})=>e));if(null===s)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(r,o,s);switch(l.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",a,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${a}".`),this._notificationService.status(C.kg("missing.chord","The key combination ({0}, {1}) is not a command.",e,a),{hideAfter:1e4}),this._leaveChordMode(),n=!0}return n;case 1:return this._logService.trace("KeybindingService#dispatch",a,"[ Several keybindings match - more chords needed ]"),n=!0,this._expectAnotherChord(s,a),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),n;case 2:if(this._logService.trace("KeybindingService#dispatch",a,`[ Will dispatch command ${l.commandId} ]`),null===l.commandId||""===l.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${a}".`),this._notificationService.status(C.kg("missing.chord","The key combination ({0}, {1}) is not a command.",e,a),{hideAfter:1e4}),this._leaveChordMode(),n=!0}}else{this.inChordMode&&this._leaveChordMode(),l.isBubble||(n=!0),this._log(`+ Invoking command ${l.commandId}.`),this._currentlyDispatchingCommandId=l.commandId;try{void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e)))}finally{this._currentlyDispatchingCommandId=null}Nt.test(l.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding",detail:e.getUserSettingsLabel()??void 0})}return n}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class Mt{static{this.EMPTY=new Mt(null)}constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}var Tt=i(19561);class Rt{constructor(e,t,i,n,s,o,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?Pt(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=Pt(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=o,this.isBuiltinExtension=r}}function Pt(e){const t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return Ot.r0.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:Ot.rr.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return Ot.G$.toLabel(this._os,this._chords,(e=>this._getUserSettingsLabel(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new at.FW(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class Bt extends Ft{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return At.YM.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":At.YM.toString(e.keyCode)}_getElectronAccelerator(e){return At.YM.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=At.YM.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return Bt.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=At.YM.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=At.Fo[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof at.dG)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new at.dG(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=Pt(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new Bt(i,t)]:[]}}var Wt=i(41517),Ht=i(86171),Vt=i(2727),zt=i(1255),Ut=i(47025),jt=i(59951),qt=i(35477),Kt=i(31806),$t=i(30981),Gt=i(42574),Qt=i(93223),Yt=i(34287),Zt=i(75969),Xt=i(53510),Jt=i(98099),ei=i(9306),ti=i(5390),ii=i(93231),ni=i(81040),si=i(56613),oi=i(4590);const ri=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,ai=/(&)?(&)([^\s&])/g;var li,ci;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(li||(li={})),function(e){e[e.Above=0]="Above",e[e.Below=1]="Below"}(ci||(ci={}));class di extends Jt.E{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const s=document.createElement("div");s.classList.add("monaco-menu"),s.setAttribute("role","presentation"),super(s,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Oe.zx||Oe.j9?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=s,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register(Xt.q.addTarget(s)),this._register((0,F.ko)(s,F.Bx.KEY_DOWN,(e=>{new qe.Z(e).equals(2)&&e.preventDefault()}))),i.enableMnemonics&&this._register((0,F.ko)(s,F.Bx.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){F.fs.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof ui&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),Oe.j9&&this._register((0,F.ko)(s,F.Bx.KEY_DOWN,(e=>{const t=new qe.Z(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),F.fs.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),F.fs.stop(e,!0))}))),this._register((0,F.ko)(this.domNode,F.Bx.MOUSE_OUT,(e=>{const t=e.relatedTarget;(0,F.QX)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,F.ko)(this.actionsList,F.Bx.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,F.QX)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(Xt.q.addTarget(this.actionsList)),this._register((0,F.ko)(this.actionsList,Xt.B.Tap,(e=>{let t=e.initialTarget;if(t&&(0,F.QX)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new ti.MU(s,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register((0,F.ko)(s,Xt.B.Change,(e=>{F.fs.stop(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register((0,F.ko)(r,F.Bx.MOUSE_UP,(e=>{e.preventDefault()})));const a=(0,F.zk)(e);s.style.maxHeight=`${Math.max(10,a.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(((e,n)=>{if(i.submenuIds?.has(e.id))return console.warn(`Found submenu cycle: ${e.id}`),!1;if(e instanceof $t.wv){if(n===t.length-1||0===n)return!1;if(t[n-1]instanceof $t.wv)return!1}return!0})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof gi))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||((0,F.Cl)(e)?this.styleSheet=(0,F.li)(e):(di.globalStyleSheet||(di.globalStyleSheet=(0,F.li)()),this.styleSheet=di.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${pi(ii.W.menuSelection)}\n${pi(ii.W.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n\tmax-height: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderHoverBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderActiveBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`)}return i}(t,(0,F.Cl)(e))}styleScrollElement(e,t){const i=t.foregroundColor??"",n=t.backgroundColor??"",s=t.borderColor?`1px solid ${t.borderColor}`:"",o=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=s,e.style.borderRadius="5px",e.style.color=i,e.style.backgroundColor=n,e.style.boxShadow=o}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register((0,F.ko)(this.element,F.Bx.MOUSE_UP,(e=>{if(F.fs.stop(e,!0),Zt.gm){if(new Yt.P((0,F.zk)(this.element),e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,F.ko)(this.element,F.Bx.CONTEXT_MENU,(e=>{F.fs.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,F.BC)(this.element,(0,F.$)("a.action-menu-item")),this._action.id===$t.wv.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,F.BC)(this.item,(0,F.$)("span.menu-item-check"+si.L.asCSSSelector(ii.W.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,F.BC)(this.item,(0,F.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,F.BC)(this.item,(0,F.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item?.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){(0,F.w_)(this.label);let e=(0,oi.pS)(this.action.label);if(e){const t=function(e){const t=ri,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=ri.exec(e);if(i){e=c.ih(e),ai.lastIndex=0;let t=ai.exec(e);for(;t&&t[1];)t=ai.exec(e);const n=e=>e.replace(/&&/g,"&");t?this.label.append(c.NB(n(e.substr(0,t.index))," "),(0,F.$)("u",{"aria-hidden":"true"},t[3]),c.BO(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item?.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",s=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=t??"",this.item.style.backgroundColor=i??"",this.item.style.outline=n,this.item.style.outlineOffset=s),this.check&&(this.check.style.color=t??"")}}class ui extends hi{constructor(e,t,i,n,s){super(e,e,n,s),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new l.Cm),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:{horizontal:li.Right,vertical:ci.Below},this.showScheduler=new f.uC((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new f.uC((()=>{this.element&&!(0,F.QX)((0,F.bq)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,F.BC)(this.item,(0,F.$)("span.submenu-indicator"+si.L.asCSSSelector(ii.W.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,F.ko)(this.element,F.Bx.KEY_UP,(e=>{const t=new qe.Z(e);(t.equals(17)||t.equals(3))&&(F.fs.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,F.ko)(this.element,F.Bx.KEY_DOWN,(e=>{const t=new qe.Z(e);(0,F.bq)()===this.item&&(t.equals(17)||t.equals(3))&&F.fs.stop(e,!0)}))),this._register((0,F.ko)(this.element,F.Bx.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,F.ko)(this.element,F.Bx.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,F.ko)(this.element,F.Bx.FOCUS_OUT,(e=>{this.element&&!(0,F.QX)((0,F.bq)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){F.fs.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=Ge(e.width,t.width,{position:n.horizontal===li.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left{new qe.Z(e).equals(15)&&(F.fs.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,F.ko)(this.submenuContainer,F.Bx.KEY_DOWN,(e=>{new qe.Z(e).equals(15)&&F.fs.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){this.item&&this.item?.setAttribute("aria-expanded",e)}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class gi extends ei.Z4{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function pi(e){const t=(0,ni.J)()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}var fi=i(52010);class mi{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=(0,F.bq)();const n=(0,F.sb)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{this.lastContainer=n;const s=e.getMenuClassName?e.getMenuClassName():"";s&&(n.className+=" "+s),this.options.blockMouse&&(this.block=n.appendChild((0,F.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",this.blockDisposable?.dispose(),this.blockDisposable=(0,F.ko)(this.block,F.Bx.MOUSE_DOWN,(e=>e.stopPropagation())));const o=new l.Cm,r=e.actionRunner||new $t.LN;r.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,o),r.onDidRun(this.onDidActionRun,this,o),i=new di(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:r,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},fi.XS),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,o),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,o);const a=(0,F.zk)(n);return o.add((0,F.ko)(a,F.Bx.BLUR,(()=>this.contextViewService.hideContextView(!0)))),o.add((0,F.ko)(a,F.Bx.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new Yt.P(a,e);let i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),(0,l.qE)(o,i)},focus:()=>{i?.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide?.(!!t),this.block&&(this.block.remove(),this.block=null),this.blockDisposable?.dispose(),this.blockDisposable=null,this.lastContainer&&((0,F.bq)()===this.lastContainer||(0,F.QX)((0,F.bq)(),this.lastContainer))&&this.focusToReturn?.focus(),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!(0,v.MB)(e.error)&&this.notificationService.error(e.error)}}var _i=function(e,t){return function(i,n){t(i,n,e)}};let vi=class extends l.jG{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new mi(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,s,o){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=s,this.contextKeyService=o,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new G.vl),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new G.vl)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=bi.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{e.onHide?.(t),this._onDidHideContextMenu.fire()}}),F.Di.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var bi;vi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([_i(0,Vt.k),_i(1,ue.Ot),_i(2,Ee.l),_i(3,Ne.b),_i(4,Qt.ez),_i(5,ee.fN)],vi),function(e){e.transform=function(e,t,i){if(!((n=e)&&n.menuId instanceof Qt.D8))return e;var n;const{menuId:s,menuActionOptions:o,contextKeyService:r}=e;return{...e,getActions:()=>{const n=[];if(s){const e=t.getMenuActions(s,r??i,o);(0,Gt.$u)(e,n)}return e.getActions?$t.wv.join(e.getActions(),n):n}}}}(bi||(bi={}));var wi,Ci=i(23560);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(wi||(wi={}));var yi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Si=function(e,t){return function(i,n){t(i,n,e)}};let ki=class{constructor(e){this._commandService=e}async open(e,t){if(!(0,b.v$)(e,b.ny.command))return!1;if(!t?.allowCommands)return!0;if("string"==typeof e&&(e=d.r.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=(0,Ci.qg)(decodeURIComponent(e.query))}catch{try{i=(0,Ci.qg)(e.query)}catch{}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};ki=yi([Si(0,gt.d)],ki);let xi=class{constructor(e){this._editorService=e}async open(e,t){"string"==typeof e&&(e=d.r.parse(e));const{selection:i,uri:n}=(0,Re.e)(e);return(e=n).scheme===b.ny.file&&(e=(0,jt.Fd)(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:t?.fromUserGesture?wi.USER:wi.API,...t?.editorOptions}},this._editorService.getFocusedCodeEditor(),t?.openToSide),!0}};xi=yi([Si(0,g.T)],xi);let Li=class{constructor(e,t){this._openers=new Q.w,this._validators=new Q.w,this._resolvers=new Q.w,this._resolvedUriTargets=new pt.fT((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new Q.w,this._defaultExternalOpener={openExternal:async e=>((0,b.fV)(e,b.ny.http,b.ny.https)?F.CE(e):a.G.location.href=e,!0)},this._openers.push({open:async(e,t)=>!(!t?.openExternal&&!(0,b.fV)(e,b.ny.mailto,b.ny.http,b.ny.https,b.ny.vsls)||(await this._doOpenExternal(e,t),0))}),this._openers.push(new ki(t)),this._openers.push(new xi(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){const i="string"==typeof e?d.r.parse(e):e,n=this._resolvedUriTargets.get(i)??e;for(const e of this._validators)if(!await e.shouldOpen(n,t))return!1;for(const i of this._openers)if(await i.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(const i of this._resolvers)try{const n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch{}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i="string"==typeof e?d.r.parse(e):e;let n,s;try{n=(await this.resolveExternalUri(i,t)).resolved}catch{n=i}if(s="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),t?.allowContributedOpeners){const e="string"==typeof t?.allowContributedOpeners?t?.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(await t.openExternal(s,{sourceUri:i,preferredOpenerId:e},Je.XO.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},Je.XO.None)}dispose(){this._validators.clear()}};Li=yi([Si(0,g.T),Si(1,gt.d)],Li);var Di=i(56812),Ei=i(41750),Ni=i(92903),Ii=i(12098),Mi=i(76583),Ti=i(6209),Ri=i(43575),Pi=function(e,t){return function(i,n){t(i,n,e)}};let Ai=class extends l.jG{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=mt.O.as(Ti.Fd.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){const[n,s]=this.getOrInstantiateProvider(e,i?.enabledProviderPrefixes),o=this.visibleQuickAccess,r=o?.descriptor;if(o&&s&&r===s)return e===s.prefix||i?.preserveValue||(o.picker.value=e),void this.adjustValueSelection(o.picker,s,i);if(s&&!i?.preserveValue){let t;if(o&&r&&r!==s){const e=o.value.substr(r.prefix.length);e&&(t=`${s.prefix}${e}`)}if(!t){const e=n?.defaultFilterValue;e===Ti.aJ.LAST?t=this.lastAcceptedPickerValues.get(s):"string"==typeof e&&(t=`${s.prefix}${e}`)}"string"==typeof t&&(e=t)}const a=o?.picker?.valueSelection,c=o?.picker?.value,d=new l.Cm,h=d.add(this.quickInputService.createQuickPick({useSeparators:!0}));let u;h.value=e,this.adjustValueSelection(h,s,i),h.placeholder=i?.placeholder??s?.placeholder,h.quickNavigate=i?.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!o,("number"==typeof i?.itemActivation||i?.quickNavigateConfiguration)&&(h.itemActivation=i?.itemActivation??Ri.C1.SECOND),h.contextKey=s?.contextKey,h.filterValue=e=>e.substring(s?s.prefix.length:0),t&&(u=new f.Zv,d.add(G.Jh.once(h.onWillAccept)((e=>{e.veto(),h.hide()})))),d.add(this.registerPickerListeners(h,n,s,e,i));const g=d.add(new Je.Qi);return n&&d.add(n.provide(h,g.token,i?.providerOptions)),G.Jh.once(h.onDidHide)((()=>{0===h.selectedItems.length&&g.cancel(),d.dispose(),u?.complete(h.selectedItems.slice(0))})),h.show(),a&&c===e&&(h.valueSelection=a),t?u?.p:void 0}adjustValueSelection(e,t,i){let n;n=i?.preserveValue?[e.value.length,e.value.length]:[t?.prefix.length??0,e.value.length],e.valueSelection=n}registerPickerListeners(e,t,i,n,s){const o=new l.Cm,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add((0,l.s)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e,s?.enabledProviderPrefixes);i!==t?this.show(e,{enabledProviderPrefixes:s?.enabledProviderPrefixes,preserveValue:!0,providerOptions:s?.providerOptions}):r.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e,t){const i=this.registry.getQuickAccessProvider(e);if(!i||t&&!t?.includes(i.prefix))return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};Ai=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Pi(0,Ri.GK),Pi(1,se._Y)],Ai);var Oi=i(44925),Fi=i(26745),Bi=i(43014),Wi=i(68860),Hi=i(95578);class Vi{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"==typeof e?e:e.label)).join("")}}!function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)}([Hi.B],Vi.prototype,"toString",null);const zi=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi,Ui={},ji=new Wi.n("quick-input-button-icon-");function qi(e,t,i){let n=e.iconClass||function(e){if(!e)return;let t;const i=e.dark.toString();return Ui[i]?t=Ui[i]:(t=ji.nextId(),F.Wt(`.${t}, .hc-light .${t}`,`background-image: ${F.Tf(e.light||e.dark)}`),F.Wt(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${F.Tf(e.dark)}`),Ui[i]=t),t}(e.iconPath);return e.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:t,label:"",tooltip:e.tooltip||"",class:n,enabled:!0,run:i}}var Ki=function(e,t){return function(i,n){t(i,n,e)}};const $i="inQuickInput",Gi=new ee.N1($i,!1,(0,C.kg)("inQuickInput","Whether keyboard focus is inside the quick input control")),Qi=ee.M$.has($i),Yi="quickInputType",Zi=new ee.N1(Yi,void 0,(0,C.kg)("quickInputType","The type of the currently visible quick input")),Xi="cursorAtEndOfQuickInputBox",Ji=new ee.N1(Xi,!1,(0,C.kg)("cursorAtEndOfQuickInputBox","Whether the cursor in the quick input is at the end of the input box")),en=ee.M$.has(Xi),tn={iconClass:si.L.asClassName(ii.W.quickInputBack),tooltip:(0,C.kg)("quickInput.back","Back"),handle:-1};class nn extends l.jG{static{this.noPromptMessage=(0,C.kg)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel")}constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._leftButtons=[],this._rightButtons=[],this._inlineButtons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=nn.noPromptMessage,this._severity=de.A.Ignore,this.onDidTriggerButtonEmitter=this._register(new G.vl),this.onDidHideEmitter=this._register(new G.vl),this.onWillHideEmitter=this._register(new G.vl),this.onDisposeEmitter=this._register(new G.vl),this.visibleDisposables=this._register(new l.Cm),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Oe.un;this._ignoreFocusOut=e&&!Oe.un,t&&this.update()}get titleButtons(){return this._leftButtons.length?[...this._leftButtons,this._rightButtons]:this._rightButtons}get buttons(){return[...this._leftButtons,...this._rightButtons,...this._inlineButtons]}set buttons(e){this._leftButtons=e.filter((e=>e===tn)),this._rightButtons=e.filter((e=>e!==tn&&e.location!==Ri.dH.Inline)),this._inlineButtons=e.filter((e=>e.location===Ri.dH.Inline)),this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=e??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Ri.kF.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=Ri.kF.Other){this.onWillHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?F.Ln(this.ui.widget,this._widget):F.Ln(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new f.pc,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this._leftButtons.map(((e,t)=>qi(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.leftActionBar.push(e,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this._rightButtons.map(((e,t)=>qi(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.rightActionBar.push(t,{icon:!0,label:!1}),this.ui.inlineActionBar.clear();const i=this._inlineButtons.map(((e,t)=>qi(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.inlineActionBar.push(i,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const e=this.toggles?.filter((e=>e instanceof Oi.l))??[];this.ui.inputBox.toggles=e}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,F.Ln(this.ui.message),function(e,t,i){F.Ln(t);const n=function(e){const t=[];let i,n=0;for(;i=zi.exec(e);){i.index-n>0&&t.push(e.substring(n,i.index));const[,s,o,,r]=i;r?t.push({label:s,href:o,title:r}):t.push({label:s,href:o}),n=i.index+i[0].length}return n{F.sd(t)&&F.fs.stop(t,!0),i.callback(e.href)},a=i.disposables.add(new Fi.f(o,F.Bx.CLICK)).event,l=i.disposables.add(new Fi.f(o,F.Bx.KEY_DOWN)).event,c=G.Jh.chain(l,(e=>e.filter((e=>{const t=new qe.Z(e);return t.equals(10)||t.equals(3)}))));i.disposables.add(Xt.q.addTarget(o));const d=i.disposables.add(new Fi.f(o,Xt.B.Tap)).event;G.Jh.any(a,d,c)(r,null,i.disposables),t.appendChild(o)}}(i,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,C.kg)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==de.A.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class sn extends nn{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new G.vl),this.onWillAcceptEmitter=this._register(new G.vl),this.onDidAcceptEmitter=this._register(new G.vl),this.onDidCustomEmitter=this._register(new G.vl),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=Ri.C1.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new G.vl),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new G.vl),this.onDidTriggerItemButtonEmitter=this._register(new G.vl),this.onDidTriggerSeparatorButtonEmitter=this._register(new G.vl),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new G.at,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}static{this.DEFAULT_ARIA_LABEL=(0,C.kg)("quickInputBox.ariaLabel","Type to narrow down results.")}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Ri.Ym:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(Ri.Fp.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,((e,t)=>t))((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,w.aI)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,w.aI)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(F.Er(t)&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&this.visible&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,w.aI)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return F.ko(this.ui.container,F.Bx.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new qe.Z(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const n=e.getChords();return!(n.length>1||(n[0].shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n[0].altKey&&6===i||n[0].ctrlKey&&5===i||n[0].metaKey&&57===i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.titleButtons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;!n&&i.inputBox&&(n=this.placeholder||sn.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=n??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents((()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this._itemActivation){case Ri.C1.NONE:this._itemActivation=Ri.C1.FIRST;break;case Ri.C1.SECOND:this.ui.list.focus(Ri.Fp.Second),this._itemActivation=Ri.C1.FIRST;break;case Ri.C1.LAST:this.ui.list.focus(Ri.Fp.Last),this._itemActivation=Ri.C1.FIRST;break;default:this.trySelectFirst()}}))),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Ri.Fp.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(e??!1))}}class on extends nn{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new G.vl),this.onDidAcceptEmitter=this._register(new G.vl),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.titleButtons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}let rn=class extends De.fO{constructor(e,t){super("element",!1,(e=>this.getOverrideOptions(e)),e,t)}getOverrideOptions(e){return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:(F.sb(e.content)?e.content.textContent??"":"string"==typeof e.content?e.content:e.content.value).includes("\n"),skipFadeInAnimation:!0}}}};rn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Ki(0,Ie.pG),Ki(1,De.TN)],rn);var an=i(96337),ln=i(229);const cn="done",dn="active",hn="infinite",un="infinite-long-running",gn="discrete";class pn extends l.jG{static{this.LONG_RUNNING_INFINITE_THRESHOLD=1e4}constructor(e,t){super(),this.progressSignal=this._register(new l.HE),this.workedVal=0,this.showDelayedScheduler=this._register(new f.uC((()=>(0,F.WU)(this.element)),0)),this.longRunningScheduler=this._register(new f.uC((()=>this.infiniteLongRunning()),pn.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=t?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(dn,hn,un,gn),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(cn),this.element.classList.contains(hn)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(gn,cn,un),this.element.classList.add(dn,hn),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(un)}getContainer(){return this.element}}var fn=i(72711);const mn=F.$;class _n extends l.jG{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>F.b2(this.findInput.inputBox.inputElement,F.Bx.KEY_DOWN,e),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=F.BC(this.parent,mn(".quick-input-box")),this.findInput=this._register(new fn.c(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===de.A.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===de.A.Info?1:e===de.A.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===de.A.Info?1:e===de.A.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}var vn=i(76432),bn=i(38403),wn=i(15339),Cn=i(39679),yn=i(72582);const Sn=new yn.d((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new yn.d((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new yn.d((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var kn,xn=i(41703),Ln=i(73755),Dn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},En=function(e,t){return function(i,n){t(i,n,e)}};const Nn=F.$;class In{constructor(e,t,i){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new yn.d((()=>{const e=i.label??"",t=(0,oi._k)(e).text.trim(),n=i.ariaLabel||[e,this.saneDescription,this.saneDetail].map((e=>(0,oi.R$)(e))).filter((e=>!!e)).join(", ");return{saneLabel:e,saneSortLabel:t,saneAriaLabel:n}})),this._saneDescription=i.description,this._saneTooltip=i.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class Mn extends In{constructor(e,t,i,n,s,o){super(e,t,s),this.fireButtonTriggered=i,this._onChecked=n,this.item=s,this._separator=o,this._checked=!1,this.onChecked=t?G.Jh.map(G.Jh.filter(this._onChecked.event,(e=>e.element===this)),(e=>e.checked)):G.Jh.None,this._saneDetail=s.detail,this._labelHighlights=s.highlights?.label,this._descriptionHighlights=s.highlights?.description,this._detailHighlights=s.highlights?.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var Tn;!function(e){e[e.NONE=0]="NONE",e[e.MOUSE_HOVER=1]="MOUSE_HOVER",e[e.ACTIVE_ITEM=2]="ACTIVE_ITEM"}(Tn||(Tn={}));class Rn extends In{constructor(e,t,i){super(e,!1,i),this.fireSeparatorButtonTriggered=t,this.separator=i,this.children=new Array,this.focusInsideSeparator=Tn.NONE}}class Pn{getHeight(e){return e instanceof Rn?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof Mn?Fn.ID:Bn.ID}}class An{getWidgetAriaLabel(){return(0,C.kg)("quickInput","Quick Input")}getAriaLabel(e){return e.separator?.label?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox&&e instanceof Mn)return{get value(){return e.checked},onDidChange:t=>e.onChecked((()=>t()))}}}class On{constructor(e){this.hoverDelegate=e}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=new l.Cm,t.toDisposeTemplate=new l.Cm,t.entry=F.BC(e,Nn(".quick-input-list-entry"));const i=F.BC(t.entry,Nn("label.quick-input-list-label"));t.toDisposeTemplate.add(F.b2(i,F.Bx.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=F.BC(i,Nn("input.quick-input-list-checkbox")),t.checkbox.type="checkbox";const n=F.BC(i,Nn(".quick-input-list-rows")),s=F.BC(n,Nn(".quick-input-list-row")),o=F.BC(n,Nn(".quick-input-list-row"));t.label=new bn.s(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=F.Hs(t.label.element,Nn(".quick-input-list-icon"));const r=F.BC(s,Nn(".quick-input-list-entry-keybinding"));t.keybinding=new wn.x(r,Oe.OS),t.toDisposeTemplate.add(t.keybinding);const a=F.BC(o,Nn(".quick-input-list-label-meta"));return t.detail=new bn.s(a,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=F.BC(t.entry,Nn(".quick-input-list-separator")),t.actionBar=new Jt.E(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.actionBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,i){i.toDisposeElement.clear(),i.actionBar.clear()}}let Fn=class extends On{static{kn=this}static{this.ID="quickpickitem"}constructor(e,t){super(e),this.themeService=t,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return kn.ID}renderTemplate(e){const t=super.renderTemplate(e);return t.toDisposeTemplate.add(F.b2(t.checkbox,F.Bx.CHANGE,(e=>{t.element.checked=t.checkbox.checked}))),t}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0;const s=n.item;i.checkbox.checked=n.checked,i.toDisposeElement.add(n.onChecked((e=>i.checkbox.checked=e))),i.checkbox.disabled=n.checkboxDisabled;const{labelHighlights:o,descriptionHighlights:r,detailHighlights:a}=n;if(s.iconPath){const e=(0,Cn.HD)(this.themeService.getColorTheme().type)?s.iconPath.dark:s.iconPath.light??s.iconPath.dark,t=d.r.revive(e);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=F.Tf(t)}else i.icon.style.backgroundImage="",i.icon.className=s.iconClass?`quick-input-list-icon ${s.iconClass}`:"";let l;!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:n.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const c={matches:o||[],descriptionTitle:l,descriptionMatches:r||[],labelEscapeNewLines:!0};if(c.extraClasses=s.iconClasses,c.italic=s.italic,c.strikethrough=s.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),i.keybinding.set(s.keybinding),n.saneDetail){let e;n.saneTooltip||(e={markdown:{value:n.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:a,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";n.separator?.label?(i.separator.textContent=n.separator.label,i.separator.style.display="",this.addItemWithSeparator(n)):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!n.separator);const h=s.buttons;h&&h.length?(i.actionBar.push(h.map(((e,t)=>qi(e,`id-${t}`,(()=>n.fireButtonTriggered({button:e,item:n.item}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,i)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}};Fn=kn=Dn([En(1,Y.Gy)],Fn);class Bn extends On{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}static{this.ID="quickpickseparator"}get templateId(){return Bn.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderTemplate(e){const t=super.renderTemplate(e);return t.checkbox.style.display="none",t}renderElement(e,t,i){const n=e.element;i.element=n,n.element=i.entry??void 0,n.element.classList.toggle("focus-inside",!!n.focusInsideSeparator);const s=n.separator,{labelHighlights:o,descriptionHighlights:r,detailHighlights:a}=n;let l;i.icon.style.backgroundImage="",i.icon.className="",!n.saneTooltip&&n.saneDescription&&(l={markdown:{value:n.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDescription});const c={matches:o||[],descriptionTitle:l,descriptionMatches:r||[],labelEscapeNewLines:!0};if(i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(n.saneLabel,n.saneDescription,c),n.saneDetail){let e;n.saneTooltip||(e={markdown:{value:n.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:n.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(n.saneDetail,void 0,{matches:a,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";i.separator.style.display="none",i.entry.classList.add("quick-input-list-separator-border");const d=s.buttons;d&&d.length?(i.actionBar.push(d.map(((e,t)=>qi(e,`id-${t}`,(()=>n.fireSeparatorButtonTriggered({button:e,separator:n.separator}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions"),this.addSeparator(n)}disposeElement(e,t,i){this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||e.element.element?.classList.remove("focus-inside"),super.disposeElement(e,t,i)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}}let Wn=class extends l.jG{constructor(e,t,i,n,s,o){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=i,this.accessibilityService=o,this._onKeyDown=new G.vl,this._onLeave=new G.vl,this.onLeave=this._onLeave.event,this._visibleCountObservable=(0,Ln.FY)("VisibleCount",0),this.onChangedVisibleCount=G.Jh.fromObservable(this._visibleCountObservable,this._store),this._allVisibleCheckedObservable=(0,Ln.FY)("AllVisibleChecked",!1),this.onChangedAllVisibleChecked=G.Jh.fromObservable(this._allVisibleCheckedObservable,this._store),this._checkedCountObservable=(0,Ln.FY)("CheckedCount",0),this.onChangedCheckedCount=G.Jh.fromObservable(this._checkedCountObservable,this._store),this._checkedElementsObservable=(0,Ln.Zh)({equalsFn:w.aI},new Array),this.onChangedCheckedElements=G.Jh.fromObservable(this._checkedElementsObservable,this._store),this._onButtonTriggered=new G.vl,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new G.vl,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new G.vl,this._elementCheckedEventBufferer=new G.at,this._hasCheckboxes=!1,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new l.Cm),this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=F.BC(this.parent,Nn(".quick-input-list")),this._separatorRenderer=new Bn(t),this._itemRenderer=s.createInstance(Fn,t),this._tree=this._register(s.createInstance(vn.zL,"QuickInput",this._container,new Pn,[this._itemRenderer,this._separatorRenderer],{filter:{filter(e){return e.hidden?0:e instanceof Rn?2:1}},sorter:{compare:(e,t)=>this.sortByLabel&&this._lastQueryString?function(e,t,i){const n=e.labelHighlights||[],s=t.labelHighlights||[];return n.length&&!s.length?-1:!n.length&&s.length?1:0===n.length&&0===s.length?0:function(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=function(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=n.startsWith(i),r=s.startsWith(i);if(o!==r)return o?-1:1;if(o&&r){if(n.lengths.length)return 1}return 0}(e,t,i);if(o)return o;const r=n.endsWith(i);if(r!==s.endsWith(i))return r?-1:1;const a=function(e,t){const i=e||"",n=t||"",s=Sn.value.collator.compare(i,n);return Sn.value.collatorIsNumeric&&0===s&&i!==n?ie.elements.filter((e=>e instanceof Mn)).map((e=>e.item))),this._store)}get onDidChangeSelection(){return G.Jh.map(this._tree.onDidChangeSelection,(e=>({items:e.elements.filter((e=>e instanceof Mn)).map((e=>e.item)),event:e.browserEvent})),this._store)}get displayed(){return"none"!==this._container.style.display}set displayed(e){this._container.style.display=e?"":"none"}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=e??""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnTreeModelChanged(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown((e=>{const t=new qe.Z(e);10===t.keyCode&&this.toggleCheckbox(),this._onKeyDown.fire(t)})))}_registerOnContainerClick(){this._register(F.ko(this._container,F.Bx.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()})))}_registerOnMouseMiddleClick(){this._register(F.ko(this._container,F.Bx.AUXCLICK,(e=>{1===e.button&&this._onLeave.fire()})))}_registerOnTreeModelChanged(){this._register(this._tree.onDidChangeModel((()=>{const e=this._itemElements.filter((e=>!e.hidden)).length;this._visibleCountObservable.set(e,void 0),this._hasCheckboxes&&this._updateCheckedObservables()})))}_registerOnElementChecked(){this._register(this._elementCheckedEventBufferer.wrapEvent(this._elementChecked.event,((e,t)=>t))((e=>this._updateCheckedObservables())))}_registerOnContextMenu(){this._register(this._tree.onContextMenu((e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))})))}_registerHoverListeners(){const e=this._register(new f.Th(this.hoverDelegate.delay));this._register(this._tree.onMouseOver((async t=>{if(F.nY(t.browserEvent.target))e.cancel();else if(F.nY(t.browserEvent.relatedTarget)||!F.QX(t.browserEvent.relatedTarget,t.element?.element))try{await e.trigger((async()=>{t.element instanceof Mn&&this.showHover(t.element)}))}catch(t){if(!(0,v.MB)(t))throw t}}))),this._register(this._tree.onMouseOut((t=>{F.QX(t.browserEvent.relatedTarget,t.element?.element)||e.cancel()})))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus((e=>{const t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const e of this._separatorRenderer.visibleSeparators){const i=e===t;!!(e.focusInsideSeparator&Tn.ACTIVE_ITEM)!==i&&(i?e.focusInsideSeparator|=Tn.ACTIVE_ITEM:e.focusInsideSeparator&=~Tn.ACTIVE_ITEM,this._tree.rerender(e))}}))),this._register(this._tree.onMouseOver((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const e of this._separatorRenderer.visibleSeparators)e===t&&(e.focusInsideSeparator&Tn.MOUSE_HOVER||(e.focusInsideSeparator|=Tn.MOUSE_HOVER,this._tree.rerender(e)))}))),this._register(this._tree.onMouseOut((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const e of this._separatorRenderer.visibleSeparators)e===t&&e.focusInsideSeparator&Tn.MOUSE_HOVER&&(e.focusInsideSeparator&=~Tn.MOUSE_HOVER,this._tree.rerender(e))})))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection((e=>{const t=e.elements.filter((e=>e instanceof Mn));t.length!==e.elements.length&&(1===e.elements.length&&e.elements[0]instanceof Rn&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))})))}setAllVisibleChecked(e){this._elementCheckedEventBufferer.bufferEvents((()=>{this._itemElements.forEach((t=>{t.hidden||t.checkboxDisabled||(t.checked=e)}))}))}setElements(e){let t;this._elementDisposable.clear(),this._lastQueryString=void 0,this._inputElements=e,this._hasCheckboxes=this.parent.classList.contains("show-checkboxes"),this._itemElements=new Array,this._elementTree=e.reduce(((i,n,s)=>{let o;if("separator"===n.type){if(!n.buttons)return i;t=new Rn(s,(e=>this._onSeparatorButtonTriggered.fire(e)),n),o=t}else{const r=s>0?e[s-1]:void 0;let a;r&&"separator"===r.type&&!r.buttons&&(t=void 0,a=r);const l=new Mn(s,this._hasCheckboxes,(e=>this._onButtonTriggered.fire(e)),this._elementChecked,n,a);if(this._itemElements.push(l),t)return t.children.push(l),i;o=l}return i.push(o),i}),new Array),this._setElementsToTree(this._elementTree),this.accessibilityService.isScreenReaderOptimized()&&setTimeout((()=>{const e=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),t=e?.parentNode;if(e&&t){const i=e.nextSibling;e.remove(),t.insertBefore(e,i)}}),0)}setFocusedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e)).filter((e=>!e.hidden));if(this._tree.setFocus(t),e.length>0){const e=this._tree.getFocus()[0];e&&this._tree.reveal(e)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e));this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){this._elementCheckedEventBufferer.bufferEvents((()=>{const t=new Set;for(const i of e)t.add(i);for(const e of this._itemElements)e.checked=t.has(e.item)}))}focus(e){if(this._itemElements.length)switch(e===Ri.Fp.Second&&this._itemElements.length<2&&(e=Ri.Fp.First),e){case Ri.Fp.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,(e=>e.element instanceof Mn));break;case Ri.Fp.Second:{this._tree.scrollTop=0;let e=!1;this._tree.focusFirst(void 0,(t=>t.element instanceof Mn&&(!!e||(e=!e,!1))));break}case Ri.Fp.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,(e=>e.element instanceof Mn));break;case Ri.Fp.Next:{const e=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,(e=>e.element instanceof Mn&&(this._tree.reveal(e.element),!0)));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case Ri.Fp.Previous:{const e=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,(e=>{if(!(e.element instanceof Mn))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[0]&&this._onLeave.fire();break}case Ri.Fp.NextPage:this._tree.focusNextPage(void 0,(e=>e.element instanceof Mn&&(this._tree.reveal(e.element),!0)));break;case Ri.Fp.PreviousPage:this._tree.focusPreviousPage(void 0,(e=>{if(!(e.element instanceof Mn))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));break;case Ri.Fp.NextSeparator:{let e=!1;const t=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,(t=>{if(e)return!0;if(t.element instanceof Rn)e=!0,this._separatorRenderer.isSeparatorVisible(t.element)?this._tree.reveal(t.element.children[0]):this._tree.reveal(t.element,0);else if(t.element instanceof Mn){if(t.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(t.element)?this._tree.reveal(t.element):this._tree.reveal(t.element,0),!0;if(t.element===this._elementTree[0])return this._tree.reveal(t.element,0),!0}return!1})),t===this._tree.getFocus()[0]&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.focusLast(void 0,(e=>e.element instanceof Mn)));break}case Ri.Fp.PreviousSeparator:{let e,t=!!this._tree.getFocus()[0]?.separator;this._tree.focusPrevious(void 0,!0,void 0,(i=>{if(i.element instanceof Rn)t?e||(this._separatorRenderer.isSeparatorVisible(i.element)?this._tree.reveal(i.element):this._tree.reveal(i.element,0),e=i.element.children[0]):t=!0;else if(i.element instanceof Mn&&!e)if(i.element.separator)this._itemRenderer.isItemWithSeparatorVisible(i.element)?this._tree.reveal(i.element):this._tree.reveal(i.element,0),e=i.element;else if(i.element===this._elementTree[0])return this._tree.reveal(i.element,0),!0;return!1})),e&&this._tree.setFocus([e]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this._tree.layout()}filter(e){if(this._lastQueryString=e,!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const t=e;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this._itemElements.forEach((n=>{let s;s="fuzzy"===this.matchOnLabelMode?this.matchOnLabel?(0,oi.pz)(e,(0,oi._k)(n.saneLabel))??void 0:void 0:this.matchOnLabel?function(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return Hn(e,i);const s=(0,c.NB)(i," "),o=i.length-s.length,r=Hn(e,s);if(r)for(const e of r){const t=n[e.start+o]+o;e.start+=t,e.end+=t}return r}(t,(0,oi._k)(n.saneLabel))??void 0:void 0;const o=this.matchOnDescription?(0,oi.pz)(e,(0,oi._k)(n.saneDescription||""))??void 0:void 0,r=this.matchOnDetail?(0,oi.pz)(e,(0,oi._k)(n.saneDetail||""))??void 0:void 0;if(s||o||r?(n.labelHighlights=s,n.descriptionHighlights=o,n.detailHighlights=r,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this._inputElements[n.index-1]||void 0;"separator"!==e?.type||e.buttons||(i=e),i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this._itemElements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this._inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));return this._setElementsToTree(this._sortByLabel&&e?this._itemElements:this._elementTree),this._tree.layout(),!0}toggleCheckbox(){this._elementCheckedEventBufferer.bufferEvents((()=>{const e=this._tree.getFocus().filter((e=>e instanceof Mn)),t=this._allVisibleChecked(e);for(const i of e)i.checkboxDisabled||(i.checked=!t)}))}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!(e?.saneTooltip&&e instanceof Mn))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();this.showHover(e);const t=new l.Cm;t.add(this._tree.onDidChangeFocus((e=>{e.elements[0]instanceof Mn&&this.showHover(e.elements[0])}))),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_setElementsToTree(e){const t=new Array;for(const i of e)i instanceof Rn?t.push({element:i,collapsible:!1,collapsed:!1,children:i.children.map((e=>({element:e,collapsible:!1,collapsed:!1})))}):t.push({element:i,collapsible:!1,collapsed:!1});this._tree.setChildren(null,t)}_allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{this._allVisibleCheckedObservable.set(this._allVisibleChecked(this._itemElements,!1),e);const t=this._itemElements.filter((e=>e.checked)).length;this._checkedCountObservable.set(t,e),this._checkedElementsObservable.set(this.getCheckedElements(),e)}))}showHover(e){this._lastHover&&!this._lastHover.isDisposed&&(this.hoverDelegate.onDidHideHover?.(),this._lastHover?.dispose()),e.element&&e.saneTooltip&&(this._lastHover=this.hoverDelegate.showHover({content:e.saneTooltip,target:e.element,linkHandler:e=>{this.linkOpenerDelegate(e)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};function Hn(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}Dn([Hi.B],Wn.prototype,"onDidChangeFocus",null),Dn([Hi.B],Wn.prototype,"onDidChangeSelection",null),Wn=Dn([En(4,se._Y),En(5,Fe.j)],Wn);var Vn=i(56614);const zn={weight:200,when:ee.M$.and(ee.M$.equals(Yi,"quickPick"),Qi),metadata:{description:(0,C.kg)("quickPick","Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function Un(e,t={}){Tt.f.registerCommandAndKeybindingRule({...zn,...e,secondary:qn(e.primary,e.secondary??[],t)})}const jn=Oe.zx?256:2048;function qn(e,t,i={}){return i.withAltMod&&t.push(512+e),i.withCtrlMod&&(t.push(jn+e),i.withAltMod&&t.push(512+jn+e)),i.withCmdMod&&Oe.zx&&(t.push(2048+e),i.withCtrlMod&&t.push(2304+e),i.withAltMod&&(t.push(2560+e),i.withCtrlMod&&t.push(2816+e))),t}function Kn(e,t){return i=>{const n=i.get(Ri.GK).currentQuickInput;if(n)return t&&n.quickNavigate?n.focus(t):n.focus(e)}}Un({id:"quickInput.pageNext",primary:12,handler:Kn(Ri.Fp.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),Un({id:"quickInput.pagePrevious",primary:11,handler:Kn(Ri.Fp.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),Un({id:"quickInput.first",primary:jn+14,handler:Kn(Ri.Fp.First)},{withAltMod:!0,withCmdMod:!0}),Un({id:"quickInput.last",primary:jn+13,handler:Kn(Ri.Fp.Last)},{withAltMod:!0,withCmdMod:!0}),Un({id:"quickInput.next",primary:18,handler:Kn(Ri.Fp.Next)},{withCtrlMod:!0}),Un({id:"quickInput.previous",primary:16,handler:Kn(Ri.Fp.Previous)},{withCtrlMod:!0});const $n=(0,C.kg)("quickInput.nextSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),Gn=(0,C.kg)("quickInput.previousSeparatorWithQuickAccessFallback","If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");Oe.zx?(Un({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:Kn(Ri.Fp.NextSeparator,Ri.Fp.Next),metadata:{description:$n}}),Un({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:Kn(Ri.Fp.NextSeparator)},{withCtrlMod:!0}),Un({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:Kn(Ri.Fp.PreviousSeparator,Ri.Fp.Previous),metadata:{description:Gn}}),Un({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:Kn(Ri.Fp.PreviousSeparator)},{withCtrlMod:!0})):(Un({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:Kn(Ri.Fp.NextSeparator,Ri.Fp.Next),metadata:{description:$n}}),Un({id:"quickInput.nextSeparator",primary:2578,handler:Kn(Ri.Fp.NextSeparator)}),Un({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:Kn(Ri.Fp.PreviousSeparator,Ri.Fp.Previous),metadata:{description:Gn}}),Un({id:"quickInput.previousSeparator",primary:2576,handler:Kn(Ri.Fp.PreviousSeparator)})),Un({id:"quickInput.acceptInBackground",when:ee.M$.and(zn.when,ee.M$.or(Vn.J7.negate(),en)),primary:17,weight:250,handler:e=>{const t=e.get(Ri.GK).currentQuickInput;t?.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});var Qn,Yn=function(e,t){return function(i,n){t(i,n,e)}};const Zn=F.$;let Xn=class extends l.jG{static{Qn=this}static{this.MAX_WIDTH=600}get currentQuickInput(){return this.controller??void 0}get container(){return this._container}constructor(e,t,i,n){super(),this.options=e,this.layoutService=t,this.instantiationService=i,this.contextKeyService=n,this.enabled=!0,this.onDidAcceptEmitter=this._register(new G.vl),this.onDidCustomEmitter=this._register(new G.vl),this.onDidTriggerButtonEmitter=this._register(new G.vl),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new G.vl),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new G.vl),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=Gi.bindTo(this.contextKeyService),this.quickInputTypeContext=Zi.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=Ji.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(G.Jh.runAndSubscribe(F.Iv,(({window:e,disposables:t})=>this.registerKeyModsListeners(e,t)),{window:a.G,disposables:this._store})),this._register(F.q3((e=>{this.ui&&F.zk(this.ui.container)===e&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})))}registerKeyModsListeners(e,t){const i=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};for(const n of[F.Bx.KEY_DOWN,F.Bx.KEY_UP,F.Bx.MOUSE_DOWN])t.add(F.ko(e,n,i,!0))}getUI(e){if(this.ui)return e&&F.zk(this._container)!==F.zk(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const t=F.BC(this._container,Zn(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=F.li(t),n=F.BC(t,Zn(".quick-input-titlebar")),s=this._register(new Jt.E(n,{hoverDelegate:this.options.hoverDelegate}));s.domNode.classList.add("quick-input-left-action-bar");const o=F.BC(n,Zn(".quick-input-title")),r=this._register(new Jt.E(n,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-right-action-bar");const a=F.BC(t,Zn(".quick-input-header")),l=F.BC(a,Zn("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",(0,C.kg)("quickInput.checkAll","Toggle all checkboxes")),this._register(F.b2(l,F.Bx.CHANGE,(e=>{const t=l.checked;E.setAllVisibleChecked(t)}))),this._register(F.ko(l,F.Bx.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const c=F.BC(a,Zn(".quick-input-description")),d=F.BC(a,Zn(".quick-input-and-message")),h=F.BC(d,Zn(".quick-input-filter")),u=this._register(new _n(h,this.styles.inputBox,this.styles.toggle));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=F.BC(h,Zn(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new ln.x(g,{countFormat:(0,C.kg)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")},this.styles.countBadge),f=F.BC(h,Zn(".quick-input-count"));f.setAttribute("aria-live","polite");const m=new ln.x(f,{countFormat:(0,C.kg)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")},this.styles.countBadge),_=this._register(new Jt.E(a,{hoverDelegate:this.options.hoverDelegate}));_.domNode.classList.add("quick-input-inline-action-bar");const v=F.BC(a,Zn(".quick-input-action")),b=this._register(new an.$(v,this.styles.button));b.label=(0,C.kg)("ok","OK"),this._register(b.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const w=F.BC(a,Zn(".quick-input-action")),y=this._register(new an.$(w,{...this.styles.button,supportIcons:!0}));y.label=(0,C.kg)("custom","Custom"),this._register(y.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const S=F.BC(d,Zn(`#${this.idPrefix}message.quick-input-message`)),k=this._register(new pn(t,this.styles.progressBar));k.getContainer().classList.add("quick-input-progress");const x=F.BC(t,Zn(".quick-input-html-widget"));x.tabIndex=-1;const L=F.BC(t,Zn(".quick-input-description")),D=this.idPrefix+"list",E=this._register(this.instantiationService.createInstance(Wn,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,D));u.setAttribute("aria-controls",D),this._register(E.onDidChangeFocus((()=>{u.setAttribute("aria-activedescendant",E.getActiveDescendant()??"")}))),this._register(E.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(E.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(E.onChangedCheckedCount((e=>{m.setCount(e)}))),this._register(E.onLeave((()=>{setTimeout((()=>{this.controller&&(u.setFocus(),this.controller instanceof sn&&this.controller.canSelectMany&&E.clearFocus())}),0)})));const N=F.w5(t);return this._register(N),this._register(F.ko(t,F.Bx.FOCUS,(e=>{const t=this.getUI();if(F.QX(e.relatedTarget,t.inputContainer)){const e=t.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==e&&this.endOfQuickInputBoxContext.set(e)}F.QX(e.relatedTarget,t.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=F.sb(e.relatedTarget)?e.relatedTarget:void 0)}),!0)),this._register(N.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Ri.kF.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0}))),this._register(u.onKeyDown((e=>{const t=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==t&&this.endOfQuickInputBoxContext.set(t)}))),this._register(F.ko(t,F.Bx.FOCUS,(e=>{u.setFocus()}))),this._register(F.b2(t,F.Bx.KEY_DOWN,(e=>{if(!F.QX(e.target,x))switch(e.keyCode){case 3:F.fs.stop(e,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:F.fs.stop(e,!0),this.hide(Ri.kF.Gesture);break;case 2:if(!e.altKey&&!e.ctrlKey&&!e.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.displayed&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(F.QX(e.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=t.querySelectorAll(i.join(", "));e.shiftKey&&e.target===n[0]?(F.fs.stop(e,!0),E.clearFocus()):!e.shiftKey&&F.QX(e.target,n[n.length-1])&&(F.fs.stop(e,!0),n[0].focus())}break;case 10:e.ctrlKey&&(F.fs.stop(e,!0),this.getUI().list.toggleHover())}}))),this.ui={container:t,styleSheet:i,leftActionBar:s,titleBar:n,title:o,description1:L,description2:c,widget:x,rightActionBar:r,inlineActionBar:_,checkAll:l,inputContainer:d,filterContainer:h,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:f,count:m,okContainer:v,ok:b,message:S,customButtonContainer:w,customButton:y,list:E,progressBar:k,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,F.BC(this._container,this.ui.container))}pick(e,t={},i=Je.XO.None){return new Promise(((n,s)=>{let o=e=>{o=n,t.onKeyMods?.(r.keyMods),n(e)};if(i.isCancellationRequested)return void o(void 0);const r=this.createQuickPick({useSeparators:!0});let a;const c=[r,r.onDidAccept((()=>{if(r.canSelectMany)o(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(o(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(o(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...e,removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),s=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=s}}}))),r.onDidTriggerSeparatorButton((e=>t.onDidTriggerSeparatorButton?.(e))),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{(0,l.AS)(c),o(void 0)}))];r.title=t.title,t.value&&(r.value=t.value),r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{s(e),r.hide()}))}))}createQuickPick(e={useSeparators:!1}){const t=this.getUI(!0);return new sn(t)}createInputBox(){const e=this.getUI(!0);return new on(e)}show(e){const t=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,i?.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",F.Ln(t.widget),t.rightActionBar.clear(),t.inlineActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(de.A.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),F.Ln(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();tn.tooltip=n?(0,C.kg)("quickInput.backWithKeybinding","Back ({0})",n):(0,C.kg)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&"none"!==this.ui.container.style.display}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.displayed=!!e.list,t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){const t=this.controller;if(!t)return;t.willHide(e);const i=this.ui?.container,n=i&&!F.nR(i);if(this.controller=null,this.onHideEmitter.fire(),i&&(i.style.display="none"),!n){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=e.parentElement??void 0;e?.offsetParent?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}t.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,Qn.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e??"",this.ui.container.style.backgroundColor=t??"",this.ui.container.style.color=i??"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.list.style(this.styles.list);const o=[];this.styles.pickerGroup.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&o.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(o.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&o.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&o.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&o.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&o.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&o.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),o.push("}"));const r=o.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}};Xn=Qn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Yn(1,oe),Yn(2,se._Y),Yn(3,ee.fN)],Xn);var Jn=function(e,t){return function(i,n){t(i,n,e)}};let es=class extends Y.lR{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(Ai))),this._quickAccess}constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=s,this._onShow=this._register(new G.vl),this._onHide=this._register(new G.vl),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{t.get(Re.C).open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(rn))},n=this._register(this.instantiationService.createInstance(Xn,{...i,...t}));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer((t=>{(0,F.zk)(e.activeContainer)===(0,F.zk)(n.container)&&n.layout(t,e.activeContainerOffset.quickPickTop)}))),this._register(e.onDidChangeActiveContainer((()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)}))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new ee.N1(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t?.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t,i=Je.XO.None){return this.controller.pick(e,t,i)}createQuickPick(e={useSeparators:!1}){return this.controller.createQuickPick(e)}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,Le.GuP)(Le.ELA),quickInputForeground:(0,Le.GuP)(Le.HJZ),quickInputTitleBackground:(0,Le.GuP)(Le.er1),widgetBorder:(0,Le.GuP)(Le.DSL),widgetShadow:(0,Le.GuP)(Le.f9l)},inputBox:fi.ho,toggle:fi.mk,countBadge:fi.m$,button:fi.cv,progressBar:fi.oJ,keybindingLabel:fi.ir,list:(0,fi.t8)({listBackground:Le.ELA,listFocusBackground:Le.AlL,listFocusForeground:Le.nH,listInactiveFocusForeground:Le.nH,listInactiveSelectionIconForeground:Le.c7i,listInactiveFocusBackground:Le.AlL,listFocusOutline:Le.buw,listInactiveFocusOutline:Le.buw}),pickerGroup:{pickerGroupBorder:(0,Le.GuP)(Le.iwL),pickerGroupForeground:(0,Le.GuP)(Le.NBf)}}}};es=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Jn(0,se._Y),Jn(1,ee.fN),Jn(2,Y.Gy),Jn(3,oe),Jn(4,Ie.pG)],es);var ts=i(96845),is=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ns=function(e,t){return function(i,n){t(i,n,e)}};let ss=class extends es{constructor(e,t,i,n,s,o){super(t,i,n,new ce(e.getContainerDomNode(),s),o),this.host=void 0;const r=rs.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get mainContainer(){return t.getDomNode()},getContainer(){return t.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[t.getDomNode()]},get activeContainer(){return t.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return G.Jh.map(e.onDidLayoutChange,(e=>({container:t.getDomNode(),dimension:e})))},get onDidChangeActiveContainer(){return G.Jh.None},get onDidAddContainer(){return G.Jh.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};ss=is([ns(1,se._Y),ns(2,ee.fN),ns(3,Y.Gy),ns(4,g.T),ns(5,Ie.pG)],ss);let os=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(ss,e);this.mapEditorToService.set(e,t),(0,ts.P)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t,i=Je.XO.None){return this.activeService.pick(e,t,i)}createQuickPick(e={useSeparators:!1}){return this.activeService.createQuickPick(e)}createInputBox(){return this.activeService.createInputBox()}};os=is([ns(0,se._Y),ns(1,g.T)],os);class rs{static{this.ID="editor.controller.quickInput"}static get(e){return e.getContribution(rs.ID)}constructor(e){this.editor=e,this.widget=new as(this.editor)}dispose(){this.widget.dispose()}}class as{static{this.ID="editor.contrib.quickInputWidget"}constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return as.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}(0,u.HW)(rs.ID,rs,4);var ls=i(28954),cs=i(86100),ds=function(e,t){return function(i,n){t(i,n,e)}};let hs=class extends l.jG{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new G.vl,this._onDidChangeReducedMotion=new G.vl,this._onDidChangeLinkUnderline=new G.vl,this._accessibilityModeEnabledContext=Fe.f.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const s=a.G.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=s.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(s),this.initLinkUnderlineListeners()}initReducedMotionListeners(e){this._register((0,F.ko)(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",e),this._layoutService.mainContainer.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration("accessibility.underlineLinks")){const e=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=e,this._onDidChangeLinkUnderline.fire()}})));const e=()=>{const e=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",e)};e(),this._register(this.onDidChangeLinkUnderlines((()=>e())))}onDidChangeLinkUnderlines(e){return this._onDidChangeLinkUnderline.event(e)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};hs=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ds(0,ee.fN),ds(1,oe),ds(2,Ie.pG)],hs);var us,gs=i(79126),ps=i(65260),fs=function(e,t){return function(i,n){t(i,n,e)}};const ms="application/vnd.code.resources";let _s=class extends l.jG{static{us=this}constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(Zt.nr||Zt.c8)&&this.installWebKitWriteTextWorkaround(),this._register(G.Jh.runAndSubscribe(F.Iv,(({window:e,disposables:t})=>{t.add((0,F.ko)(e.document,"copy",(()=>this.clearResourcesState())))}),{window:a.G,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const e=new f.Zv;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,(0,F.fz)().navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((async t=>{t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))};this._register(G.Jh.runAndSubscribe(this.layoutService.onDidAddContainer,(({container:t,disposables:i})=>{i.add((0,F.ko)(t,"click",e)),i.add((0,F.ko)(t,"keydown",e))}),{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.clearResourcesState(),t)this.mapTextToType.set(t,e);else{if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await(0,F.fz)().navigator.clipboard.writeText(e)}catch(e){console.error(e)}this.fallbackWriteText(e)}}fallbackWriteText(e){const t=(0,F.a)(),i=t.activeElement,n=t.body.appendChild((0,F.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),t.execCommand("copy"),(0,F.sb)(i)&&i.focus(),n.remove()}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await(0,F.fz)().navigator.clipboard.readText()}catch(e){console.error(e)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}static{this.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3}async readResources(){try{const e=await(0,F.fz)().navigator.clipboard.read();for(const t of e)if(t.types.includes(`web ${ms}`)){const e=await t.getType(`web ${ms}`);return JSON.parse(await e.text()).map((e=>d.r.from(e)))}}catch(e){}const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(0===this.resources.length)return;const e=await this.readText();return(0,ps.tW)(e.substring(0,us.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}};_s=us=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([fs(0,oe),fs(1,M.rr)],_s);var vs=i(42558),bs=i(26182),ws=i(80945);const Cs="data-keybinding-context";class ys{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class Ss extends ys{static{this.INSTANCE=new Ss}constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}class ks extends ys{static{this._keyPrefix="config."}constructor(e,t,i){super(e,null),this._configurationService=t,this._values=ws.cB.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new Ds(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...bs.f.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new Ds(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(ks._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(ks._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}class xs{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Ls{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Ds{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class Es{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}class Ns extends l.jG{constructor(e){super(),this._onDidChangeContext=this._register(new G.fV({merge:e=>new Es(e)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new xs(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Ms(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new Ls(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Ls(e))}getContext(e){return this._isDisposed?Ss.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(Cs)){const t=e.getAttribute(Cs);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}dispose(){super.dispose(),this._isDisposed=!0}}let Is=class extends Ns{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new ks(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?Ss.INSTANCE:this._contexts.get(e)||Ss.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new ys(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};Is=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Ie.pG)],Is);class Ms extends Ns{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new l.HE),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Cs)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(Cs,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{var t;t=this._parent.getContextValuesContainer(this._myContextId).value,e.allKeysContainedIn(new Set(Object.keys(t)))||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(Cs),super.dispose())}getContextValuesContainer(e){return this._isDisposed?Ss.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}gt.w.registerCommand("_setContext",(function(e,t,i){e.get(ee.fN).createKey(String(t),function(e){return(0,p.PI)(e,(e=>"object"==typeof e&&1===e.$mid?d.r.revive(e).toString():e instanceof d.r?e.toString():void 0))}(i))})),gt.w.registerCommand({id:"getContextKeyInfo",handler(){return[...ee.N1.all()].sort(((e,t)=>e.key.localeCompare(t.key)))},metadata:{description:(0,C.kg)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),gt.w.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of ee.N1.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var Ts=i(44204);class Rs{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class Ps{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Rs(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}var As=i(24813);class Os extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.findCycleSlow()??`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class Fs{constructor(e=new As.a,t=!1,i,n=!1){this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(se._Y,this),this._globalGraph=n?i?._globalGraph??new Ps((e=>e)):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,(0,l.AS)(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)(0,l.Xm)(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const i=this,n=new class extends Fs{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),t?.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();const i=Bs.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:e=>{if(n)throw(0,v.iH)("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return this._throwIfDisposed(),e instanceof Ts.d?(i=Bs.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Bs.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=se._$.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),s=[];for(const t of n){const n=this._getOrCreateServiceInstance(t.id,i);n||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`,!1),s.push(n)}const o=n.length>0?n[0].index:t.length;if(t.length!==o){console.trace(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);const i=o-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,o)}return Reflect.construct(e,t.concat(s))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof Ts.d)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setCreatedServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof Ts.d?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new Ps((e=>e.id.toString()));let s=0;const o=[{id:e,desc:t,_trace:i}],r=new Set;for(;o.length;){const t=o.pop();if(!r.has(String(t.id))){if(r.add(String(t.id)),n.lookupOrInsertNode(t),s++>1e3)throw new Os(n);for(const i of se._$.getServiceDependencies(t.desc.ctor)){const s=this._getServiceInstanceOrDescriptor(i.id);if(s||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(t.id),String(i.id)),s instanceof Ts.d){const e={id:i.id,desc:s,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),o.push(e)}}}}for(;;){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new Os(n);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Ts.d){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setCreatedServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof Ts.d)return this._createServiceInstance(e,t,i,n,s,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,s,o){if(n){const n=new Fs(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const r=new Map,a=new f.F6((()=>{const e=n._createInstance(t,i,s);for(const[t,i]of r){const n=e[t];if("function"==typeof n)for(const t of i)t.disposable=n.apply(e,t.listener)}return r.clear(),o.add(e),e}));return new Proxy(Object.create(null),{get(e,t){if(!a.isInitialized&&"string"==typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=r.get(t);return e||(e=new Q.w,r.set(t,e)),(i,n,s)=>{if(a.isInitialized)return a.value[t](i,n,s);{const t={listener:[i,n,s],disposable:void 0},o=e.push(t);return(0,l.s)((()=>{o(),t.disposable?.dispose()}))}}}if(t in e)return e[t];const i=a.value;let n=i[t];return"function"!=typeof n||(n=n.bind(i),e[t]=n),n},set(e,t,i){return a.value[t]=i,!0},getPrototypeOf(e){return t.prototype}})}{const e=this._createInstance(t,i,s);return o.add(e),e}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Bs{static{this.all=new Set}static{this._None=new class extends Bs{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(e,t){return e?new Bs(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Bs._None}static traceCreation(e,t){return e?new Bs(1,t.name):Bs._None}static{this._totals=0}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Bs(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Bs._totals+=e;let t=!1;const i=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){const s=[],o=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,s.push(`${o}CREATES -> ${r}`);const n=e(i+1,l);n&&s.push(n)}else s.push(`${o}uses -> ${r}`);return s.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Bs._totals.toFixed(2)}ms)`];(e>2||t)&&Bs.all.add(i.join("\n"))}}var Ws=i(84119);const Hs=new Set([b.ny.inMemory,b.ny.vscodeSourceControl,b.ny.walkThrough,b.ny.walkThroughSnippet,b.ny.vscodeChatCodeBlock]);class Vs{constructor(){this._byResource=new pt.fT,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new pt.fT,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){const i=this._byResource.get(e);return i?.get(t)}delete(e,t){let i=!1,n=!1;const s=this._byResource.get(e);s&&(i=s.delete(t));const o=this._byOwner.get(t);if(o&&(n=o.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){return"string"==typeof e?this._byOwner.get(e)?.values()??bs.f.empty():d.r.isUri(e)?this._byResource.get(e)?.values()??bs.f.empty():bs.f.map(bs.f.concat(...this._byOwner.values()),(e=>e[1]))}}class zs{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new pt.fT,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Hs.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Ws.cj.Error?t.errors+=1:i===Ws.cj.Warning?t.warnings+=1:i===Ws.cj.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class Us{constructor(){this._onMarkerChanged=new G.uI({delay:0,merge:Us._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Vs,this._stats=new zs(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,w.Ct)(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const i=Us._toMarker(e,t,s);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:u}=i;if(o)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,d=d>0?d:l,{resource:t,owner:e,code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:u}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const t of n){const n=bs.f.first(t);n&&(i.push(n.resource),this._data.delete(n.resource,e))}if((0,w.EI)(t)){const n=new pt.fT;for(const{resource:s,marker:o}of t){const t=Us._toMarker(e,s,o);if(!t)continue;const r=n.get(s);r?r.push(t):(n.set(s,[t]),i.push(s))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(Us._accept(i,n)){const e=t.push(i);if(s>0&&e===s)break}return t}return[]}if(t||i){const e=this._data.values(i??t),o=[];for(const t of e)for(const e of t)if(Us._accept(e,n)){const t=o.push(e);if(s>0&&t===s)return o}return o}{const e=[];for(const t of this._data.values())for(const i of t)if(Us._accept(i,n)){const t=e.push(i);if(s>0&&t===s)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new pt.fT;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}var js=i(87332);class qs extends l.jG{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=vt.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=vt.createEmptyModel(this.logService);const e=mt.O.as(ft.Fd.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],s=t[n];void 0!==e?this._configurationModel.setValue(n,e):s?this._configurationModel.setValue(n,s.default):this._configurationModel.removeValue(n)}}}var Ks=i(54673);class $s extends l.jG{constructor(e,t=[]){super(),this.logger=new M.Dk([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}var Gs=i(23534),Qs=i(37351),Ys=i(10948),Zs=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Xs=function(e,t){return function(i,n){t(i,n,e)}};class Js{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new G.vl}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let eo=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new l.BO(new Js(t))):Promise.reject(new Error("Model not found"))}};eo=Zs([Xs(0,N.IModelService)],eo);class to{static{this.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}}}show(){return to.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}}class io{static{this.NO_OP=new ue.Kz}info(e){return this.notify({severity:de.A.Info,message:e})}warn(e){return this.notify({severity:de.A.Warning,message:e})}error(e){return this.notify({severity:de.A.Error,message:e})}notify(e){switch(e.severity){case de.A.Error:console.error(e.message);break;case de.A.Warning:console.warn(e.message);break;default:console.log(e.message)}return io.NO_OP}prompt(e,t,i,n){return io.NO_OP}status(e,t){return l.jG.None}}let no=class{constructor(e){this._onWillExecuteCommand=new G.vl,this._onDidExecuteCommand=new G.vl,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=gt.w.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}};no=Zs([Xs(0,se._Y)],no);let so=class extends It{constructor(e,t,i,n,s,o){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new l.Cm;t.add(F.ko(e,F.Bx.KEY_DOWN,(e=>{const t=new qe.Z(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(F.ko(e,F.Bx.KEY_UP,(e=>{const t=new qe.Z(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new oo(e,t))},a=e=>{for(let t=0;t{e.getOption(61)||r(e.getContainerDomNode())};this._register(o.onCodeEditorAdd(c)),this._register(o.onCodeEditorRemove((e=>{e.getOption(61)||a(e.getContainerDomNode())}))),o.listCodeEditors().forEach(c);const d=e=>{r(e.getContainerDomNode())};this._register(o.onDiffEditorAdd(d)),this._register(o.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),o.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,i,n){return(0,l.qE)(gt.w.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>({keybinding:(0,at.Zv)(e.keybinding,Oe.OS),command:e.command??null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1})));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),(0,l.s)((()=>{for(let e=0;ethis._log(e)))}return this._cachedResolver}_documentHasFocus(){return a.G.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const s of e){const e=s.when||void 0,o=s.keybinding;if(o){const r=Bt.resolveKeybinding(o,Oe.OS);for(const o of r)i[n++]=new Rt(o,s.command,s.commandArgs,e,t,null,!1)}else i[n++]=new Rt(void 0,s.command,s.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new at.dG(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new Bt([t],Oe.OS)}};so=Zs([Xs(0,ee.fN),Xs(1,gt.d),Xs(2,Vt.k),Xs(3,ue.Ot),Xs(4,M.rr),Xs(5,g.T)],so);class oo extends l.jG{constructor(e,t){super(),this.domNode=e,this._register(t)}}function ro(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof d.r)}let ao=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new G.vl,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new qs(e);this._configuration=new Ct(t.reload(),vt.createEmptyModel(e),vt.createEmptyModel(e),vt.createEmptyModel(e),vt.createEmptyModel(e),vt.createEmptyModel(e),new pt.fT,vt.createEmptyModel(e),new pt.fT,e),t.dispose()}getValue(e,t){const i="string"==typeof e?e:void 0,n=ro(e)?e:ro(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new yt({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);e.source=8,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};ao=Zs([Xs(0,M.rr)],ao);let lo=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new G.vl,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=ht.y.isIPosition(t)?t:null,s=n?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0,o=e?this.getLanguage(e,n):void 0;return void 0===s?this.configurationService.getValue({resource:e,overrideIdentifier:o}):this.configurationService.getValue(s,{resource:e,overrideIdentifier:o})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};lo=Zs([Xs(0,Ie.pG),Xs(1,N.IModelService),Xs(2,Ei.L)],lo);let co=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:Oe.j9||Oe.zx?"\n":"\r\n"}};co=Zs([Xs(0,Ie.pG)],co);class ho{static{this.SCHEME="inmemory"}constructor(){const e=d.r.from({scheme:ho.SCHEME,authority:"model",path:"/"});this.workspace={id:zt.cn,folders:[new zt.mX({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===ho.SCHEME?this.workspace.folders[0]:null}}function uo(e,t,i){if(!t)return;if(!(e instanceof ao))return;const n=[];Object.keys(t).forEach((e=>{(0,ct.vf)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,ct.Gn)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}let go=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:lt.jN.convert(e),n=new Map;for(const e of i){if(!(e instanceof lt.cw))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"==typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let i=n.get(t);i||(i=[],n.set(t,i)),i.push(dt.k.replaceMove(L.Q.lift(e.textEdit.range),e.textEdit.text))}let s=0,o=0;for(const[e,t]of n)e.pushStackElement(),e.pushEditOperations([],t,(()=>[])),e.pushStackElement(),o+=1,s+=t.length;return{ariaSummary:c.GP(Ut.tu.bulkEditServiceSummary,s,o),isApplied:s>0}}};go=Zs([Xs(0,N.IModelService)],go);let po=class extends Xe{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};po=Zs([Xs(0,oe),Xs(1,g.T)],po);class fo extends Kt.LanguageService{constructor(){super()}}let mo=class extends vi{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o),this.configure({blockMouse:!1})}};mo=Zs([Xs(0,Vt.k),Xs(1,ue.Ot),Xs(2,Ee.l),Xs(3,Ne.b),Xs(4,Qt.ez),Xs(5,ee.fN)],mo);const _o={amdModuleId:"vs/editor/common/services/editorSimpleWorker",esmModuleLocation:void 0,label:"editorWorkerService"};let vo=class extends U{constructor(e,t,i,n,s){super(_o,e,t,i,n,s)}};var bo;vo=Zs([Xs(0,N.IModelService),Xs(1,I.ITextResourceConfigurationService),Xs(2,M.rr),Xs(3,D.JZ),Xs(4,R.ILanguageFeaturesService)],vo),(0,te.v)(M.rr,class extends $s{constructor(){super(new M.Cr)}},0),(0,te.v)(Ie.pG,ao,0),(0,te.v)(I.ITextResourceConfigurationService,lo,0),(0,te.v)(I.ITextResourcePropertiesService,co,0),(0,te.v)(zt.VR,ho,0),(0,te.v)(Wt.L,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return(0,jt.P8)(e)}},0),(0,te.v)(Vt.k,class{publicLog2(){}},0),(0,te.v)(he.X,class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),a.G.confirm(i)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){const i=[...e.buttons??[]];e.cancelButton&&"string"!=typeof e.cancelButton&&"boolean"!=typeof e.cancelButton&&i.push(e.cancelButton),t=await(i[0]?.run({checkboxChecked:!1}))}return{result:t}}async error(e,t){await this.prompt({type:de.A.Error,message:e,detail:t})}},0),(0,te.v)(Qs.k,class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},0),(0,te.v)(ue.Ot,io,0),(0,te.v)(Ws.DR,Us,0),(0,te.v)(Ei.L,fo,0),(0,te.v)(cs.L,ls.Sx,0),(0,te.v)(N.IModelService,Mi.ModelService,0),(0,te.v)(Ii.IMarkerDecorationsService,Ni.MarkerDecorationsService,0),(0,te.v)(ee.fN,Is,0),(0,te.v)(Ht.G5,class{withProgress(e,t,i){return t({report:()=>{}})}},0),(0,te.v)(Ht.N8,to,0),(0,te.v)(js.CS,js.pc,0),(0,te.v)(Di.IEditorWorkerService,vo,0),(0,te.v)(lt.nu,go,0),(0,te.v)(qt.L,class{constructor(){this._neverEmitter=new G.vl,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},0),(0,te.v)(ut.ITextModelService,eo,0),(0,te.v)(Fe.j,hs,0),(0,te.v)(vn.PE,vn.aG,0),(0,te.v)(gt.d,no,0),(0,te.v)(Ne.b,so,0),(0,te.v)(Ri.GK,os,0),(0,te.v)(Ee.l,po,0),(0,te.v)(Re.C,Li,0),(0,te.v)(vs.h,_s,0),(0,te.v)(Ee.Z,mo,0),(0,te.v)(Qt.ez,gs.$,0),(0,te.v)(Ks.Nt,class{async playSignal(e,t){}},0),(0,te.v)(Ys.ITreeSitterParserService,class{getParseResult(e){}},0),function(e){const t=new As.a;for(const[e,i]of(0,te.N)())t.set(e,i);const i=new Fs(t,!0);t.set(se._Y,i),e.get=function(e){n||o({});const s=t.get(e);if(!s)throw new Error("Missing service "+e);return s instanceof Ts.d?i.invokeFunction((t=>t.get(e))):s};let n=!1;const s=new G.vl;function o(e){if(n)return i;n=!0;for(const[e,i]of(0,te.N)())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=(0,se.u1)(i);t.get(n)instanceof Ts.d&&t.set(n,e[i])}const o=(0,Gs.T)();for(const e of o)try{i.createInstance(e)}catch(e){(0,v.dz)(e)}return s.fire(),i}e.initialize=o,e.withServices=function(e){if(n)return e();const t=new l.Cm,i=t.add(s.event((()=>{i.dispose(),t.add(e())})));return t}}(bo||(bo={}));class wo extends ${constructor(e,t){super({amdModuleId:_o.amdModuleId,esmModuleLocation:_o.esmModuleLocation,label:t.label},t.keepIdleModels||!1,e),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?(0,p.V0)(this._foreignModuleHost):[];return e.$loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.$fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},s={};for(const e of t)s[e]=n(e,i);return s}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this.workerWithSyncedResources(e).then((e=>this.getProxy()))}}var Co=i(76543),yo=i(78336),So=i(48872),ko=i(35720),xo=i(11521),Lo=i(5032),Do=i(62067),Eo=i(36035),No=i(44425),Io=i(73055),Mo=i(68316);function To(e){return"string"==typeof e}function Ro(e){return!To(e)}function Po(e){return!e}function Ao(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Oo(e){return e.replace(/[&<>'"_]/g,"-")}function Fo(e,t){return new Error(`${e.languageId}: ${t}`)}function Bo(e,t,i,n,s){let o=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,c,d,h,u,g){return Po(a)?Po(l)?!Po(c)&&c0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}var Ho;class Vo{static{this._INSTANCE=new Vo(5)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new zo(e,t);let i=zo.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new zo(e,t),this._entries[i]=n,n)}}class zo{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return zo._equals(this,e)}push(e){return Vo.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Vo.create(this.parent,e)}}class Uo{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Uo(this.languageId,this.state)}}class jo{static{this._INSTANCE=new jo(5)}static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new qo(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new qo(e,t);const i=zo.getStackElementId(e);let n=this._entries[i];return n||(n=new qo(e,null),this._entries[i]=n,n)}}class qo{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:jo.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof qo&&!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData))}}class Ko{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new ko.ou(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const s=i.languageId,o=i.state,r=ko.dG.get(s);if(!r)return this.enterLanguage(s),this.emit(n,""),o;const a=r.tokenize(e,t,o);if(0!==n)for(const e of a.tokens)this._tokens.push(new ko.ou(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new ko.$M(this._tokens,e)}}class $o{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,s=t.length,o=null!==i?i.length:0;if(0===n&&0===s&&0===o)return new Uint32Array(0);if(0===n&&0===s)return i;if(0===s&&0===o)return e;const r=new Uint32Array(n+s+o);null!==e&&r.set(e);for(let e=0;e{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=ko.dG.get(t);if(i){if(i instanceof Ho){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else ko.dG.isResolved(t)||e.push(ko.dG.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=Vo.create(null,this._lexer.start);return jo.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,Lo.$H)(this._languageId,i);const n=new Ko,s=this._tokenize(e,t,i,n);return n.finalize(s)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return(0,Lo.Lh)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new $o(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),s=this._tokenize(e,t,i,n);return n.finalize(s)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Wo(this._lexer,t.stack.state),!i))throw Fo(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const o of i){if(!Ro(o.action)||"@pop"!==o.action.nextEmbedded)continue;s=!0;let i=o.resolveRegex(t.stack.state);const r=i.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(r.substr(4,r.length-5),e)}const a=e.search(i);-1===a||0!==a&&o.matchOnlyAtLineStart||(-1===n||a0&&s.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(o);return this._myTokenize(a,t,i,n+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterLanguage(this._languageId);const o=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,c=i.stack,d=0,h=null,u=!0;for(;u||d=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=Wo(this._lexer,_),!e))throw Fo(this._lexer,"tokenizer state is not defined: "+_);const t=r.substr(d);for(const i of e)if((0===d||!i.matchOnlyAtLineStart)&&(v=t.match(i.resolveRegex(_)),v)){b=v[0],w=i.action;break}}if(v||(v=[""],b=""),w||(d=this._lexer.maxStack)throw Fo(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if("@pop"===w.next){if(c.depth<=1)throw Fo(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(C));c=c.pop()}else if("@popall"===w.next)c=c.popall();else{let e=Bo(this._lexer,w.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!Wo(this._lexer,e))throw Fo(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(C));c=c.push(e)}}w.log&&"string"==typeof w.log&&(g=this._lexer,p=this._lexer.languageId+": "+Bo(this._lexer,w.log,b,v,_),console.log(`${g.languageId}: ${p}`))}if(null===S)throw Fo(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(C));const k=i=>{const o=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(o);if(d0)throw Fo(this._lexer,"groups cannot be nested: "+this._safeRuleName(C));if(v.length!==S.length+1)throw Fo(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(C));let e=0;for(let t=1;t=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(4,Ie.pG)],Go);const Yo=(0,_.H)("standaloneColorizer",{createHTML:e=>e});class Zo{static colorizeElement(e,t,i,n){const s=(n=n||{}).theme||"vs",o=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(o)||o;e.setTheme(s);const a=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+s,this.colorize(t,a||"",r,n).then((e=>{const t=Yo?.createHTML(e)??e;i.innerHTML=t}),(e=>console.error(e)))}static async colorize(e,t,i,n){const s=e.languageIdCodec;let o=4;n&&"number"==typeof n.tabSize&&(o=n.tabSize),c.LU(t)&&(t=t.substr(1));const r=c.uz(t);if(!e.isRegisteredLanguageId(i))return Xo(r,o,s);const a=await ko.dG.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((s,o)=>{const r=()=>{const a=function(e,t,i,n){let s=[],o=i.getInitialState();for(let r=0,a=e.length;r"),o=l.endState}return s.join("")}(e,t,i,n);if(i instanceof Go){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}s(a)};r()}))}(r,o,a,s):Xo(r,o,s)}static colorizeLine(e,t,i,n,s=4){const o=Mo.qL.isBasicASCII(e,t),r=Mo.qL.containsRTL(e,o,i);return(0,Io.Md)(new Io.zL(!1,!0,e,!1,o,r,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const s=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),s,i)}}function Xo(e,t,i){let n=[];const s=new Uint32Array(2);s[0]=0,s[1]=33587200;for(let o=0,r=e.length;o")}return n.join("")}var Jo=i(19527),er=i(68831),tr=i(24764),ir=i(12048),nr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},sr=function(e,t){return function(i,n){t(i,n,e)}};let or=0,rr=!1,ar=class extends s.x{constructor(e,t,i,n,s,o,r,l,c,d,h,u,g){const p={...t};p.ariaLabel=p.ariaLabel||Ut.vp.editorViewAccessibleLabel,super(e,p,{},i,n,s,o,c,d,h,u,g),this._standaloneKeybindingService=l instanceof so?l:null,function(e){if(!e){if(rr)return;rr=!0}Be.vr(e||a.G.document.body)}(p.ariaContainerElement),(0,tr.MW)(((e,t)=>i.createInstance(De.fO,e,t,{}))),(0,ir.e)(r)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++or,s=ee.M$.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.jG.None;const t=e.id,i=e.label,n=ee.M$.and(ee.M$.equals("editorId",this.getId()),ee.M$.deserialize(e.precondition)),s=e.keybindings,o=ee.M$.and(n,ee.M$.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,c=(t,...i)=>Promise.resolve(e.run(this,...i)),d=new l.Cm,h=this.getId()+":"+t;if(d.add(gt.w.registerCommand(h,c)),r){const e={command:{id:h,title:i},when:n,group:r,order:a};d.add(Qt.ZG.appendMenuItem(Qt.D8.EditorContext,e))}if(Array.isArray(s))for(const e of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(h,e,c,o));const u=new Jo.f(h,i,i,void 0,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,u),d.add((0,l.s)((()=>{this._actions.delete(t)}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof ne)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};ar=nr([sr(2,se._Y),sr(3,g.T),sr(4,gt.d),sr(5,ee.fN),sr(6,De.TN),sr(7,Ne.b),sr(8,Y.Gy),sr(9,ue.Ot),sr(10,Fe.j),sr(11,D.JZ),sr(12,R.ILanguageFeaturesService)],ar);let lr=class extends ar{constructor(e,t,i,n,s,o,r,a,l,c,d,h,u,g,p,f){const m={...t};uo(d,m,!1);const _=l.registerEditorContainer(e);"string"==typeof m.theme&&l.setTheme(m.theme),void 0!==m.autoDetectHighContrast&&l.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));const v=m.model;let b;if(delete m.model,super(e,m,i,n,s,o,r,a,l,c,h,p,f),this._configurationService=d,this._standaloneThemeService=l,this._register(_),void 0===v){const e=g.getLanguageIdByMimeType(m.language)||m.language||xo.vH;b=dr(u,g,m.value||"",e,void 0),this._ownsModel=!0}else b=v,this._ownsModel=!1;if(this._attachModel(b),b){const e={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){uo(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};lr=nr([sr(2,se._Y),sr(3,g.T),sr(4,gt.d),sr(5,ee.fN),sr(6,De.TN),sr(7,Ne.b),sr(8,cs.L),sr(9,ue.Ot),sr(10,Ie.pG),sr(11,Fe.j),sr(12,N.IModelService),sr(13,Ei.L),sr(14,D.JZ),sr(15,R.ILanguageFeaturesService)],lr);let cr=class extends er.T{constructor(e,t,i,n,s,o,r,a,l,c,d,h){const u={...t};uo(a,u,!0);const g=o.registerEditorContainer(e);"string"==typeof u.theme&&o.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&o.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},n,i,s,h,c),this._configurationService=a,this._standaloneThemeService=o,this._register(g)}dispose(){super.dispose()}updateOptions(e){uo(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(ar,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function dr(e,t,i,n,s){if(i=i||"",!n){const n=i.indexOf("\n");let o=i;return-1!==n&&(o=i.substring(0,n)),hr(e,i,t.createByFilepathOrFirstLine(s||null,o),s)}return hr(e,i,t.createById(n),s)}function hr(e,t,i,n){return e.createModel(t,i,n)}cr=nr([sr(2,se._Y),sr(3,ee.fN),sr(4,g.T),sr(5,cs.L),sr(6,ue.Ot),sr(7,Ie.pG),sr(8,Ee.Z),sr(9,Ht.N8),sr(10,vs.h),sr(11,Ks.Nt)],cr);var ur=i(64523),gr=i(64429),pr=i(1878),fr=i(95773),mr=i(72540),_r=i(28376),vr=i(56218),br=i(49678),wr=i(90072),Cr=i(86051),yr=i(41667),Sr=function(e,t){return function(i,n){t(i,n,e)}};class kr{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let xr=class extends l.jG{constructor(e,t,i,n,s){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=(0,pr.FY)(this,void 0),this._collapsed=(0,Ln.un)(this,(e=>this._viewModel.read(e)?.collapsed.read(e))),this._editorContentHeight=(0,pr.FY)(this,500),this.contentHeight=(0,Ln.un)(this,(e=>(this._collapsed.read(e)?0:this._editorContentHeight.read(e))+this._outerEditorHeight)),this._modifiedContentWidth=(0,pr.FY)(this,0),this._modifiedWidth=(0,pr.FY)(this,0),this._originalContentWidth=(0,pr.FY)(this,0),this._originalWidth=(0,pr.FY)(this,0),this.maxScroll=(0,Ln.un)(this,(e=>{const t=this._modifiedContentWidth.read(e)-this._modifiedWidth.read(e),i=this._originalContentWidth.read(e)-this._originalWidth.read(e);return t>i?{maxScroll:t,width:this._modifiedWidth.read(e)}:{maxScroll:i,width:this._originalWidth.read(e)}})),this._elements=(0,F.h)("div.multiDiffEntry",[(0,F.h)("div.header@header",[(0,F.h)("div.header-content",[(0,F.h)("div.collapse-button@collapseButton"),(0,F.h)("div.file-path",[(0,F.h)("div.title.modified.show-file-icons@primaryPath",[]),(0,F.h)("div.status.deleted@status",["R"]),(0,F.h)("div.title.original.show-file-icons@secondaryPath",[])]),(0,F.h)("div.actions@actions")])]),(0,F.h)("div.editorParent",[(0,F.h)("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(er.T,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=(0,wr.Ud)(this.editor.getModifiedEditor()).isFocused,this.isOriginalFocused=(0,wr.Ud)(this.editor.getOriginalEditor()).isFocused,this.isFocused=(0,Ln.un)(this,(e=>this.isModifedFocused.read(e)||this.isOriginalFocused.read(e))),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=this._register(new l.Cm),this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const o=new an.$(this._elements.collapseButton,{});this._register((0,Ln.fm)((e=>{o.element.className="",o.icon=this._collapsed.read(e)?ii.W.chevronRight:ii.W.chevronDown}))),this._register(o.onDidClick((()=>{this._viewModel.get()?.collapsed.set(!this._collapsed.get(),void 0)}))),this._register((0,Ln.fm)((e=>{this._elements.editor.style.display=this._collapsed.read(e)?"none":"block"}))),this._register(this.editor.getModifiedEditor().onDidLayoutChange((e=>{const t=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(t,void 0)}))),this._register(this.editor.getOriginalEditor().onDidLayoutChange((e=>{const t=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(t,void 0)}))),this._register(this.editor.onDidContentSizeChange((e=>{(0,pr.YY)((t=>{this._editorContentHeight.set(e.contentHeight,t),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),t),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),t)}))}))),this._register(this.editor.getOriginalEditor().onDidScrollChange((e=>{if(this._isSettingScrollTop)return;if(!e.scrollTopChanged||!this._data)return;const t=e.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(t)}))),this._register((0,Ln.fm)((e=>{const t=this._viewModel.read(e)?.isActive.read(e);this._elements.root.classList.toggle("active",t)}))),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._contextKeyService=this._register(s.createScoped(this._elements.actions));const r=this._register(this._instantiationService.createChild(new As.a([ee.fN,this._contextKeyService])));this._register(r.createInstance(Cr.m,this._elements.actions,Qt.D8.MultiDiffEditorFileToolbar,{actionRunner:this._register(new yr.I((()=>this._viewModel.get()?.modifiedUri))),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("navigation")},actionViewItemProvider:(e,t)=>(0,Gt.rN)(r,e,t)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(e){return{...e,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}if(this._data=e,!e)return void(0,pr.YY)((e=>{this._viewModel.set(void 0,e),this.editor.setDiffModel(null,e),this._dataStore.clear()}));const i=e.viewModel.documentDiffItem;if((0,pr.YY)((n=>{this._resourceLabel?.setUri(e.viewModel.modifiedUri??e.viewModel.originalUri,{strikethrough:void 0===e.viewModel.modifiedUri});let s=!1,o=!1,r=!1,a="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(a="R",s=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(a="A",r=!0):(a="D",o=!0),this._elements.status.classList.toggle("renamed",s),this._elements.status.classList.toggle("deleted",o),this._elements.status.classList.toggle("added",r),this._elements.status.innerText=a,this._resourceLabel2?.setUri(s?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setDiffModel(e.viewModel.diffEditorViewModelRef,n),this.editor.updateOptions(t(i.options??{}))})),i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange((()=>{this.editor.updateOptions(t(i.options??{}))}))),e.viewModel.isAlive.recomputeInitiallyAndOnChange(this._dataStore,(e=>{e||this.setData(void 0)})),e.viewModel.documentDiffItem.contextKeys)for(const[t,i]of Object.entries(e.viewModel.documentDiffItem.contextKeys))this._contextKeyService.createKey(t,i)}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const s=e.length-this._headerHeight,o=Math.max(0,Math.min(n.start-e.start,s));this._elements.header.style.transform=`translateY(${o}px)`,(0,pr.YY)((i=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})}));try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",o>0||i>0),this._elements.header.classList.toggle("collapsed",o===s)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};xr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Sr(3,se._Y),Sr(4,ee.fN)],xr);class Lr{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){let t;if(0===this._unused.size)t=this._create(e),this._itemData.set(t,e);else{const i=[...this._unused.values()];t=i.find((t=>this._itemData.get(t).getId()===e.getId()))??i[0],this._unused.delete(t),this._itemData.set(t,e),t.setData(e)}return this._used.add(t),{object:t,dispose:()=>{this._used.delete(t),this._unused.size>5?t.dispose():this._unused.add(t)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var Dr=function(e,t){return function(i,n){t(i,n,e)}};let Er=class extends l.jG{constructor(e,t,i,n,s,o){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=s,this._parentInstantiationService=o,this._scrollableElements=(0,F.h)("div.scrollContent",[(0,F.h)("div@content",{style:{overflow:"hidden"}}),(0,F.h)("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new fr.yE({forceIntegerValues:!1,scheduleAtNextAnimationFrame:e=>(0,F.PG)((0,F.zk)(this._element),e),smoothScrollDuration:100})),this._scrollableElement=this._register(new ti.oO(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=(0,F.h)("div.monaco-component.multiDiffEditor",{},[(0,F.h)("div",{},[this._scrollableElement.getDomNode()]),(0,F.h)("div.placeholder@placeholder",{},[(0,F.h)("div",[(0,C.kg)("noChangedFiles","No Changed Files")])])]),this._sizeObserver=this._register(new mr.pN(this._element,void 0)),this._objectPool=this._register(new Lr((e=>{const t=this._instantiationService.createInstance(xr,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return t.setData(e),t}))),this.scrollTop=(0,Ln.y0)(this,this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollTop)),this.scrollLeft=(0,Ln.y0)(this,this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollLeft)),this._viewItemsInfo=(0,Ln.rm)(this,((e,t)=>{const i=this._viewModel.read(e);if(!i)return{items:[],getItem:e=>{throw new v.D7}};const n=i.items.read(e),s=new Map;return{items:n.map((e=>{const i=t.add(new Nr(e,this._objectPool,this.scrollLeft,(e=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+e})}))),n=this._lastDocStates?.[i.getKey()];return n&&(0,pr.Rn)((e=>{i.setViewState(n,e)})),s.set(e,i),i})),getItem:e=>s.get(e)}})),this._viewItems=this._viewItemsInfo.map(this,(e=>e.items)),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,((e,t)=>e.reduce(((e,i)=>e+i.contentHeight.read(t)+this._spaceBetweenPx),0))),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new As.a([ee.fN,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(br.R.inMultiDiffEditor.key,!0),this._register((0,Ln.yC)(((e,t)=>{const i=this._viewModel.read(e);if(i&&i.contextKeys)for(const[e,n]of Object.entries(i.contextKeys)){const i=this._contextKeyService.createKey(e,void 0);i.set(n),t.add((0,l.s)((()=>i.reset())))}})));const r=this._parentContextKeyService.createKey(br.R.multiDiffEditorAllCollapsed.key,!1);this._register((0,Ln.fm)((e=>{const t=this._viewModel.read(e);if(t){const i=t.items.read(e).every((t=>t.collapsed.read(e)));r.set(i)}}))),this._register((0,Ln.fm)((e=>{const t=this._dimension.read(e);this._sizeObserver.observe(t)}))),this._register((0,Ln.fm)((e=>{const t=this._viewItems.read(e);this._elements.placeholder.classList.toggle("visible",0===t.length)}))),this._scrollableElements.content.style.position="relative",this._register((0,Ln.fm)((e=>{const t=this._sizeObserver.height.read(e);this._scrollableElements.root.style.height=`${t}px`;const i=this._totalHeight.read(e);this._scrollableElements.content.style.height=`${i}px`;const n=this._sizeObserver.width.read(e);let s=n;const o=this._viewItems.read(e),r=(0,gr.Cn)(o,(0,w.VE)((t=>t.maxScroll.read(e).maxScroll),w.U9));r&&(s=n+r.maxScroll.read(e).maxScroll),this._scrollableElement.setScrollDimensions({width:n,height:t,scrollHeight:i,scrollWidth:s})}))),e.replaceChildren(this._elements.root),this._register((0,l.s)((()=>{e.replaceChildren()}))),this._register(this._register((0,Ln.fm)((e=>{(0,pr.YY)((t=>{this.render(e)}))}))))}render(e){const t=this.scrollTop.read(e);let i=0,n=0,s=0;const o=this._sizeObserver.height.read(e),r=_r.L.ofStartAndLength(t,o),a=this._sizeObserver.width.read(e);for(const l of this._viewItems.read(e)){const c=l.contentHeight.read(e),d=Math.min(c,o),h=_r.L.ofStartAndLength(n,d),u=_r.L.ofStartAndLength(s,c);if(u.isBefore(r))i-=c-d,l.hide();else if(u.isAfter(r))l.hide();else{const e=Math.max(0,Math.min(r.start-u.start,c-d));i-=e;const n=_r.L.ofStartAndLength(t+i,o);l.render(h,e,a,n)}n+=d+this._spaceBetweenPx,s+=c+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};Er=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Dr(4,ee.fN),Dr(5,se._Y)],Er);class Nr extends l.jG{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register((0,pr.X2)(this,void 0)),this.contentHeight=(0,Ln.un)(this,(e=>this._templateRef.read(e)?.object.contentHeight?.read(e)??this.viewModel.lastTemplateData.read(e).contentHeight)),this.maxScroll=(0,Ln.un)(this,(e=>this._templateRef.read(e)?.object.maxScroll.read(e)??{maxScroll:0,scrollWidth:0})),this.template=(0,Ln.un)(this,(e=>this._templateRef.read(e)?.object)),this._isHidden=(0,Ln.FY)(this,!1),this._isFocused=(0,Ln.un)(this,(e=>this.template.read(e)?.isFocused.read(e)??!1)),this.viewModel.setIsFocused(this._isFocused,void 0),this._register((0,Ln.fm)((e=>{const t=this._scrollLeft.read(e);this._templateRef.read(e)?.object.setScrollLeft(t)}))),this._register((0,Ln.fm)((e=>{const t=this._templateRef.read(e);t&&this._isHidden.read(e)&&(t.object.isFocused.read(e)||this._clear())})))}dispose(){this._clear(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.documentDiffItem.modified?.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const i=this.viewModel.lastTemplateData.get(),n=e.selections?.map(vr.L.liftSelection);this.viewModel.lastTemplateData.set({...i,selections:n},t);const s=this._templateRef.get();s&&n&&s.object.editor.setSelections(n)}_updateTemplateData(e){const t=this._templateRef.get();t&&this.viewModel.lastTemplateData.set({contentHeight:t.object.contentHeight.get(),selections:t.object.editor.getSelections()??void 0},e)}_clear(){const e=this._templateRef.get();e&&(0,pr.Rn)((t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)}))}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let s=this._templateRef.get();if(!s){s=this._objectPool.getUnusedObj(new kr(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(s,void 0);const e=this.viewModel.lastTemplateData.get().selections;e&&s.object.editor.setSelections(e)}s.object.render(e,i,t,n)}}(0,Le.x1A)("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},(0,C.kg)("multiDiffEditor.headerBackground","The background color of the diff editor's header")),(0,Le.x1A)("multiDiffEditor.background",Le.YtV,(0,C.kg)("multiDiffEditor.background","The background color of the multi file diff editor")),(0,Le.x1A)("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},(0,C.kg)("multiDiffEditor.border","The border color of the multi file diff editor"));let Ir=class extends l.jG{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=(0,Ln.FY)(this,void 0),this._viewModel=(0,Ln.FY)(this,void 0),this._widgetImpl=(0,Ln.rm)(this,((e,t)=>((0,ur.b)(xr,e),t.add(this._instantiationService.createInstance((0,ur.b)(Er,e),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))))),this._register((0,Ln.OI)(this._widgetImpl))}};function Mr(e){const t=bo.get(Ne.b);return t instanceof so?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:ee.M$.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),l.jG.None)}Ir=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,se._Y)],Ir);var Tr=i(59321);function Rr(e,t){return"boolean"==typeof e?e:t}function Pr(e,t){return"string"==typeof e?e:t}function Ar(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function Or(e,t,i){t=t.replace(/@@/g,"");let n,s=0;do{n=!1,t=t.replace(/@(\w+)/g,(function(i,s){n=!0;let o="";if("string"==typeof e[s])o=e[s];else{if(!(e[s]&&e[s]instanceof RegExp))throw void 0===e[s]?Fo(e,"language definition does not contain attribute '"+s+"', used at: "+t):Fo(e,"attribute reference '"+s+"' must be a string, used at: "+t);o=e[s].source}return Po(o)?"":"(?:"+o+")"})),s++}while(n&&s<5);t=t.replace(/\x01/g,"@");const o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");if(i&&t.match(/\$[sS](\d\d?)/g)){let i=null,n=null;return s=>(n&&i===s||(i=s,n=new RegExp(function(e,t,i){let n=null;return t.replace(/\$[sS](\d\d?)/g,(function(t,s){return null===n&&(n=i.split("."),n.unshift(i)),!Po(s)&&s=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Fo(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw Fo(e,"the next state must be a string value in rule: "+t);{let s=i.next;if(!/^(@pop|@push|@popall)$/.test(s)&&("@"===s[0]&&(s=s.substr(1)),s.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,Bo(e,s,"",[],""))))throw Fo(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=s}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let s=0,o=i.length;s0&&"^"===i[0],this.name=this.name+": "+i,this.regex=Or(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=Br(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function Hr(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={languageId:e,includeLF:Rr(t.includeLF,!1),noThrow:!1,maxStack:100,start:"string"==typeof t.start?t.start:null,ignoreCase:Rr(t.ignoreCase,!1),unicode:Rr(t.unicode,!1),tokenPostfix:Pr(t.tokenPostfix,"."+e),defaultToken:Pr(t.defaultToken,"source"),usesEmbedded:!1,stateNames:{},tokenizer:{},brackets:[]},n=t;function s(e,o,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw Fo(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw Fo(i,"include target '"+r+"' is not defined at: "+e);s(e+"."+r,o,t.tokenizer[r])}else{const t=new Wr(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw Fo(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Fo(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Rr(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}o.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw Fo(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,s("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Fo(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const o=[];for(const e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Fo(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw Fo(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");o.push({token:t.token+i.tokenPostfix,open:Ao(i,t.open),close:Ao(i,t.close)})}return i.brackets=o,i.noThrow=!0,i}class Vr{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return zr.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new ko.rY(n.tokens,n.endState)}}class zr{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let s=0,o=e.length;s0&&s[o-1]===l)continue;let c=a.startIndex;0===e?c=0:c{const i=await Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?jr(e,i):new Go(bo.get(Ei.L),bo.get(cs.L),e,Hr(e,i),bo.get(Ie.pG)):null}));return ko.dG.registerFactory(e,i)}var Kr=i(5973);o.qB.wrappingIndent.defaultValue=0,o.qB.glyphMargin.defaultValue=!1,o.qB.autoIndent.defaultValue=3,o.qB.overviewRulerLanes.defaultValue=2,Kr.Pj.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const $r=(0,r.createMonacoBaseAPI)();$r.editor={create:function(e,t,i){return bo.initialize(i||{}).createInstance(lr,e,t)},getEditors:function(){return bo.get(g.T).listCodeEditors()},getDiffEditors:function(){return bo.get(g.T).listDiffEditors()},onDidCreateEditor:function(e){return bo.get(g.T).onCodeEditorAdd((t=>{e(t)}))},onDidCreateDiffEditor:function(e){return bo.get(g.T).onDiffEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return bo.initialize(i||{}).createInstance(cr,e,t)},addCommand:function(e){if("string"!=typeof e.id||"function"!=typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return gt.w.registerCommand(e.id,e.run)},addEditorAction:function(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=ee.M$.deserialize(e.precondition),i=new l.Cm;if(i.add(gt.w.registerCommand(e.id,((i,...n)=>u.DX.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n))))))),e.contextMenuGroupId){const n={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};i.add(Qt.ZG.appendMenuItem(Qt.D8.EditorContext,n))}if(Array.isArray(e.keybindings)){const n=bo.get(Ne.b);if(n instanceof so){const s=ee.M$.and(t,ee.M$.deserialize(e.keybindingContext));i.add(n.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:s})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return i},addKeybindingRule:function(e){return Mr([e])},addKeybindingRules:Mr,createModel:function(e,t,i){const n=bo.get(Ei.L),s=n.getLanguageIdByMimeType(t)||t;return dr(bo.get(N.IModelService),n,e,s,i)},setModelLanguage:function(e,t){const i=bo.get(Ei.L),n=i.getLanguageIdByMimeType(t)||t||xo.vH;e.setLanguage(i.createById(n))},setModelMarkers:function(e,t,i){e&&bo.get(Ws.DR).changeOne(t,e.uri,i)},getModelMarkers:function(e){return bo.get(Ws.DR).read(e)},removeAllMarkers:function(e){bo.get(Ws.DR).changeAll(e,[])},onDidChangeMarkers:function(e){return bo.get(Ws.DR).onMarkerChanged(e)},getModels:function(){return bo.get(N.IModelService).getModels()},getModel:function(e){return bo.get(N.IModelService).getModel(e)},onDidCreateModel:function(e){return bo.get(N.IModelService).onModelAdded(e)},onWillDisposeModel:function(e){return bo.get(N.IModelService).onModelRemoved(e)},onDidChangeModelLanguage:function(e){return bo.get(N.IModelService).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))},createWebWorker:function(e){return function(e,t){return new wo(e,t)}(bo.get(N.IModelService),e)},colorizeElement:function(e,t){const i=bo.get(Ei.L),n=bo.get(cs.L);return Zo.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))},colorize:function(e,t,i){const n=bo.get(Ei.L);return bo.get(cs.L).registerEditorContainer(a.G.document.body),Zo.colorize(n,e,t,i)},colorizeModelLine:function(e,t,i=4){return bo.get(cs.L).registerEditorContainer(a.G.document.body),Zo.colorizeModelLine(e,t,i)},tokenize:function(e,t){ko.dG.getOrCreate(t);const i=(o=t,ko.dG.get(o)||{getInitialState:()=>Lo.r3,tokenize:(e,t,i)=>(0,Lo.$H)(o,i)}),n=(0,c.uz)(e),s=[];var o;let r=i.getInitialState();for(let e=0,t=n.length;e{if(!i)return null;const s=t.options?.selection;let o;return s&&"number"==typeof s.endLineNumber&&"number"==typeof s.endColumn?o=s:s&&(o={lineNumber:s.startLineNumber,column:s.startColumn}),await e.openCodeEditor(i,t.resource,o)?i:null}))},AccessibilitySupport:Eo.Gn,ContentWidgetPositionPreference:Eo.Qj,CursorChangeReason:Eo.h5,DefaultEndOfLine:Eo.of,EditorAutoIndentStrategy:Eo.e0,EditorOption:Eo.p2,EndOfLinePreference:Eo.kf,EndOfLineSequence:Eo.WU,MinimapPosition:Eo.R3,MinimapSectionHeaderStyle:Eo.VX,MouseTargetType:Eo.hS,OverlayWidgetPositionPreference:Eo.dE,OverviewRulerLane:Eo.A5,GlyphMarginLane:Eo.ZS,RenderLineNumbersType:Eo.DO,RenderMinimap:Eo.hW,ScrollbarVisibility:Eo.XR,ScrollType:Eo.ov,TextEditorCursorBlinkingStyle:Eo.U7,TextEditorCursorStyle:Eo.m9,TrackedRangeStickiness:Eo.kK,WrappingIndent:Eo.tJ,InjectedTextCursorStops:Eo.VW,PositionAffinity:Eo.Ic,ShowLightbulbIconMode:Eo.jT,ConfigurationChangedEvent:o.lw,BareFontInfo:yo._8,FontInfo:yo.YJ,TextModelResolvedOptions:Do.X2,FindMatch:Do.Dg,ApplyUpdateResult:o.hZ,EditorZoom:Co.D,createMultiFileDiffEditor:function(e,t){const i=bo.initialize(t||{});return new Ir(e,{},i)},EditorType:So._,EditorOptions:o.qB},$r.languages={register:function(e){xo.W6.registerLanguage(e)},getLanguages:function(){let e=[];return e=e.concat(xo.W6.getLanguages()),e},onLanguage:function(e,t){return bo.withServices((()=>{const i=bo.get(Ei.L).onDidRequestRichLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},onLanguageEncountered:function(e,t){return bo.withServices((()=>{const i=bo.get(Ei.L).onDidRequestBasicLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},getEncodedLanguageId:function(e){return bo.get(Ei.L).languageIdCodec.encodeLanguageId(e)},setLanguageConfiguration:function(e,t){if(!bo.get(Ei.L).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return bo.get(D.JZ).register(e,t,100)},setColorMap:function(e){const t=bo.get(cs.L);if(e){const i=[null];for(let t=1,n=e.length;tt}):ko.dG.register(e,jr(e,t))},setMonarchTokensProvider:function(e,t){return Ur(t)?qr(e,{create:()=>t}):ko.dG.register(e,(t=>new Go(bo.get(Ei.L),bo.get(cs.L),e,Hr(e,t),bo.get(Ie.pG)))(t))},registerReferenceProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).referenceProvider.register(e,t)},registerRenameProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).renameProvider.register(e,t)},registerNewSymbolNameProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).newSymbolNamesProvider.register(e,t)},registerCompletionItemProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).completionProvider.register(e,t)},registerSignatureHelpProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).signatureHelpProvider.register(e,t)},registerHoverProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).hoverProvider.register(e,{provideHover:async(e,i,n,s)=>{const o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n,s)).then((e=>{if(e)return!e.range&&o&&(e.range=new L.Q(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new L.Q(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentSymbolProvider.register(e,t)},registerDocumentHighlightProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentHighlightProvider.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).linkedEditingRangeProvider.register(e,t)},registerDefinitionProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).definitionProvider.register(e,t)},registerImplementationProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).implementationProvider.register(e,t)},registerTypeDefinitionProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).typeDefinitionProvider.register(e,t)},registerCodeLensProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).codeLensProvider.register(e,t)},registerCodeActionProvider:function(e,t,i){return bo.get(R.ILanguageFeaturesService).codeActionProvider.register(e,{providedCodeActionKinds:i?.providedCodeActionKinds,documentation:i?.documentation,provideCodeActions:(e,i,n,s)=>{const o=bo.get(Ws.DR).read({resource:e.uri}).filter((e=>L.Q.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:o,only:n.only,trigger:n.trigger},s)},resolveCodeAction:t.resolveCodeAction})},registerDocumentFormattingEditProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentFormattingEditProvider.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentRangeFormattingEditProvider.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).onTypeFormattingEditProvider.register(e,t)},registerLinkProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).linkProvider.register(e,t)},registerColorProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).colorProvider.register(e,t)},registerFoldingRangeProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).foldingRangeProvider.register(e,t)},registerDeclarationProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).declarationProvider.register(e,t)},registerSelectionRangeProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).selectionRangeProvider.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentSemanticTokensProvider.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).documentRangeSemanticTokensProvider.register(e,t)},registerInlineCompletionsProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).inlineCompletionsProvider.register(e,t)},registerInlineEditProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).inlineEditProvider.register(e,t)},registerInlayHintsProvider:function(e,t){return bo.get(R.ILanguageFeaturesService).inlayHintsProvider.register(e,t)},DocumentHighlightKind:Eo.Kb,CompletionItemKind:Eo.Io,CompletionItemTag:Eo.QP,CompletionItemInsertTextRule:Eo._E,SymbolKind:Eo.v0,SymbolTag:Eo.H_,IndentAction:Eo.l,CompletionTriggerKind:Eo.t7,SignatureHelpTriggerKind:Eo.WA,InlayHintKind:Eo.r4,InlineCompletionTriggerKind:Eo.qw,InlineEditTriggerKind:Eo.sm,CodeActionTriggerType:Eo.ok,NewSymbolNameTag:Eo.OV,NewSymbolNameTriggerKind:Eo.YT,PartialAcceptTriggerKind:Eo.Ah,HoverVerbosityAction:Eo.M$,FoldingRangeKind:ko.lO,SelectedSuggestionInfo:ko.GE};const Gr=$r.CancellationTokenSource,Qr=$r.Emitter,Yr=$r.KeyCode,Zr=$r.KeyMod,Xr=$r.Position,Jr=$r.Range,ea=$r.Selection,ta=$r.SelectionDirection,ia=$r.MarkerSeverity,na=$r.MarkerTag,sa=$r.Uri,oa=$r.Token,ra=$r.editor,aa=$r.languages,la=globalThis.MonacoEnvironment;var ca;(la?.globalAPI||"function"==typeof define&&i.amdO)&&(globalThis.monaco=$r),void 0!==globalThis.require&&"function"==typeof globalThis.require.config&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]}),i(55172),i(95380),self.MonacoEnvironment=(ca={editorWorkerService:"editor.worker.js",css:"css.worker.js",less:"css.worker.js",scss:"css.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,s=(n?n.replace(/\/$/,"")+"/":"")+ca[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(s)){var o=String(window.location),r=o.substr(0,o.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(s.substring(0,r.length)!==r){/^(\/\/)/.test(s)&&(s=window.location.protocol+s);var a=new Blob(["/*"+t+'*/importScripts("'+s+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return s}});var da=n},75969:function(e,t,i){"use strict";i.d(t,{Dy:function(){return o},H8:function(){return d},Qu:function(){return f},Tc:function(){return c},c8:function(){return u},gm:function(){return l},m0:function(){return g},nr:function(){return h},pR:function(){return r}});var n=i(95601);class s{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new s}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function o(e,t,i){"string"==typeof t&&(t=e.matchMedia(t)),t.addEventListener("change",i)}function r(e){return s.INSTANCE.getZoomFactor(e)}const a=navigator.userAgent,l=a.indexOf("Firefox")>=0,c=a.indexOf("AppleWebKit")>=0,d=a.indexOf("Chrome")>=0,h=!d&&a.indexOf("Safari")>=0,u=!d&&!h&&c,g=(a.indexOf("Electron/"),a.indexOf("Android")>=0);let p=!1;if("function"==typeof n.G.matchMedia){const e=n.G.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=n.G.matchMedia("(display-mode: fullscreen)");p=e.matches,o(n.G,e,(({matches:e})=>{p&&t.matches||(p=e)}))}function f(){return p}},19621:function(e,t,i){"use strict";i.d(t,{e:function(){return r}});var n=i(75969),s=i(95601),o=i(79783);const r={clipboard:{writeText:o.ib||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.ib||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.ib||n.Qu()?0:navigator.keyboard||n.nr?1:2,touch:"ontouchstart"in s.G||navigator.maxTouchPoints>0,pointerEvents:s.G.PointerEvent&&("ontouchstart"in s.G||navigator.maxTouchPoints>0)}},88767:function(e,t,i){"use strict";i.d(t,{t:function(){return n}});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(5940).K.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},84201:function(e,t,i){"use strict";i.d(t,{$:function(){return Be},BC:function(){return Te},BK:function(){return q},Be:function(){return F},Bx:function(){return ke},CE:function(){return Ue},Cl:function(){return ee},Di:function(){return Ye},Ej:function(){return j},Er:function(){return ye},Fv:function(){return L},H4:function(){return Q},Hs:function(){return Re},Ij:function(){return P},Iv:function(){return k},L9:function(){return W},Ln:function(){return Pe},Mc:function(){return et},OK:function(){return Y},Oq:function(){return A},PG:function(){return O},Pl:function(){return Me},Q2:function(){return C},QX:function(){return Z},TT:function(){return Qe},Tf:function(){return qe},Tr:function(){return $},U2:function(){return _e},U3:function(){return R},WU:function(){return He},Wt:function(){return me},X7:function(){return ne},XD:function(){return X},Xc:function(){return T},ZF:function(){return y},a:function(){return oe},a4:function(){return Ge},b2:function(){return M},bo:function(){return We},bq:function(){return ie},cL:function(){return U},fg:function(){return z},fs:function(){return Le},fz:function(){return re},gI:function(){return $e},h:function(){return Je},i0:function(){return je},jD:function(){return Ve},jG:function(){return te},jh:function(){return le},ko:function(){return N},kx:function(){return Se},li:function(){return de},mU:function(){return K},nR:function(){return se},nY:function(){return we},pN:function(){return Ze},q3:function(){return x},sb:function(){return be},sd:function(){return xe},tG:function(){return H},vT:function(){return ze},w5:function(){return Ie},w_:function(){return D},wk:function(){return Ee},xZ:function(){return Ce},y6:function(){return G},yt:function(){return Ke},zK:function(){return De},zk:function(){return _}});var n=i(75969),s=i(19621),o=i(40478),r=i(34287),a=i(90890),l=i(20187),c=i(80670),d=i(19082),h=i(35114),u=i(84756),g=i(79783),p=i(65260),f=i(95601);const{registerWindow:m,getWindow:_,getDocument:v,getWindows:b,getWindowsCount:w,getWindowId:C,getWindowById:y,hasWindow:S,onDidRegisterWindow:k,onWillUnregisterWindow:x,onDidUnregisterWindow:L}=function(){const e=new Map;(0,f.y)(f.G,1);const t={window:f.G,disposables:new h.Cm};e.set(f.G.vscodeWindowId,t);const i=new c.vl,n=new c.vl,s=new c.vl;return{onDidRegisterWindow:i.event,onWillUnregisterWindow:s.event,onDidUnregisterWindow:n.event,registerWindow(t){if(e.has(t.vscodeWindowId))return h.jG.None;const o=new h.Cm,r={window:t,disposables:o.add(new h.Cm)};return e.set(t.vscodeWindowId,r),o.add((0,h.s)((()=>{e.delete(t.vscodeWindowId),n.fire(t)}))),o.add(N(t,ke.BEFORE_UNLOAD,(()=>{s.fire(t)}))),i.fire(r),o},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:function(i,n){return("number"==typeof i?e.get(i):void 0)??(n?t:void 0)},getWindow(e){const t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;const i=e;return i?.view?i.view.window:f.G},getDocument(e){return _(e).document}}}();function D(e){for(;e.firstChild;)e.firstChild.remove()}class E{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function N(e,t,i,n){return new E(e,t,i,n)}function I(e,t){return function(i){return t(new r.P(e,i))}}const M=function(e,t,i,n){let s=i;return"click"===t||"mousedown"===t||"contextmenu"===t?s=I(_(e),i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(s=function(e){return function(t){return e(new o.Z(t))}}(i)),N(e,t,s,n)},T=function(e,t,i){return function(e,t,i){return N(e,g.un&&s.e.pointerEvents?ke.POINTER_DOWN:ke.MOUSE_DOWN,t,i)}(e,I(_(e),t),i)};function R(e,t,i){return(0,a.b7)(e,t,i)}class P extends a.A0{constructor(e,t){super(e,t)}}let A,O;class F extends a.vb{constructor(e){super(),this.defaultTarget=e&&_(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}}class B{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dz)(e)}}static sort(e,t){return t.priority-e.priority}}function W(e){return _(e).getComputedStyle(e,null)}function H(e,t){const i=_(e),n=i.document;if(e!==n.body)return new z(e.clientWidth,e.clientHeight);if(g.un&&i?.visualViewport)return new z(i.visualViewport.width,i.visualViewport.height);if(i?.innerWidth&&i.innerHeight)return new z(i.innerWidth,i.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new z(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new z(n.documentElement.clientWidth,n.documentElement.clientHeight);if(t)return H(t);throw new Error("Unable to figure out browser width and height")}!function(){const e=new Map,t=new Map,i=new Map,n=new Map;O=(s,o,r=0)=>{const a=C(s),l=new B(o,r);let c=e.get(a);return c||(c=[],e.set(a,c)),c.push(l),i.get(a)||(i.set(a,!0),s.requestAnimationFrame((()=>(s=>{i.set(s,!1);const o=e.get(s)??[];for(t.set(s,o),e.set(s,[]),n.set(s,!0);o.length>0;)o.sort(B.sort),o.shift().execute();n.set(s,!1)})(a)))),l},A=(e,i,s)=>{const o=C(e);if(n.get(o)){const e=new B(i,s);let n=t.get(o);return n||(n=[],t.set(o,n)),n.push(e),e}return O(e,i,s)}}();class V{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=W(e),s=n?n.getPropertyValue(t):"0";return V.convertToPixels(e,s)}static getBorderLeftWidth(e){return V.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return V.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return V.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return V.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return V.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return V.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return V.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return V.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return V.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return V.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return V.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return V.getDimension(e,"margin-bottom","marginBottom")}}class z{static{this.None=new z(0,0)}constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new z(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof z?e:new z(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function U(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement;){i-=e.scrollTop;const s=J(e)?null:W(e);s&&(n-="rtl"!==s.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=V.getBorderLeftWidth(e),i+=V.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function j(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function q(e){const t=e.getBoundingClientRect(),i=_(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}function K(e){let t=e,i=1;do{const e=W(t).zoom;null!=e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==t.ownerDocument.documentElement);return i}function $(e){const t=V.getMarginLeft(e)+V.getMarginRight(e);return e.offsetWidth+t}function G(e){const t=V.getBorderLeftWidth(e)+V.getBorderRightWidth(e),i=V.getPaddingLeft(e)+V.getPaddingRight(e);return e.offsetWidth-t-i}function Q(e){const t=V.getBorderTopWidth(e)+V.getBorderBottomWidth(e),i=V.getPaddingTop(e)+V.getPaddingBottom(e);return e.offsetHeight-t-i}function Y(e){const t=V.getMarginTop(e)+V.getMarginBottom(e);return e.offsetHeight+t}function Z(e,t){return Boolean(t?.contains(e))}function X(e,t,i){return!!function(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}(e,t,i)}function J(e){return e&&!!e.host&&!!e.mode}function ee(e){return!!te(e)}function te(e){for(;e.parentNode;){if(e===e.ownerDocument?.body)return null;e=e.parentNode}return J(e)?e:null}function ie(){let e=oe().activeElement;for(;e?.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ne(e){return ie()===e}function se(e){return Z(ie(),e)}function oe(){return w()<=1?f.G.document:Array.from(b()).map((({window:e})=>e.document)).find((e=>e.hasFocus()))??f.G.document}function re(){const e=oe();return e.defaultView?.window??f.G}const ae=new Map;function le(){return new ce}class ce{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=de(f.G.document.head,(t=>t.innerText=e)))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function de(e=f.G.document.head,t,i){const n=document.createElement("style");if(n.type="text/css",n.media="screen",t?.(n),e.appendChild(n),i&&i.add((0,h.s)((()=>n.remove()))),e===f.G.document.head){const e=new Set;ae.set(n,e);for(const{window:t,disposables:s}of b()){if(t===f.G)continue;const o=s.add(he(n,e,t));i?.add(o)}}return n}function he(e,t,i){const n=new h.Cm,s=e.cloneNode(!0);i.document.head.appendChild(s),n.add((0,h.s)((()=>s.remove())));for(const t of fe(e))s.sheet?.insertRule(t.cssText,s.sheet?.cssRules.length);return n.add(ue.observe(e,n,{childList:!0})((()=>{s.textContent=e.textContent}))),t.add(s),n.add((0,h.s)((()=>t.delete(s)))),n}const ue=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));const s=(0,p.tW)(i);let o=n.get(s);if(o)o.users+=1;else{const r=new c.vl,a=new MutationObserver((e=>r.fire(e)));a.observe(e,i);const l=o={users:1,observer:a,onDidMutate:r.event};t.add((0,h.s)((()=>{l.users-=1,0===l.users&&(r.dispose(),a.disconnect(),n?.delete(s),0===n?.size&&this.mutationObservers.delete(e))}))),n.set(s,o)}return o.onDidMutate}};let ge=null;function pe(){return ge||(ge=de()),ge}function fe(e){return e?.sheet?.rules?e.sheet.rules:e?.sheet?.cssRules?e.sheet.cssRules:[]}function me(e,t,i=pe()){if(i&&t){i.sheet?.insertRule(`${e} {${t}}`,0);for(const n of ae.get(i)??[])me(e,t,n)}}function _e(e,t=pe()){if(!t)return;const i=fe(t),n=[];for(let t=0;t=0;e--)t.sheet?.deleteRule(n[e]);for(const i of ae.get(t)??[])_e(e,i)}function ve(e){return"string"==typeof e.selectorText}function be(e){return e instanceof HTMLElement||e instanceof _(e).HTMLElement}function we(e){return e instanceof HTMLAnchorElement||e instanceof _(e).HTMLAnchorElement}function Ce(e){return e instanceof SVGElement||e instanceof _(e).SVGElement}function ye(e){return e instanceof MouseEvent||e instanceof _(e).MouseEvent}function Se(e){return e instanceof KeyboardEvent||e instanceof _(e).KeyboardEvent}const ke={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Tc?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Tc?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Tc?"webkitAnimationIteration":"animationiteration"};function xe(e){const t=e;return!(!t||"function"!=typeof t.preventDefault||"function"!=typeof t.stopPropagation)}const Le={stop:(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e)};function De(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function Ee(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class Ne extends h.jG{static hasFocusWithin(e){if(be(e)){const t=te(e);return Z(t?t.activeElement:e.ownerDocument.activeElement,e)}{const t=e;return Z(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new c.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.vl),this.onDidBlur=this._onDidBlur.event;let t=Ne.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},s=()=>{t&&(i=!0,(be(e)?_(e):e).setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{Ne.hasFocusWithin(e)!==t&&(t?s():n())},this._register(N(e,ke.FOCUS,n,!0)),this._register(N(e,ke.BLUR,s,!0)),be(e)&&(this._register(N(e,ke.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(N(e,ke.FOCUS_OUT,(()=>this._refreshStateHandler()))))}}function Ie(e){return new Ne(e)}function Me(e,t){return e.after(t),t}function Te(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function Re(e,t){return e.insertBefore(t,e.firstChild),t}function Pe(e,...t){e.innerText="",Te(e,...t)}const Ae=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Oe;function Fe(e,t,i,...n){const s=Ae.exec(t);if(!s)throw new Error("Bad use of emmet");const o=s[1]||"div";let r;return r=e!==Oe.HTML?document.createElementNS(e,o):document.createElement(o),s[3]&&(r.id=s[3]),s[4]&&(r.className=s[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function Be(e,t,...i){return Fe(Oe.HTML,e,t,...i)}function We(e,...t){e?He(...t):Ve(...t)}function He(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function Ve(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function ze(e,t){const i=e.devicePixelRatio*t;return Math.max(1,Math.floor(i))/e.devicePixelRatio}function Ue(e){f.G.open(e,"_blank","noopener")}function je(e,t){const i=()=>{t(),n=O(e,i)};let n=O(e,i);return(0,h.s)((()=>n.dispose()))}function qe(e){return e?`url('${u.zl.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Ke(e){return`'${e.replace(/'/g,"%27")}'`}function $e(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=$e(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}function Ge(e,t=!1){const i=document.createElement("a");return d.$w("afterSanitizeAttributes",(n=>{for(const s of["href","src"])if(n.hasAttribute(s)){const o=n.getAttribute(s);if("href"===s&&o.startsWith("#"))continue;if(i.href=o,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===s&&i.href.startsWith("data:"))continue;n.removeAttribute(s)}}})),(0,h.s)((()=>{d.SV("afterSanitizeAttributes")}))}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(Oe||(Oe={})),Be.SVG=function(e,t,...i){return Fe(Oe.SVG,e,t,...i)},u.Ez.setPreferredWebSchema(/^https:/.test(f.G.location.href)?"https":"http");const Qe=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class Ye extends c.vl{constructor(){super(),this._subscriptions=new h.Cm,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(c.Jh.runAndSubscribe(k,(({window:e,disposables:t})=>this.registerListeners(e,t)),{window:f.G,disposables:this._subscriptions}))}registerListeners(e,t){t.add(N(e,"keydown",(e=>{if(e.defaultPrevented)return;const t=new o.Z(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),t.add(N(e,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),t.add(N(e.document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(N(e.document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(N(e.document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),t.add(N(e,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Ye.instance||(Ye.instance=new Ye),Ye.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class Ze extends h.jG{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(N(this.element,ke.DRAG_START,(e=>{this.callbacks.onDragStart?.(e)}))),this.callbacks.onDrag&&this._register(N(this.element,ke.DRAG,(e=>{this.callbacks.onDrag?.(e)}))),this._register(N(this.element,ke.DRAG_ENTER,(e=>{this.counter++,this.dragStartTime=e.timeStamp,this.callbacks.onDragEnter?.(e)}))),this._register(N(this.element,ke.DRAG_OVER,(e=>{e.preventDefault(),this.callbacks.onDragOver?.(e,e.timeStamp-this.dragStartTime)}))),this._register(N(this.element,ke.DRAG_LEAVE,(e=>{this.counter--,0===this.counter&&(this.dragStartTime=0,this.callbacks.onDragLeave?.(e))}))),this._register(N(this.element,ke.DRAG_END,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd?.(e)}))),this._register(N(this.element,ke.DROP,(e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop?.(e)})))}}const Xe=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function Je(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const s=Xe.exec(e);if(!s||!s.groups)throw new Error("Bad use of h");const o=s.groups.tag||"div",r=document.createElement(o);s.groups.id&&(r.id=s.groups.id);const a=[];if(s.groups.class)for(const e of s.groups.class.split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(s.groups.name&&(l[s.groups.name]=r),n)for(const e of n)be(e)?r.appendChild(e):"string"==typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(tt(e),"number"==typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(tt(e),t.toString());return l.root=r,l}function et(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const s=Xe.exec(e);if(!s||!s.groups)throw new Error("Bad use of h");const o=s.groups.tag||"div",r=document.createElementNS("http://www.w3.org/2000/svg",o);s.groups.id&&(r.id=s.groups.id);const a=[];if(s.groups.class)for(const e of s.groups.class.split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(s.groups.name&&(l[s.groups.name]=r),n)for(const e of n)be(e)?r.appendChild(e):"string"==typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(tt(e),"number"==typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(tt(e),t.toString());return l.root=r,l}function tt(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},19082:function(e,t,i){"use strict";i.d(t,{$w:function(){return ie},SV:function(){return ne},aj:function(){return te}});const{entries:n,setPrototypeOf:s,isFrozen:o,getPrototypeOf:r,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:d}=Object,{apply:h,construct:u}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),h||(h=function(e,t,i){return e.apply(t,i)}),u||(u=function(e,t){return new e(...t)});const g=L(Array.prototype.forEach),p=L(Array.prototype.pop),f=L(Array.prototype.push),m=L(String.prototype.toLowerCase),_=L(String.prototype.toString),v=L(String.prototype.match),b=L(String.prototype.replace),w=L(String.prototype.indexOf),C=L(String.prototype.trim),y=L(Object.prototype.hasOwnProperty),S=L(RegExp.prototype.test),k=(x=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i1?i-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:m;s&&s(e,null);let n=t.length;for(;n--;){let s=t[n];if("string"==typeof s){const e=i(s);e!==s&&(o(t)||(t[n]=e),s=e)}e[s]=!0}return e}function E(e){for(let t=0;t/gm),j=c(/\${[\w\W]*}/gm),q=c(/^data-[\-\w.\u00B7-\uFFFF]/),K=c(/^aria-[\-\w]+$/),$=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=c(/^(?:\w+script|data):/i),Q=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=c(/^html$/i),Z=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var X=Object.freeze({__proto__:null,MUSTACHE_EXPR:z,ERB_EXPR:U,TMPLIT_EXPR:j,DATA_ATTR:q,ARIA_ATTR:K,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Q,DOCTYPE_NAME:Y,CUSTOM_ELEMENT:Z});const J=function(){return"undefined"==typeof window?null:window};var ee=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J();const i=t=>e(t);if(i.version="3.1.7",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;let{document:s}=t;const o=s,r=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:h,Element:u,NodeFilter:x,NamedNodeMap:L=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:E,DOMParser:z,trustedTypes:U}=t,j=u.prototype,q=I(j,"cloneNode"),K=I(j,"remove"),G=I(j,"nextSibling"),Q=I(j,"childNodes"),Z=I(j,"parentNode");if("function"==typeof c){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let ee,te="";const{implementation:ie,createNodeIterator:ne,createDocumentFragment:se,getElementsByTagName:oe}=s,{importNode:re}=o;let ae={};i.isSupported="function"==typeof n&&"function"==typeof Z&&ie&&void 0!==ie.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:de,DATA_ATTR:he,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:pe,CUSTOM_ELEMENT:fe}=X;let{IS_ALLOWED_URI:me}=X,_e=null;const ve=D({},[...M,...T,...R,...A,...F]);let be=null;const we=D({},[...B,...W,...H,...V]);let Ce=Object.seal(d(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ye=null,Se=null,ke=!0,xe=!0,Le=!1,De=!0,Ee=!1,Ne=!0,Ie=!1,Me=!1,Te=!1,Re=!1,Pe=!1,Ae=!1,Oe=!0,Fe=!1,Be=!0,We=!1,He={},Ve=null;const ze=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ue=null;const je=D({},["audio","video","img","source","image","track"]);let qe=null;const Ke=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Ye=Qe,Ze=!1,Xe=null;const Je=D({},[$e,Ge,Qe],_);let et=null;const tt=["application/xhtml+xml","text/html"];let it=null,nt=null;const st=s.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=N(e),et=-1===tt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,it="application/xhtml+xml"===et?_:m,_e=y(e,"ALLOWED_TAGS")?D({},e.ALLOWED_TAGS,it):ve,be=y(e,"ALLOWED_ATTR")?D({},e.ALLOWED_ATTR,it):we,Xe=y(e,"ALLOWED_NAMESPACES")?D({},e.ALLOWED_NAMESPACES,_):Je,qe=y(e,"ADD_URI_SAFE_ATTR")?D(N(Ke),e.ADD_URI_SAFE_ATTR,it):Ke,Ue=y(e,"ADD_DATA_URI_TAGS")?D(N(je),e.ADD_DATA_URI_TAGS,it):je,Ve=y(e,"FORBID_CONTENTS")?D({},e.FORBID_CONTENTS,it):ze,ye=y(e,"FORBID_TAGS")?D({},e.FORBID_TAGS,it):{},Se=y(e,"FORBID_ATTR")?D({},e.FORBID_ATTR,it):{},He=!!y(e,"USE_PROFILES")&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Ne=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Ae=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||$,Ye=e.NAMESPACE||Qe,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(xe=!1),Pe&&(Re=!0),He&&(_e=D({},F),be=[],!0===He.html&&(D(_e,M),D(be,B)),!0===He.svg&&(D(_e,T),D(be,W),D(be,V)),!0===He.svgFilters&&(D(_e,R),D(be,W),D(be,V)),!0===He.mathMl&&(D(_e,A),D(be,H),D(be,V))),e.ADD_TAGS&&(_e===ve&&(_e=N(_e)),D(_e,e.ADD_TAGS,it)),e.ADD_ATTR&&(be===we&&(be=N(be)),D(be,e.ADD_ATTR,it)),e.ADD_URI_SAFE_ATTR&&D(qe,e.ADD_URI_SAFE_ATTR,it),e.FORBID_CONTENTS&&(Ve===ze&&(Ve=N(Ve)),D(Ve,e.FORBID_CONTENTS,it)),Be&&(_e["#text"]=!0),Ie&&D(_e,["html","head","body"]),_e.table&&(D(_e,["tbody"]),delete ye.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(U,r)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));l&&l(e),nt=e}},at=D({},["mi","mo","mn","ms","mtext"]),lt=D({},["annotation-xml"]),ct=D({},["title","style","font","a","script"]),dt=D({},[...T,...R,...P]),ht=D({},[...A,...O]),ut=function(e){f(i.removed,{element:e});try{Z(e).removeChild(e)}catch(t){K(e)}},gt=function(e,t){try{f(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!be[e])if(Re||Pe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t=null,i=null;if(Te)e=""+e;else{const t=v(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===et&&Ye===Qe&&(e=''+e+"");const n=ee?ee.createHTML(e):e;if(Ye===Qe)try{t=(new z).parseFromString(n,et)}catch(e){}if(!t||!t.documentElement){t=ie.createDocument(Ye,"template",null);try{t.documentElement.innerHTML=Ze?te:n}catch(e){}}const o=t.body||t.documentElement;return e&&i&&o.insertBefore(s.createTextNode(i),o.childNodes[0]||null),Ye===Qe?oe.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:o},ft=function(e){return ne.call(e.ownerDocument||e,e,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null)},mt=function(e){return e instanceof E&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof L)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function(e){return"function"==typeof h&&e instanceof h},vt=function(e,t,n){ae[e]&&g(ae[e],(e=>{e.call(i,t,n,nt)}))},bt=function(e){let t=null;if(vt("beforeSanitizeElements",e,null),mt(e))return ut(e),!0;const n=it(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:n,allowedTags:_e}),e.hasChildNodes()&&!_t(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return ut(e),!0;if(7===e.nodeType)return ut(e),!0;if(Ne&&8===e.nodeType&&S(/<[/\w]/g,e.data))return ut(e),!0;if(!_e[n]||ye[n]){if(!ye[n]&&Ct(n)){if(Ce.tagNameCheck instanceof RegExp&&S(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Be&&!Ve[n]){const t=Z(e)||e.parentNode,i=Q(e)||e.childNodes;if(i&&t)for(let n=i.length-1;n>=0;--n){const s=q(i[n],!0);s.__removalCount=(e.__removalCount||0)+1,t.insertBefore(s,G(e))}}return ut(e),!0}return e instanceof u&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});const i=m(e.tagName),n=m(t.tagName);return!!Xe[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===Qe?"svg"===i:t.namespaceURI===$e?"svg"===i&&("annotation-xml"===n||at[n]):Boolean(dt[i]):e.namespaceURI===$e?t.namespaceURI===Qe?"math"===i:t.namespaceURI===Ge?"math"===i&<[n]:Boolean(ht[i]):e.namespaceURI===Qe?!(t.namespaceURI===Ge&&!lt[n])&&!(t.namespaceURI===$e&&!at[n])&&!ht[i]&&(ct[i]||!dt[i]):!("application/xhtml+xml"!==et||!Xe[e.namespaceURI]))}(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,g([le,ce,de],(e=>{t=b(t,e," ")})),e.textContent!==t&&(f(i.removed,{element:e.cloneNode()}),e.textContent=t)),vt("afterSanitizeElements",e,null),!1):(ut(e),!0)},wt=function(e,t,i){if(Oe&&("id"===t||"name"===t)&&(i in s||i in st))return!1;if(xe&&!Se[t]&&S(he,t));else if(ke&&S(ue,t));else if(!be[t]||Se[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&S(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&S(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&S(Ce.tagNameCheck,i)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(i))))return!1}else if(qe[t]);else if(S(me,b(i,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(i,"data:")||!Ue[e])if(Le&&!S(ge,b(i,pe,"")));else if(i)return!1;return!0},Ct=function(e){return"annotation-xml"!==e&&v(e,fe)},yt=function(e){vt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be};let s=t.length;for(;s--;){const o=t[s],{name:r,namespaceURI:a,value:l}=o,c=it(r);let d="value"===r?l:C(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(gt(r,e),!n.keepAttr)continue;if(!De&&S(/\/>/i,d)){gt(r,e);continue}Ee&&g([le,ce,de],(e=>{d=b(d,e," ")}));const h=it(e.nodeName);if(wt(h,c,d))if(!Fe||"id"!==c&&"name"!==c||(gt(r,e),d="user-content-"+d),Ne&&S(/((--!?|])>)|<\/(style|title)/i,d))gt(r,e);else{if(ee&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(a);else switch(U.getAttributeType(h,c)){case"TrustedHTML":d=ee.createHTML(d);break;case"TrustedScriptURL":d=ee.createScriptURL(d)}try{a?e.setAttributeNS(a,r,d):e.setAttribute(r,d),mt(e)?ut(e):p(i.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)},St=function e(t){let i=null;const n=ft(t);for(vt("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)vt("uponSanitizeShadowNode",i,null),bt(i)||(i.content instanceof a&&e(i.content),yt(i));vt("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,r=null,l=null;if(Ze=!e,Ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw k("toString is not a function");if("string"!=typeof(e=e.toString()))throw k("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Me||rt(t),i.removed=[],"string"==typeof e&&(We=!1),We){if(e.nodeName){const t=it(e.nodeName);if(!_e[t]||ye[t])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof h)n=pt("\x3c!----\x3e"),s=n.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!Re&&!Ee&&!Ie&&-1===e.indexOf("<"))return ee&&Ae?ee.createHTML(e):e;if(n=pt(e),!n)return Re?null:Ae?te:""}n&&Te&&ut(n.firstChild);const c=ft(We?e:n);for(;r=c.nextNode();)bt(r)||(r.content instanceof a&&St(r.content),yt(r));if(We)return e;if(Re){if(Pe)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(be.shadowroot||be.shadowrootmode)&&(l=re.call(o,l,!0)),l}let d=Ie?n.outerHTML:n.innerHTML;return Ie&&_e["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(Y,n.ownerDocument.doctype.name)&&(d="\n"+d),Ee&&g([le,ce,de],(e=>{d=b(d,e," ")})),ee&&Ae?ee.createHTML(d):d},i.setConfig=function(){rt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},i.clearConfig=function(){nt=null,Me=!1},i.isValidAttribute=function(e,t,i){nt||rt({});const n=it(e),s=it(t);return wt(n,s,i)},i.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],f(ae[e],t))},i.removeHook=function(e){if(ae[e])return p(ae[e])},i.removeHooks=function(e){ae[e]&&(ae[e]=[])},i.removeAllHooks=function(){ae={}},i}();ee.version,ee.isSupported;const te=ee.sanitize,ie=(ee.setConfig,ee.clearConfig,ee.isValidAttribute,ee.addHook),ne=ee.removeHook;ee.removeHooks,ee.removeAllHooks},26745:function(e,t,i){"use strict";i.d(t,{f:function(){return s}});var n=i(80670);class s{get event(){return this.emitter.event}constructor(e,t,i){const s=e=>this.emitter.fire(e);this.emitter=new n.vl({onWillAddFirstListener:()=>e.addEventListener(t,s,i),onDidRemoveLastListener:()=>e.removeEventListener(t,s,i)})}dispose(){this.emitter.dispose()}}},43999:function(e,t,i){"use strict";i.d(t,{D:function(){return n},Z:function(){return o}});class n{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=s(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=s(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=s(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=s(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=s(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=s(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=s(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=s(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=s(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=s(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=s(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function s(e){return"number"==typeof e?`${e}px`:e}function o(e){return new n(e)}},39159:function(e,t,i){"use strict";i.d(t,{z:function(){return s}});var n=i(79783);const s=n.uF?'"Segoe WPC", "Segoe UI", sans-serif':n.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'},65745:function(e,t,i){"use strict";i.d(t,{S5:function(){return s},n:function(){return r},yk:function(){return o}});var n=i(84201);function s(e,t={}){const i=r(t);return i.textContent=e,i}function o(e,t={}){const i=r(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,s=i;const o=[],r=new a(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==c(r.peek(),t);if(i&&(e=r.next()),i||0===c(e,t)||e!==r.peek())if("\n"===e)2===s.type&&(s=o.pop()),s.children.push({type:8});else if(2!==s.type){const t={type:2,content:e};s.children.push(t),o.push(s),s=t}else s.content+=e;else{r.advance(),2===s.type&&(s=o.pop());const i=c(e,t);if(s.type===i||5===s.type&&6===i)s=o.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),s.children.push(e),o.push(s),s=e}}}return 2===s.type&&(s=o.pop()),o.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,s){let o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(7===t.type&&s)o=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.b2(e,"click",(e=>{i.callback(String(t.index),e)}))),o=e}else 8===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach((e=>{l(o,e,i,s)}))}function c(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},82884:function(e,t,i){"use strict";i.d(t,{_:function(){return o}});var n=i(84201),s=i(35114);class o{constructor(){this._hooks=new s.Cm,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,o,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=o,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,s.s)((()=>{try{e.releasePointerCapture(t)}catch(e){}})))}catch(t){a=n.zk(e)}this._hooks.add(n.ko(a,n.Bx.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(n.ko(a,n.Bx.POINTER_UP,(e=>this.stopMonitoring(!0))))}}},40478:function(e,t,i){"use strict";i.d(t,{Z:function(){return c}});var n=i(75969),s=i(62167),o=i(99559),r=i(79783);const a=r.zx?256:2048,l=r.zx?2048:256;class c{constructor(e){this._standardKeyboardEventBrand=!0;const t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=function(e){if(e.charCode){const t=String.fromCharCode(e.charCode).toUpperCase();return s.YM.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.gm)switch(t){case 59:return 85;case 60:if(r.j9)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(r.zx)return 57}else if(n.Tc){if(r.zx&&93===t)return 57;if(!r.zx&&92===t)return 57}return s.uw[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=l),t|=e,t}_computeKeyCodeChord(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new o.dG(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},96710:function(e,t,i){"use strict";i.d(t,{Gc:function(){return I},R9:function(){return O}});var n=i(84201),s=i(19082),o=i(26745),r=i(65745),a=i(40478),l=i(34287),c=i(43014),d=i(20187),h=i(80670),u=i(85584),g=i(4590),p=i(68860),f=i(72582),m=i(35114);let _={};!function(){function e(e,t){t(_)}var t,i;e.amd=!0,t=this,i=function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const n=/[&<>"']/,s=new RegExp(n.source,"g"),o=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,r=new RegExp(o.source,"g"),a={"&":"&","<":"<",">":">",'"':""","'":"'"},l=e=>a[e];function c(e,t){if(t){if(n.test(e))return e.replace(s,l)}else if(o.test(e))return e.replace(r,l);return e}const d=/(^|[^\[])\^/g;function h(e,t){let i="string"==typeof e?e:e.source;t=t||"";const n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(d,"$1"),i=i.replace(e,s),n},getRegex:()=>new RegExp(i,t)};return n}function u(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const g={exec:()=>null};function p(e,t){const i=e.replace(/\|/g,((e,t,i)=>{let n=!1,s=t;for(;--s>=0&&"\\"===i[s];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:f(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t){const i=e.match(/^(\s+)(?:```)/);if(null===i)return t;const n=i[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=f(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:f(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=f(t[0],"\n").split("\n"),i="",n="";const s=[];for(;e.length>0;){let t=!1;const o=[];let r;for(r=0;r/.test(e[r]))o.push(e[r]),t=!0;else{if(t)break;o.push(e[r])}e=e.slice(r);const a=o.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}\n${a}`:a,n=n?`${n}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=c,0===e.length)break;const d=s[s.length-1];if("code"===d?.type)break;if("blockquote"===d?.type){const t=d,o=t.raw+"\n"+e.join("\n"),r=this.blockquote(o);s[s.length-1]=r,i=i.substring(0,i.length-t.raw.length)+r.raw,n=n.substring(0,n.length-t.text.length)+r.text;break}if("list"!==d?.type);else{const t=d,o=t.raw+"\n"+e.join("\n"),r=this.list(o);s[s.length-1]=r,i=i.substring(0,i.length-d.raw.length)+r.raw,n=n.substring(0,n.length-t.raw.length)+r.raw,e=o.substring(s[s.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:i,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const o=new RegExp(`^( {0,3}${i})((?:[\t ][^\\n]*)?(?:\\n|$))`);let r=!1;for(;e;){let i=!1,n="",a="";if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],d=!l.trim(),h=0;if(this.options.pedantic?(h=2,a=l.trimStart()):d?h=t[1].length+1:(h=t[2].search(/[^ ]/),h=h>4?1:h,a=l.slice(h),h+=t[1].length),d&&/^ *$/.test(c)&&(n+=c+"\n",e=e.substring(c.length+1),i=!0),!i){const t=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),i=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;e;){const r=e.split("\n",1)[0];if(c=r,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),s.test(c))break;if(o.test(c))break;if(t.test(c))break;if(i.test(e))break;if(c.search(/[^ ]/)>=h||!c.trim())a+="\n"+c.slice(h);else{if(d)break;if(l.search(/[^ ]/)>=4)break;if(s.test(l))break;if(o.test(l))break;if(i.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),n+=r+"\n",e=e.substring(r.length+1),l=c.slice(h)}}s.loose||(r?s.loose=!0:/\n *\n *$/.test(n)&&(r=!0));let u,g=null;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(u="[ ] "!==g[0],a=a.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:n,task:!!g,checked:u,loose:!1,text:a,tokens:[]}),s.raw+=n}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e"space"===e.type)),i=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));s.loose=i}if(s.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const i=p(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const e of n)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:c(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=f(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let n=0;n-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^$/.test(e)?i.slice(1):i.slice(1,-1)),m(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=t[(i[2]||i[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return m(i,e,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(n&&(!n[3]||!i.match(/[\p{L}\p{N}]/u))&&(!n[1]&&!n[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...n[0]].length-1;let s,o,r=i,a=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){r+=o;continue}if((n[5]||n[6])&&i%3&&!((i+o)%3)){a+=o;continue}if(r-=o,r>0)continue;o=Math.min(o,o+r+a);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+o);if(Math.min(i,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=c(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=c(t[1]),i="mailto:"+e):(e=c(t[1]),i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,i;if("@"===t[2])e=c(t[0]),i="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(n!==t[0]);e=c(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:c(t[0]),{type:"text",raw:t[0],text:e}}}}const v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,b=/(?:[*+-]|\d{1,9}[.)])/,w=h(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,b).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y=/(?!\s*\])(?:\\.|[^\[\]\\])+/,S=h(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",y).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),k=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,b).getRegex(),x="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",L=/|$))/,D=h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",L).replace("tag",x).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),E=h(C).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),N={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",E).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:S,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:v,html:D,lheading:w,list:k,newline:/^(?: *(?:\n|$))+/,paragraph:E,table:g,text:/^[^\n]+/},I=h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),M={...N,table:I,paragraph:h(C).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",I).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex()},T={...N,html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",L).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(C).replace("hr",v).replace("heading"," *#{1,6} *[^\n]").replace("lheading",w).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,P=/^( {2,}|\\)\n(?!\s*$)/,A="\\p{P}\\p{S}",O=h(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,A).getRegex(),F=h(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,A).getRegex(),B=h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,A).getRegex(),W=h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,A).getRegex(),H=h(/\\([punct])/,"gu").replace(/punct/g,A).getRegex(),V=h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),z=h(L).replace("(?:--\x3e|$)","--\x3e").getRegex(),U=h("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",z).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),j=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q=h(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",j).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),K=h(/^!?\[(label)\]\[(ref)\]/).replace("label",j).replace("ref",y).getRegex(),$=h(/^!?\[(ref)\](?:\[\])?/).replace("ref",y).getRegex(),G={_backpedal:g,anyPunctuation:H,autolink:V,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:P,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:g,emStrongLDelim:F,emStrongRDelimAst:B,emStrongRDelimUnd:W,escape:R,link:q,nolink:$,punctuation:O,reflink:K,reflinkSearch:h("reflink|nolink(?!\\()","g").replace("reflink",K).replace("nolink",$).getRegex(),tag:U,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(i.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(n):(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(s.raw+="\n"+n.raw,s.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))s=t[t.length-1],i&&"paragraph"===s?.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,s,o,r,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(r||(a=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,l,a))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach((e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(s))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),r=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}class te{options;parser;constructor(t){this.options=t||e.defaults}space(e){return""}code({text:e,lang:t,escaped:i}){const n=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+"\n";return n?'
    '+(i?s:c(s,!0))+"
    \n":"
    "+(i?s:c(s,!0))+"
    \n"}blockquote({tokens:e}){return`
    \n${this.parser.parse(e)}
    \n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
    \n"}list(e){const t=e.ordered,i=e.start;let n="";for(let t=0;t\n"+n+"\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

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

    An error occurred:

    "+c(i.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const re=new oe;function ae(e,t){return re.parse(e,t)}ae.options=ae.setOptions=function(e){return re.setOptions(e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.getDefaults=t,ae.defaults=e.defaults,ae.use=function(...e){return re.use(...e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.walkTokens=function(e,t){return re.walkTokens(e,t)},ae.parseInline=re.parseInline,ae.Parser=ne,ae.parser=ne.parse,ae.Renderer=te,ae.TextRenderer=ie,ae.Lexer=ee,ae.lexer=ee.lex,ae.Tokenizer=_,ae.Hooks=se,ae.parse=ae;const le=ae.options,ce=ae.setOptions,de=ae.use,he=ae.walkTokens,ue=ae.parseInline,ge=ae,pe=ne.parse,fe=ee.lex;e.Hooks=se,e.Lexer=ee,e.Marked=oe,e.Parser=ne,e.Renderer=te,e.TextRenderer=ie,e.Tokenizer=_,e.getDefaults=t,e.lexer=fe,e.marked=ae,e.options=le,e.parse=ge,e.parseInline=ue,e.parser=pe,e.setOptions=ce,e.use=de,e.walkTokens=he},e.amd?e(0,i):"object"==typeof exports?i(exports):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}(),_.Hooks||exports.Hooks,_.Lexer||exports.Lexer,_.Marked||exports.Marked,_.Parser||exports.Parser;var v=_.Renderer||exports.Renderer,b=(_.TextRenderer||exports.TextRenderer,_.Tokenizer||exports.Tokenizer,_.defaults||exports.defaults),w=(_.getDefaults||exports.getDefaults,_.lexer||exports.lexer),C=(_.marked||exports.marked,_.options||exports.options,_.parse||exports.parse),y=(_.parseInline||exports.parseInline,_.parser||exports.parser),S=(_.setOptions||exports.setOptions,_.use||exports.use,_.walkTokens||exports.walkTokens,i(23560)),k=i(84756),x=i(49134),L=i(59951),D=i(43920),E=i(54244);const N=Object.freeze({image:({href:e,title:t,text:i})=>{let n=[],s=[];return e&&(({href:e,dimensions:n}=(0,u.nI)(e)),s.push(`src="${(0,u.oO)(e)}"`)),i&&s.push(`alt="${(0,u.oO)(i)}"`),t&&s.push(`title="${(0,u.oO)(t)}"`),n.length&&(s=s.concat(n)),""},paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `},link({href:e,title:t,tokens:i}){let n=this.parser.parseInline(i);return"string"!=typeof e?"":(e===n&&(n=(0,u._W)(n)),t="string"==typeof t?(0,u.oO)((0,u._W)(t)):"",`
    /g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${t||e}" draggable="false">${n}`)}});function I(e,t={},i={}){const s=new m.Cm;let u=!1;const f=(0,r.n)(t),_=function(t){let i;try{i=(0,S.qg)(decodeURIComponent(t))}catch(e){}return i?(i=(0,x.PI)(i,(t=>e.uris&&e.uris[t]?E.r.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},L=function(t,i){const n=e.uris&&e.uris[t];let s=E.r.revive(n);return i?t.startsWith(k.ny.data+":")?t:(s||(s=E.r.parse(t)),k.zl.uriToBrowserUri(s).toString(!0)):s?E.r.parse(t).toString()===s.toString()?t:(s.query&&(s=s.with({query:_(s.query)})),s.toString()):t},I=new v;I.image=N.image,I.link=N.link,I.paragraph=N.paragraph;const R=[],A=[];if(t.codeBlockRendererSync?I.code=({text:e,lang:i})=>{const n=p.r.nextId(),s=t.codeBlockRendererSync(M(i),e);return A.push([n,s]),`
    ${(0,D.ih)(e)}
    `}:t.codeBlockRenderer&&(I.code=({text:e,lang:i})=>{const n=p.r.nextId(),s=t.codeBlockRenderer(M(i),e);return R.push(s.then((e=>[n,e]))),`
    ${(0,D.ih)(e)}
    `}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let s=n.dataset.href;s&&(e.baseUri&&(s=T(E.r.from(e.baseUri),s)),t.actionHandler.callback(s,i))}catch(e){(0,d.dz)(e)}finally{i.preventDefault()}},s=t.actionHandler.disposables.add(new o.f(f,"click")),r=t.actionHandler.disposables.add(new o.f(f,"auxclick"));t.actionHandler.disposables.add(h.Jh.any(s.event,r.event)((e=>{const t=new l.P(n.zk(f),e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(n.ko(f,"keydown",(e=>{const t=new a.Z(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(I.html=({text:i})=>t.sanitizerOptions?.replaceWithPlaintext?(0,D.ih)(i):(e.isTrusted?i.match(/^(]+>)|(<\/\s*span>)$/):void 0)?i:""),i.renderer=I;let O,F=e.value??"";if(F.length>1e5&&(F=`${F.substr(0,1e5)}…`),e.supportThemeIcons&&(F=(0,g.sA)(F)),t.fillInIncompleteTokens){const e={...b,...i},t=function(e){for(let t=0;t"string"==typeof e?e:e.outerHTML)).join(""));const B=(new DOMParser).parseFromString(P({isTrusted:e.isTrusted,...t.sanitizerOptions},O),"text/html");if(B.body.querySelectorAll("img, audio, video, source").forEach((i=>{const s=i.getAttribute("src");if(s){let o=s;try{e.baseUri&&(o=T(E.r.from(e.baseUri),o))}catch(e){}if(i.setAttribute("src",L(o,!0)),t.remoteImageIsAllowed){const e=E.r.parse(o);e.scheme===k.ny.file||e.scheme===k.ny.data||t.remoteImageIsAllowed(e)||i.replaceWith(n.$("",void 0,i.outerHTML))}}})),B.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=L(i,!1);e.baseUri&&(n=T(E.r.from(e.baseUri),i)),t.dataset.href=n}})),f.innerHTML=P({isTrusted:e.isTrusted,...t.sanitizerOptions},B.body.innerHTML),R.length>0)Promise.all(R).then((e=>{if(u)return;const i=new Map(e),s=f.querySelectorAll("div[data-code]");for(const e of s){const t=i.get(e.dataset.code??"");t&&n.Ln(e,t)}t.asyncRenderCallback?.()}));else if(A.length>0){const e=new Map(A),t=f.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(i.dataset.code??"");t&&n.Ln(i,t)}}if(t.asyncRenderCallback)for(const e of f.getElementsByTagName("img")){const i=s.add(n.ko(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()})))}return{element:f,dispose:()=>{u=!0,s.dispose()}}}function M(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function T(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?(0,L.o1)(e,t).toString():(0,L.o1)((0,L.pD)(e),t).toString()}const R=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function P(e,t){const{config:i,allowedSchemes:o}=function(e){const t=[k.ny.http,k.ny.https,k.ny.mailto,k.ny.data,k.ny.file,k.ny.vscodeFileResource,k.ny.vscodeRemote,k.ny.vscodeRemoteResource];return e.isTrusted&&t.push(k.ny.command),{config:{ALLOWED_TAGS:e.allowedTags??[...n.TT],ALLOWED_ATTR:A,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e),r=new m.Cm;r.add(J("uponSanitizeAttribute",((e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName){if("INPUT"===e.tagName&&"checkbox"===e.attributes.getNamedItem("type")?.value){if("type"===t.attrName&&"checkbox"===t.attrValue||"disabled"===t.attrName||"checked"===t.attrName)return void(t.keepAttr=!0);t.keepAttr=!1}}else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}))),r.add(J("uponSanitizeElement",((t,i)=>{if("input"===i.tagName&&("checkbox"===t.attributes.getNamedItem("type")?.value?t.setAttribute("disabled",""):e.replaceWithPlaintext||t.remove()),e.replaceWithPlaintext&&!i.allowedTags[i.tagName]&&"body"!==i.tagName&&t.parentElement){let e,n;if("#comment"===i.tagName)e=`\x3c!--${t.textContent}--\x3e`;else{const s=R.includes(i.tagName),o=t.attributes.length?" "+Array.from(t.attributes).map((e=>`${e.name}="${e.value}"`)).join(" "):"";e=`<${i.tagName}${o}>`,s||(n=``)}const s=document.createDocumentFragment(),o=t.parentElement.ownerDocument.createTextNode(e);s.appendChild(o);const r=n?t.parentElement.ownerDocument.createTextNode(n):void 0;for(;t.firstChild;)s.appendChild(t.firstChild);r&&s.appendChild(r),t.nodeType===Node.COMMENT_NODE?t.parentElement.insertBefore(s,t):t.parentElement.replaceChild(s,t)}}))),r.add(n.a4(o));try{return s.aj(t,{...i,RETURN_TRUSTED_TYPE:!0})}finally{r.dispose()}}const A=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];function O(e){return"string"==typeof e?e:function(e){let t=e.value??"";return t.length>1e5&&(t=`${t.substr(0,1e5)}…`),P({isTrusted:!1},C(t,{async:!1,renderer:W.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>F.get(e)??e))).toString()}(e)}const F=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function B(){const e=new v;return e.code=({text:e})=>e,e.blockquote=({text:e})=>e+"\n",e.html=e=>"",e.heading=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.hr=()=>"",e.list=function({items:e}){return e.map((e=>this.listitem(e))).join("\n")+"\n"},e.listitem=({text:e})=>e+"\n",e.paragraph=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.table=function({header:e,rows:t}){return e.map((e=>this.tablecell(e))).join(" ")+"\n"+t.map((e=>e.map((e=>this.tablecell(e))).join(" "))).join("\n")+"\n"},e.tablerow=({text:e})=>e,e.tablecell=function({tokens:e}){return this.parser.parseInline(e)},e.strong=({text:e})=>e,e.em=({text:e})=>e,e.codespan=({text:e})=>e,e.br=e=>"\n",e.del=({text:e})=>e,e.image=e=>"",e.text=({text:e})=>e,e.link=({text:e})=>e,e}const W=new f.d((e=>B()));new f.d((()=>{const e=B();return e.code=({text:e})=>`\n\`\`\`\n${e}\n\`\`\`\n`,e}));function H(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function V(e){if(e.tokens)for(let t=e.tokens.length-1;t>=0;t--){const i=e.tokens[t];if("text"===i.type){const n=i.raw.split("\n"),s=n[n.length-1];if(s.includes("`"))return q(e);if(s.includes("**"))return Z(e,"**");if(s.match(/\*\w/))return Z(e,"*");if(s.match(/(^|\s)__\w/))return Y(e);if(s.match(/(^|\s)_\w/))return K(e);if(s.match(/(^|\s)\[.*\]\(\w*/)||s.match(/^[^\[]*\]\([^\)]*$/)&&e.tokens.slice(0,t).some((e=>"text"===e.type&&e.raw.match(/\[[^\]]*$/)))){const i=e.tokens.slice(t+1);return"link"===i[0]?.type&&"text"===i[1]?.type&&i[1].raw.match(/^ *"[^"]*$/)||s.match(/^[^"]* +"[^"]*$/)?G(e):$(e)}if(s.match(/(^|\s)\[\w*/))return Q(e)}}}function z(e){const t=e.items[e.items.length-1],i=t.tokens?t.tokens[t.tokens.length-1]:void 0;let n;if("text"!==i?.type||"inRawBlock"in t||(n=V(i)),!n||"paragraph"!==n.type)return;const s=H(e.items.slice(0,-1)),o=t.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!o)return;const r=o+H(t.tokens.slice(0,-1))+n.raw,a=w(s+r)[0];return"list"===a.type?a:void 0}const U=3;function j(e){let t,i;for(t=0;t0){const e=s?i.slice(0,-1).join("\n"):t,o=!!e.match(/\|\s*$/),r=e+(o?"":"|")+`\n|${" --- |".repeat(n)}`;return w(r)}}function J(e,t){return s.$w(e,t),(0,m.s)((()=>s.SV(e)))}},34287:function(e,t,i){"use strict";i.d(t,{P:function(){return l},$:function(){return c}});var n=i(75969);const s=new WeakMap;function o(e){if(!e.parent||e.parent===e)return null;try{const t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return null}catch(e){return null}return e.parent}class r{static getSameOriginWindowChain(e){let t=s.get(e);if(!t){t=[],s.set(e,t);let i,n=e;do{i=o(n),i?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=i}while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;const s=this.getSameOriginWindowChain(e);for(const e of s){const s=e.window.deref();if(i+=s?.scrollY??0,n+=s?.scrollX??0,s===t)break;if(!e.iframeElement)break;const o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}var a=i(79783);class l{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=0===t.button,this.middleButton=1===t.button,this.rightButton=2===t.button,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,"dblclick"===t.type&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,"number"==typeof t.pageX?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const i=r.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class c{constructor(e,t=0,i=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let s=!1;if(n.H8){const e=navigator.userAgent.match(/Chrome\/(\d+)/);s=(e?parseInt(e[1]):123)<=122}if(e){const t=e,i=e,o=e.view?.devicePixelRatio||1;if(void 0!==t.wheelDeltaY)this.deltaY=s?t.wheelDeltaY/(120*o):t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.gm&&!a.zx?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.nr&&a.uF?this.deltaX=-t.wheelDeltaX/120:this.deltaX=s?t.wheelDeltaX/(120*o):t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.gm&&!a.zx?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=s?e.wheelDelta/(120*o):e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}},56627:function(e,t,i){"use strict";var n;i.d(t,{p:function(){return n}}),function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i={...t},n={...t},s={...t};let o=0;const r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,h()}function c(){1===r.input&&(performance.mark("input/end"),r.input=2)}function d(){1===r.render&&(performance.mark("render/end"),r.render=2)}function h(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",s),o++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/o,max:e.max,min:e.min}}function f(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(c)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(d),h())},e.getAndClearMeasurements=function(){if(0===o)return;const e={keydown:p(t),input:p(i),render:p(n),total:p(s),sampleCount:o};return f(t),f(i),f(n),f(s),o=0,e}}(n||(n={}))},8670:function(e,t,i){"use strict";i.d(t,{c:function(){return l}});var n=i(84201),s=i(80670),o=i(35114);class r extends o.jG{constructor(e){super(),this._onDidChange=this._register(new s.vl),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,t){this._mediaQueryList?.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}}class a extends o.jG{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new s.vl),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const t=this._register(new r(e));this._register(t.onDidChange((()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)})))}_getPixelRatio(e){const t=document.createElement("canvas").getContext("2d");return(e.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}}const l=new class{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const t=(0,n.Q2)(e);let i=this.mapWindowIdToPixelRatioMonitor.get(t);return i||(i=(0,o.lC)(new a(e)),this.mapWindowIdToPixelRatioMonitor.set(t,i),(0,o.lC)(s.Jh.once(n.Fv)((({vscodeWindowId:e})=>{e===t&&(i?.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(t))})))),i}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}}},53510:function(e,t,i){"use strict";i.d(t,{B:function(){return n},q:function(){return h}});var n,s=i(84201),o=i(95601),r=i(97358),a=i(95578),l=i(80670),c=i(35114),d=i(54409);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class h extends c.jG{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new d.w,this.ignoreTargets=new d.w,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(l.Jh.runAndSubscribe(s.Iv,(({window:e,disposables:t})=>{t.add(s.ko(e.document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),t.add(s.ko(e.document,"touchend",(t=>this.onTouchEnd(e,t)))),t.add(s.ko(e.document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}),{window:o.G,disposables:this._store}))}static addTarget(e){if(!h.isTouchDevice())return c.jG.None;h.INSTANCE||(h.INSTANCE=(0,c.lC)(new h));const t=h.INSTANCE.targets.push(e);return(0,c.s)(t)}static ignoreTarget(e){if(!h.isTouchDevice())return c.jG.None;h.INSTANCE||(h.INSTANCE=(0,c.lC)(new h));const t=h.INSTANCE.ignoreTargets.push(e);return(0,c.s)(t)}static isTouchDevice(){return"ontouchstart"in o.G||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,s=e.targetTouches.length;i=h.HOLD_DELAY&&Math.abs(l.initialPageX-r.RT(l.rollingPageX))<30&&Math.abs(l.initialPageY-r.RT(l.rollingPageY))<30){const e=this.newGestureEvent(n.Contextmenu,l.initialTarget);e.pageX=r.RT(l.rollingPageX),e.pageY=r.RT(l.rollingPageY),this.dispatchEvent(e)}else if(1===s){const t=r.RT(l.rollingPageX),n=r.RT(l.rollingPageY),s=r.RT(l.rollingTimestamps)-l.rollingTimestamps[0],o=t-l.rollingPageX[0],a=n-l.rollingPageY[0],c=[...this.targets].filter((e=>l.initialTarget instanceof Node&&e.contains(l.initialTarget)));this.inertia(e,c,i,Math.abs(o)/s,o>0?1:-1,t,Math.abs(a)/s,a>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(n.End,l.initialTarget)),delete this.activeTouches[a.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>h.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;const t=[];for(const i of this.targets)if(i.contains(e.initialTarget)){let n=0,s=e.initialTarget;for(;s&&s!==i;)n++,s=s.parentElement;t.push([n,i])}t.sort(((e,t)=>e[0]-t[0]));for(const[i,n]of t)n.dispatchEvent(e),this.dispatched=!0}}inertia(e,t,i,o,r,a,l,c,d){this.handle=s.PG(e,(()=>{const s=Date.now(),u=s-i;let g=0,p=0,f=!0;o+=h.SCROLL_FRICTION*u,l+=h.SCROLL_FRICTION*u,o>0&&(f=!1,g=r*o*u),l>0&&(f=!1,p=c*l*u);const m=this.newGestureEvent(n.Change);m.translationX=g,m.translationY=p,t.forEach((e=>e.dispatchEvent(m))),f||this.inertia(e,t,s,o,r,a+g,l,c,d+p)}))}onTouchMove(e){const t=Date.now();for(let i=0,s=e.changedTouches.length;i3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(s.pageX),o.rollingPageY.push(s.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}!function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)}([a.B],h,"isTouchDevice",null)},38945:function(e,t,i){"use strict";i.d(t,{H:function(){return s}});var n=i(20187);function s(e,t){const i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(e){return void(0,n.dz)(e)}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){return void(0,n.dz)(e)}}},9306:function(e,t,i){"use strict";i.d(t,{Z4:function(){return N},EH:function(){return E},XF:function(){return I}});var n=i(75969),s=i(88767),o=i(84201),r=i(53510),a=i(24764),l=i(26745),c=i(40478),d=i(96710),h=i(12048),u=i(67334),g=i(97358),p=i(80670),f=i(62167),m=i(35114),_=i(79783),v=i(14374);const b=o.$,w="selectOption.entry.template";class C{get templateId(){return w}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=o.BC(e,b(".option-text")),t.detail=o.BC(e,b(".option-detail")),t.decoratorRight=o.BC(e,b(".option-decorator-right")),t}renderElement(e,t,i){const n=i,s=e.text,o=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=s,n.detail.textContent=o||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class y extends m.jG{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=y.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new p.vl,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register((0,h.i)().setupManagedHover((0,a.nZ)("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return w}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=o.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=o.BC(this.selectDropDownContainer,b(".select-box-details-pane"));const t=o.BC(this.selectDropDownContainer,b(".select-box-dropdown-container-width-control")),i=o.BC(t,b(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",o.BC(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=o.li(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(o.ko(this.selectDropDownContainer,o.Bx.DRAG_START,(e=>{o.fs.stop(e,!0)})))}registerListeners(){let e;this._register(o.b2(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}))),this._register(o.ko(this.selectElement,o.Bx.CLICK,(e=>{o.fs.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(o.ko(this.selectElement,o.Bx.MOUSE_DOWN,(e=>{o.fs.stop(e)}))),this._register(o.ko(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(o.ko(this.selectElement,"touchend",(t=>{o.fs.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(o.ko(this.selectElement,o.Bx.KEY_DOWN,(e=>{const t=new c.Z(e);let i=!1;_.zx?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),o.fs.stop(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){g.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){const e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){const e=this.styles.selectBackground??"",t=o.gI(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;const i=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=o.zk(this.selectElement),i=o.BK(this.selectElement),n=o.zk(this.selectElement).getComputedStyle(this.selectElement),s=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-y.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,c=this.setWidthControlElement(this.widthControlElement),d=Math.max(c,Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let h=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const u=this._hasDetails?this._cachedMaxDetailsHeight:0,g=h+s+u,p=Math.floor((r-s-u)/this.getHeight()),f=Math.floor((a-s-u)/this.getHeight());if(e)return!(i.top+i.height>t.innerHeight-22||i.topp&&this.options.length>p?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),0));if(i.top+i.height>t.innerHeight-22||i.topr&&(h=p*this.getHeight())}else g>a&&(h=f*this.getHeight());return this.selectList.layout(h),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=h+s+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=h+s+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=d,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const s=e.detail?e.detail.length:0,o=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+s+o;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=o.Tr(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=o.BC(e,b(".select-box-dropdown-list-container")),this.listRenderer=new C,this.selectList=this._register(new u.B8("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,v.kg)({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>_.zx?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new l.f(this.selectDropDownListContainer,"keydown")),i=p.Jh.chain(t.event,(e=>e.filter((()=>this.selectList.length>0)).map((e=>new c.Z(e)))));this._register(p.Jh.chain(i,(e=>e.filter((e=>3===e.keyCode))))(this.onEnter,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>2===e.keyCode))))(this.onEnter,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>9===e.keyCode))))(this.onEscape,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>16===e.keyCode))))(this.onUpArrow,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>18===e.keyCode))))(this.onDownArrow,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>12===e.keyCode))))(this.onPageDown,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>11===e.keyCode))))(this.onPageUp,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>14===e.keyCode))))(this.onHome,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>13===e.keyCode))))(this.onEnd,this)),this._register(p.Jh.chain(i,(e=>e.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))))(this.onCharacter,this)),this._register(o.ko(this.selectList.getHTMLElement(),o.Bx.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>void 0!==e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(o.ko(this.selectDropDownContainer,o.Bx.FOCUS_OUT,(e=>{this._isVisible&&!o.QX(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;o.fs.stop(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(o.fs.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){o.fs.stop(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){o.fs.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){o.fs.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=f.YM.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(o.ko(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(o.b2(this.selectElement,"click",(e=>{o.fs.stop(e,!0)}))),this._register(o.b2(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(o.b2(this.selectElement,"keydown",(e=>{let t=!1;_.zx?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&g.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new L.LN)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(r.q.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.gm&&this._register((0,o.ko)(e,o.Bx.DRAG_START,(e=>e.dataTransfer?.setData(s.t.TEXT,this._action.label))))),this._register((0,o.ko)(t,r.B.Tap,(e=>this.onClick(e,!0)))),this._register((0,o.ko)(t,o.Bx.MOUSE_DOWN,(e=>{i||o.fs.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),_.zx&&this._register((0,o.ko)(t,o.Bx.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,o.ko)(t,o.Bx.CLICK,(e=>{o.fs.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,o.ko)(t,o.Bx.DBLCLICK,(e=>{o.fs.stop(e,!0)}))),[o.Bx.MOUSE_UP,o.Bx.MOUSE_OUT].forEach((e=>{this._register((0,o.ko)(t,e,(e=>{o.fs.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){o.fs.stop(e,!0);const i=D.z(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){if(!this.element)return;const e=this.getTooltip()??"";if(this.updateAriaLabel(),this.options.hoverDelegate?.showNativeHover)this.element.title=e;else if(this.customHover||""===e)this.customHover&&this.customHover.update(e);else{const t=this.options.hoverDelegate??(0,a.nZ)("element");this.customHover=this._store.add((0,h.i)().setupManagedHover(t,this.element,e))}}updateAriaLabel(){if(this.element){const e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class N extends E{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),D.j(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){const e=document.createElement("span");e.classList.add("keybinding"),e.textContent=this.options.keybinding,this.element.appendChild(e)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===L.wv.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=v.kg({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){const e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class I extends E{constructor(e,t,i,n,s,o,r){super(e,t),this.selectBox=new x(i,n,s,o,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}},98099:function(e,t,i){"use strict";i.d(t,{E:function(){return h}});var n=i(84201),s=i(40478),o=i(9306),r=i(24764),a=i(30981),l=i(80670),c=i(35114),d=i(24219);class h extends c.jG{constructor(e,t={}){let i,d;switch(super(),this._actionRunnerDisposables=this._register(new c.Cm),this.viewItemDisposables=this._register(new c.$w),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.vl),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.vl({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l.vl),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new l.vl),this.onWillRun=this._onWillRun.event,this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register((0,r.bW)()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new a.LN,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:i=[15],d=[17];break;case 1:i=[16],d=[18],this.domNode.className+=" vertical"}this._register(n.ko(this.domNode,n.Bx.KEY_DOWN,(e=>{const t=new s.Z(e);let n=!0;const r="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;i&&(t.equals(i[0])||t.equals(i[1]))?n=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&r instanceof o.EH&&r.trapsArrowNavigation?n=this.focusNext(void 0,!0):this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.ko(this.domNode,n.Bx.KEY_UP,(e=>{const t=new s.Z(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.w5(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.bq()!==this.domNode&&n.QX(n.bq(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof o.EH&&e.isEnabled()));e instanceof o.EH&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof o.EH&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){if("number"==typeof e)return this.viewItems[e]?.action;if(n.sb(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const i=document.createElement("li");let r;i.className="action-item",i.setAttribute("role","presentation");const a={hoverDelegate:this._hoverDelegate,...t,isTabList:"tablist"===this.options.ariaRole};this.options.actionViewItemProvider&&(r=this.options.actionViewItemProvider(e,a)),r||(r=new o.Z4(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(r,n.ko(i,n.Bx.CONTEXT_MENU,(e=>{n.fs.stop(e,!0)}))),r.actionRunner=this._actionRunner,r.setActionContext(this.context),r.render(i),this.focusable&&r instanceof o.EH&&0===this.viewItems.length&&r.setFocusable(!0),null===s||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(r)):(this.actionsList.insertBefore(i,this.actionsList.children[s]),this.viewItems.splice(s,0,r),s++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,c.AS)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.w_(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===a.wv.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===a.wv.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();const n=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(n){let s=!0;d.Tn(n.focus)||(s=!1),this.options.focusOnlyEnabledItems&&d.Tn(n.isEnabled)&&!n.isEnabled()&&(s=!1),n.action.id===a.wv.ID&&(s=!1),s?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),s&&n.showHover?.()}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof o.EH){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=(0,c.AS)(this.viewItems),this.getContainer().remove(),super.dispose()}}},15075:function(e,t,i){"use strict";i.d(t,{h5:function(){return u},vr:function(){return d},xE:function(){return h}});var n=i(84201);const s=2e4;let o,r,a,l,c;function d(e){o=document.createElement("div"),o.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),o.appendChild(e),e};r=t(),a=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),o.appendChild(e),e};l=i(),c=i(),e.appendChild(o)}function h(e){o&&(r.textContent!==e?(n.w_(a),g(r,e)):(n.w_(r),g(a,e)))}function u(e){o&&(l.textContent!==e?(n.w_(c),g(l,e)):(n.w_(l),g(c,e)))}function g(e,t){n.w_(e),t.length>s&&(t=t.substr(0,s)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},96337:function(e,t,i){"use strict";i.d(t,{$:function(){return m}});var n=i(84201),s=i(19082),o=i(40478),r=i(96710),a=i(53510),l=i(24764),c=i(43014),d=i(59321),h=i(80670),u=i(85584),g=i(35114),p=i(56613),f=i(12048);d.Q1.white.toString(),d.Q1.white.toString();class m extends g.jG{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new h.vl),this._onDidEscape=this._register(new h.vl),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,s=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=s||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"==typeof t.title&&this.setTitle(t.title),"string"==typeof t.ariaLabel&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register(a.q.addTarget(this._element)),[n.Bx.CLICK,a.B.Tap].forEach((e=>{this._register((0,n.ko)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):n.fs.stop(e)})))})),this._register((0,n.ko)(this._element,n.Bx.KEY_DOWN,(e=>{const t=new o.Z(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._onDidEscape.fire(e),this._element.blur(),i=!0),i&&n.fs.stop(t,!0)}))),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register((0,n.ko)(this._element,n.Bx.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register((0,n.w5)(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of(0,c.n)(e))if("string"==typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){if(this._label===e)return;if((0,u.VS)(this._label)&&(0,u.VS)(e)&&(0,u.nK)(this._label,e))return;this._element.classList.add("monaco-text-button");const t=this.options.supportShortLabel?this._labelElement:this._element;if((0,u.VS)(e)){const i=(0,r.Gc)(e,{inline:!0});i.dispose();const o=i.element.querySelector("p")?.innerHTML;if(o){const e=(0,s.aj)(o,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});t.innerHTML=e}else(0,n.Ln)(t)}else this.options.supportIcons?(0,n.Ln)(t,...this.getContentElements(e)):t.textContent=e;let i="";"string"==typeof this.options.title?i=this.options.title:this.options.title&&(i=(0,r.R9)(e)),this.setTitle(i),"string"==typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",i),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...p.L.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){this._hover||""===e?this._hover&&this._hover.update(e):this._hover=this._register((0,f.i)().setupManagedHover(this.options.hoverDelegate??(0,l.nZ)("mouse"),this._element,e))}}},229:function(e,t,i){"use strict";i.d(t,{x:function(){return o}});var n=i(84201),s=i(43920);class o{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=(0,n.BC)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,s.GP)(this.countFormat,this.count),this.element.title=(0,s.GP)(this.titleFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},99457:function(e,t,i){"use strict";i.d(t,{d:function(){return g}});var n=i(84201),s=i(9306),o=i(40478),r=i(53510),a=i(30981),l=i(80670);class c extends a.LN{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new l.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.BC)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.BC)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[n.Bx.CLICK,n.Bx.MOUSE_DOWN,r.B.Tap])this._register((0,n.ko)(this.element,e,(e=>n.fs.stop(e,!0))));for(const e of[n.Bx.MOUSE_DOWN,r.B.Tap])this._register((0,n.ko)(this._label,e,(e=>{(0,n.Er)(e)&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register((0,n.ko)(this._label,n.Bx.KEY_UP,(e=>{const t=new o.Z(e);(t.equals(3)||t.equals(10))&&(n.fs.stop(e,!0),this.visible?this.hide():this.show())})));const s=i(this._label);s&&this._register(s),this._register(r.q.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class d extends c{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}var h=i(24764),u=i(12048);class g extends s.EH{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new l.vl),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,n.BC)(e,(0,n.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register((0,u.i)().setupManagedHover(this.options.hoverDelegate??(0,h.nZ)("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new d(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{this.element?.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return e.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),e??void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){this.dropdownMenu?.show()}updateEnabled(){const e=!this.action.enabled;this.actionItem?.classList.toggle("disabled",e),this.element?.classList.toggle("disabled",e)}}},72711:function(e,t,i){"use strict";i.d(t,{c:function(){return u}});var n=i(84201),s=i(68462),o=i(50216),r=i(6770),a=i(80670),l=i(14374),c=i(35114),d=i(24764);const h=l.kg("defaultLabel","input");class u extends r.x{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new c.HE),this.additionalToggles=[],this._onDidOptionChange=this._register(new a.vl),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new a.vl),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new a.vl),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new a.vl),this._onKeyUp=this._register(new a.vl),this._onCaseSensitiveKeyDown=this._register(new a.vl),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new a.vl),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||h,this.showCommonFindToggles=!!i.showCommonFindToggles;const r=i.appendCaseSensitiveLabel||"",l=i.appendWholeWordsLabel||"",u=i.appendRegexLabel||"",g=i.history||[],p=!!i.flexibleHeight,f=!!i.flexibleWidth,m=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new o.mJ(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:g,showHistoryHint:i.showHistoryHint,flexibleHeight:p,flexibleWidth:f,flexibleMaxHeight:m,inputBoxStyles:i.inputBoxStyles}));const _=this._register((0,d.bW)());if(this.showCommonFindToggles){this.regex=this._register(new s.Ix({appendTitle:u,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new s.nV({appendTitle:l,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new s.bc({appendTitle:r,isChecked:!1,hoverDelegate:_,...i.toggleStyles})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(this.domNode.ownerDocument.activeElement);if(i>=0){let s=-1;t.equals(17)?s=(i+1)%e.length:t.equals(15)&&(s=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):s>=0&&e[s].focus(),n.fs.stop(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),e?.appendChild(this.domNode),this._register(n.ko(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(n.ko(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex?.enable(),this.wholeWords?.enable(),this.caseSensitive?.enable();for(const e of this.additionalToggles)e.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const e of this.additionalToggles)e.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new c.Cm;for(const t of e??[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){this.inputBox.paddingRight=e?0:(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){return this.regex?.checked??!1}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){this.caseSensitive?.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}},68462:function(e,t,i){"use strict";i.d(t,{Ix:function(){return u},bc:function(){return d},nV:function(){return h}});var n=i(24764),s=i(44925),o=i(93231),r=i(14374);const a=r.kg("caseDescription","Match Case"),l=r.kg("wordsDescription","Match Whole Word"),c=r.kg("regexDescription","Use Regular Expression");class d extends s.l{constructor(e){super({icon:o.W.caseSensitive,title:a+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class h extends s.l{constructor(e){super({icon:o.W.wholeWord,title:l+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class u extends s.l{constructor(e){super({icon:o.W.regex,title:c+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},2627:function(e,t,i){"use strict";i.d(t,{_:function(){return c}});var n=i(84201),s=i(12048),o=i(24764),r=i(43014),a=i(35114),l=i(49134);class c extends a.jG{constructor(e,t){super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=t?.supportIcons??!1,this.domNode=n.BC(e,n.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=c.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&l.aI(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,s+=i;for(const e of t)e.end<=s||(e.start>=s&&(e.start+=n),e.end>=s&&(e.end+=n));return i+=n,"⏎"}))}}},12048:function(e,t,i){"use strict";i.d(t,{e:function(){return s},i:function(){return o}});let n={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupManagedHover:()=>null,showManagedHover:()=>{}};function s(e){n=e}function o(){return n}},24764:function(e,t,i){"use strict";i.d(t,{MW:function(){return a},bW:function(){return c},nZ:function(){return l}});var n=i(72582);let s=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});const o=new n.d((()=>s("mouse",!1))),r=new n.d((()=>s("element",!1)));function a(e){s=e}function l(e){return"element"===e?r.value:o.value}function c(){return s("element",!0)}},49943:function(e,t,i){"use strict";i.d(t,{M4:function(){return g},N4:function(){return c},jQ:function(){return d},vV:function(){return u},vr:function(){return h}});var n=i(84201),s=i(40478),o=i(5390),r=i(35114),a=i(14374);const l=n.$;class c extends r.jG{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new o.MU(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class d extends r.jG{static render(e,t,i){return new d(e,t,i)}constructor(e,t,i){super(),this.actionLabel=t.label,this.actionKeybindingLabel=i,this.actionContainer=n.BC(e,l("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=n.BC(this.actionContainer,l("a.action")),this.action.setAttribute("role","button"),t.iconClass&&n.BC(this.action,l(`span.icon.${t.iconClass}`)),n.BC(this.action,l("span")).textContent=i?`${t.label} (${i})`:t.label,this._store.add(new u(this.actionContainer,t.run)),this._store.add(new g(this.actionContainer,t.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function h(e,t){return e&&t?(0,a.kg)("acessibleViewHint","Inspect this in the accessible view with {0}.",t):e?(0,a.kg)("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class u extends r.jG{constructor(e,t){super(),this._register(n.ko(e,n.Bx.CLICK,(i=>{i.stopPropagation(),i.preventDefault(),t(e)})))}}class g extends r.jG{constructor(e,t,i){super(),this._register(n.ko(e,n.Bx.KEY_DOWN,(n=>{const o=new s.Z(n);i.some((e=>o.equals(e)))&&(n.stopPropagation(),n.preventDefault(),t(e))})))}}},38403:function(e,t,i){"use strict";i.d(t,{s:function(){return g}});var n=i(84201),s=i(2627),o=i(35114),r=i(49134),a=i(69627),l=i(24764),c=i(12048),d=i(24219),h=i(4590);class u{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||(0,r.aI)(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class g extends o.jG{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new u(n.BC(e,n.$(".monaco-icon-label")))),this.labelContainer=n.BC(this.domNode.element,n.$(".monaco-icon-label-container")),this.nameContainer=n.BC(this.labelContainer,n.$("span.monaco-icon-name-container")),this.nameNode=t?.supportHighlights||t?.supportIcons?this._register(new f(this.nameContainer,!!t.supportIcons)):new p(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??(0,l.nZ)("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){const o=["monaco-icon-label"],r=["monaco-icon-label-container"];let a="";i&&(i.extraClasses&&o.push(...i.extraClasses),i.italic&&o.push("italic"),i.strikethrough&&o.push("strikethrough"),i.disabledCommand&&r.push("disabled"),i.title&&("string"==typeof i.title?a+=i.title:a+=e));const l=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let e;l&&n.sb(l)?e=l:(e=n.$(".monaco-icon-label-iconpath"),this.domNode.element.prepend(e)),e.style.backgroundImage=n.Tf(i?.iconPath)}else l&&l.remove();if(this.domNode.classNames=o,this.domNode.element.setAttribute("aria-label",a),this.labelContainer.classList.value="",this.labelContainer.classList.add(...r),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof s._?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines),this.setupHover(e.element,i?.descriptionTitle)):(e.textContent=t&&i?.labelEscapeNewLines?s._.escapeNewLines(t,[]):t||"",this.setupHover(e.element,i?.descriptionTitle||""),e.empty=!t)}(i?.suffix||this.suffixNode)&&(this.getOrCreateSuffixNode().textContent=i?.suffix??"")}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate.showNativeHover){function n(e,t){(0,d.Kg)(t)?e.title=(0,h.pS)(t):t?.markdownNotSupportedFallback?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}n(e,t)}else{const s=(0,c.i)().setupManagedHover(this.hoverDelegate,e,t);s&&this.customHovers.set(e,s)}else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const e=this._register(new u(n.Pl(this.nameContainer,n.$("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new u(n.BC(e.element,n.$("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){const e=this._register(new u(n.BC(this.labelContainer,n.$("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new s._(n.BC(e.element,n.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new u(n.BC(e.element,n.$("span.label-description"))))}return this.descriptionNode}}class p{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,r.aI)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.BC(this.container,n.$("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const s={start:n,end:n+e.length},o=i.map((e=>a.Q.intersect(s,e))).filter((e=>!a.Q.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=s.end+t.length,o}))}(e,i,t?.matches);for(let r=0;r=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new g(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var f=i(49134),m=i(14374);const _=n.$,v={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class b extends h.x{constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new u.vl),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new u.vl),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=this.options.tooltip??(this.placeholder||""),this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.BC(e,_(".monaco-inputbox.idle"));const o=this.options.flexibleHeight?"textarea":"input",a=n.BC(this.element,_(".ibwrapper"));if(this.input=n.BC(a,_(o+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.BC(a,_("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new d.Se(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.BC(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new s.f(e.ownerDocument,"selectionchange")),i=u.Jh.filter(t.event,(()=>{const t=e.ownerDocument.getSelection();return t?.anchorNode===a}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new r.E(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register((0,l.i)().setupManagedHover((0,c.nZ)("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:n.OK(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return n.X7(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){const e=this.input.selectionStart;return null===e?null:{start:e,end:this.input.selectionEnd??e}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&(0,f.aI)(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${n.gI(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e?.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=n.Tr(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{if(!this.message)return null;e=n.BC(i,_(".monaco-inputbox-container")),t();const s={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?(0,o.yk)(this.message.content,s):(0,o.S5)(this.message.content,s);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background??"",r.style.color=a.foreground??"",r.style.border=a.border?`1px solid ${a.border}`:"",n.BC(e,r),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?m.kg("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?m.kg("alertWarningMessage","Warning: {0}",this.message.content):m.kg("alertInfoMessage","Info: {0}",this.message.content),a.xE(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}applyStyles(){const e=this.options.inputBoxStyles,t=e.inputBackground??"",i=e.inputForeground??"",s=e.inputBorder??"";this.element.style.backgroundColor=t,this.element.style.color=i,this.input.style.backgroundColor="inherit",this.input.style.color=i,this.element.style.border=`1px solid ${n.gI(s,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.OK(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;null!==i&&null!==n&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}}class w extends b{constructor(e,t,i){const s=m.kg({key:"history.inputbox.hint.suffix.noparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field ends in a closing parenthesis ")", for example "Filter (e.g. text, !exclude)". The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," or {0} for history","⇅"),o=m.kg({key:"history.inputbox.hint.suffix.inparens",comment:['Text is the suffix of an input field placeholder coming after the action the input field performs, this will be used when the input field does NOT end in a closing parenthesis (eg. "Find"). The character inserted into the final string is ⇅ to represent the up and down arrow keys.']}," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new u.vl),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new u.vl),this.onDidBlur=this._onDidBlur.event,this.history=new p(i.history,100);const r=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?s:o,t=this.placeholder+e;i.showPlaceholderOnFocus&&!n.X7(this.input)?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||r()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>r())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(o)||e(s)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=e??"",a.h5(this.value?this.value:m.kg("clearedInput","Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,a.h5(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}},15339:function(e,t,i){"use strict";i.d(t,{l:function(){return h},x:function(){return u}});var n=i(84201),s=i(12048),o=i(24764),r=i(92479),a=i(35114),l=i(49134),c=i(14374);const d=n.$,h={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class u extends a.jG{constructor(e,t,i){super(),this.os=t,this.keyElements=new Set,this.options=i||Object.create(null);const r=this.options.keybindingLabelForeground;this.domNode=n.BC(e,d(".monaco-keybinding")),r&&(this.domNode.style.color=r),this.hover=this._register((0,s.i)().setupManagedHover((0,o.nZ)("mouse"),this.domNode,"")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&u.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){const e=this.keybinding.getChords();e[0]&&this.renderChord(this.domNode,e[0],this.matches?this.matches.firstPart:null);for(let t=1;t=n.range.end)continue;if(e.end({range:m(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(const n of e){const e=n.range.start,s=n.range.end,o=n.size;i&&o===i.size?i.range.end=s:(i={range:{start:e,end:s},size:o},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(s,r,o),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var b=i(20187),w=i(60028),C=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const y={CurrentDragAndDropData:void 0},S={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class k{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,this.getPosInSet=e?.getPosInSet?e.getPosInSet.bind(e):(e,t)=>t+1,this.getRole=e?.getRole?e.getRole.bind(e):e=>"listitem",this.isChecked=e?.isChecked?e.isChecked.bind(e):e=>{}}}class E{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,s.y6)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=S){if(this.virtualDelegate=t,this.domId="list_id_"+ ++E.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new c.ve(50),this.splicing=!1,this.dragOverAnimationStopDisposable=u.jG.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=u.jG.None,this.onDragLeaveTimeout=u.jG.None,this.disposables=new u.Cm,this._onDidChangeContentHeight=new h.vl,this._onDidChangeContentWidth=new h.vl,this.onDidChangeContentHeight=h.Jh.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(n.paddingTop??0);for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new v(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=n.horizontalScrolling??S.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new D(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(n.transformOptimization??S.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.q.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new p.yE({forceIntegerValues:!0,smoothScrollDuration:n.smoothScrolling?125:0,scheduleAtNextAnimationFrame:e=>(0,s.PG)((0,s.zk)(this.domNode),e)})),this.scrollableElement=this.disposables.add(new a.oO(this.rowsContainer,{alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel??S.alwaysConsumeMouseWheel,horizontal:1,vertical:n.verticalScrollMode??S.verticalScrollMode,useShadows:n.useShadows??S.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,s.ko)(this.rowsContainer,r.B.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,s.ko)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,s.ko)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,s.ko)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,s.ko)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,s.ko)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=n.setRowLineHeight??S.setRowLineHeight,this.setRowHeight=n.setRowHeight??S.setRowHeight,this.supportDynamicHeights=n.supportDynamicHeights??S.supportDynamicHeights,this.dnd=n.dnd??this.disposables.add(S.dnd),this.layout(n.initialSize?.height,n.initialSize?.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t={...t??{},scrollByPage:e.scrollByPage}),void 0!==e.mouseWheelScrollSensitivity&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new _(e)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),s={start:e,end:e+t},o=g.Q.intersect(n,s),r=new Map;for(let e=o.end-1;e>=o.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.unshift(t.row)}t.row=null,t.stale=!0}const a={start:e+t,end:this.items.length},l=g.Q.intersect(a,n),c=g.Q.relativeComplement(a,n),d=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:u.jG.None,checkedDisposable:u.jG.None,stale:!1})));let h;0===e&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));const p=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=m(l,p),v=g.Q.intersect(f,_);for(let e=v.start;em(e,p))),C=[{start:e,end:e+i.length},...w].map((e=>g.Q.intersect(f,e))).reverse();for(const e of C)for(let t=e.end-1;t>=e.start;t--){const e=this.items[t],i=r.get(e.templateId),n=i?.pop();this.insertItemInDOM(t,n)}for(const e of r.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,s.PG)((0,s.zk)(this.domNode),(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex((t=>t.element===e))}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:"number"==typeof e?e:(0,s.H4)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,s.y6)(this.domNode)})}render(e,t,i,n,s,o=!1){const r=this.getRenderRange(t,i),a=g.Q.relativeComplement(r,e).reverse(),l=g.Q.relativeComplement(e,r);if(o){const t=g.Q.intersect(e,r);for(let e=t.start;e{for(const e of l)for(let t=e.start;t=e.start;t--)this.insertItemInDOM(t)})),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==s&&(this.rowsContainer.style.width=`${Math.max(s,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){const i=this.items[e];if(!i.row)if(t)i.row=t,i.stale=!0;else{const e=this.cache.alloc(i.templateId);i.row=e.row,i.stale||=e.isReusingConnectedDomNode}const n=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",n);const o=this.accessibilityProvider.isChecked(i.element);if("boolean"==typeof o)i.row.domNode.setAttribute("aria-checked",String(!!o));else if(o){const e=e=>i.row.domNode.setAttribute("aria-checked",String(!!e));e(o.value),i.checkedDisposable=o.onDidChange((()=>e(o.value)))}if(i.stale||!i.row.domNode.parentElement){const t=this.items.at(e+1)?.row?.domNode??null;i.row.domNode.parentElement===this.rowsContainer&&i.row.domNode.nextElementSibling===t||this.rowsContainer.insertBefore(i.row.domNode,t),i.stale=!1}this.updateItemInDOM(i,e);const r=this.renderers.get(i.templateId);if(!r)throw new Error(`No renderer found for template id ${i.templateId}`);r?.renderElement(i.element,e,i.row.templateData,i.size);const a=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a&&(i.dragStartDisposable=(0,s.ko)(i.row.domNode,"dragstart",(e=>this.onDragStart(i.element,a,e)))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,s.y6)(e.row.domNode);const t=(0,s.zk)(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return h.Jh.filter(h.Jh.map(this.disposables.add(new o.f(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return h.Jh.any(h.Jh.map(this.disposables.add(new o.f(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),h.Jh.map(this.disposables.add(new o.f(this.domNode,r.B.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return h.Jh.map(this.disposables.add(new o.f(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return h.Jh.map(this.disposables.add(new o.f(this.rowsContainer,r.B.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element,sector:this.getTargetSector(e,t)}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const o=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.t.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(o,i)),void 0===e&&(e=String(o.length));const t=(0,s.$)(".monaco-drag-image");t.textContent=e,(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||this.domNode.ownerDocument})(this.domNode).appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>t.remove()),0)}this.domNode.classList.add("dragging"),this.currentDragData=new k(o),y.CurrentDragAndDropData=new x(o),this.dnd.onDragStart?.(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),y.CurrentDragAndDropData&&"vscode-ui"===y.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(y.CurrentDragAndDropData)this.currentDragData=y.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new L}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?.type?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=(0,l.dM)(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i;let n="boolean"!=typeof t&&t.effect&&t.effect.position?t.effect.position:"drop-target";if(s=this.currentDragFeedback,o=i,(Array.isArray(s)&&Array.isArray(o)?(0,l.aI)(s,o):s===o)&&this.currentDragFeedbackPosition===n)return!0;var s,o;if(this.currentDragFeedback=i,this.currentDragFeedbackPosition=n,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add(n),this.rowsContainer.classList.add(n),this.currentDragFeedbackDisposable=(0,u.s)((()=>{this.domNode.classList.remove(n),this.rowsContainer.classList.remove(n)}));else{if(i.length>1&&"drop-target"!==n)throw new Error("Can't use multiple feedbacks with position different than 'over'");"drop-target-after"===n&&i[0]{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row?.domNode.classList.remove(n)}}))}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,c.EQ)((()=>this.clearDragOverFeedback()),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=u.jG.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,s.cL)(this.domNode).top;this.dragOverAnimationDisposable=(0,s.i0)((0,s.zk)(this.domNode),this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,c.EQ)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(void 0===t)return;const i=e.offsetY/this.items[t].size,n=Math.floor(i/.25);return(0,w.qE)(n,0,3)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;((0,s.sb)(i)||(0,s.xZ)(i))&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,o;e===this.elementTop(n.start)?(s=n.start,o=0):n.end-n.start>1&&(s=n.start+1,o=this.elementTop(s)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=e.start;t--)this.insertItemInDOM(t);for(let e=a.start;en.splice(e,t,i)))}}var c=i(97358),d=i(90890),h=i(59321),u=i(95578),g=i(80670),p=i(17793),f=i(35114),m=i(60028),_=i(79783),v=i(24219);class b extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var w,C,y=i(26914),S=i(34287),k=i(73755),x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class L{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class D{get name(){return this._trait}get renderer(){return new L(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.vl,this.onChange=this._onChange.event}splice(e,t,i){const n=i.length-t,s=e+t,o=[];let r=0;for(;r=s;)o.push(this.sortedIndexes[r++]+n);this.renderer.splice(e,t,i.length),this._set(o,o)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(Y),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=Q(s,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,c.El)(this.sortedIndexes,e,Y)>=0}dispose(){(0,f.AS)(this._onChange)}}x([u.B],D.prototype,"renderer",null);class E extends D{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class N{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const s=new Set(n),o=i.map((e=>s.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,o)}}function I(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function M(e,t){return!!e.classList.contains(t)||!e.classList.contains("monaco-list")&&!!e.parentElement&&M(e.parentElement,t)}function T(e){return M(e,"monaco-editor")}function R(e){return M(e,"monaco-custom-toggle")}function P(e){return M(e,"action-item")}function A(e){return M(e,"monaco-tree-sticky-row")}function O(e){return e.classList.contains("monaco-tree-sticky-container")}function F(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&!!e.parentElement&&F(e.parentElement)}class B{get onKeyDown(){return g.Jh.chain(this.disposables.add(new s.f(this.view.domNode,"keydown")).event,(e=>e.filter((e=>!I(e.target))).map((e=>new o.Z(e)))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new f.Cm,this.multipleSelectionDisposables=new f.Cm,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown((e=>{switch(e.keyCode){case 3:return this.onEnter(e);case 16:return this.onUpArrow(e);case 18:return this.onDownArrow(e);case 11:return this.onPageUpArrow(e);case 12:return this.onPageDownArrow(e);case 9:return this.onEscape(e);case 31:this.multipleSelectionSupport&&(_.zx?e.metaKey:e.ctrlKey)&&this.onCtrlA(e)}})))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,c.y1)(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}x([u.B],B.prototype,"onKeyDown",null),function(e){e[e.Automatic=0]="Automatic",e[e.Trigger=1]="Trigger"}(w||(w={})),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(C||(C={}));const W=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class H{constructor(e,t,i,n,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=s,this.enabled=!1,this.state=C.Idle,this.mode=w.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new f.Cm,this.disposables=new f.Cm,this.updateOptions(e.options)}updateOptions(e){e.typeNavigationEnabled??1?this.enable():this.disable(),this.mode=e.typeNavigationMode??w.Automatic}enable(){if(this.enabled)return;let e=!1;const t=g.Jh.chain(this.enabledDisposables.add(new s.f(this.view.domNode,"keydown")).event,(t=>t.filter((e=>!I(e.target))).filter((()=>this.mode===w.Automatic||this.triggered)).map((e=>new o.Z(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>n.fs.stop(e,!0))).map((e=>e.browserEvent.key)))),i=g.Jh.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables);g.Jh.reduce(g.Jh.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){const e=this.list.getFocus();if(e.length>0&&e[0]===this.previouslyFocused){const t=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(e[0]));"string"==typeof t?(0,a.xE)(t):t&&(0,a.xE)(t.get())}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=C.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===C.Idle?1:0;this.state=C.Typing;for(let t=0;t1&&1===t.length)return this.previouslyFocused=i,this.list.setFocus([s]),void this.list.reveal(s)}}else if(void 0===r||(0,p.WP)(e,r))return this.previouslyFocused=i,this.list.setFocus([s]),void this.list.reveal(s)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class V{constructor(e,t){this.list=e,this.view=t,this.disposables=new f.Cm;const i=g.Jh.chain(this.disposables.add(new s.f(t.domNode,"keydown")).event,(e=>e.filter((e=>!I(e.target))).map((e=>new o.Z(e)))));g.Jh.chain(i,(e=>e.filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)))))(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const s=i.querySelector("[tabIndex]");if(!s||!(0,n.sb)(s)||-1===s.tabIndex)return;const o=(0,n.zk)(s).getComputedStyle(s);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),s.focus())}dispose(){this.disposables.dispose()}}function z(e){return _.zx?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function U(e){return e.browserEvent.shiftKey}const j={isSelectionSingleChangeEvent:z,isSelectionRangeChangeEvent:U};class q{constructor(e){this.list=e,this.disposables=new f.Cm,this._onPointer=new g.vl,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||j),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(r.q.addTarget(e.getHTMLElement()))),g.Jh.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||j))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){T(e.browserEvent.target)||(0,n.bq)()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(I(e.browserEvent.target)||T(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(I(e.browserEvent.target)||T(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),i=e.browserEvent,(0,n.Er)(i)&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(I(e.browserEvent.target)||T(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){void 0===i&&(i=this.list.getFocus()[0]??t,this.list.setAnchor(i));const n=Math.min(i,t),s=Math.max(i,t),o=(0,c.y1)(n,s+1),r=this.list.getSelection(),a=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let s=i-1;for(;s>=0&&e[s]===t-(i-s);)n.push(e[s--]);for(n.reverse(),s=i;s=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){n++,s++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class K{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const s=(0,n.gI)(e.listFocusAndSelectionOutline,(0,n.gI)(e.listSelectionOutline,e.listFocusOutline??""));s&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const o=(0,n.gI)(e.listSelectionOutline,e.listInactiveFocusOutline??"");o&&i.push(`.monaco-list${t} .monaco-list-row.focused.selected { outline: 1px dotted ${o}; outline-offset: -1px; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&i.push(`\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.listDropOverBackground} !important; color: inherit !important; }\n\t\t\t`),e.listDropBetweenBackground&&(i.push(`\n\t\t\t.monaco-list${t} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,\n\t\t\t.monaco-list${t} .monaco-list-row.drop-target-before::before {\n\t\t\t\tcontent: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`),i.push(`\n\t\t\t.monaco-list${t} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,\n\t\t\t.monaco-list${t} .monaco-list-row.drop-target-after::after {\n\t\t\t\tcontent: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`)),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&i.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=i.join("\n")}}const $={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:h.Q1.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:h.Q1.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:h.Q1.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},G={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function Q(e,t){const i=[];let n=0,s=0;for(;n=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){i.push(e[n]),n++,s++;continue}e[n]e-t;class Z{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let s=0;for(const o of this.renderers)o.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(const o of this.renderers)o.disposeElement?.(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class X{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new f.Cm}}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e),s=n&&"string"!=typeof n?n:(0,k.lk)(n);i.disposables.add((0,k.fm)((e=>{this.setAriaLabel(e.readObservable(s),i.container)})));const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.container.setAttribute("aria-level",`${o}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i,n){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class J{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,s){return this.dnd.onDragOver(e,t,i,n,s)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,s){this.dnd.drop(e,t,i,n,s)}dispose(){this.dnd.dispose()}}class ee{get onDidChangeFocus(){return g.Jh.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return g.Jh.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=g.Jh.chain(this.disposables.add(new s.f(this.view.domNode,"keydown")).event,(t=>t.map((e=>new o.Z(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>n.fs.stop(e,!0))).filter((()=>!1)))),i=g.Jh.chain(this.disposables.add(new s.f(this.view.domNode,"keyup")).event,(t=>t.forEach((()=>e=!1)).map((e=>new o.Z(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>n.fs.stop(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})))),r=g.Jh.chain(this.view.onContextMenu,(t=>t.filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new S.P((0,n.zk)(this.view.domNode),i),browserEvent:i})))));return g.Jh.any(t,i,r)}get onKeyDown(){return this.disposables.add(new s.f(this.view.domNode,"keydown")).event}get onDidFocus(){return g.Jh.signal(this.disposables.add(new s.f(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return g.Jh.signal(this.disposables.add(new s.f(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,s,o=G){this.user=e,this._options=o,this.focus=new D("focused"),this.anchor=new D("anchor"),this.eventBufferer=new g.at,this._ariaLabel="",this.disposables=new f.Cm,this._onDidDispose=new g.vl,this.onDidDispose=this._onDidDispose.event;const r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new E("listbox"!==r);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new X(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),s=s.map((e=>new Z(e.templateId,[...a,e])));const c={...o,dnd:o.dnd&&new J(this,o.dnd)};if(this.view=this.createListView(t,i,s,c),this.view.domNode.setAttribute("role",r),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=(0,n.li)(this.view.domNode);this.styleController=new K(e,this.view.domId)}if(this.spliceable=new l([new N(this.focus,this.view,o.identityProvider),new N(this.selection,this.view,o.identityProvider),new N(this.anchor,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new V(this,this.view)),("boolean"!=typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new B(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||W;this.typeNavigationController=new H(this,this.view,o.keyboardNavigationLabelProvider,o.keyboardNavigationEventFilter??(()=>!0),e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new y.uO(e,t,i,n)}createMouseController(e){return new q(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new b(this.user,`Invalid start index: ${e}`);if(t<0)throw new b(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,c.Fy)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new b(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findNextIndex(s.length>0?s[0]+e:0,t,n);o>-1&&this.setFocus([o],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);o>-1&&this.setFocus([o],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{const s=this.view.getScrollTop();let o=s+this.view.renderHeight;i>n&&(o-=this.view.elementHeight(i)),this.view.setScrollTop(o),this.view.getScrollTop()!==s&&(this.setFocus([]),await(0,d.wR)(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=()=>0){let n;const s=i(),o=this.view.getScrollTop()+s;n=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);const r=this.getFocus()[0];if(r!==n&&(void 0===r||r>=n)){const i=this.findNextIndex(n,!1,t);i>-1&&r!==i?this.setFocus([i],e):this.setFocus([n],e)}else{const n=o;this.view.setScrollTop(o-this.view.renderHeight-s),this.view.getScrollTop()+i()!==n&&(this.setFocus([]),await(0,d.wR)(0),await this.focusPreviousPage(e,t,i))}}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),s=this.view.elementTop(e),o=this.view.elementHeight(e);if((0,v.Et)(t)){const e=o-this.view.renderHeight+i;this.view.setScrollTop(e*(0,m.qE)(t,0,1)+s-i)}else{const e=s+o,t=n+this.view.renderHeight;s=t||(s=t&&o>=this.view.renderHeight?this.view.setScrollTop(s-i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new b(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const o=s-this.view.renderHeight+t;return Math.abs((i+t-n)/o)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){const e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}x([u.B],ee.prototype,"onDidChangeFocus",null),x([u.B],ee.prototype,"onDidChangeSelection",null),x([u.B],ee.prototype,"onContextMenu",null),x([u.B],ee.prototype,"onKeyDown",null),x([u.B],ee.prototype,"onDidFocus",null),x([u.B],ee.prototype,"onDidBlur",null)},98435:function(e,t,i){"use strict";i.d(t,{v:function(){return a}});var n=i(84201),s=i(38175),o=i(80670),r=i(35114);class a{constructor(){let e;this._onDidWillResize=new o.vl,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new o.vl,this.onDidResize=this._onDidResize.event,this._sashListener=new r.Cm,this._size=new n.fg(0,0),this._minSize=new n.fg(0,0),this._maxSize=new n.fg(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new s.m(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new s.m(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new s.m(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:s.B.North}),this._southSash=new s.m(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:s.B.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(o.Jh.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(o.Jh.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(o.Jh.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(o.Jh.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:s}=this._minSize,{height:o,width:r}=this._maxSize;e=Math.max(i,Math.min(o,e)),t=Math.max(s,Math.min(r,t));const a=new n.fg(t,e);n.fg.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}},38175:function(e,t,i){"use strict";i.d(t,{B:function(){return n},m:function(){return b}});var n,s=i(84201),o=i(26745),r=i(53510),a=i(90890),l=i(95578),c=i(80670),d=i(35114),h=i(79783),u=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(n||(n={}));const g=new c.vl,p=new c.vl;class f{constructor(e){this.el=e,this.disposables=new d.Cm}get onPointerMove(){return this.disposables.add(new o.f((0,s.zk)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new o.f((0,s.zk)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}u([l.B],f.prototype,"onPointerMove",null),u([l.B],f.prototype,"onPointerUp",null);class m{get onPointerMove(){return this.disposables.add(new o.f(this.el,r.B.Change)).event}get onPointerUp(){return this.disposables.add(new o.f(this.el,r.B.End)).event}constructor(e){this.el=e,this.disposables=new d.Cm}dispose(){this.disposables.dispose()}}u([l.B],m.prototype,"onPointerMove",null),u([l.B],m.prototype,"onPointerUp",null);class _{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}u([l.B],_.prototype,"onPointerMove",null),u([l.B],_.prototype,"onPointerUp",null);const v="pointer-events-disabled";class b extends d.jG{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,s.BC)(this.el,(0,s.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,d.s)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new o.f(this._orthogonalStartDragHandle,"mouseenter")).event((()=>b.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new o.f(this._orthogonalStartDragHandle,"mouseleave")).event((()=>b.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,s.BC)(this.el,(0,s.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,d.s)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new o.f(this._orthogonalEndDragHandle,"mouseenter")).event((()=>b.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new o.f(this._orthogonalEndDragHandle,"mouseleave")).event((()=>b.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new a.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new c.vl),this._onDidStart=this._register(new c.vl),this._onDidChange=this._register(new c.vl),this._onDidReset=this._register(new c.vl),this._onDidEnd=this._register(new c.vl),this.orthogonalStartSashDisposables=this._register(new d.Cm),this.orthogonalStartDragHandleDisposables=this._register(new d.Cm),this.orthogonalEndSashDisposables=this._register(new d.Cm),this.orthogonalEndDragHandleDisposables=this._register(new d.Cm),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,s.BC)(e,(0,s.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),h.zx&&this.el.classList.add("mac");const n=this._register(new o.f(this.el,"mousedown")).event;this._register(n((t=>this.onPointerStart(t,new f(e))),this));const l=this._register(new o.f(this.el,"dblclick")).event;this._register(l(this.onPointerDoublePress,this));const u=this._register(new o.f(this.el,"mouseenter")).event;this._register(u((()=>b.onMouseEnter(this))));const _=this._register(new o.f(this.el,"mouseleave")).event;this._register(_((()=>b.onMouseLeave(this)))),this._register(r.q.addTarget(this.el));const v=this._register(new o.f(this.el,r.B.Start)).event;this._register(v((e=>this.onPointerStart(e,new m(this.el))),this));const w=this._register(new o.f(this.el,r.B.Tap)).event;let C;this._register(w((e=>{if(C)return clearTimeout(C),C=void 0,void this.onPointerDoublePress(e);clearTimeout(C),C=setTimeout((()=>C=void 0),250)}),this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(g.event((e=>{this.size=e,this.layout()})))),this._register(p.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(e,t){s.fs.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new _(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new _(t))),!this.state)return;const n=this.el.ownerDocument.getElementsByTagName("iframe");for(const e of n)e.classList.add(v);const o=e.pageX,r=e.pageY,a=e.altKey,l={startX:o,currentX:o,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=(0,s.li)(this.el),u=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":h.zx?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":h.zx?"col-resize":"ew-resize",c.textContent=`* { cursor: ${e} !important; }`},g=new d.Cm;u(),i||this.onDidEnablementChange.event(u,null,g),t.onPointerMove((e=>{s.fs.stop(e,!1);const t={startX:o,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{s.fs.stop(e,!1),c.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of n)e.classList.remove(v)}),null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&b.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&b.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){b.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){const t=e.initialTarget??e.target;if(t&&(0,s.sb)(t))return t.classList.contains("orthogonal-drag-handle")?t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},5390:function(e,t,i){"use strict";i.d(t,{MU:function(){return D},QC:function(){return S},Se:function(){return x},oO:function(){return L}});var n=i(75969),s=i(84201),o=i(43999),r=i(34287),a=i(82884),l=i(6770),c=i(90890),d=i(56613);class h extends l.x{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...d.L.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a._),this._register(s.b2(this.bgDomNode,s.Bx.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(s.b2(this.domNode,s.Bx.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new s.Be),this._pointerdownScheduleRepeatTimer=this._register(new c.pc)}_arrowPointerDown(e){e.target&&e.target instanceof Element&&(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet((()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24,s.zk(e))}),200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault())}}var u=i(35114);class g extends u.jG{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new c.pc)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode?.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}var p=i(79783);class f extends l.x{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new g(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a._),this._shouldRender=!0,this.domNode=(0,o.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(s.ko(this.domNode.domNode,s.Bx.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,o.Z)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(s.ko(this.slider.domNode,s.Bx.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=s.BK(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const s=this._sliderOrthogonalPointerPosition(e),o=Math.abs(s-i);if(p.uF&&o>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}var m=i(99758),_=i(93231);class v extends f{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new m.m(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,s.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.W.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,1,0))}),this._createArrow({className:"scra",icon:_.W.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class b extends f{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new m.m(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.W.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,1))}),this._createArrow({className:"scra",icon:_.W.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var w=i(80670),C=i(95773);class y{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class S{static{this.INSTANCE=new S}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const s=n===this._front?e:Math.pow(2,-i);if(e-=s,t+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}acceptStandardWheelEvent(e){if(n.H8){const t=s.zk(e.browserEvent),i=(0,n.pR)(t);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){let n=null;const s=new y(e,t,i);-1===this._front&&-1===this._rear?(this._memory[0]=s,this._front=0,this._rear=0):(n=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=s),s.score=this._computeScore(s,n)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if(this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(i+=.25),t){const n=Math.abs(e.deltaX),s=Math.abs(e.deltaY),o=Math.abs(t.deltaX),r=Math.abs(t.deltaY),a=Math.max(Math.min(n,o),1),l=Math.max(Math.min(s,r),1),c=Math.max(n,o),d=Math.max(s,r);c%a==0&&d%l==0&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}class k extends l.x{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new w.vl),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new w.vl),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,p.zx&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,o.Z)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,o.Z)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,o.Z)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new c.pc),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.AS)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,p.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.$(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.AS)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.$(e))};this._mouseWheelToDispose.push(s.ko(this._listenOnDomNode,s.Bx.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;const t=S.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+n===0?s=n=0:Math.abs(n)>=Math.abs(s)?s=0:n=0),this._options.flipAxes&&([n,s]=[s,n]);const o=!p.zx&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!o||s||(s=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(s*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(s){const e=50*s,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"",o=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class x extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new C.yE({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>s.PG(s.zk(e),t)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class L extends k{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class D extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new C.yE({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>s.PG(s.zk(e),t)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}))),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},99758:function(e,t,i){"use strict";i.d(t,{m:function(){return n}});class n{constructor(e,t,i,n,s,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new n(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){const o=Math.max(0,i-e),r=Math.max(0,o-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),c=(r-l)/(n-i),d=s*c;return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=n._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t(0,n.PG)((0,n.zk)(this.el),e)})),this.scrollableElement=this._register(new r.oO(this.viewContainer,{vertical:0===this.orientation?t.scrollbarVisibility??1:2,horizontal:1===this.orientation?t.scrollbarVisibility??1:2},this.scrollable));const i=this._register(new s.f(this.viewContainer,"scroll")).event;this._register(i((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),(0,n.BC)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||p),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=g.b0(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this._contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i0&&(n.size=(0,h.qE)(Math.round(s*e/t),n.minimumSize,n.maximumSize))}}else{const t=(0,a.y1)(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),s=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const s=this.sashItems.findIndex((t=>t.sash===e)),o=(0,d.qE)((0,n.ko)(this.el.ownerDocument.body,"keydown",(e=>r(this.sashDragState.current,e.altKey))),(0,n.ko)(this.el.ownerDocument.body,"keyup",(()=>r(this.sashDragState.current,!1)))),r=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,r,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(s===this.sashItems.length-1){const e=this.viewItems[s];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[s+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}if(!t){const e=(0,a.y1)(s,-1),t=(0,a.y1)(s+1,this.viewItems.length),o=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),d=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),h=Math.max(o,d),u=Math.min(c,l),g=this.findFirstSnapIndex(e),p=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?h-t:h+t,size:e.size}}if("number"==typeof p){const e=this.viewItems[p],t=Math.floor(e.viewMinimumSize/2);r={index:p,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:s,sizes:i,minDelta:l,maxDelta:c,alt:t,snapBefore:n,snapAfter:r,disposable:o}};r(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:o,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,d=this.resize(t,c,n,void 0,void 0,o,r,a,l);if(s){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,s=this.viewItems[n],o=s.size-s.maximumSize,r=s.size-s.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,o,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,h.qE)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;try{const i=(0,a.y1)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],s=i.filter((e=>2===this.viewItems[e].priority)),o=this.viewItems[e];t=Math.round(t),t=(0,h.qE)(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(n,s)}finally{this.state=v.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,h.qE)(i,t.minimumSize,t.maximumSize);const n=(0,a.y1)(this.viewItems.length),s=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));this.relayout(s,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,s){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;try{const r=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(r):this.viewContainer.insertBefore(r,this.viewContainer.children.item(i));const l=e.onDidChange((e=>this.onViewChange(p,e))),h=(0,d.s)((()=>r.remove())),u=(0,d.qE)(l,h);let g;"number"==typeof t?g=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),g="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const p=0===this.orientation?new m(r,e,g,u):new _(r,e,g,u);if(this.viewItems.splice(i,0,p),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new o.m(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},{...e,orientation:1}):new o.m(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},{...e,orientation:0}),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),s=c.Jh.map(t.onDidStart,n)(this.onSashStart,this),r=c.Jh.map(t.onDidChange,n)(this.onSashChange,this),l=c.Jh.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),h=l(this.onSashEnd,this),u=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.y1)(e,-1),n=(0,a.y1)(e+1,this.viewItems.length),s=this.findFirstSnapIndex(i),o=this.findFirstSnapIndex(n);("number"!=typeof s||this.viewItems[s].visible)&&("number"!=typeof o||this.viewItems[o].visible)&&this._onDidSashReset.fire(e)})),g=(0,d.qE)(s,r,h,u,t),p={sash:t,disposable:g};this.sashItems.splice(i-1,0,p)}let f;r.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(f=[t.index]),s||this.relayout([i],f),s||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}finally{this.state=v.Idle}}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,s,o=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const d=(0,a.y1)(e,-1),u=(0,a.y1)(e+1,this.viewItems.length);if(s)for(const e of s)(0,a._A)(d,e),(0,a._A)(u,e);if(n)for(const e of n)(0,a.r7)(d,e),(0,a.r7)(u,e);const g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),f=u.map((e=>this.viewItems[e])),m=u.map((e=>i[e])),_=d.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=d.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===u.length?Number.POSITIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),w=0===u.length?Number.NEGATIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),C=Math.max(_,w,o),y=Math.min(b,v,r);let S=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;S=i!==e.visible,e.setVisible(i,l.size)}if(!S&&c){const e=this.viewItems[c.index],i=te+t.size),0);let i=this.size-t;const n=(0,a.y1)(this.viewItems.length-1,-1),s=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));for(const e of o)(0,a._A)(n,e);for(const e of s)(0,a.r7)(n,e);"number"==typeof e&&(0,a.r7)(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const s=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const o=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:h&&t[e]&&(r0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){this.sashDragState?.disposable.dispose(),(0,d.AS)(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}},44925:function(e,t,i){"use strict";i.d(t,{F:function(){return l},l:function(){return c}});var n=i(6770),s=i(56613),o=i(80670),r=i(24764),a=i(12048);const l={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class c extends n.x{constructor(e){super(),this._onChange=this._register(new o.vl),this.onChange=this._onChange.event,this._onKeyDown=this._register(new o.vl),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...s.L.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register((0,a.i)().setupManagedHover(e.hoverDelegate??(0,r.nZ)("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},41703:function(e,t,i){"use strict";i.d(t,{DO:function(){return G},KP:function(){return n},RD:function(){return o},vD:function(){return s},w0:function(){return I}});var n,s,o,r=i(84201),a=(i(26745),i(40478)),l=(i(98099),i(72711),i(50216)),c=i(26914),d=i(67334),h=i(44925),u=i(64476),g=i(37345),p=(i(30981),i(97358)),f=i(90890),m=i(93231),_=i(56613),v=i(52732),b=i(80670),w=i(17793),C=i(35114),y=i(60028),S=i(24219),k=i(14374),x=(i(24764),i(73755)),L=i(15075);class D extends c.ur{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function E(e){return e instanceof c.ur?new D(e):e}class N{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=C.jG.None,this.disposables=new C.Cm}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart?.(E(e),t)}onDragOver(e,t,i,n,s,o=!0){const r=this.dnd.onDragOver(E(e),t&&t.element,i,n,s),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(a&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,f.EQ)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500,this.disposables)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return o?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),a=i.getNode(r),l=r&&i.getListIndex(r);return this.onDragOver(e,a,l,n,s,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),d=l.getListIndex(c),h=l.getListRenderCount(c);return{...r,feedback:(0,p.y1)(d,d+h)}}drop(e,t,i,n,s){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(E(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}class I{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(n||(n={}));class M{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new C.Cm,this.onDidChange=b.Jh.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class T{static{this.DefaultIndent=8}constructor(e,t,i,n,s,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=T.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=C.jG.None,this.disposables=new C.Cm,this.templateId=e.templateId,this.updateOptions(o),b.Jh.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){const t=(0,y.qE)(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if(void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==n.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new C.Cm;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,r.BC)(e,(0,r.$)(".monaco-tl-row")),i=(0,r.BC)(t,(0,r.$)(".monaco-tl-indent")),n=(0,r.BC)(t,(0,r.$)(".monaco-tl-twistie")),s=(0,r.BC)(t,(0,r.$)(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:C.jG.None,templateData:o}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=T.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(..._.L.asClassNameArray(m.W.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(..._.L.asClassNameArray(m.W.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,r.w_)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new C.Cm,n=this.modelProvider();for(;;){const s=n.getNodeLocation(e),o=n.getParentNodeLocation(s);if(!o)break;const a=n.getNode(o),l=(0,r.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(a)&&l.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(l):t.indent.insertBefore(l,t.indent.firstElementChild),this.renderedIndentGuides.add(a,l),i.add((0,C.s)((()=>this.renderedIndentGuides.delete(a,l)))),e=a}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const s=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):s&&t.add(i.getNode(s))}catch{}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,C.AS)(this.disposables)}}class R{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new C.Cm,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"==typeof n?n?1:0:(0,u.iZ)(n)?(0,u.Mn)(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:w.ne.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(n)?n:[n];for(const e of r){const t=e&&e.toString();if(void 0===t)return{data:w.ne.Default,visibility:i};let n;if(this.tree.findMatchType===o.Contiguous){const e=t.toLowerCase().indexOf(this._lowercasePattern);if(e>-1){n=[Number.MAX_SAFE_INTEGER,0];for(let t=this._lowercasePattern.length;t>0;t--)n.push(e+t-1)}}else n=(0,w.dt)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===r.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===s.Filter?"number"==typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:w.ne.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,C.AS)(this.disposables)}}h.l,h.l,l.x8,h.F,function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(s||(s={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(o||(o={})),C.jG;class P{get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,r,a={}){this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=r,this.options=a,this._pattern="",this.width=0,this._onDidChangeMode=new b.vl,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new b.vl,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new b.vl,this._onDidChangeOpenState=new b.vl,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new C.Cm,this.disposables=new C.Cm,this._mode=e.options.defaultFindMode??s.Highlight,this._matchType=e.options.defaultFindMatchType??o.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&e?((0,L.xE)((0,k.kg)("replFindNoResults","No results")),this.tree.options.showNotFoundMessage??1?this.widget?.showMessage({type:2,content:(0,k.kg)("not found","No elements found.")}):this.widget?.showMessage({type:2})):(this.widget?.clearMessage(),this.pattern&&(0,L.xE)((0,k.kg)("replFindResults","{0} results",this.filter.matchCount)))}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1||!w.ne.isDefault(e.filterData)}layout(e){this.width=e,this.widget?.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function A(e,t){return e.position===t.position&&O(e,t)}function O(e,t){return e.node.element===t.node.element&&e.startIndex===t.startIndex&&e.height===t.height&&e.endIndex===t.endIndex}class F{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return(0,p.aI)(this.stickyNodes,e.stickyNodes,A)}lastNodePartiallyVisible(){if(0===this.count)return!1;const e=this.stickyNodes[this.count-1];if(1===this.count)return 0!==e.position;const t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!(0,p.aI)(this.stickyNodes,e.stickyNodes,O))return!1;if(0===this.count)return!1;const t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class B{constrainStickyScrollNodes(e,t,i){for(let n=0;ni||n>=t)return e.slice(0,n)}return e}}class W extends C.jG{constructor(e,t,i,n,s,o={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=s,this.maxWidgetViewRatio=.4;const r=this.validateStickySettings(o);this.stickyScrollMaxItemCount=r.stickyScrollMaxItemCount,this.stickyScrollDelegate=o.stickyScrollDelegate??new B,this._widget=this._register(new H(i.getScrollableElement(),i,e,n,s,o.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll((()=>this.update()))),this._register(i.onDidChangeContentHeight((()=>this.update()))),this._register(e.onDidChangeCollapseState((()=>this.update()))),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(t=0===e?this.view.firstVisibleIndex:this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){const e=this.getNodeAtHeight(0);if(!e||0===this.tree.scrollTop)return void this._widget.setState(void 0);const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[];let i=e,n=0,s=this.getNextStickyNode(i,void 0,n);for(;s&&(t.push(s),n+=s.height,!(t.length<=this.stickyScrollMaxItemCount)||(i=this.getNextVisibleNode(s),i));)s=this.getNextStickyNode(i,s.node,n);const o=this.constrainStickyNodes(t);return o.length?new F(o):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n){if(n===e){if(!this.nodeIsUncollapsedParent(e))return;if(this.nodeTopAlignsWithStickyNodesBottom(e,i))return}return this.createStickyScrollNode(n,i)}}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),s=t;return this.view.scrollTop===n-s}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:s}=this.getNodeRange(e);return{node:e,position:this.calculateStickyNodePosition(s,t,i),height:i,startIndex:n,endIndex:s}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(void 0===t)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(null===n&&this.view.firstVisibleIndex===e&&e+1r&&t<=r?r-i:t}constrainStickyNodes(e){if(0===e.length)return[];const t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;const n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];const s=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||s.position+s.height>t)throw new Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){const t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){const t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");return{startIndex:i,endIndex:i+this.model.getListRenderCount(t)-1}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let e=0;e0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i)return this._previousState=void 0,this._previousElements=[],void this._previousStateDisposables.clear();const n=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${n.position}px`;else{this._previousStateDisposables.clear();const t=Array(e.count);for(let i=e.count-1;i>=0;i--){const n=e.stickyNodes[i],{element:s,disposable:o}=this.createElement(n,i,e.count);t[i]=s,this._rootDomNode.appendChild(s),this._previousStateDisposables.add(o)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}createElement(e,t,i){const n=e.startIndex,s=document.createElement("div");s.style.top=`${e.position}px`,!1!==this.tree.options.setRowHeight&&(s.style.height=`${e.height}px`),!1!==this.tree.options.setRowLineHeight&&(s.style.lineHeight=`${e.height}px`),s.classList.add("monaco-tree-sticky-row"),s.classList.add("monaco-list-row"),s.setAttribute("data-index",`${n}`),s.setAttribute("data-parity",n%2==0?"even":"odd"),s.setAttribute("id",this.view.getElementID(n));const o=this.setAccessibilityAttributes(s,e.node.element,t,i),r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find((e=>e.templateId===r));if(!a)throw new Error(`No renderer found for template id ${r}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));const c=a.renderTemplate(s);a.renderElement(l,e.startIndex,c,e.height);const d=(0,C.s)((()=>{o.dispose(),a.disposeElement(l,e.startIndex,c,e.height),a.disposeTemplate(c),s.remove()}));return{element:s,disposable:d}}setAccessibilityAttributes(e,t,i,n){if(!this.accessibilityProvider)return C.jG.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");const s=this.accessibilityProvider.getAriaLabel(t),o=s&&"string"!=typeof s?s:(0,x.lk)(s),r=(0,x.fm)((t=>{const i=t.readObservable(o);i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")}));"string"==typeof s||s&&e.setAttribute("aria-label",s.get());const a=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return"number"==typeof a&&e.setAttribute("aria-level",`${a}`),e.setAttribute("aria-selected",String(!1)),r}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class V extends C.jG{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new b.vl,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new b.vl,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register((0,r.ko)(this.container,"focus",(()=>this.onFocus()))),this._register((0,r.ko)(this.container,"blur",(()=>this.onBlur()))),this._register(this.view.onDidFocus((()=>this.toggleStickyScrollFocused(!1)))),this._register(this.view.onKeyDown((e=>this.onKeyDown(e)))),this._register(this.view.onMouseDown((e=>this.onMouseDown(e)))),this._register(this.view.onContextMenu((e=>this.handleContextMenu(e))))}handleContextMenu(e){const t=e.browserEvent.target;if(!(0,d.Es)(t)&&!(0,d.xu)(t))return void(this.focusedLast()&&this.view.domFocus());if(!(0,r.kx)(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const t=this.state.stickyNodes.findIndex((t=>t.node.element===e.element?.element));if(-1===t)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");return this.container.focus(),void this.setFocus(t)}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const i=this.state.stickyNodes[this.focusedIndex].node.element,n=this.elements[this.focusedIndex];this._onContextMenu.fire({element:i,anchor:n,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state)if("ArrowUp"===e.key)this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if("ArrowDown"===e.key||"ArrowRight"===e.key){if(this.focusedIndex>=this.state.count-1){const e=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([e]),this.scrollNodeUnderWidget(e,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}onMouseDown(e){const t=e.browserEvent.target;((0,d.Es)(t)||(0,d.xu)(t))&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&0===t.count)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){const e=(0,y.qE)(i,0,t.count-1);this.setFocus(e)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){const t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,s=this.view.getElementTop(e),o=n?n.position+n.height+i.height:i.height;this.view.scrollTop=s-o}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return!!this.state&&this.view.getHTMLElement().classList.contains("sticky-scroll-focused")}removeFocus(){-1!==this.focusedIndex&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){-1!==this.focusedIndex&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||0===this.elements.length)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),-1===this.focusedIndex&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function z(e){let t=g.Lx.Unknown;return(0,r.XD)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=g.Lx.Twistie:(0,r.XD)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=g.Lx.Element:(0,r.XD)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=g.Lx.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function U(e){const t=(0,d.Es)(e.browserEvent.target);return{element:e.element?e.element.element:null,browserEvent:e.browserEvent,anchor:e.anchor,isStickyScroll:t}}function j(e,t){t(e),e.children.forEach((e=>j(e,t)))}class q{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new b.vl,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&(0,p.aI)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>j(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>j(e,n)));const s=new Map,o=e=>s.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>j(e,o)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=s.get(t);e&&e.visible&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class K extends d.MH{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if((0,d.Bm)(e.browserEvent.target)||(0,d.B6)(e.browserEvent.target)||(0,d.bm)(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,s=(0,d.xu)(e.browserEvent.target);let o=!1;if(o=!!s||("function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick),s)this.handleStickyScrollMouseEvent(e,t);else{if(o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e)}if(t.collapsible&&(!s||n)){const i=this.tree.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,s),n)return void(e.browserEvent.isHandledByList=!0)}s||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if((0,d.b$)(e.browserEvent.target)||(0,d.W0)(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),s=this.list.getElementTop(n),o=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=s-o,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}onMouseDown(e){const t=e.browserEvent.target;(0,d.Es)(t)||(0,d.xu)(t)||super.onMouseDown(e)}onContextMenu(e){const t=e.browserEvent.target;(0,d.Es)(t)||(0,d.xu)(t)||super.onContextMenu(e)}}class $ extends d.B8{constructor(e,t,i,n,s,o,r,a){super(e,t,i,n,a),this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=r}createMouseController(e){return new K(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];let o;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i),this.anchorTrait.has(t)&&(o=e+i)})),n.length>0&&super.setFocus((0,p.dM)([...super.getFocus(),...n])),s.length>0&&super.setSelection((0,p.dM)([...super.getSelection(),...s])),"number"==typeof o&&super.setAnchor(o)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class G{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return b.Jh.filter(b.Jh.map(this.view.onMouseDblClick,z),(e=>e.target!==g.Lx.Filter))}get onMouseOver(){return b.Jh.map(this.view.onMouseOver,z)}get onMouseOut(){return b.Jh.map(this.view.onMouseOut,z)}get onContextMenu(){return b.Jh.any(b.Jh.filter(b.Jh.map(this.view.onContextMenu,U),(e=>!e.isStickyScroll)),this.stickyScrollController?.onContextMenu??b.Jh.None)}get onPointer(){return b.Jh.map(this.view.onPointer,z)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return b.Jh.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){return this.findController?.mode??s.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){return this.findController?.matchType??o.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,s,o={}){this._user=e,this._options=o,this.eventBufferer=new b.at,this.onDidChangeFindOpenState=b.Jh.None,this.onDidChangeStickyScrollFocused=b.Jh.None,this.disposables=new C.Cm,this._onWillRefilter=new b.vl,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new b.vl,this.treeDelegate=new I(i);const l=new b.Wj,c=new b.Wj,h=this.disposables.add(new M(c.event)),u=new v.db;this.renderers=s.map((e=>new T(e,(()=>this.model),l.event,h,u,o)));for(const e of this.renderers)this.disposables.add(e);let g;var p,m;o.keyboardNavigationLabelProvider&&(g=new R(this,o.keyboardNavigationLabelProvider,o.filter),o={...o,filter:g},this.disposables.add(g)),this.focus=new q((()=>this.view.getFocusedElements()[0]),o.identityProvider),this.selection=new q((()=>this.view.getSelectedElements()[0]),o.identityProvider),this.anchor=new q((()=>this.view.getAnchorElement()),o.identityProvider),this.view=new $(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...(p=()=>this.model,m=o,m&&{...m,identityProvider:m.identityProvider&&{getId(e){return m.identityProvider.getId(e.element)}},dnd:m.dnd&&new N(p,m.dnd),multipleSelectionController:m.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return m.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return m.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:m.accessibilityProvider&&{...m.accessibilityProvider,getSetSize(e){const t=p(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i);return t.getNode(n).visibleChildrenCount},getPosInSet(e){return e.visibleChildIndex+1},isChecked:m.accessibilityProvider&&m.accessibilityProvider.isChecked?e=>m.accessibilityProvider.isChecked(e.element):void 0,getRole:m.accessibilityProvider&&m.accessibilityProvider.getRole?e=>m.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel(e){return m.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return m.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:m.accessibilityProvider&&m.accessibilityProvider.getWidgetRole?()=>m.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:m.accessibilityProvider&&m.accessibilityProvider.getAriaLevel?e=>m.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:m.accessibilityProvider.getActiveDescendantId&&(e=>m.accessibilityProvider.getActiveDescendantId(e.element))},keyboardNavigationLabelProvider:m.keyboardNavigationLabelProvider&&{...m.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return m.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}}),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,o),l.input=this.model.onDidChangeCollapseState;const _=b.Jh.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);_((()=>null),null,this.disposables);const w=this.disposables.add(new b.vl),y=this.disposables.add(new f.ve(0));if(this.disposables.add(b.Jh.any(_,this.focus.onDidChange,this.selection.onDidChange)((()=>{y.trigger((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);w.fire([...e.values()])}))}))),c.input=w.event,!1!==o.keyboardSupport){const e=b.Jh.chain(this.view.onKeyDown,(e=>e.filter((e=>!(0,d.B6)(e.target))).map((e=>new a.Z(e)))));b.Jh.chain(e,(e=>e.filter((e=>15===e.keyCode))))(this.onLeftArrow,this,this.disposables),b.Jh.chain(e,(e=>e.filter((e=>17===e.keyCode))))(this.onRightArrow,this,this.disposables),b.Jh.chain(e,(e=>e.filter((e=>10===e.keyCode))))(this.onSpace,this,this.disposables)}if((o.findWidgetEnabled??1)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new P(this,this.model,this.view,g,o.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=b.Jh.None,this.onDidChangeFindMatchType=b.Jh.None;o.enableStickyScroll&&(this.stickyScrollController=new W(this,this.model,this.view,this.renderers,this.treeDelegate,o),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,r.li)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}updateOptions(e={}){this._options={...this._options,...e};for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new W(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=b.Jh.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t),(0,S.Et)(t)&&this.findController?.layout(t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const n=e.treeStickyScrollBackground??e.listBackground;n&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${n}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${n}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const s=(0,r.gI)(e.listFocusAndSelectionOutline,(0,r.gI)(e.listSelectionOutline,e.listFocusOutline??""));s&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}))}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}))}focusNext(e=1,t=!1,i,n=((0,r.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=((0,r.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=((0,r.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=((0,r.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusPreviousPage(e,t,(()=>this.stickyScrollController?.height??0))}focusLast(e,t=((0,r.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusLast(e,t)}focusFirst(e,t=((0,r.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(-1!==i)if(this.stickyScrollController){const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}else this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){(0,C.AS)(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose()}}},64476:function(e,t,i){"use strict";i.d(t,{G6:function(){return g},Mn:function(){return h},iZ:function(){return d}});var n=i(37345),s=i(97358),o=i(90890),r=i(4691),a=i(72491),l=i(80670),c=i(26182);function d(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function h(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function u(e){return"boolean"==typeof e.collapsible}class g{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new l.at,this._onDidChangeCollapseState=new l.vl,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new l.vl,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new l.vl,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new o.ve(r.h),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.allowNonCollapsibleParents=n.allowNonCollapsibleParents??!1,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=c.f.empty(),s={}){if(0===e.length)throw new n.jh(this.user,"Invalid tree location");s.diffIdentityProvider?this.spliceSmart(s.diffIdentityProvider,e,t,i,s):this.spliceSimple(e,t,i,s)}spliceSmart(e,t,i,n=c.f.empty(),s,o=s.diffDepth??0){const{parentNode:r}=this.getParentNodeWithListIndex(t);if(!r.lastDiffIds)return this.spliceSimple(t,i,n,s);const l=[...n],d=t[t.length-1],h=new a.uP({getElements:()=>r.lastDiffIds},{getElements:()=>[...r.children.slice(0,d),...l,...r.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(h.quitEarly)return r.lastDiffIds=void 0,this.spliceSimple(t,i,l,s);const u=t.slice(0,-1),g=(t,i,n)=>{if(o>0)for(let r=0;rt.originalStart-e.originalStart)))g(p,f,p-(e.originalStart+e.originalLength)),p=e.originalStart,f=e.modifiedStart-d,this.spliceSimple([...u,p],e.originalLength,c.f.slice(l,f,f+e.modifiedLength),s);g(p,f,p)}spliceSimple(e,t,i=c.f.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:r}){const{parentNode:a,listIndex:l,revealed:d,visible:h}=this.getParentNodeWithListIndex(e),u=[],g=c.f.map(i,(e=>this.createTreeNode(e,a,a.visible?1:0,d,u,n))),p=e[e.length-1];let f=0;for(let e=p;e>=0&&er.getId(e.element).toString()))):a.lastDiffIds=a.children.map((e=>r.getId(e.element).toString())):a.lastDiffIds=void 0;let w=0;for(const e of b)e.visible&&w++;if(0!==w)for(let e=p+m.length;ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(a,v-e),this.list.splice(l,e,u)}if(b.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};b.forEach(e)}this._onDidSplice.fire({insertedNodes:m,deletedNodes:b});let C=a;for(;C;){if(2===C.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}C=C.parent}}rerender(e){if(0===e.length)throw new n.jh(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:s}=this.getTreeNodeWithListIndex(e);t.visible&&s&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,s)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),o=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&o&&!u(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return o}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const o=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=o-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(u(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!u(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,s,o){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&s.push(r);const l=e.children||c.f.empty(),d=n&&0!==a&&!r.collapsed;let h=0,u=1;for(const e of l){const t=this.createTreeNode(e,r,a,d,s,o);r.children.push(t),u+=t.renderNodeCount,t.visible&&(t.visibleChildIndex=h++)}return this.allowNonCollapsibleParents||(r.collapsible=r.collapsible||r.children.length>0),r.visibleChildrenCount=h,r.visible=2===a?h>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=u):(r.renderNodeCount=0,n&&s.pop()),o?.(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),0===s)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const o=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===s)e.visibleChildrenCount=0;else{let t=0;for(const o of e.children)r=this._updateNodeAfterFilterChange(o,s,i,n&&!e.collapsed)||r,o.visible&&(o.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===s?r:1===s,e.visibility=s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-o):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):d(i)?(e.filterData=i.data,h(i.visibility)):(e.filterData=void 0,h(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...s]=e;if(i<0||i>t.children.length)throw new n.jh(this.user,"Invalid tree location");return this.getTreeNode(s,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:s,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new n.jh(this.user,"Invalid tree location");const a=t.children[r];return{node:a,listIndex:i,revealed:s,visible:o&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,s=!0,o=!0){const[r,...a]=e;if(r<0||r>t.children.length)throw new n.jh(this.user,"Invalid tree location");for(let e=0;et(new o.P(n.zk(e),i)))))}onmousedown(e,t){this._register(n.ko(e,n.Bx.MOUSE_DOWN,(i=>t(new o.P(n.zk(e),i)))))}onmouseover(e,t){this._register(n.ko(e,n.Bx.MOUSE_OVER,(i=>t(new o.P(n.zk(e),i)))))}onmouseleave(e,t){this._register(n.ko(e,n.Bx.MOUSE_LEAVE,(i=>t(new o.P(n.zk(e),i)))))}onkeydown(e,t){this._register(n.ko(e,n.Bx.KEY_DOWN,(e=>t(new s.Z(e)))))}onkeyup(e,t){this._register(n.ko(e,n.Bx.KEY_UP,(e=>t(new s.Z(e)))))}oninput(e,t){this._register(n.ko(e,n.Bx.INPUT,t))}onblur(e,t){this._register(n.ko(e,n.Bx.BLUR,t))}onfocus(e,t){this._register(n.ko(e,n.Bx.FOCUS,t))}ignoreGesture(e){return r.q.ignoreTarget(e)}}},95601:function(e,t,i){"use strict";function n(e,t){const i=e;"number"!=typeof i.vscodeWindowId&&Object.defineProperty(i,"vscodeWindowId",{get:()=>t})}i.d(t,{G:function(){return s},y:function(){return n}});const s=window},30981:function(e,t,i){"use strict";i.d(t,{HJ:function(){return d},LN:function(){return a},YH:function(){return c},ih:function(){return h},rc:function(){return r},wv:function(){return l}});var n=i(80670),s=i(35114),o=i(14374);class r extends s.jG{constructor(e,t="",i="",s=!0,o){super(),this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=s,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}}class a extends s.jG{constructor(){super(...arguments),this._onWillRun=this._register(new n.vl),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new n.vl),this.onDidRun=this._onDidRun.event}async run(e,t){if(!e.enabled)return;let i;this._onWillRun.fire({action:e});try{await this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}async runAction(e,t){await e.run(t)}}class l{constructor(){this.id=l.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(const i of e)i.length&&(t=t.length?[...t,new l,...i]:i);return t}static{this.ID="vs.actions.separator"}async run(){}}class c{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}async run(){}}class d extends r{static{this.ID="vs.actions.empty"}constructor(){super(d.ID,o.kg("submenu.empty","(empty)"),void 0,!1)}}function h(e){return{id:e.id,label:e.label,tooltip:e.tooltip??e.label,class:e.class,enabled:e.enabled??!0,checked:e.checked,run:async(...t)=>e.run(...t)}}},97358:function(e,t,i){"use strict";function n(e,t=0){return e[e.length-(1+t)]}function s(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function o(e,t,i=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n0))return n;o=n-1}}return-(s+1)}(e.length)}function l(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],s=[],o=[],r=[];for(const e of t){const t=i(e,n);t<0?s.push(e):t>0?o.push(e):r.push(e)}return e!!e))}function p(e){let t=0;for(let i=0;i0}function _(e,t=e=>e){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function v(e,t){return e.length>0?e[0]:t}function b(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function w(e,t,i){const n=e.slice(0,t),s=e.slice(t);return n.concat(i,s)}function C(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function S(e,t){for(const i of t)e.push(i)}function k(e){return Array.isArray(e)?e:[e]}function x(e,t,i,n){const s=L(e,t);let o=e.splice(s,i);return void 0===o&&(o=[]),function(e,t,i){const n=L(e,t),s=e.length,o=i.length;e.length=s+o;for(let t=s-1;t>=n;t--)e[t+o]=e[t];for(let t=0;tt(e(i),e(n))}function N(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!D.isNeitherLessOrGreaterThan(e))return e}return D.neitherLessOrGreaterThan}}i.d(t,{$z:function(){return c},Ct:function(){return f},E4:function(){return S},EI:function(){return m},El:function(){return a},Fy:function(){return v},Hw:function(){return T},RT:function(){return n},SK:function(){return p},SO:function(){return l},TS:function(){return M},U9:function(){return I},UH:function(){return r},V4:function(){return x},VE:function(){return E},Yc:function(){return g},_A:function(){return C},_j:function(){return k},aI:function(){return o},bS:function(){return s},c1:function(){return P},dM:function(){return _},j3:function(){return R},kj:function(){return u},n:function(){return d},nH:function(){return N},nK:function(){return w},pN:function(){return h},r7:function(){return y},t9:function(){return A},y1:function(){return b}}),function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(D||(D={}));const I=(e,t)=>e-t,M=(e,t)=>I(e?1:0,t?1:0);function T(e){return(t,i)=>-e(t,i)}class R{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class P{static{this.empty=new P((e=>{}))}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new P((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new P((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||D.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}class A{constructor(e){this._indexMap=e}static createSortPermutation(e,t){const i=Array.from(e.keys()).sort(((i,n)=>t(e[i],e[n])));return new A(i)}apply(e){return e.map(((t,i)=>e[this._indexMap[i]]))}inverse(){const e=this._indexMap.slice();for(let t=0;t=0;n--)if(t(e[n]))return n;return-1}(e,t);if(-1!==i)return e[i]}function s(e,t){const i=o(e,t);return-1===i?void 0:e[i]}function o(e,t,i=0,n=e.length){let s=i,o=n;for(;s0&&(i=s)}return i}function d(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=s)}return i}function h(e,t){return c(e,((e,i)=>-t(e,i)))}function u(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n0&&(i=n);return i}function g(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}},93066:function(e,t,i){"use strict";i.d(t,{Ft:function(){return a},V7:function(){return r},Xo:function(){return l},ok:function(){return s},xb:function(){return o}});var n=i(20187);function s(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function o(e,t="Unreachable"){throw new Error(t)}function r(e){e||(0,n.dz)(new n.D7("Soft Assertion Failed"))}function a(e){e()||(e(),(0,n.dz)(new n.D7("Assertion Failed")))}function l(e,t){let i=0;for(;i{const o=t.token.onCancellationRequested((()=>{o.dispose(),n(new s.AL)}));Promise.resolve(i).then((i=>{o.dispose(),t.dispose(),e(i)}),(e=>{o.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel(),t.dispose()}then(e,t){return o.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return o.finally(e)}}}function h(e,t,i){return new Promise(((n,s)=>{const o=t.onCancellationRequested((()=>{o.dispose(),n(i)}));e.then(n,s).finally((()=>o.dispose()))}))}class u{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}class g{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=t===l.h?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new s.AL),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}class p{constructor(e){this.delayer=new g(e),this.throttler=new u}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function f(e,t){return t?new Promise(((i,n)=>{const o=setTimeout((()=>{r.dispose(),i()}),e),r=t.onCancellationRequested((()=>{clearTimeout(o),r.dispose(),n(new s.AL)}))})):d((t=>f(e,t)))}function m(e,t=0,i){const n=setTimeout((()=>{e(),i&&s.dispose()}),t),s=(0,r.s)((()=>{clearTimeout(n),i?.deleteAndLeak(s)}));return i?.add(s),s}function _(e,t=e=>!!e,i=null){let n=0;const s=e.length,o=()=>{if(n>=s)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):o()))};return o()}class v{constructor(e,t){this._isDisposed=!1,this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new s.D7("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){if(this._isDisposed)throw new s.D7("Calling 'setIfNotSet' on a disposed TimeoutTimer");-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class b{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new s.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const n=i.setInterval((()=>{e()}),t);this.disposable=(0,r.s)((()=>{i.clearInterval(n),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class w{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}let C,y;y="function"!=typeof globalThis.requestIdleCallback||"function"!=typeof globalThis.cancelIdleCallback?(e,t)=>{(0,a._p)((()=>{if(i)return;const e=Date.now()+15,n={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(n))}));let i=!1;return{dispose(){i||(i=!0)}}}:(e,t,i)=>{const n=e.requestIdleCallback(t,"number"==typeof i?{timeout:i}:void 0);let s=!1;return{dispose(){s||(s=!0,e.cancelIdleCallback(n))}}},C=e=>y(globalThis,e);class S{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=y(e,(()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class k extends S{constructor(e){super(globalThis,e)}}class x{get isRejected(){return 1===this.outcome?.outcome}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new s.AL)}}var L;!function(e){e.settled=async function(e){let t;const i=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i},e.withAsyncBody=function(e){return new Promise((async(t,i)=>{try{await e(t,i)}catch(e){i(e)}}))}}(L||(L={}));class D{static fromArray(e){return new D((t=>{t.emitMany(e)}))}static fromPromise(e){return new D((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new D((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new D((async t=>{await Promise.all(e.map((async e=>{for await(const i of e)t.emitOne(i)})))}))}static{this.EMPTY=D.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new o.vl,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new D((async i=>{for await(const n of e)i.emitOne(t(n))}))}map(e){return D.map(this,e)}static filter(e,t){return new D((async i=>{for await(const n of e)t(n)&&i.emitOne(n)}))}filter(e){return D.filter(this,e)}static coalesce(e){return D.filter(e,(e=>!!e))}coalesce(){return D.coalesce(this)}static async toPromise(e){const t=[];for await(const i of e)t.push(i);return t}toPromise(){return D.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}class E extends D{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function N(e){const t=new n.Qi,i=e(t.token);return new E(t,(async e=>{const n=t.token.onCancellationRequested((()=>{n.dispose(),t.dispose(),e.reject(new s.AL)}));try{for await(const n of i){if(t.token.isCancellationRequested)return;e.emitOne(n)}n.dispose(),t.dispose()}catch(i){n.dispose(),t.dispose(),e.reject(i)}}))}},28198:function(e,t,i){"use strict";i.d(t,{$l:function(){return a},Gs:function(){return u},MB:function(){return r},Sw:function(){return d},bb:function(){return c},gN:function(){return l},pJ:function(){return h}});var n=i(72582);const s="undefined"!=typeof Buffer;let o;new n.d((()=>new Uint8Array(256)));class r{static wrap(e){return s&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new r(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return s?this.buffer.toString():(o||(o=new TextDecoder),o.decode(this.buffer))}}function a(e,t){return(0|e[t+0])>>>0|e[t+1]<<8>>>0}function l(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function c(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function d(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function h(e,t){return e[t]}function u(e,t,i){e[i]=t}},44808:function(e,t,i){"use strict";function n(e){return e}i.d(t,{VV:function(){return o},o5:function(){return s}});class s{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof e?(this._fn=e,this._computeKey=n):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}class o{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"==typeof e?(this._fn=e,this._computeKey=n):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const i=this._fn(e);return this._map.set(e,i),this._map2.set(t,i),i}}},76611:function(e,t,i){"use strict";i.d(t,{Qi:function(){return a},XO:function(){return o},bs:function(){return l}});var n=i(80670);const s=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var o;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof r||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Jh.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s})}(o||(o={}));class r{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new n.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=o.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=o.None}}function l(e){const t=new a;return e.add({dispose(){t.cancel()}}),t.token}},93231:function(e,t,i){"use strict";i.d(t,{W:function(){return s}});var n=i(81040);const s={add:(0,n.k)("add",6e4),plus:(0,n.k)("plus",6e4),gistNew:(0,n.k)("gist-new",6e4),repoCreate:(0,n.k)("repo-create",6e4),lightbulb:(0,n.k)("lightbulb",60001),lightBulb:(0,n.k)("light-bulb",60001),repo:(0,n.k)("repo",60002),repoDelete:(0,n.k)("repo-delete",60002),gistFork:(0,n.k)("gist-fork",60003),repoForked:(0,n.k)("repo-forked",60003),gitPullRequest:(0,n.k)("git-pull-request",60004),gitPullRequestAbandoned:(0,n.k)("git-pull-request-abandoned",60004),recordKeys:(0,n.k)("record-keys",60005),keyboard:(0,n.k)("keyboard",60005),tag:(0,n.k)("tag",60006),gitPullRequestLabel:(0,n.k)("git-pull-request-label",60006),tagAdd:(0,n.k)("tag-add",60006),tagRemove:(0,n.k)("tag-remove",60006),person:(0,n.k)("person",60007),personFollow:(0,n.k)("person-follow",60007),personOutline:(0,n.k)("person-outline",60007),personFilled:(0,n.k)("person-filled",60007),gitBranch:(0,n.k)("git-branch",60008),gitBranchCreate:(0,n.k)("git-branch-create",60008),gitBranchDelete:(0,n.k)("git-branch-delete",60008),sourceControl:(0,n.k)("source-control",60008),mirror:(0,n.k)("mirror",60009),mirrorPublic:(0,n.k)("mirror-public",60009),star:(0,n.k)("star",60010),starAdd:(0,n.k)("star-add",60010),starDelete:(0,n.k)("star-delete",60010),starEmpty:(0,n.k)("star-empty",60010),comment:(0,n.k)("comment",60011),commentAdd:(0,n.k)("comment-add",60011),alert:(0,n.k)("alert",60012),warning:(0,n.k)("warning",60012),search:(0,n.k)("search",60013),searchSave:(0,n.k)("search-save",60013),logOut:(0,n.k)("log-out",60014),signOut:(0,n.k)("sign-out",60014),logIn:(0,n.k)("log-in",60015),signIn:(0,n.k)("sign-in",60015),eye:(0,n.k)("eye",60016),eyeUnwatch:(0,n.k)("eye-unwatch",60016),eyeWatch:(0,n.k)("eye-watch",60016),circleFilled:(0,n.k)("circle-filled",60017),primitiveDot:(0,n.k)("primitive-dot",60017),closeDirty:(0,n.k)("close-dirty",60017),debugBreakpoint:(0,n.k)("debug-breakpoint",60017),debugBreakpointDisabled:(0,n.k)("debug-breakpoint-disabled",60017),debugHint:(0,n.k)("debug-hint",60017),terminalDecorationSuccess:(0,n.k)("terminal-decoration-success",60017),primitiveSquare:(0,n.k)("primitive-square",60018),edit:(0,n.k)("edit",60019),pencil:(0,n.k)("pencil",60019),info:(0,n.k)("info",60020),issueOpened:(0,n.k)("issue-opened",60020),gistPrivate:(0,n.k)("gist-private",60021),gitForkPrivate:(0,n.k)("git-fork-private",60021),lock:(0,n.k)("lock",60021),mirrorPrivate:(0,n.k)("mirror-private",60021),close:(0,n.k)("close",60022),removeClose:(0,n.k)("remove-close",60022),x:(0,n.k)("x",60022),repoSync:(0,n.k)("repo-sync",60023),sync:(0,n.k)("sync",60023),clone:(0,n.k)("clone",60024),desktopDownload:(0,n.k)("desktop-download",60024),beaker:(0,n.k)("beaker",60025),microscope:(0,n.k)("microscope",60025),vm:(0,n.k)("vm",60026),deviceDesktop:(0,n.k)("device-desktop",60026),file:(0,n.k)("file",60027),fileText:(0,n.k)("file-text",60027),more:(0,n.k)("more",60028),ellipsis:(0,n.k)("ellipsis",60028),kebabHorizontal:(0,n.k)("kebab-horizontal",60028),mailReply:(0,n.k)("mail-reply",60029),reply:(0,n.k)("reply",60029),organization:(0,n.k)("organization",60030),organizationFilled:(0,n.k)("organization-filled",60030),organizationOutline:(0,n.k)("organization-outline",60030),newFile:(0,n.k)("new-file",60031),fileAdd:(0,n.k)("file-add",60031),newFolder:(0,n.k)("new-folder",60032),fileDirectoryCreate:(0,n.k)("file-directory-create",60032),trash:(0,n.k)("trash",60033),trashcan:(0,n.k)("trashcan",60033),history:(0,n.k)("history",60034),clock:(0,n.k)("clock",60034),folder:(0,n.k)("folder",60035),fileDirectory:(0,n.k)("file-directory",60035),symbolFolder:(0,n.k)("symbol-folder",60035),logoGithub:(0,n.k)("logo-github",60036),markGithub:(0,n.k)("mark-github",60036),github:(0,n.k)("github",60036),terminal:(0,n.k)("terminal",60037),console:(0,n.k)("console",60037),repl:(0,n.k)("repl",60037),zap:(0,n.k)("zap",60038),symbolEvent:(0,n.k)("symbol-event",60038),error:(0,n.k)("error",60039),stop:(0,n.k)("stop",60039),variable:(0,n.k)("variable",60040),symbolVariable:(0,n.k)("symbol-variable",60040),array:(0,n.k)("array",60042),symbolArray:(0,n.k)("symbol-array",60042),symbolModule:(0,n.k)("symbol-module",60043),symbolPackage:(0,n.k)("symbol-package",60043),symbolNamespace:(0,n.k)("symbol-namespace",60043),symbolObject:(0,n.k)("symbol-object",60043),symbolMethod:(0,n.k)("symbol-method",60044),symbolFunction:(0,n.k)("symbol-function",60044),symbolConstructor:(0,n.k)("symbol-constructor",60044),symbolBoolean:(0,n.k)("symbol-boolean",60047),symbolNull:(0,n.k)("symbol-null",60047),symbolNumeric:(0,n.k)("symbol-numeric",60048),symbolNumber:(0,n.k)("symbol-number",60048),symbolStructure:(0,n.k)("symbol-structure",60049),symbolStruct:(0,n.k)("symbol-struct",60049),symbolParameter:(0,n.k)("symbol-parameter",60050),symbolTypeParameter:(0,n.k)("symbol-type-parameter",60050),symbolKey:(0,n.k)("symbol-key",60051),symbolText:(0,n.k)("symbol-text",60051),symbolReference:(0,n.k)("symbol-reference",60052),goToFile:(0,n.k)("go-to-file",60052),symbolEnum:(0,n.k)("symbol-enum",60053),symbolValue:(0,n.k)("symbol-value",60053),symbolRuler:(0,n.k)("symbol-ruler",60054),symbolUnit:(0,n.k)("symbol-unit",60054),activateBreakpoints:(0,n.k)("activate-breakpoints",60055),archive:(0,n.k)("archive",60056),arrowBoth:(0,n.k)("arrow-both",60057),arrowDown:(0,n.k)("arrow-down",60058),arrowLeft:(0,n.k)("arrow-left",60059),arrowRight:(0,n.k)("arrow-right",60060),arrowSmallDown:(0,n.k)("arrow-small-down",60061),arrowSmallLeft:(0,n.k)("arrow-small-left",60062),arrowSmallRight:(0,n.k)("arrow-small-right",60063),arrowSmallUp:(0,n.k)("arrow-small-up",60064),arrowUp:(0,n.k)("arrow-up",60065),bell:(0,n.k)("bell",60066),bold:(0,n.k)("bold",60067),book:(0,n.k)("book",60068),bookmark:(0,n.k)("bookmark",60069),debugBreakpointConditionalUnverified:(0,n.k)("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:(0,n.k)("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:(0,n.k)("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:(0,n.k)("debug-breakpoint-data-unverified",60072),debugBreakpointData:(0,n.k)("debug-breakpoint-data",60073),debugBreakpointDataDisabled:(0,n.k)("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:(0,n.k)("debug-breakpoint-log-unverified",60074),debugBreakpointLog:(0,n.k)("debug-breakpoint-log",60075),debugBreakpointLogDisabled:(0,n.k)("debug-breakpoint-log-disabled",60075),briefcase:(0,n.k)("briefcase",60076),broadcast:(0,n.k)("broadcast",60077),browser:(0,n.k)("browser",60078),bug:(0,n.k)("bug",60079),calendar:(0,n.k)("calendar",60080),caseSensitive:(0,n.k)("case-sensitive",60081),check:(0,n.k)("check",60082),checklist:(0,n.k)("checklist",60083),chevronDown:(0,n.k)("chevron-down",60084),chevronLeft:(0,n.k)("chevron-left",60085),chevronRight:(0,n.k)("chevron-right",60086),chevronUp:(0,n.k)("chevron-up",60087),chromeClose:(0,n.k)("chrome-close",60088),chromeMaximize:(0,n.k)("chrome-maximize",60089),chromeMinimize:(0,n.k)("chrome-minimize",60090),chromeRestore:(0,n.k)("chrome-restore",60091),circleOutline:(0,n.k)("circle-outline",60092),circle:(0,n.k)("circle",60092),debugBreakpointUnverified:(0,n.k)("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:(0,n.k)("terminal-decoration-incomplete",60092),circleSlash:(0,n.k)("circle-slash",60093),circuitBoard:(0,n.k)("circuit-board",60094),clearAll:(0,n.k)("clear-all",60095),clippy:(0,n.k)("clippy",60096),closeAll:(0,n.k)("close-all",60097),cloudDownload:(0,n.k)("cloud-download",60098),cloudUpload:(0,n.k)("cloud-upload",60099),code:(0,n.k)("code",60100),collapseAll:(0,n.k)("collapse-all",60101),colorMode:(0,n.k)("color-mode",60102),commentDiscussion:(0,n.k)("comment-discussion",60103),creditCard:(0,n.k)("credit-card",60105),dash:(0,n.k)("dash",60108),dashboard:(0,n.k)("dashboard",60109),database:(0,n.k)("database",60110),debugContinue:(0,n.k)("debug-continue",60111),debugDisconnect:(0,n.k)("debug-disconnect",60112),debugPause:(0,n.k)("debug-pause",60113),debugRestart:(0,n.k)("debug-restart",60114),debugStart:(0,n.k)("debug-start",60115),debugStepInto:(0,n.k)("debug-step-into",60116),debugStepOut:(0,n.k)("debug-step-out",60117),debugStepOver:(0,n.k)("debug-step-over",60118),debugStop:(0,n.k)("debug-stop",60119),debug:(0,n.k)("debug",60120),deviceCameraVideo:(0,n.k)("device-camera-video",60121),deviceCamera:(0,n.k)("device-camera",60122),deviceMobile:(0,n.k)("device-mobile",60123),diffAdded:(0,n.k)("diff-added",60124),diffIgnored:(0,n.k)("diff-ignored",60125),diffModified:(0,n.k)("diff-modified",60126),diffRemoved:(0,n.k)("diff-removed",60127),diffRenamed:(0,n.k)("diff-renamed",60128),diff:(0,n.k)("diff",60129),diffSidebyside:(0,n.k)("diff-sidebyside",60129),discard:(0,n.k)("discard",60130),editorLayout:(0,n.k)("editor-layout",60131),emptyWindow:(0,n.k)("empty-window",60132),exclude:(0,n.k)("exclude",60133),extensions:(0,n.k)("extensions",60134),eyeClosed:(0,n.k)("eye-closed",60135),fileBinary:(0,n.k)("file-binary",60136),fileCode:(0,n.k)("file-code",60137),fileMedia:(0,n.k)("file-media",60138),filePdf:(0,n.k)("file-pdf",60139),fileSubmodule:(0,n.k)("file-submodule",60140),fileSymlinkDirectory:(0,n.k)("file-symlink-directory",60141),fileSymlinkFile:(0,n.k)("file-symlink-file",60142),fileZip:(0,n.k)("file-zip",60143),files:(0,n.k)("files",60144),filter:(0,n.k)("filter",60145),flame:(0,n.k)("flame",60146),foldDown:(0,n.k)("fold-down",60147),foldUp:(0,n.k)("fold-up",60148),fold:(0,n.k)("fold",60149),folderActive:(0,n.k)("folder-active",60150),folderOpened:(0,n.k)("folder-opened",60151),gear:(0,n.k)("gear",60152),gift:(0,n.k)("gift",60153),gistSecret:(0,n.k)("gist-secret",60154),gist:(0,n.k)("gist",60155),gitCommit:(0,n.k)("git-commit",60156),gitCompare:(0,n.k)("git-compare",60157),compareChanges:(0,n.k)("compare-changes",60157),gitMerge:(0,n.k)("git-merge",60158),githubAction:(0,n.k)("github-action",60159),githubAlt:(0,n.k)("github-alt",60160),globe:(0,n.k)("globe",60161),grabber:(0,n.k)("grabber",60162),graph:(0,n.k)("graph",60163),gripper:(0,n.k)("gripper",60164),heart:(0,n.k)("heart",60165),home:(0,n.k)("home",60166),horizontalRule:(0,n.k)("horizontal-rule",60167),hubot:(0,n.k)("hubot",60168),inbox:(0,n.k)("inbox",60169),issueReopened:(0,n.k)("issue-reopened",60171),issues:(0,n.k)("issues",60172),italic:(0,n.k)("italic",60173),jersey:(0,n.k)("jersey",60174),json:(0,n.k)("json",60175),kebabVertical:(0,n.k)("kebab-vertical",60176),key:(0,n.k)("key",60177),law:(0,n.k)("law",60178),lightbulbAutofix:(0,n.k)("lightbulb-autofix",60179),linkExternal:(0,n.k)("link-external",60180),link:(0,n.k)("link",60181),listOrdered:(0,n.k)("list-ordered",60182),listUnordered:(0,n.k)("list-unordered",60183),liveShare:(0,n.k)("live-share",60184),loading:(0,n.k)("loading",60185),location:(0,n.k)("location",60186),mailRead:(0,n.k)("mail-read",60187),mail:(0,n.k)("mail",60188),markdown:(0,n.k)("markdown",60189),megaphone:(0,n.k)("megaphone",60190),mention:(0,n.k)("mention",60191),milestone:(0,n.k)("milestone",60192),gitPullRequestMilestone:(0,n.k)("git-pull-request-milestone",60192),mortarBoard:(0,n.k)("mortar-board",60193),move:(0,n.k)("move",60194),multipleWindows:(0,n.k)("multiple-windows",60195),mute:(0,n.k)("mute",60196),noNewline:(0,n.k)("no-newline",60197),note:(0,n.k)("note",60198),octoface:(0,n.k)("octoface",60199),openPreview:(0,n.k)("open-preview",60200),package:(0,n.k)("package",60201),paintcan:(0,n.k)("paintcan",60202),pin:(0,n.k)("pin",60203),play:(0,n.k)("play",60204),run:(0,n.k)("run",60204),plug:(0,n.k)("plug",60205),preserveCase:(0,n.k)("preserve-case",60206),preview:(0,n.k)("preview",60207),project:(0,n.k)("project",60208),pulse:(0,n.k)("pulse",60209),question:(0,n.k)("question",60210),quote:(0,n.k)("quote",60211),radioTower:(0,n.k)("radio-tower",60212),reactions:(0,n.k)("reactions",60213),references:(0,n.k)("references",60214),refresh:(0,n.k)("refresh",60215),regex:(0,n.k)("regex",60216),remoteExplorer:(0,n.k)("remote-explorer",60217),remote:(0,n.k)("remote",60218),remove:(0,n.k)("remove",60219),replaceAll:(0,n.k)("replace-all",60220),replace:(0,n.k)("replace",60221),repoClone:(0,n.k)("repo-clone",60222),repoForcePush:(0,n.k)("repo-force-push",60223),repoPull:(0,n.k)("repo-pull",60224),repoPush:(0,n.k)("repo-push",60225),report:(0,n.k)("report",60226),requestChanges:(0,n.k)("request-changes",60227),rocket:(0,n.k)("rocket",60228),rootFolderOpened:(0,n.k)("root-folder-opened",60229),rootFolder:(0,n.k)("root-folder",60230),rss:(0,n.k)("rss",60231),ruby:(0,n.k)("ruby",60232),saveAll:(0,n.k)("save-all",60233),saveAs:(0,n.k)("save-as",60234),save:(0,n.k)("save",60235),screenFull:(0,n.k)("screen-full",60236),screenNormal:(0,n.k)("screen-normal",60237),searchStop:(0,n.k)("search-stop",60238),server:(0,n.k)("server",60240),settingsGear:(0,n.k)("settings-gear",60241),settings:(0,n.k)("settings",60242),shield:(0,n.k)("shield",60243),smiley:(0,n.k)("smiley",60244),sortPrecedence:(0,n.k)("sort-precedence",60245),splitHorizontal:(0,n.k)("split-horizontal",60246),splitVertical:(0,n.k)("split-vertical",60247),squirrel:(0,n.k)("squirrel",60248),starFull:(0,n.k)("star-full",60249),starHalf:(0,n.k)("star-half",60250),symbolClass:(0,n.k)("symbol-class",60251),symbolColor:(0,n.k)("symbol-color",60252),symbolConstant:(0,n.k)("symbol-constant",60253),symbolEnumMember:(0,n.k)("symbol-enum-member",60254),symbolField:(0,n.k)("symbol-field",60255),symbolFile:(0,n.k)("symbol-file",60256),symbolInterface:(0,n.k)("symbol-interface",60257),symbolKeyword:(0,n.k)("symbol-keyword",60258),symbolMisc:(0,n.k)("symbol-misc",60259),symbolOperator:(0,n.k)("symbol-operator",60260),symbolProperty:(0,n.k)("symbol-property",60261),wrench:(0,n.k)("wrench",60261),wrenchSubaction:(0,n.k)("wrench-subaction",60261),symbolSnippet:(0,n.k)("symbol-snippet",60262),tasklist:(0,n.k)("tasklist",60263),telescope:(0,n.k)("telescope",60264),textSize:(0,n.k)("text-size",60265),threeBars:(0,n.k)("three-bars",60266),thumbsdown:(0,n.k)("thumbsdown",60267),thumbsup:(0,n.k)("thumbsup",60268),tools:(0,n.k)("tools",60269),triangleDown:(0,n.k)("triangle-down",60270),triangleLeft:(0,n.k)("triangle-left",60271),triangleRight:(0,n.k)("triangle-right",60272),triangleUp:(0,n.k)("triangle-up",60273),twitter:(0,n.k)("twitter",60274),unfold:(0,n.k)("unfold",60275),unlock:(0,n.k)("unlock",60276),unmute:(0,n.k)("unmute",60277),unverified:(0,n.k)("unverified",60278),verified:(0,n.k)("verified",60279),versions:(0,n.k)("versions",60280),vmActive:(0,n.k)("vm-active",60281),vmOutline:(0,n.k)("vm-outline",60282),vmRunning:(0,n.k)("vm-running",60283),watch:(0,n.k)("watch",60284),whitespace:(0,n.k)("whitespace",60285),wholeWord:(0,n.k)("whole-word",60286),window:(0,n.k)("window",60287),wordWrap:(0,n.k)("word-wrap",60288),zoomIn:(0,n.k)("zoom-in",60289),zoomOut:(0,n.k)("zoom-out",60290),listFilter:(0,n.k)("list-filter",60291),listFlat:(0,n.k)("list-flat",60292),listSelection:(0,n.k)("list-selection",60293),selection:(0,n.k)("selection",60293),listTree:(0,n.k)("list-tree",60294),debugBreakpointFunctionUnverified:(0,n.k)("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:(0,n.k)("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:(0,n.k)("debug-breakpoint-function-disabled",60296),debugStackframeActive:(0,n.k)("debug-stackframe-active",60297),circleSmallFilled:(0,n.k)("circle-small-filled",60298),debugStackframeDot:(0,n.k)("debug-stackframe-dot",60298),terminalDecorationMark:(0,n.k)("terminal-decoration-mark",60298),debugStackframe:(0,n.k)("debug-stackframe",60299),debugStackframeFocused:(0,n.k)("debug-stackframe-focused",60299),debugBreakpointUnsupported:(0,n.k)("debug-breakpoint-unsupported",60300),symbolString:(0,n.k)("symbol-string",60301),debugReverseContinue:(0,n.k)("debug-reverse-continue",60302),debugStepBack:(0,n.k)("debug-step-back",60303),debugRestartFrame:(0,n.k)("debug-restart-frame",60304),debugAlt:(0,n.k)("debug-alt",60305),callIncoming:(0,n.k)("call-incoming",60306),callOutgoing:(0,n.k)("call-outgoing",60307),menu:(0,n.k)("menu",60308),expandAll:(0,n.k)("expand-all",60309),feedback:(0,n.k)("feedback",60310),gitPullRequestReviewer:(0,n.k)("git-pull-request-reviewer",60310),groupByRefType:(0,n.k)("group-by-ref-type",60311),ungroupByRefType:(0,n.k)("ungroup-by-ref-type",60312),account:(0,n.k)("account",60313),gitPullRequestAssignee:(0,n.k)("git-pull-request-assignee",60313),bellDot:(0,n.k)("bell-dot",60314),debugConsole:(0,n.k)("debug-console",60315),library:(0,n.k)("library",60316),output:(0,n.k)("output",60317),runAll:(0,n.k)("run-all",60318),syncIgnored:(0,n.k)("sync-ignored",60319),pinned:(0,n.k)("pinned",60320),githubInverted:(0,n.k)("github-inverted",60321),serverProcess:(0,n.k)("server-process",60322),serverEnvironment:(0,n.k)("server-environment",60323),pass:(0,n.k)("pass",60324),issueClosed:(0,n.k)("issue-closed",60324),stopCircle:(0,n.k)("stop-circle",60325),playCircle:(0,n.k)("play-circle",60326),record:(0,n.k)("record",60327),debugAltSmall:(0,n.k)("debug-alt-small",60328),vmConnect:(0,n.k)("vm-connect",60329),cloud:(0,n.k)("cloud",60330),merge:(0,n.k)("merge",60331),export:(0,n.k)("export",60332),graphLeft:(0,n.k)("graph-left",60333),magnet:(0,n.k)("magnet",60334),notebook:(0,n.k)("notebook",60335),redo:(0,n.k)("redo",60336),checkAll:(0,n.k)("check-all",60337),pinnedDirty:(0,n.k)("pinned-dirty",60338),passFilled:(0,n.k)("pass-filled",60339),circleLargeFilled:(0,n.k)("circle-large-filled",60340),circleLarge:(0,n.k)("circle-large",60341),circleLargeOutline:(0,n.k)("circle-large-outline",60341),combine:(0,n.k)("combine",60342),gather:(0,n.k)("gather",60342),table:(0,n.k)("table",60343),variableGroup:(0,n.k)("variable-group",60344),typeHierarchy:(0,n.k)("type-hierarchy",60345),typeHierarchySub:(0,n.k)("type-hierarchy-sub",60346),typeHierarchySuper:(0,n.k)("type-hierarchy-super",60347),gitPullRequestCreate:(0,n.k)("git-pull-request-create",60348),runAbove:(0,n.k)("run-above",60349),runBelow:(0,n.k)("run-below",60350),notebookTemplate:(0,n.k)("notebook-template",60351),debugRerun:(0,n.k)("debug-rerun",60352),workspaceTrusted:(0,n.k)("workspace-trusted",60353),workspaceUntrusted:(0,n.k)("workspace-untrusted",60354),workspaceUnknown:(0,n.k)("workspace-unknown",60355),terminalCmd:(0,n.k)("terminal-cmd",60356),terminalDebian:(0,n.k)("terminal-debian",60357),terminalLinux:(0,n.k)("terminal-linux",60358),terminalPowershell:(0,n.k)("terminal-powershell",60359),terminalTmux:(0,n.k)("terminal-tmux",60360),terminalUbuntu:(0,n.k)("terminal-ubuntu",60361),terminalBash:(0,n.k)("terminal-bash",60362),arrowSwap:(0,n.k)("arrow-swap",60363),copy:(0,n.k)("copy",60364),personAdd:(0,n.k)("person-add",60365),filterFilled:(0,n.k)("filter-filled",60366),wand:(0,n.k)("wand",60367),debugLineByLine:(0,n.k)("debug-line-by-line",60368),inspect:(0,n.k)("inspect",60369),layers:(0,n.k)("layers",60370),layersDot:(0,n.k)("layers-dot",60371),layersActive:(0,n.k)("layers-active",60372),compass:(0,n.k)("compass",60373),compassDot:(0,n.k)("compass-dot",60374),compassActive:(0,n.k)("compass-active",60375),azure:(0,n.k)("azure",60376),issueDraft:(0,n.k)("issue-draft",60377),gitPullRequestClosed:(0,n.k)("git-pull-request-closed",60378),gitPullRequestDraft:(0,n.k)("git-pull-request-draft",60379),debugAll:(0,n.k)("debug-all",60380),debugCoverage:(0,n.k)("debug-coverage",60381),runErrors:(0,n.k)("run-errors",60382),folderLibrary:(0,n.k)("folder-library",60383),debugContinueSmall:(0,n.k)("debug-continue-small",60384),beakerStop:(0,n.k)("beaker-stop",60385),graphLine:(0,n.k)("graph-line",60386),graphScatter:(0,n.k)("graph-scatter",60387),pieChart:(0,n.k)("pie-chart",60388),bracket:(0,n.k)("bracket",60175),bracketDot:(0,n.k)("bracket-dot",60389),bracketError:(0,n.k)("bracket-error",60390),lockSmall:(0,n.k)("lock-small",60391),azureDevops:(0,n.k)("azure-devops",60392),verifiedFilled:(0,n.k)("verified-filled",60393),newline:(0,n.k)("newline",60394),layout:(0,n.k)("layout",60395),layoutActivitybarLeft:(0,n.k)("layout-activitybar-left",60396),layoutActivitybarRight:(0,n.k)("layout-activitybar-right",60397),layoutPanelLeft:(0,n.k)("layout-panel-left",60398),layoutPanelCenter:(0,n.k)("layout-panel-center",60399),layoutPanelJustify:(0,n.k)("layout-panel-justify",60400),layoutPanelRight:(0,n.k)("layout-panel-right",60401),layoutPanel:(0,n.k)("layout-panel",60402),layoutSidebarLeft:(0,n.k)("layout-sidebar-left",60403),layoutSidebarRight:(0,n.k)("layout-sidebar-right",60404),layoutStatusbar:(0,n.k)("layout-statusbar",60405),layoutMenubar:(0,n.k)("layout-menubar",60406),layoutCentered:(0,n.k)("layout-centered",60407),target:(0,n.k)("target",60408),indent:(0,n.k)("indent",60409),recordSmall:(0,n.k)("record-small",60410),errorSmall:(0,n.k)("error-small",60411),terminalDecorationError:(0,n.k)("terminal-decoration-error",60411),arrowCircleDown:(0,n.k)("arrow-circle-down",60412),arrowCircleLeft:(0,n.k)("arrow-circle-left",60413),arrowCircleRight:(0,n.k)("arrow-circle-right",60414),arrowCircleUp:(0,n.k)("arrow-circle-up",60415),layoutSidebarRightOff:(0,n.k)("layout-sidebar-right-off",60416),layoutPanelOff:(0,n.k)("layout-panel-off",60417),layoutSidebarLeftOff:(0,n.k)("layout-sidebar-left-off",60418),blank:(0,n.k)("blank",60419),heartFilled:(0,n.k)("heart-filled",60420),map:(0,n.k)("map",60421),mapHorizontal:(0,n.k)("map-horizontal",60421),foldHorizontal:(0,n.k)("fold-horizontal",60421),mapFilled:(0,n.k)("map-filled",60422),mapHorizontalFilled:(0,n.k)("map-horizontal-filled",60422),foldHorizontalFilled:(0,n.k)("fold-horizontal-filled",60422),circleSmall:(0,n.k)("circle-small",60423),bellSlash:(0,n.k)("bell-slash",60424),bellSlashDot:(0,n.k)("bell-slash-dot",60425),commentUnresolved:(0,n.k)("comment-unresolved",60426),gitPullRequestGoToChanges:(0,n.k)("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:(0,n.k)("git-pull-request-new-changes",60428),searchFuzzy:(0,n.k)("search-fuzzy",60429),commentDraft:(0,n.k)("comment-draft",60430),send:(0,n.k)("send",60431),sparkle:(0,n.k)("sparkle",60432),insert:(0,n.k)("insert",60433),mic:(0,n.k)("mic",60434),thumbsdownFilled:(0,n.k)("thumbsdown-filled",60435),thumbsupFilled:(0,n.k)("thumbsup-filled",60436),coffee:(0,n.k)("coffee",60437),snake:(0,n.k)("snake",60438),game:(0,n.k)("game",60439),vr:(0,n.k)("vr",60440),chip:(0,n.k)("chip",60441),piano:(0,n.k)("piano",60442),music:(0,n.k)("music",60443),micFilled:(0,n.k)("mic-filled",60444),repoFetch:(0,n.k)("repo-fetch",60445),copilot:(0,n.k)("copilot",60446),lightbulbSparkle:(0,n.k)("lightbulb-sparkle",60447),robot:(0,n.k)("robot",60448),sparkleFilled:(0,n.k)("sparkle-filled",60449),diffSingle:(0,n.k)("diff-single",60450),diffMultiple:(0,n.k)("diff-multiple",60451),surroundWith:(0,n.k)("surround-with",60452),share:(0,n.k)("share",60453),gitStash:(0,n.k)("git-stash",60454),gitStashApply:(0,n.k)("git-stash-apply",60455),gitStashPop:(0,n.k)("git-stash-pop",60456),vscode:(0,n.k)("vscode",60457),vscodeInsiders:(0,n.k)("vscode-insiders",60458),codeOss:(0,n.k)("code-oss",60459),runCoverage:(0,n.k)("run-coverage",60460),runAllCoverage:(0,n.k)("run-all-coverage",60461),coverage:(0,n.k)("coverage",60462),githubProject:(0,n.k)("github-project",60463),mapVertical:(0,n.k)("map-vertical",60464),foldVertical:(0,n.k)("fold-vertical",60464),mapVerticalFilled:(0,n.k)("map-vertical-filled",60465),foldVerticalFilled:(0,n.k)("fold-vertical-filled",60465),goToSearch:(0,n.k)("go-to-search",60466),percentage:(0,n.k)("percentage",60467),sortPercentage:(0,n.k)("sort-percentage",60467),attach:(0,n.k)("attach",60468),dialogError:(0,n.k)("dialog-error","error"),dialogWarning:(0,n.k)("dialog-warning","warning"),dialogInfo:(0,n.k)("dialog-info","info"),dialogClose:(0,n.k)("dialog-close","close"),treeItemExpanded:(0,n.k)("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:(0,n.k)("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:(0,n.k)("tree-filter-on-type-off","list-selection"),treeFilterClear:(0,n.k)("tree-filter-clear","close"),treeItemLoading:(0,n.k)("tree-item-loading","loading"),menuSelection:(0,n.k)("menu-selection","check"),menuSubmenu:(0,n.k)("menu-submenu","chevron-right"),menuBarMore:(0,n.k)("menubar-more","more"),scrollbarButtonLeft:(0,n.k)("scrollbar-button-left","triangle-left"),scrollbarButtonRight:(0,n.k)("scrollbar-button-right","triangle-right"),scrollbarButtonUp:(0,n.k)("scrollbar-button-up","triangle-up"),scrollbarButtonDown:(0,n.k)("scrollbar-button-down","triangle-down"),toolBarMore:(0,n.k)("toolbar-more","more"),quickInputBack:(0,n.k)("quick-input-back","arrow-left"),dropDownButton:(0,n.k)("drop-down-button",60084),symbolCustomColor:(0,n.k)("symbol-customcolor",60252),exportIcon:(0,n.k)("export",60332),workspaceUnspecified:(0,n.k)("workspace-unspecified",60355),newLine:(0,n.k)("newline",60394),thumbsDownFilled:(0,n.k)("thumbsdown-filled",60435),thumbsUpFilled:(0,n.k)("thumbsup-filled",60436),gitFetch:(0,n.k)("git-fetch",60445),lightbulbSparkleAutofix:(0,n.k)("lightbulb-sparkle-autofix",60447),debugBreakpointPending:(0,n.k)("debug-breakpoint-pending",60377)}},81040:function(e,t,i){"use strict";i.d(t,{J:function(){return r},k:function(){return o}});var n=i(24219);const s=Object.create(null);function o(e,t){if((0,n.Kg)(t)){const i=s[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return s[e]=t,{id:e}}function r(){return s}},34027:function(e,t,i){"use strict";function n(e,t){const i=[],n=[];for(const n of e)t.has(n)||i.push(n);for(const i of t)e.has(i)||n.push(i);return{removed:i,added:n}}function s(e,t){const i=new Set;for(const n of t)e.has(n)&&i.add(n);return i}i.d(t,{E:function(){return s},Z:function(){return n}})},59321:function(e,t,i){"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{$J:function(){return r},Q1:function(){return a},bU:function(){return s},hB:function(){return o}});class s{constructor(e,t,i,s=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class o{constructor(e,t,i,s){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const d=(a+r)/2,h=r-a;if(h>0){switch(c=Math.min(d<=.5?h/(2*d):h/(2-2*d),1),r){case t:l=(i-n)/h+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,c;if(0===i)a=l=c=n;else{const e=n<.5?n*(1+i):n+i-n*i,s=2*n-e;a=o._hue2rgb(s,e,t+1/3),l=o._hue2rgb(s,e,t),c=o._hue2rgb(s,e,t-1/3)}return new s(Math.round(255*a),Math.round(255*l),Math.round(255*c),r)}}class r{constructor(e,t,i,s){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),o=s-Math.min(t,i,n),a=0===s?0:o/s;let l;return l=0===o?0:s===t?((i-n)/o%6+6)%6:s===i?(n-t)/o+2:(t-i)/o+4,new r(Math.round(60*l),a,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[c,d,h]=[0,0,0];return t<60?(c=r,d=a):t<120?(c=a,d=r):t<180?(d=r,h=a):t<240?(d=a,h=r):t<300?(c=a,h=r):t<=360&&(c=r,h=a),c=Math.round(255*(c+l)),d=Math.round(255*(d+l)),h=Math.round(255*(h+l)),new s(c,d,h,o)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof s)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}equals(e){return!!e&&s.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()e,asFile:()=>{},value:"string"==typeof e?e:void 0}}function a(e,t,i){const n={id:(0,o.b)(),name:e,uri:t,data:i};return{asString:async()=>"",asFile:()=>n,value:void 0}}class l{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return s.f.some(this,(([e,t])=>t.asFile()))&&t.push("files"),h(c(e),t)}get(e){return this._entries.get(this.toKey(e))?.[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return c(e)}}function c(e){return e.toLowerCase()}function d(e,t){return h(c(e),t.map(c))}function h(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,s,o]=i;return"*"===o&&t.some((e=>e.startsWith(s+"/")))}const u=Object.freeze({create:e=>(0,n.dM)(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>u.split(e).filter((e=>!e.startsWith("#")))})},95578:function(e,t,i){"use strict";function n(e,t,i){let n=null,s=null;if("function"==typeof i.value?(n="value",s=i.value,0!==s.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",s=i.get),!s)throw new Error("not supported");const o=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:s.apply(this,e)}),this[o]}}i.d(t,{B:function(){return n}})},72491:function(e,t,i){"use strict";i.d(t,{uP:function(){return d},F1:function(){return r}});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var s=i(65260);class o{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class d{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,s,o]=d._getElements(e),[r,a,l]=d._getElements(t);this._hasStrings=o&&l,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(d._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&s>=i&&this.ElementsAreEqual(t,s);)t--,s--;if(e>t||i>s){let o;return i<=s?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new n(e,0,i,s-i+1)]):e<=t?(a.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),o=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===s+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const r=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,s,r,l,o),d=r[0],h=l[0];if(null!==c)return c;if(!o[0]){const r=this.ComputeDiffRecursive(e,d,i,h,o);let a=[];return a=o[0]?[new n(d+1,t-(d+1)+1,h+1,s-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,s,o),this.ConcatenateChanges(r,a)}return[new n(e,t-e+1,i,s-i+1)]}WALKTRACE(e,t,i,s,o,r,a,l,d,h,u,g,p,f,m,_,v,b){let w=null,C=null,y=new c,S=t,k=i,x=p[0]-_[0]-s,L=-1073741824,D=this.m_forwardHistory.length-1;do{const t=x+e;t===S||t=0&&(e=(d=this.m_forwardHistory[D])[0],S=1,k=d.length-1)}while(--D>=-1);if(w=y.getReverseChanges(),b[0]){let e=p[0]+1,t=_[0]+1;if(null!==w&&w.length>0){const i=w[w.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}C=[new n(e,g-e+1,t,m-t+1)]}else{y=new c,S=r,k=a,x=p[0]-_[0]-l,L=1073741824,D=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=x+o;e===S||e=h[e+1]?(f=(u=h[e+1]-1)-x-l,u>L&&y.MarkNextChange(),L=u+1,y.AddOriginalElement(u+1,f+1),x=e+1-o):(f=(u=h[e-1])-x-l,u>L&&y.MarkNextChange(),L=u,y.AddModifiedElement(u+1,f+1),x=e-1-o),D>=0&&(o=(h=this.m_reverseHistory[D])[0],S=1,k=h.length-1)}while(--D>=-1);C=y.getChanges()}return this.ConcatenateChanges(w,C)}ComputeRecursionPoint(e,t,i,s,o,r,a){let c=0,d=0,h=0,u=0,g=0,p=0;e--,i--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const f=t-e+(s-i),m=f+1,_=new Int32Array(m),v=new Int32Array(m),b=s-i,w=t-e,C=e-i,y=t-s,S=(w-b)%2==0;_[b]=e,v[w]=t,a[0]=!1;for(let k=1;k<=f/2+1;k++){let f=0,x=0;h=this.ClipDiagonalBound(b-k,k,b,m),u=this.ClipDiagonalBound(b+k,k,b,m);for(let e=h;e<=u;e+=2){c=e===h||ef+x&&(f=c,x=d),!S&&Math.abs(e-w)<=k-1&&c>=v[e])return o[0]=c,r[0]=d,i<=v[e]&&k<=1448?this.WALKTRACE(b,h,u,C,w,g,p,y,_,v,c,t,o,d,s,r,S,a):null}const L=(f-e+(x-i)-k)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(f,L))return a[0]=!0,o[0]=f,r[0]=x,L>0&&k<=1448?this.WALKTRACE(b,h,u,C,w,g,p,y,_,v,c,t,o,d,s,r,S,a):(e++,i++,[new n(e,t-e+1,i,s-i+1)]);g=this.ClipDiagonalBound(w-k,k,w,m),p=this.ClipDiagonalBound(w+k,k,w,m);for(let n=g;n<=p;n+=2){c=n===g||n=v[n+1]?v[n+1]-1:v[n-1],d=c-(n-w)-y;const l=c;for(;c>e&&d>i&&this.ElementsAreEqual(c,d);)c--,d--;if(v[n]=c,S&&Math.abs(n-b)<=k&&c<=_[n])return o[0]=c,r[0]=d,l>=_[n]&&k<=1448?this.WALKTRACE(b,h,u,C,w,g,p,y,_,v,c,t,o,d,s,r,S,a):null}if(k<=1447){let e=new Int32Array(u-h+2);e[0]=b-h+1,l.Copy2(_,h,e,1,u-h+1),this.m_forwardHistory.push(e),e=new Int32Array(p-g+2),e[0]=w-g+1,l.Copy2(v,g,e,1,p-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,h,u,C,w,g,p,y,_,v,c,t,o,d,s,r,S,a)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,s=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,s=i.modifiedStart+i.modifiedLength}const o=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=d,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const s=e.originalStart;let o=e.originalLength;const r=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(s,o,r,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&ee===t;function o(e=s){return(t,i)=>n.aI(t,i,e)}function r(){return(e,t)=>e.equals(t)}function a(e,t,i){if(void 0!==i){return null==e||null==t?t===e:i(e,t)}{const t=e;return(e,i)=>null==e||null==i?i===e:t(e,i)}}function l(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i1?o.kg("error.moreErrors","{0} ({1} errors in total)",s,i.length):s}if(s.Kg(e))return e;if(e.detail){const i=e.detail;if(i.error)return r(i.error,t);if(i.exception)return r(i.exception,t)}return e.stack?r(e,t):e.message?e.message:o.kg("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}},20187:function(e,t,i){"use strict";i.d(t,{AL:function(){return c},D7:function(){return f},EM:function(){return g},MB:function(){return l},M_:function(){return o},Qg:function(){return h},aD:function(){return d},cU:function(){return r},dz:function(){return s},iH:function(){return u}});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(p.isErrorNoTelemetry(e))throw new p(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function s(e){l(e)||n.onUnexpectedError(e)}function o(e){l(e)||n.onUnexpectedExternalError(e)}function r(e){if(e instanceof Error){const{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack,noTelemetry:p.isErrorNoTelemetry(e)}}return e}const a="Canceled";function l(e){return e instanceof c||e instanceof Error&&e.name===a&&e.message===a}class c extends Error{constructor(){super(a),this.name=this.message}}function d(){const e=new Error(a);return e.name=e.message,e}function h(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class g extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class p extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof p)return e;const t=new p;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class f extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,f.prototype)}}},80670:function(e,t,i){"use strict";i.d(t,{Jh:function(){return n},QT:function(){return w},Qy:function(){return m},Wj:function(){return S},_B:function(){return C},at:function(){return y},fV:function(){return v},uI:function(){return b},vl:function(){return f}});var n,s=i(20187),o=i(96845),r=i(35114),a=i(54409),l=i(43857);!function(e){function t(e){return(t,i=null,n)=>{let s,o=!1;return s=e((e=>{if(!o)return s?s.dispose():o=!0,t.call(i,e)}),null,n),o&&s.dispose(),s}}function i(e,t,i){return s(((i,n=null,s)=>e((e=>i.call(n,t(e))),null,s)),i)}function n(e,t,i){return s(((i,n=null,s)=>e((e=>t(e)&&i.call(n,e)),null,s)),i)}function s(e,t){let i;const n=new f({onWillAddFirstListener(){i=e(n.fire,n)},onDidRemoveLastListener(){i?.dispose()}});return t?.add(n),n.event}function o(e,t,i=100,n=!1,s=!1,o,r){let a,l,c,d,h=0;const u=new f({leakWarningThreshold:o,onWillAddFirstListener(){a=e((e=>{h++,l=t(l,e),n&&!c&&(u.fire(l),l=void 0),d=()=>{const e=l;l=void 0,c=void 0,(!n||h>1)&&u.fire(e),h=0},"number"==typeof i?(clearTimeout(c),c=setTimeout(d,i)):void 0===c&&(c=0,queueMicrotask(d))}))},onWillRemoveListener(){s&&h>0&&d?.()},onDidRemoveLastListener(){d=void 0,a.dispose()}});return r?.add(u),u.event}e.None=()=>r.jG.None,e.defer=function(e,t){return o(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=t,e.onceIf=function(t,i){return e.once(e.filter(t,i))},e.map=i,e.forEach=function(e,t,i){return s(((i,n=null,s)=>e((e=>{t(e),i.call(n,e)}),null,s)),i)},e.filter=n,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>{return s=(0,r.qE)(...e.map((e=>e((e=>t.call(i,e)))))),(o=n)instanceof Array?o.push(s):o&&o.add(s),s;var s,o}},e.reduce=function(e,t,n,s){let o=n;return i(e,(e=>(o=t(o,e),o)),s)},e.debounce=o,e.accumulate=function(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)},e.latch=function(e,t=(e,t)=>e===t,i){let s,o=!0;return n(e,(e=>{const i=o||!t(e,s);return o=!1,s=e,i}),i)},e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[],n){let s=i.slice(),o=e((e=>{s?s.push(e):a.fire(e)}));n&&n.add(o);const r=()=>{s?.forEach((e=>a.fire(e))),s=null},a=new f({onWillAddFirstListener(){o||(o=e((e=>a.fire(e))),n&&n.add(o))},onDidAddFirstListener(){s&&(t?setTimeout(r):r())},onDidRemoveLastListener(){o&&o.dispose(),o=null}});return n&&n.add(a),a.event},e.chain=function(e,t){return(i,n,s)=>{const o=t(new l);return e((function(e){const t=o.evaluate(e);t!==a&&i.call(n,t)}),void 0,s)}};const a=Symbol("HaltChainable");class l{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:a)),this}reduce(e,t){let i=t;return this.steps.push((t=>(i=e(i,t),i))),this}latch(e=(e,t)=>e===t){let t,i=!0;return this.steps.push((n=>{const s=i||!e(n,t);return i=!1,t=n,s?n:a})),this}evaluate(e){for(const t of this.steps)if((e=t(e))===a)break;return e}}e.fromNodeEventEmitter=function(e,t,i=e=>e){const n=(...e)=>s.fire(i(...e)),s=new f({onWillAddFirstListener:()=>e.on(t,n),onDidRemoveLastListener:()=>e.removeListener(t,n)});return s.event},e.fromDOMEventEmitter=function(e,t,i=e=>e){const n=(...e)=>s.fire(i(...e)),s=new f({onWillAddFirstListener:()=>e.addEventListener(t,n),onDidRemoveLastListener:()=>e.removeEventListener(t,n)});return s.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.fromPromise=function(e){const t=new f;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.forward=function(e,t){return e((e=>t.fire(e)))},e.runAndSubscribe=function(e,t,i){return t(i),e((e=>t(e)))};class c{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new f(i),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new c(e,t).emitter.event},e.fromObservableLight=function(e){return(t,i,n)=>{let s=0,o=!1;const a={beginUpdate(){s++},endUpdate(){s--,0===s&&(e.reportChanges(),o&&(o=!1,t.call(i)))},handlePossibleChange(){},handleChange(){o=!0}};e.addObserver(a),e.reportChanges();const l={dispose(){e.removeObserver(a)}};return n instanceof r.Cm?n.add(l):Array.isArray(n)&&n.push(l),l}}}(n||(n={}));class c{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${c._idPool++}`,c.all.add(this)}start(e){this._stopWatch=new l.W,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}class d{static{this._idPool=1}constructor(e,t,i=(d._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=t,this.name=i,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[i,n]of this._stacks)(!e||t{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],i=new g(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return(this._options?.onListenerError||s.dz)(i),r.jG.None}if(this._disposed)return r.jG.None;t&&(e=e.bind(t));const n=new p(e);let o;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(n.stack=h.create(),o=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof p?(this._deliveryQueue??=new _,this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;const a=(0,r.s)((()=>{o?.(),this._removeListener(n)}));return i instanceof r.Cm?i.add(a):Array.isArray(i)&&i.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),void(this._size=0);const t=this._listeners,i=t.indexOf(e);if(-1===i)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;const n=this._deliveryQueue.current===this;if(2*this._size<=t.length){let e=0;for(let i=0;i0}}const m=()=>new _;class _{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class v extends f{constructor(e){super(e),this._isPaused=0,this._eventQueue=new a.w,this._mergeFn=e?.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class b extends v{constructor(e){super(e),this._delay=e.delay??100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class w extends f{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=e?.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class C{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new f({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),(0,r.s)((0,o.P)((()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)})))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){e.listener?.dispose(),e.listener=null}dispose(){this.emitter.dispose();for(const e of this.events)e.listener?.dispose();this.events=[]}}class y{constructor(){this.data=[]}wrapEvent(e,t,i){return(n,s,o)=>e((e=>{const o=this.data[this.data.length-1];if(!t)return void(o?o.buffers.push((()=>n.call(s,e))):n.call(s,e));const r=o;r?(r.items??=[],r.items.push(e),0===r.buffers.length&&o.buffers.push((()=>{r.reducedResult??=i?r.items.reduce(t,i):r.items.reduce(t),n.call(s,r.reducedResult)}))):n.call(s,t(i,e))}),void 0,o)}bufferEvents(e){const t={buffers:new Array};this.data.push(t);const i=e();return this.data.pop(),t.buffers.forEach((e=>e())),i}}class S{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=r.jG.None,this.emitter=new f({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},11354:function(e,t,i){"use strict";i.d(t,{No:function(){return u},TH:function(){return a},Zn:function(){return c},_1:function(){return d},kb:function(){return l}});var n=i(68847),s=i(79783),o=i(43920);function r(e){return 47===e||92===e}function a(e){return e.replace(/[\\/]/g,n.SA.sep)}function l(e){return-1===e.indexOf("/")&&(e=a(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function c(e,t=n.SA.sep){if(!e)return"";const i=e.length,s=e.charCodeAt(0);if(r(s)){if(r(e.charCodeAt(1))&&!r(e.charCodeAt(2))){let n=3;const s=n;for(;ne.length)return!1;if(i){if(!(0,o.ns)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===s&&i--,e.charAt(i)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}function h(e){return e>=65&&e<=90||e>=97&&e<=122}function u(e,t=s.uF){return!!t&&h(e.charCodeAt(0))&&58===e.charCodeAt(1)}},17793:function(e,t,i){"use strict";i.d(t,{ne:function(){return te},Nd:function(){return ie},Jo:function(){return H},WJ:function(){return V},dt:function(){return ne},uU:function(){return oe},Tt:function(){return f},yr:function(){return B},O:function(){return W},WP:function(){return g},dE:function(){return m},J1:function(){return T},or:function(){return u}});var n=i(52732);let s=0;const o=new Uint32Array(10);function r(e,t,i){var n;e>=i&&e>8&&(o[s++]=n>>8&255),n>>16&&(o[s++]=n>>16&255)))}const a=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),l=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),c=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),d=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);var h=i(43920);function u(...e){return function(t,i){for(let n=0,s=e.length;n0?[{start:0,end:t.length}]:[]:null}function f(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function m(e,t){return _(e.toLowerCase(),t.toLowerCase(),0,0)}function _(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let s=null;return(s=_(e,t,i+1,n+1))?E({start:n,end:n+1},s):null}return _(e,t,i,n+1)}function v(e){return 97<=e&&e<=122}function b(e){return 65<=e&&e<=90}function w(e){return 48<=e&&e<=57}function C(e){return 32===e||9===e||10===e||13===e}const y=new Set;function S(e){return C(e)||y.has(e)}function k(e,t){return e===t||S(e)&&S(t)}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>y.add(e.charCodeAt(0))));const x=new Map;function L(e){if(x.has(e))return x.get(e);let t;const i=function(e){const t=function(e){if(s=0,r(e,a,4352),s>0)return o.subarray(0,s);if(r(e,l,4449),s>0)return o.subarray(0,s);if(r(e,c,4520),s>0)return o.subarray(0,s);if(r(e,d,12593),s)return o.subarray(0,s);if(e>=44032&&e<=55203){const t=e-44032,i=t%588,n=Math.floor(t/588),h=Math.floor(i/28),u=i%28-1;if(n=0&&(u0)return o.subarray(0,s)}}(e);if(t&&t.length>0)return new Uint32Array(t)}(e);return i&&(t=i),x.set(e,t),t}function D(e){return v(e)||b(e)||w(e)}function E(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function N(e,t){for(let i=t;i0&&!D(e.charCodeAt(i-1)))return i}return e.length}function I(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let s=null,o=n+1;for(s=I(e,t,i+1,n+1);!s&&(o=N(t,o))60&&(t=t.substring(0,60));const i=function(e){let t=0,i=0,n=0,s=0,o=0;for(let r=0;r.2&&t<.8&&n>.6&&s<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,s=0;for(e=e.toLowerCase();s0&&S(e.charCodeAt(i-1)))return i;return e.length}const A=u(g,M,f),O=u(g,M,m),F=new n.qK(1e4);function B(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=F.get(e);n||(n=new RegExp(h.Bm(e),"i"),F.set(e,n));const s=n.exec(t);return s?[{start:s.index,end:s.index+s[0].length}]:i?O(e,t):A(e,t)}function W(e,t){const i=ne(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?V(i):null}function H(e,t,i,n,s,o){const r=Math.min(13,e.length);for(;i1;n--){const s=e[n]+i,o=t[t.length-1];o&&o.end===s?o.end=s+1:t.push({start:s,end:s+1})}return t}const z=128;function U(){const e=[],t=[];for(let e=0;e<=z;e++)t[e]=0;for(let i=0;i<=z;i++)e.push(t.slice(0));return e}function j(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const q=j(2*z),K=j(2*z),$=U(),G=U(),Q=U(),Y=!1;function Z(e,t,i,n,s){function o(e,t,i=" "){for(;e.lengtho(e,3))).join("|")}\n`;for(let n=0;n<=i;n++)r+=0===n?" |":`${t[n-1]}|`,r+=e[n].slice(0,s+1).map((e=>o(e.toString(),3))).join("|")+"\n";return r}function X(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!h.Ss(i)}}function J(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function ee(e,t,i){return t[e]!==i[e]}var te;!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(te||(te={}));class ie{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function ne(e,t,i,n,s,o,r=ie.default){const a=e.length>z?z:e.length,l=n.length>z?z:n.length;if(i>=a||o>=l||a-i>l-o)return;if(!function(e,t,i,n,s,o,r=!1){for(;t=i&&a>=n;)s[r]===o[a]&&(K[r]=a,r--),a--}(a,l,i,o,t,s);let c=1,d=1,h=i,u=o;const g=[!1];for(c=1,h=i;hr,v=_?G[c][d-1]+($[c][d-1]>0?-5:0):0,b=u>r+1&&$[c][d-1]>0,w=b?G[c][d-2]+($[c][d-2]>0?-5:0):0;if(b&&(!_||w>=v)&&(!f||w>=m))G[c][d]=w,Q[c][d]=3,$[c][d]=0;else if(_&&(!f||v>=m))G[c][d]=v,Q[c][d]=2,$[c][d]=0;else{if(!f)throw new Error("not possible");G[c][d]=m,Q[c][d]=1,$[c][d]=$[c-1][d-1]+1}}}if(Y&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(Z(G,e,e.length,i,i.length)),console.log(Z(Q,e,e.length,i,i.length)),console.log(Z($,e,e.length,i,i.length))}(e,i,n,o),!g[0]&&!r.firstMatchCanBeWeak)return;c--,d--;const p=[G[c][d],o];let f=0,m=0;for(;c>=1;){let e=d;do{const t=Q[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);f>1&&t[i+c-1]===s[o+d-1]&&!ee(e+o-1,n,s)&&f+1>$[c][e]&&(e=d),e===d?f++:f=1,m||(m=e),c--,d=e-1,p.push(d)}l-o===a&&r.boostFullMatch&&(p[0]+=2);const _=m-a;return p[0]-=_,p}function se(e,t,i,n,s,o,r,a,l,c,d){if(t[i]!==o[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===i-n?h=e[i]===s[r]?7:5:!ee(r,s,o)||0!==r&&ee(r-1,s,o)?!X(o,r)||0!==r&&X(o,r-1)?(X(o,r-1)||J(o,r-1))&&(h=5,u=!0):h=5:(h=e[i]===s[r]?7:5,u=!0),h>1&&i===n&&(d[0]=!0),u||(u=ee(r,s,o)||X(o,r-1)||J(o,r-1)),i===n?r>l&&(h-=u?3:5):h+=c?u?2:0:u?0:1,r+1===a&&(h-=u?3:5),h}function oe(e,t,i,n,s,o,r){return function(e,t,i,n,s,o,r,a){let l=ne(e,t,i,n,s,o,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}(e,t,i,n,s,o,0,r)}function re(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}},96845:function(e,t,i){"use strict";function n(e,t){const i=this;let n,s=!1;return function(){if(s)return n;if(s=!0,t)try{n=e.apply(i,arguments)}finally{t()}else n=e.apply(i,arguments);return n}}i.d(t,{P:function(){return n}})},90562:function(e,t,i){"use strict";i.d(t,{YW:function(){return N},qg:function(){return I}});var n=i(90890),s=i(11354),o=i(52732),r=i(68847),a=i(79783),l=i(43920);const c="**",d="/",h="[/\\\\]",u="[^/\\\\]",g=/\//g;function p(e,t){switch(e){case 0:return"";case 1:return`${u}*?`;default:return`(?:${h}|${u}+${h}${t?`|${h}${u}+`:""})*?`}}function f(e,t){if(!e)return[];const i=[];let n=!1,s=!1,o="";for(const r of e){switch(r){case t:if(!n&&!s){i.push(o),o="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1}o+=r}return o&&i.push(o),i}function m(e){if(!e)return"";let t="";const i=f(e,d);if(i.every((e=>e===c)))t=".*";else{let e=!1;i.forEach(((n,s)=>{if(n===c){if(e)return;t+=p(2,s===i.length-1)}else{let e=!1,o="",r=!1,a="";for(const i of n)if("}"!==i&&e)o+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=`(?:${f(o,",").map((e=>m(e))).join("|")})`;t+=i,e=!1,o="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=u;continue;case"*":t+=p(1);continue;default:t+=(0,l.bm)(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?i===d?"":(0,l.bm)(i):"^",a+=e}sL(e,t))).filter((e=>e!==x)),e),n=i.length;if(!n)return x;if(1===n)return i[0];const s=function(t,n){for(let s=0,o=i.length;s!!e.allBasenames));o&&(s.allBasenames=o.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(s.allPaths=r),s}(i,t):(o=C.exec(D(i,t)))?E(o[1].substr(1),i,!0):(o=y.exec(D(i,t)))?E(o[1],i,!1):function(e){try{const t=new RegExp(`^${m(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return x}}(i),S.set(n,c)),function(e,t){if("string"==typeof t)return e;const i=function(i,n){return(0,s._1)(i,t.base,!a.j9)?e((0,l.NB)(i.substr(t.base.length),r.Vn),n):null};return i.allBasenames=e.allBasenames,i.allPaths=e.allPaths,i.basenames=e.basenames,i.patterns=e.patterns,i}(c,e)}function D(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function E(e,t,i){const n=r.Vn===r.SA.sep,s=n?e:e.replace(g,r.Vn),o=r.Vn+s,a=r.SA.sep+e;let l;return l=i?function(i,r){return"string"!=typeof i||i!==s&&!i.endsWith(o)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,o){return"string"!=typeof i||i!==s&&(n||i!==e)?null:t},l.allPaths=[(i?"*/":"./")+e],l}function N(e,t,i){return!(!e||"string"!=typeof t)&&I(e)(t,void 0,i)}function I(e,t={}){if(!e)return k;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const i=L(e,t);if(i===x)return k;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=M(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return x;const s=L(e,i);if(s===x)return x;if("boolean"==typeof t)return s;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,r,a)=>{if(!a||!s(t,o))return null;const l=a(i.replace("$(basename)",(()=>r)));return(0,n.Qg)(l)?l.then((t=>t?e:null)):l?e:null};return t.requiresSiblings=!0,t}}return s}(i,e[i],t))).filter((e=>e!==x))),s=i.length;if(!s)return x;if(!i.some((e=>!!e.requiresSiblings))){if(1===s)return i[0];const e=function(e,t){let s;for(let o=0,r=i.length;o{for(const e of s){const t=await e;if("string"==typeof t)return t}return null})():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,s){let o,a;for(let l=0,c=i.length;l{for(const e of a){const t=await e;if("string"==typeof t)return t}return null})():null},a=i.find((e=>!!e.allBasenames));a&&(o.allBasenames=a.allBasenames);const l=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(o.allPaths=l),o}(e,t)}function M(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let s;if(t){s=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const o=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?s[i]:null};o.basenames=n,o.patterns=s,o.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(o),r}},65260:function(e,t,i){"use strict";i.d(t,{e2:function(){return a},sN:function(){return o},tW:function(){return s},v7:function(){return h}});var n=i(43920);function s(e){return o(e,0)}function o(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(i=e,n=r(104579,n=t),i.reduce(((e,t)=>o(t,e)),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),o(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}var i,n}function r(e,t){return(t<<5)-t+e|0}function a(e,t){t=r(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function c(e,t=0,i=e.byteLength,n=0){for(let s=0;se.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class h{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let s,o,r=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(s=a,o=-1,a=0):(s=e.charCodeAt(0),o=0);;){let l=s;if(n.pc(s)){if(!(o+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),d(this._h0)+d(this._h1)+d(this._h2)+d(this._h3)+d(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=h._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,s,o=this._h0,r=this._h1,a=this._h2,c=this._h3,d=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&c,n=1518500249):t<40?(i=r^a^c,n=1859775393):t<60?(i=r&a|r&c|a&c,n=2400959708):(i=r^a^c,n=3395469782),s=l(o,5)+i+d+n+e.getUint32(4*t,!1)&4294967295,d=c,c=a,a=l(r,30),r=o,o=s;this._h0=this._h0+o&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+d&4294967295}}},74159:function(e,t,i){"use strict";i.d(t,{k:function(){return n}});class n{static{this.sep="."}static{this.None=new n("@@none@@")}static{this.Empty=new n("")}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+n.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new n((this.value?[this.value,...e]:e).join(n.sep))}}},87312:function(e,t,i){"use strict";i.d(t,{O:function(){return o},e:function(){return s}});var n=i(93915);function s(){return n._K&&!!n._K.VSCODE_DEV}function o(e){if(s()){const t=function(){r||(r=new Set);const e=globalThis;return e.$hotReload_applyNewExports||(e.$hotReload_applyNewExports=e=>{const t={config:{mode:void 0},...e},i=[];for(const e of r){const n=e(t);n&&i.push(n)}if(i.length>0)return e=>{let t=!1;for(const n of i)n(e)&&(t=!0);return t}}),r}();return t.add(e),{dispose(){t.delete(e)}}}return{dispose(){}}}let r;s()&&o((({oldExports:e,newSrc:t,config:i})=>{if("patch-prototype"===i.mode)return t=>{for(const i in t){const n=t[i];if(console.log(`[hot-reload] Patching prototype methods of '${i}'`,{exportedItem:n}),"function"==typeof n&&n.prototype){const s=e[i];if(s){for(const e of Object.getOwnPropertyNames(n.prototype)){const t=Object.getOwnPropertyDescriptor(n.prototype,e),o=Object.getOwnPropertyDescriptor(s.prototype,e);t?.value?.toString()!==o?.value?.toString()&&console.log(`[hot-reload] Patching prototype method '${i}.${e}'`),Object.defineProperty(s.prototype,e,t)}t[i]=s}}}return!0}}))},64523:function(e,t,i){"use strict";i.d(t,{b:function(){return o}});var n=i(87312),s=i(73755);function o(e,t){return function(e,t){(0,n.e)()&&(0,s.yQ)("reload",(t=>(0,n.O)((({oldExports:i})=>{if([...Object.values(i)].some((t=>e.includes(t))))return e=>(t(void 0),!0)})))).read(t)}([e],t),e}},85584:function(e,t,i){"use strict";i.d(t,{Bc:function(){return l},VS:function(){return d},_W:function(){return g},it:function(){return c},nI:function(){return p},nK:function(){return h},oO:function(){return u}});var n=i(20187),s=i(4590),o=i(59951),r=i(43920),a=i(54244);class l{constructor(e="",t=!1){if(this.value=e,"string"!=typeof this.value)throw(0,n.Qg)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=t.isTrusted??void 0,this.supportThemeIcons=t.supportThemeIcons??!1,this.supportHtml=t.supportHtml??!1)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,s.m2)(e):e,i.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`\n${function(e,t){const i=e.match(/^`+/gm)?.reduce(((e,t)=>e.length>t.length?e:t)).length??0,n=i>=3?i+1:3;return[`${"`".repeat(n)}${t}`,e,`${"`".repeat(n)}`].join("\n")}(t,e)}\n`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp((0,r.bm)(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function c(e){return d(e)?!e.value:!Array.isArray(e)||e.every(c)}function d(e){return e instanceof l||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&"object"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function h(e,t){return e===t||!(!e||!t)&&e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons&&e.supportHtml===t.supportHtml&&(e.baseUri===t.baseUri||!!e.baseUri&&!!t.baseUri&&(0,o.n4)(a.r.from(e.baseUri),a.r.from(t.baseUri)))}function u(e){return e.replace(/"/g,""")}function g(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}function p(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),s=e?e[1]:"",o=i?i[1]:"",r=isFinite(parseInt(o)),a=isFinite(parseInt(s));r&&t.push(`width="${o}"`),a&&t.push(`height="${s}"`)}return{href:e,dimensions:t}}},4590:function(e,t,i){"use strict";i.d(t,{R$:function(){return p},_k:function(){return m},m2:function(){return c},pS:function(){return g},pz:function(){return _},sA:function(){return h}});var n=i(17793),s=i(43920),o=i(56613);const r="$(",a=new RegExp(`\\$\\(${o.L.iconNameExpression}(?:${o.L.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function c(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const d=new RegExp(`\\\\${a.source}`,"g");function h(e){return e.replace(d,(e=>`\\${e}`))}const u=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(r)?e:e.replace(u,((e,t,i,n)=>i?e:t||n||""))}function p(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}const f=new RegExp(`\\$\\(${o.L.iconNameCharacter}+\\)`,"g");function m(e){f.lastIndex=0;let t="";const i=[];let n=0;for(;;){const s=f.lastIndex,o=f.exec(e),r=e.substring(s,o?.index);if(r.length>0){t+=r;for(let e=0;e=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){let i=0;for(const n of e)if(t(n,i++))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.flatMap=function*(e,t){let i=0;for(const n of e)yield*t(n,i++)},e.concat=function*(...e){for(const t of e)yield*t},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t>>0)>>>0}!function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],i=[],n=[];for(const e of t){const[t,p,f,m,_,v,b,w,C]=e;if(n[p]||(n[p]=!0,c[p]=f,d[f]=p,h[f.toLowerCase()]=p,t&&(u[p]=m,0!==m&&3!==m&&5!==m&&4!==m&&6!==m&&57!==m&&(g[m]=p))),!i[m]){if(i[m]=!0,!_)throw new Error(`String representation missing for key code ${m} around scan code ${f}`);s.define(m,_),o.define(m,w||_),r.define(m,C||w||_)}v&&(a[v]=m),b&&(l[b]=m)}g[3]=46}(),function(e){e.toString=function(e){return s.keyCodeToStr(e)},e.fromString=function(e){return s.strToKeyCode(e)},e.toUserSettingsUS=function(e){return o.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return r.keyCodeToStr(e)},e.fromUserSettings=function(e){return o.strToKeyCode(e)||r.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return s.keyCodeToStr(e)}}(p||(p={}))},92479:function(e,t,i){"use strict";i.d(t,{G$:function(){return l},Of:function(){return o},r0:function(){return r},rr:function(){return a}});var n=i(14374);class s{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let s=0,o=t.length;s>>0,n=(4294901760&e)>>>16;return new a(0!==n?[o(i,t),o(n,t)]:[o(i,t)])}{const i=[];for(let n=0;n1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function u(...e){const t=g((()=>h(e)));return function(e,t){if(o)for(const i of e)o.setParent(i,t)}(e,t),t}function g(e){const t=r({dispose:(0,n.P)((()=>{a(t),e()}))});return t}class p{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,r(this)}dispose(){this._isDisposed||(a(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{h(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return l(e,this),this._isDisposed?p.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),l(e,null))}}class f{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new p,r(this),l(this._store,this)}dispose(){a(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}class m{constructor(){this._isDisposed=!1,r(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&l(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,a(this),this._value?.dispose(),this._value=void 0}}class _{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class v{constructor(e){this.object=e}dispose(){}}class b{constructor(){this._store=new Map,this._isDisposed=!1,r(this)}dispose(){a(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{h(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||this._store.get(e)?.dispose(),this._store.set(e,t)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}},54409:function(e,t,i){"use strict";i.d(t,{w:function(){return s}});class n{static{this.Undefined=new n(void 0)}constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}class s{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},52732:function(e,t,i){"use strict";var n,s;i.d(t,{cO:function(){return d},db:function(){return h},fT:function(){return r},qK:function(){return c}});class o{constructor(e,t){this.uri=e,this.value=t}}class r{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[n]="ResourceMap",e instanceof r)this.map=new Map(e.map),this.toKey=t??r.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=t??r.defaultToKey;for(const[t,i]of e)this.set(t,i)}else this.map=new Map,this.toKey=e??r.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new o(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}class a{constructor(){this[s]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(s=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.previous,i--;this._tail=t,this._size=i,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class l extends a{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class c extends l{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class d{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class h{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}}},23560:function(e,t,i){"use strict";i.d(t,{As:function(){return o},qg:function(){return r}});var n=i(28198),s=i(54244);function o(e){return JSON.stringify(e,a)}function r(e){let t=JSON.parse(e);return t=l(t),t}function a(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function l(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return s.r.revive(e);case 2:return new RegExp(e.source,e.flags);case 17:return new Date(e.source)}if(e instanceof n.MB||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;ic(e,t)))}!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"}(n||(n={}));const h=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return l.SA.join(this._serverRootPath,n.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return s.dz(t),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const r=this._ports[t],l=this._connectionTokens[t];let c=`path=${encodeURIComponent(e.path)}`;return"string"==typeof l&&(c+=`&tkn=${encodeURIComponent(l)}`),a.r.from({scheme:o.HZ?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${r}`,path:this._remoteResourcesPath,query:c})}};class u{static{this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(e){const t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===n.vscodeRemote?h.rewrite(e):e.scheme!==n.file||!o.ib&&o.lg!==`${n.vscodeFileResource}://${u.FALLBACK_AUTHORITY}`?e:e.with({scheme:n.vscodeFileResource,authority:e.authority||u.FALLBACK_AUTHORITY,query:null,fragment:null})}toUri(e,t){if(a.r.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){const t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return a.r.joinPath(a.r.parse(t,!0),e);const i=l.fj(t,e);return a.r.file(i)}return a.r.parse(t.toUrl(e))}}const g=new u;var p;!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";e.getHeadersFromQuery=function(e){let n;"string"==typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:a.r.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const s=n?.get(i);if(s)return t.get(s)},e.addSearchParam=function(e,t,n){if(!globalThis.crossOriginIsolated)return;const s=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,s):e[i]=s}}(p||(p={}))},60028:function(e,t,i){"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{Uq:function(){return s},mu:function(){return o},qE:function(){return n}});class s{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class o{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{t[e]=i&&"object"==typeof i?s(i):i})),t}function o(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const s=e[i];"object"!=typeof s||Object.isFrozen(s)||(0,n.iu)(s)||t.push(s)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.z)(e))return e;const s=t(e);if(void 0!==s)return s;if(Array.isArray(e)){const n=[];for(const s of e)n.push(l(s,t,i));return n}if((0,n.Gv)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const s in e)r.call(e,s)&&(n[s]=l(e[s],t,i));return i.delete(e),n}return e}function c(e,t,i=!0){return(0,n.Gv)(e)?((0,n.Gv)(t)&&Object.keys(t).forEach((s=>{s in e?i&&((0,n.Gv)(e[s])&&(0,n.Gv)(t[s])?c(e[s],t[s],i):e[s]=t[s]):e[s]=t[s]})),e):t}function d(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ifunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const t of e)n[t]=i(t);return n}},73755:function(e,t,i){"use strict";i.d(t,{BK:function(){return _},fm:function(){return c},Y:function(){return h},zL:function(){return d},yC:function(){return g},ht:function(){return u},lk:function(){return f.lk},un:function(){return s.un},nb:function(){return s.nb},ZX:function(){return f.ZX},C:function(){return s.C},rm:function(){return s.rm},X2:function(){return n.X2},y0:function(){return f.y0},Yd:function(){return f.Yd},yQ:function(){return f.yQ},FY:function(){return n.FY},Zh:function(){return y},OI:function(){return f.OI},PO:function(){return n.PO},Rn:function(){return n.Rn},oJ:function(){return b}});var n=i(1878),s=i(98018),o=i(93066),r=i(35114),a=i(86147),l=i(83810);function c(e){return new p(new a.nA(void 0,void 0,e),e,void 0,void 0)}function d(e,t){return new p(new a.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,void 0)}function h(e,t){return new p(new a.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,e.createEmptyChangeSummary,e.handleChange)}function u(e,t){const i=new r.Cm,n=h({owner:e.owner,debugName:e.debugName,debugReferenceFn:e.debugReferenceFn??t,createEmptyChangeSummary:e.createEmptyChangeSummary,handleChange:e.handleChange},((e,n)=>{i.clear(),t(e,n,i)}));return(0,r.s)((()=>{n.dispose(),i.dispose()}))}function g(e){const t=new r.Cm,i=d({owner:void 0,debugName:void 0,debugReferenceFn:e},(i=>{t.clear(),e(i,t)}));return(0,r.s)((()=>{i.dispose(),t.dispose()}))}class p{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n){this._debugNameData=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=this.createChangeSummary?.(),(0,l.tZ)()?.handleAutorunCreated(this),this._runIfNeeded(),(0,r.Ay)(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),(0,r.VD)(this)}_runIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e,this.state=3;const t=this.disposed;try{if(!t){(0,l.tZ)()?.handleAutorunTriggered(this);const e=this.changeSummary;this.changeSummary=this.createChangeSummary?.(),this._runFn(this,e)}}finally{t||(0,l.tZ)()?.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,(0,o.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary))&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}!function(e){e.Observer=p}(c||(c={}));var f=i(84230),m=i(20187);class _{static fromFn(e){return new _(e())}constructor(e){this._value=(0,n.FY)(this,void 0),this.promiseResult=this._value,this.promise=e.then((e=>((0,n.Rn)((t=>{this._value.set(new v(e,void 0),t)})),e)),(e=>{throw(0,n.Rn)((t=>{this._value.set(new v(void 0,e),t)})),e}))}}class v{constructor(e,t){this.data=e,this.error=t}}function b(e,t,i,n){return t||(t=e=>null!=e),new Promise(((s,o)=>{let r=!0,a=!1;const l=e.map((e=>({isFinished:t(e),error:!!i&&i(e),state:e}))),d=c((e=>{const{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:d.dispose(),i?o(!0===i?n:i):s(n))}));if(n){const e=n.onCancellationRequested((()=>{d.dispose(),e.dispose(),o(new m.AL)}));if(n.isCancellationRequested)return d.dispose(),e.dispose(),void o(new m.AL)}r=!1,a&&d.dispose()}))}var w=i(57981);class C extends n.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i){super(),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(const e of this.observers)for(const t of this._deltas)e.handleChange(this,t);this._deltas.length=0}else for(const e of this.observers)e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(const e of this.observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){this._update();const e=[...this.observers];for(const t of e)t.endUpdate(this)}}addObserver(e){const t=!this.observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){if(void 0===i&&this._equalityComparator(this._value,e))return;let s;t||(t=s=new n.XL((()=>{}),(()=>`Setting ${this.debugName}`)));try{if(this._isUpToDate=!1,this._setValue(e),void 0!==i&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(e,t)=>{},handlePossibleChange:e=>{}},this),this._updateCounter>1)for(const e of this.observers)e.handlePossibleChange(this)}finally{s&&s.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function y(e,t){return e.lazy?new C(new a.nA(e.owner,e.debugName,void 0),t,e.equalsFn??w.nx):new n.Lj(new a.nA(e.owner,e.debugName,void 0),t,e.equalsFn??w.nx)}},1878:function(e,t,i){"use strict";i.d(t,{Bm:function(){return d},FB:function(){return h},FY:function(){return w},Lj:function(){return C},N2:function(){return u},PO:function(){return v},Rn:function(){return f},X2:function(){return y},XL:function(){return b},YY:function(){return m},ZK:function(){return p},fL:function(){return _},zV:function(){return g}});var n=i(57981),s=i(86147),o=i(83810);let r,a,l,c;function d(e){r=e}function h(e){a=e}function u(e){l=e}class g{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=void 0===t?void 0:e,n=void 0===t?e:t;return l({owner:i,debugName:()=>{const e=(0,s.qQ)(n);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(n.toString());return t?`${this.debugName}.${t[2]}`:i?void 0:`${this.debugName} (mapped)`},debugReferenceFn:n},(e=>n(this.read(e),e)))}flatten(){return l({owner:void 0,debugName:()=>`${this.debugName} (flattened)`},(e=>this.read(e).read(e)))}recomputeInitiallyAndOnChange(e,t){return e.add(r(this,t)),this}keepObserved(e){return e.add(a(this)),this}}class p extends g{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function f(e,t){const i=new b(e,t);try{e(i)}finally{i.finish()}}function m(e){if(c)e(c);else{const t=new b(e,void 0);c=t;try{e(t)}finally{t.finish(),c=void 0}}}async function _(e,t){const i=new b(e,t);try{await e(i)}finally{i.finish()}}function v(e,t,i){e?t(e):f(t,i)}class b{constructor(e,t){this._fn=e,this._getDebugName=t,this.updatingObservers=[],(0,o.tZ)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,s.qQ)(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;for(let t=0;t{}),(()=>`Setting ${this.debugName}`)));try{const n=this._value;this._setValue(e),(0,o.tZ)()?.handleObservableChanged(this,{oldValue:n,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{n&&n.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function y(e,t){let i;return i="string"==typeof e?new s.nA(void 0,e,void 0):new s.nA(e,void 0,void 0),new S(i,t,n.nx)}class S extends C{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}},86147:function(e,t,i){"use strict";i.d(t,{nA:function(){return n},qQ:function(){return l}});class n{constructor(e,t,i){this.owner=e,this.debugNameSource=t,this.referenceFn=i}getDebugName(e){return function(e,t){const i=o.get(e);if(i)return i;const n=function(e,t){const i=o.get(e);if(i)return i;const n=t.owner?function(e){const t=a.get(e);if(t)return t;const i=function(e){const t=e.constructor;return t?t.name:"Object"}(e);let n=r.get(i)??0;n++,r.set(i,n);const s=1===n?i:`${i}#${n}`;return a.set(e,s),s}(t.owner)+".":"";let s;const c=t.debugNameSource;if(void 0!==c){if("function"!=typeof c)return n+c;if(s=c(),void 0!==s)return n+s}const d=t.referenceFn;if(void 0!==d&&(s=l(d),void 0!==s))return n+s;if(void 0!==t.owner){const i=function(e,t){for(const i in e)if(e[i]===t)return i}(t.owner,e);if(void 0!==i)return n+i}}(e,t);if(n){let t=s.get(n)??0;t++,s.set(n,t);const i=1===t?n:`${n}#${t}`;return o.set(e,i),i}}(e,this)}}const s=new Map,o=new WeakMap,r=new Map,a=new WeakMap;function l(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),n=i?i[1]:void 0;return n?.trim()}},98018:function(e,t,i){"use strict";i.d(t,{C:function(){return h},a0:function(){return p},dQ:function(){return d},nb:function(){return u},rm:function(){return g},un:function(){return c}});var n=i(93066),s=i(57981),o=i(35114),r=i(1878),a=i(86147),l=i(83810);function c(e,t){return void 0!==t?new f(new a.nA(e,void 0,t),t,void 0,void 0,void 0,s.nx):new f(new a.nA(void 0,void 0,e),e,void 0,void 0,void 0,s.nx)}function d(e,t,i){return new m(new a.nA(e,void 0,t),t,void 0,void 0,void 0,s.nx,i)}function h(e,t){return new f(new a.nA(e.owner,e.debugName,e.debugReferenceFn),t,void 0,void 0,e.onLastObserverRemoved,e.equalsFn??s.nx)}function u(e,t){return new f(new a.nA(e.owner,e.debugName,void 0),t,e.createEmptyChangeSummary,e.handleChange,void 0,e.equalityComparer??s.nx)}function g(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const r=new o.Cm;return new f(new a.nA(n,void 0,i),(e=>(r.clear(),i(e,r))),void 0,void 0,(()=>r.dispose()),s.nx)}function p(e,t){let i,n,r;return void 0===t?(i=e,n=void 0):(n=e,i=t),new f(new a.nA(n,void 0,i),(e=>{r?r.clear():r=new o.Cm;const t=i(e);return t&&r.add(t),t}),void 0,void 0,(()=>{r&&(r.dispose(),r=void 0)}),s.nx)}(0,r.N2)(h);class f extends r.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n,s=void 0,o){super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=i,this._handleChange=n,this._handleLastObserverRemoved=s,this._equalityComparator=o,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=this.createChangeSummary?.(),(0,l.tZ)()?.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),this._handleLastObserverRemoved?.()}get(){if(0===this.observers.size){const e=this._computeFn(this,this.createChangeSummary?.());return this.onLastObserverRemoved(),e}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){if(3===this.state)return;const e=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=e;const t=0!==this.state,i=this.value;this.state=3;const n=this.changeSummary;this.changeSummary=this.createChangeSummary?.();try{this.value=this._computeFn(this,n)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const s=t&&!this._equalityComparator(i,this.value);if((0,l.tZ)()?.handleDerivedRecomputed(this,{oldValue:i,newValue:this.value,change:void 0,didChange:s,hadValue:t}),s)for(const e of this.observers)e.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}(0,n.Ft)((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=!this._handleChange||this._handleChange({changedObservable:e,change:t,didChange:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}class m extends f{constructor(e,t,i,n,s=void 0,o,r){super(e,t,i,n,s,o),this.set=r}}},83810:function(e,t,i){"use strict";let n;function s(e){n=e}function o(){return n}i.d(t,{Br:function(){return s},jm:function(){return r},tZ:function(){return o}});class r{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(e){return function(e){const t=new Array,i=[];let n="";!function e(s){if("length"in s)for(const t of s)t&&e(t);else"text"in s?(n+=`%c${s.text}`,t.push(s.style),s.data&&i.push(...s.data)):"data"in s&&i.push(...s.data)}(e);const s=[n,...t];return s.push(...i),s}([a(h("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[a(" "),c(d(e.oldValue,70),{color:"red",strikeThrough:!0}),a(" "),c(d(e.newValue,60),{color:"green"})]:[a(" (unchanged)")]:[a(" "),c(d(e.newValue,60),{color:"green"}),a(" (initial)")]}handleObservableChanged(e,t){console.log(...this.textToConsoleArgs([l("observable value changed"),c(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}formatChanges(e){if(0!==e.size)return c(" (changed deps: "+[...e].map((e=>e.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleDerivedRecomputed(e,t){const i=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([l("derived recomputed"),c(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),i.clear()}handleFromEventObservableTriggered(e,t){console.log(...this.textToConsoleArgs([l("observable from event triggered"),c(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),{data:[{fn:e._getValue}]}]))}handleAutorunCreated(e){const t=e.handleChange;this.changedObservablesSets.set(e,new Set),e.handleChange=(i,n)=>(this.changedObservablesSets.get(e).add(i),t.apply(e,[i,n]))}handleAutorunTriggered(e){const t=this.changedObservablesSets.get(e);console.log(...this.textToConsoleArgs([l("autorun"),c(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),console.log(...this.textToConsoleArgs([l("transaction"),c(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function a(e){return c(e,{color:"black"})}function l(e){return c(function(e){for(;e.length<10;)e+=" ";return e}(`${e}: `),{color:"black",bold:!0})}function c(e,t={color:"black"}){const i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:(n=i,Object.entries(n).reduce(((e,[t,i])=>`${e}${t}:${i};`),""))};var n}function d(e,t){switch(typeof e){case"number":default:return""+e;case"string":return e.length+2<=t?`"${e}"`:`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":return null===e?"null":Array.isArray(e)?function(e,t){let i="[ ",n=!0;for(const s of e){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${d(s,t-i.length)}`}return i+=" ]",i}(e,t):function(e,t){let i="{ ",n=!0;for(const[s,o]of Object.entries(e)){if(n||(i+=", "),i.length-5>t){i+="...";break}n=!1,i+=`${s}: ${d(o,t-i.length)}`}return i+=" }",i}(e,t);case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`}}function h(e,t){let i="";for(let n=1;n<=t;n++)i+=e;return i}},84230:function(e,t,i){"use strict";i.d(t,{OI:function(){return v},Rl:function(){return C},Yd:function(){return m},ZX:function(){return w},eP:function(){return u},lk:function(){return c},t:function(){return S},y0:function(){return h},yQ:function(){return p}}),i(80670);var n=i(35114),s=i(1878),o=i(86147),r=i(98018),a=i(83810),l=i(57981);function c(e){return new d(e)}class d extends s.zV{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function h(...e){let t,i,n;return 3===e.length?[t,i,n]=e:[i,n]=e,new g(new o.nA(t,void 0,n),i,n,(()=>g.globalTransaction),l.nx)}function u(e,t,i){return new g(new o.nA(e.owner,e.debugName,e.debugReferenceFn??i),t,i,(()=>g.globalTransaction),e.equalsFn??l.nx)}class g extends s.ZK{constructor(e,t,i,n,o){super(),this._debugNameData=e,this.event=t,this._getValue=i,this._getTransaction=n,this._equalityComparator=o,this.hasValue=!1,this.handleEvent=e=>{const t=this._getValue(e),i=this.value,n=!this.hasValue||!this._equalityComparator(i,t);let o=!1;n&&(this.value=t,this.hasValue&&(o=!0,(0,s.PO)(this._getTransaction(),(e=>{(0,a.tZ)()?.handleFromEventObservableTriggered(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),o||(0,a.tZ)()?.handleFromEventObservableTriggered(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this.hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}function p(e,t){return new f(e,t)}!function(e){e.Observer=g,e.batchEventsGlobally=function(e,t){let i=!1;void 0===g.globalTransaction&&(g.globalTransaction=e,i=!0);try{t()}finally{i&&(g.globalTransaction=void 0)}}}(h||(h={}));class f extends s.ZK{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{(0,s.Rn)((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function m(e){return"string"==typeof e?new _(e):new _(void 0,e)}class _ extends s.ZK{get debugName(){return new o.nA(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else(0,s.Rn)((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function v(e,t){const i=new b(!0,t);return e.addObserver(i),t?t(e.get()):e.reportChanges(),(0,n.s)((()=>{e.removeObserver(i)}))}(0,s.FB)((function(e){const t=new b(!1,void 0);return e.addObserver(t),(0,n.s)((()=>{e.removeObserver(t)}))})),(0,s.Bm)(v);class b{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}function w(e,t){let i;return(0,r.C)({owner:e,debugReferenceFn:t},(e=>(i=t(e,i),i)))}function C(e,t,i,n){let s=new y(i,n);return(0,r.C)({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{s.dispose(),s=new y(i)}},(e=>(s.setItems(t.read(e)),s.getItems())))}class y{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach((e=>e.store.dispose())),this._cache.clear()}setItems(e){const t=[],i=new Set(this._cache.keys());for(const s of e){const e=this._keySelector?this._keySelector(s):s;let o=this._cache.get(e);if(o)i.delete(e);else{const t=new n.Cm;o={out:this._map(s,t),store:t},this._cache.set(e,o)}t.push(o.out)}for(const e of i)this._cache.get(e).store.dispose(),this._cache.delete(e);this._items=t}getItems(){return this._items}}function S(e,t){return w(e,((e,i)=>i??t(e)))}},68847:function(e,t,i){"use strict";i.d(t,{IN:function(){return m},LC:function(){return x},P8:function(){return k},S8:function(){return b},SA:function(){return v},V8:function(){return y},Vn:function(){return L},fj:function(){return w},hd:function(){return C},pD:function(){return S}});var n=i(93915);const s=46,o=47,r=92,a=58;class l extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=-1!==e.indexOf(".")?"property":"argument";let o=`The "${e}" ${s} ${n} of type ${t}`;o+=". Received type "+typeof i,super(o),this.code="ERR_INVALID_ARG_TYPE"}}function c(e,t){if("string"!=typeof e)throw new l(t,"string",e)}const d="win32"===n.iD;function h(e){return e===o||e===r}function u(e){return e===o}function g(e){return e>=65&&e<=90||e>=97&&e<=122}function p(e,t,i,n){let r="",a=0,l=-1,c=0,d=0;for(let h=0;h<=e.length;++h){if(h2){const e=r.lastIndexOf(i);-1===e?(r="",a=0):(r=r.slice(0,e),a=r.length-1-r.lastIndexOf(i)),l=h,c=0;continue}if(0!==r.length){r="",a=0,l=h,c=0;continue}}t&&(r+=r.length>0?`${i}..`:"..",a=2)}else r.length>0?r+=`${i}${e.slice(l+1,h)}`:r=e.slice(l+1,h),a=h-l-1;l=h,c=0}else d===s&&-1!==c?++c:c=-1}return r}function f(e,t){!function(e){if(null===e||"object"!=typeof e)throw new l("pathObject","Object",e)}(t);const i=t.dir||t.root,n=t.base||`${t.name||""}${s=t.ext,s?`${"."===s[0]?"":"."}${s}`:""}`;var s;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const m={resolve(...e){let t="",i="",s=!1;for(let o=e.length-1;o>=-1;o--){let l;if(o>=0){if(l=e[o],c(l,`paths[${o}]`),0===l.length)continue}else 0===t.length?l=n.bJ():(l=n._K[`=${t}`]||n.bJ(),(void 0===l||l.slice(0,2).toLowerCase()!==t.toLowerCase()&&l.charCodeAt(2)===r)&&(l=`${t}\\`));const d=l.length;let u=0,p="",f=!1;const m=l.charCodeAt(0);if(1===d)h(m)&&(u=1,f=!0);else if(h(m))if(f=!0,h(l.charCodeAt(1))){let e=2,t=e;for(;e2&&h(l.charCodeAt(2))&&(f=!0,u=3));if(p.length>0)if(t.length>0){if(p.toLowerCase()!==t.toLowerCase())continue}else t=p;if(s){if(t.length>0)break}else if(i=`${l.slice(u)}\\${i}`,s=f,f&&t.length>0)break}return i=p(i,!s,"\\",h),s?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){c(e,"path");const t=e.length;if(0===t)return".";let i,n=0,s=!1;const o=e.charCodeAt(0);if(1===t)return u(o)?"\\":e;if(h(o))if(s=!0,h(e.charCodeAt(1))){let s=2,o=s;for(;s2&&h(e.charCodeAt(2))&&(s=!0,n=3));let r=n0&&h(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?s?`\\${r}`:r:s?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){c(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return h(i)||t>2&&g(i)&&e.charCodeAt(1)===a&&h(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=s:t+=`\\${s}`)}if(void 0===t)return".";let n=!0,s=0;if("string"==typeof i&&h(i.charCodeAt(0))){++s;const e=i.length;e>1&&h(i.charCodeAt(1))&&(++s,e>2&&(h(i.charCodeAt(2))?++s:n=!1))}if(n){for(;s=2&&(t=`\\${t.slice(s)}`)}return m.normalize(t)},relative(e,t){if(c(e,"from"),c(t,"to"),e===t)return"";const i=m.resolve(e),n=m.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let s=0;for(;ss&&e.charCodeAt(o-1)===r;)o--;const a=o-s;let l=0;for(;ll&&t.charCodeAt(d-1)===r;)d--;const h=d-l,u=au){if(t.charCodeAt(l+p)===r)return n.slice(l+p+1);if(2===p)return n.slice(l+p)}a>u&&(e.charCodeAt(s+p)===r?g=p:2===p&&(g=3)),-1===g&&(g=0)}let f="";for(p=s+g+1;p<=o;++p)p!==o&&e.charCodeAt(p)!==r||(f+=0===f.length?"..":"\\..");return l+=g,f.length>0?`${f}${n.slice(l,d)}`:(n.charCodeAt(l)===r&&++l,n.slice(l,d))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=m.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===r){if(t.charCodeAt(1)===r){const e=t.charCodeAt(2);if(63!==e&&e!==s)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(g(t.charCodeAt(0))&&t.charCodeAt(1)===a&&t.charCodeAt(2)===r)return`\\\\?\\${t}`;return e},dirname(e){c(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const s=e.charCodeAt(0);if(1===t)return h(s)?e:".";if(h(s)){if(i=n=1,h(e.charCodeAt(1))){let s=2,o=s;for(;s2&&h(e.charCodeAt(2))?3:2,n=i);let o=-1,r=!0;for(let i=t-1;i>=n;--i)if(h(e.charCodeAt(i))){if(!r){o=i;break}}else r=!1;if(-1===o){if(-1===i)return".";o=i}return e.slice(0,o)},basename(e,t){void 0!==t&&c(t,"suffix"),c(e,"path");let i,n=0,s=-1,o=!0;if(e.length>=2&&g(e.charCodeAt(0))&&e.charCodeAt(1)===a&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(h(l)){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(s=i):(r=-1,s=a))}return n===s?s=a:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(h(e.charCodeAt(i))){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){c(e,"path");let t=0,i=-1,n=0,o=-1,r=!0,l=0;e.length>=2&&e.charCodeAt(1)===a&&g(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(h(t)){if(!r){n=a+1;break}}else-1===o&&(r=!1,o=a+1),t===s?-1===i?i=a:1!==l&&(l=1):-1!==i&&(l=-1)}return-1===i||-1===o||0===l||1===l&&i===o-1&&i===n+1?"":e.slice(i,o)},format:f.bind(null,"\\"),parse(e){c(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return h(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(h(o)){if(n=1,h(e.charCodeAt(1))){let t=2,s=t;for(;t0&&(t.root=e.slice(0,n));let r=-1,l=n,d=-1,u=!0,p=e.length-1,f=0;for(;p>=n;--p)if(o=e.charCodeAt(p),h(o)){if(!u){l=p+1;break}}else-1===d&&(u=!1,d=p+1),o===s?-1===r?r=p:1!==f&&(f=1):-1!==r&&(f=-1);return-1!==d&&(-1===r||0===f||1===f&&r===d-1&&r===l+1?t.base=t.name=e.slice(l,d):(t.name=e.slice(l,r),t.base=e.slice(l,d),t.ext=e.slice(r,d))),t.dir=l>0&&l!==n?e.slice(0,l-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},_=(()=>{if(d){const e=/\\/g;return()=>{const t=n.bJ().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>n.bJ()})(),v={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const s=n>=0?e[n]:_();c(s,`paths[${n}]`),0!==s.length&&(t=`${s}/${t}`,i=s.charCodeAt(0)===o)}return t=p(t,!i,"/",u),i?`/${t}`:t.length>0?t:"."},normalize(e){if(c(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===o,i=e.charCodeAt(e.length-1)===o;return 0===(e=p(e,!t,"/",u)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return c(e,"path"),e.length>0&&e.charCodeAt(0)===o},join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":v.normalize(t)},relative(e,t){if(c(e,"from"),c(t,"to"),e===t)return"";if((e=v.resolve(e))===(t=v.resolve(t)))return"";const i=e.length,n=i-1,s=t.length-1,r=nr){if(t.charCodeAt(1+l)===o)return t.slice(1+l+1);if(0===l)return t.slice(1+l)}else n>r&&(e.charCodeAt(1+l)===o?a=l:0===l&&(a=0));let d="";for(l=1+a+1;l<=i;++l)l!==i&&e.charCodeAt(l)!==o||(d+=0===d.length?"..":"/..");return`${d}${t.slice(1+a)}`},toNamespacedPath(e){return e},dirname(e){if(c(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===o;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===o){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&c(t,"ext"),c(e,"path");let i,n=0,s=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){const c=e.charCodeAt(i);if(c===o){if(!r){n=i+1;break}}else-1===l&&(r=!1,l=i+1),a>=0&&(c===t.charCodeAt(a)?-1==--a&&(s=i):(a=-1,s=l))}return n===s?s=l:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===o){if(!r){n=i+1;break}}else-1===s&&(r=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){c(e,"path");let t=-1,i=0,n=-1,r=!0,a=0;for(let l=e.length-1;l>=0;--l){const c=e.charCodeAt(l);if(c!==o)-1===n&&(r=!1,n=l+1),c===s?-1===t?t=l:1!==a&&(a=1):-1!==t&&(a=-1);else if(!r){i=l+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===i+1?"":e.slice(t,n)},format:f.bind(null,"/"),parse(e){c(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===o;let n;i?(t.root="/",n=1):n=0;let r=-1,a=0,l=-1,d=!0,h=e.length-1,u=0;for(;h>=n;--h){const t=e.charCodeAt(h);if(t!==o)-1===l&&(d=!1,l=h+1),t===s?-1===r?r=h:1!==u&&(u=1):-1!==r&&(u=-1);else if(!d){a=h+1;break}}if(-1!==l){const n=0===a&&i?1:a;-1===r||0===u||1===u&&r===l-1&&r===a+1?t.base=t.name=e.slice(n,l):(t.name=e.slice(n,r),t.base=e.slice(n,l),t.ext=e.slice(r,l))}return a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};v.win32=m.win32=m,v.posix=m.posix=v;const b=d?m.normalize:v.normalize,w=d?m.join:v.join,C=d?m.resolve:v.resolve,y=d?m.relative:v.relative,S=d?m.dirname:v.dirname,k=d?m.basename:v.basename,x=d?m.extname:v.extname,L=d?m.sep:v.sep},79783:function(e,t,i){"use strict";i.d(t,{BH:function(){return P},Fr:function(){return T},H8:function(){return V},HZ:function(){return N},OS:function(){return F},UP:function(){return j},_p:function(){return O},cm:function(){return H},gm:function(){return z},ib:function(){return E},j9:function(){return D},lg:function(){return I},m0:function(){return q},nr:function(){return U},uF:function(){return x},un:function(){return M},zx:function(){return L}});var n=i(14374);const s="en";let o,r,a=!1,l=!1,c=!1,d=!1,h=!1,u=!1,g=!1,p=!1,f=!1,m=!1,_=s,v=null,b=null;const w=globalThis;let C;void 0!==w.vscode&&void 0!==w.vscode.process?C=w.vscode.process:"undefined"!=typeof process&&"string"==typeof process?.versions?.node&&(C=process);const y="string"==typeof C?.versions?.electron,S=y&&"renderer"===C?.type;if("object"==typeof C){a="win32"===C.platform,l="darwin"===C.platform,c="linux"===C.platform,d=c&&!!C.env.SNAP&&!!C.env.SNAP_REVISION,g=y,f=!!C.env.CI||!!C.env.BUILD_ARTIFACTSTAGINGDIRECTORY,o=s,_=s;const e=C.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);o=t.userLocale,v=t.osLocale,_=t.resolvedLanguage||s,b=t.languagePack?.translationsConfigFile}catch(e){}h=!0}else"object"!=typeof navigator||S?console.error("Unable to resolve platform."):(r=navigator.userAgent,a=r.indexOf("Windows")>=0,l=r.indexOf("Macintosh")>=0,p=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=r.indexOf("Linux")>=0,m=r?.indexOf("Mobi")>=0,u=!0,_=n.i8()||s,o=navigator.language.toLowerCase(),v=o);let k=0;l?k=1:a?k=3:c&&(k=2);const x=a,L=l,D=c,E=h,N=u,I=u&&"function"==typeof w.importScripts?w.origin:void 0,M=p,T=m,R=r,P=_,A="function"==typeof w.postMessage&&!w.importScripts,O=(()=>{if(A){const e=[];w.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),w.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),F=l||p?2:a?1:3;let B=!0,W=!1;function H(){if(!W){W=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);B=513===t[0]}return B}const V=!!(R&&R.indexOf("Chrome")>=0),z=!!(R&&R.indexOf("Firefox")>=0),U=!!(!V&&R&&R.indexOf("Safari")>=0),j=!!(R&&R.indexOf("Edg/")>=0),q=!!(R&&R.indexOf("Android")>=0)},93915:function(e,t,i){"use strict";i.d(t,{_K:function(){return a},bJ:function(){return r},iD:function(){return l}});var n=i(79783);let s;const o=globalThis.vscode;if(void 0!==o&&void 0!==o.process){const e=o.process;s={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else s="undefined"!=typeof process&&"string"==typeof process?.versions?.node?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:{get platform(){return n.uF?"win32":n.zx?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const r=s.cwd,a=s.env,l=s.platform},69627:function(e,t,i){"use strict";var n;i.d(t,{Q:function(){return n}}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],s={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return i(s)||n.push(s),i(o)||n.push(o),n}}(n||(n={}))},59951:function(e,t,i){"use strict";i.d(t,{B6:function(){return S},Fd:function(){return v},LC:function(){return f},P8:function(){return p},Pi:function(){return g},er:function(){return h},iZ:function(){return b},n4:function(){return u},o1:function(){return w},pD:function(){return m},su:function(){return c},uJ:function(){return _}});var n=i(11354),s=i(84756),o=i(68847),r=i(79783),a=i(43920),l=i(54244);function c(e){return(0,l.I)(e,!0)}class d{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,a.UD)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===s.ny.file)return n._1(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(C(e.authority,t.authority))return n._1(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.r.joinPath(e,...t)}basenameOrAuthority(e){return p(e)||e.authority}basename(e){return o.SA.basename(e.path)}extname(e){return o.SA.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===s.ny.file?t=l.r.file(o.pD(c(e))).path:(t=o.SA.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===s.ny.file?l.r.file(o.S8(c(e))).path:o.SA.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!C(e.authority,t.authority))return;if(e.scheme===s.ny.file){const i=o.V8(c(e),c(t));return r.uF?n.TH(i):i}let i=e.path||"/";const a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,a.length);en.Zn(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=o.Vn){return y(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=o.Vn){let i=!1;if(e.scheme===s.ny.file){const s=c(e);i=void 0!==s&&s.length===n.Zn(s).length&&s[s.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||y(e,t)?e:e.with({path:e.path+"/"})}}const h=new d((()=>!1)),u=(new d((e=>e.scheme!==s.ny.file||!r.j9)),new d((e=>!0)),h.isEqual.bind(h)),g=(h.isEqualOrParent.bind(h),h.getComparisonKey.bind(h),h.basenameOrAuthority.bind(h)),p=h.basename.bind(h),f=h.extname.bind(h),m=h.dirname.bind(h),_=h.joinPath.bind(h),v=h.normalizePath.bind(h),b=h.relativePath.bind(h),w=h.resolvePath.bind(h),C=(h.isAbsolutePath.bind(h),h.isEqualAuthority.bind(h)),y=h.hasTrailingPathSeparator.bind(h);var S;h.removeTrailingPathSeparator.bind(h),h.addTrailingPathSeparator.bind(h),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(S||(S={}))},95773:function(e,t,i){"use strict";i.d(t,{yE:function(){return r}});var n=i(80670),s=i(35114);class o{constructor(e,t,i,n,s,o,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,s|=0,o|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),r+s>o&&(r=o-s),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new o(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new o(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends s.jG{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.vl),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new o(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new c(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=c.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class c{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e=t.length?e:t[n]}))}function l(e){return e.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e}))}function c(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function d(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function h(e,t=" "){return g(u(e,t),t)}function u(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function g(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let s=n,o=-1;for(;o=e.lastIndexOf(t,s-1),-1!==o&&o+i===s;){if(0===o)return"";s=o}return e.substring(0,s)}function p(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(e){return e.replace(/\*/g,"")}function m(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=d(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function v(e){return e.split(/\r\n|\r|\n/)}function b(e){const t=[],i=e.split(/(\r\n|\r|\n)/);for(let e=0;e=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function S(e,t){return et?1:0}function k(e,t,i=0,n=e.length,s=0,o=t.length){for(;io)return 1}const r=n-i,a=o-s;return ra?1:0}function x(e,t){return L(e,t,0,e.length,0,t.length)}function L(e,t,i=0,n=e.length,s=0,o=t.length){for(;i=128||a>=128)return k(e.toLowerCase(),t.toLowerCase(),i,n,s,o);E(r)&&(r-=32),E(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=o-s;return ra?1:0}function D(e){return e>=48&&e<=57}function E(e){return e>=97&&e<=122}function N(e){return e>=65&&e<=90}function I(e,t){return e.length===t.length&&0===L(e,t)}function M(e,t){const i=t.length;return!(t.length>e.length)&&0===L(e,t,0,i)}function T(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n1){const n=e.charCodeAt(t-2);if(P(n))return O(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=F(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class W{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new B(e,t)}nextGraphemeLength(){const e=ie.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(te(n,s)){t.setOffset(i);break}n=s}return t.offset-i}prevGraphemeLength(){const e=ie.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(te(s,n)){t.setOffset(i);break}n=s}return i-t.offset}eol(){return this._iterator.eol()}}function H(e,t){return new W(e,t).nextGraphemeLength()}function V(e,t){return new W(e,t).prevGraphemeLength()}function z(e,t){t>0&&A(e.charCodeAt(t))&&t--;const i=t+H(e,t);return[i-V(e,i),i]}let U;function j(e){return U||(U=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),U.test(e)}const q=/^[\t\n\r\x20-\x7E]*$/;function K(e){return q.test(e)}const $=/[\u2028\u2029]/;function G(e){return $.test(e)}function Q(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Y(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const Z=String.fromCharCode(65279);function X(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function J(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ee(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function te(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ie{static{this._INSTANCE=null}static getInstance(){return ie._INSTANCE||(ie._INSTANCE=new ie),ie._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function ne(e,t){if(0===e)return 0;const i=function(e,t){const i=new B(t,e);let n=i.prevCodePoint();for(;se(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!Y(n))return;let s=i.offset;return s>0&&8205===i.prevCodePoint()&&(s=i.offset),s}(e,t);if(void 0!==i)return i;const n=new B(t,e);return n.prevCodePoint(),n.offset}function se(e){return 127995<=e&&e<=127999}const oe=" ";class re{static{this.ambiguousCharacterData=new s.d((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')))}static{this.cache=new n.o5({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in n));0===o.length&&(o=["_default"]);for(const e of o)s=i(s,t(n[e]));const r=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(n._common),s);return new re(r)}))}static getInstance(e){return re.cache.get(Array.from(e))}static{this._locales=new s.d((()=>Object.keys(re.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))))}static getLocales(){return re._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class ae{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(ae.getRawData())),this._data}static isInvisibleCharacter(e){return ae.getData().has(e)}static get codePoints(){return ae.getData()}}},4691:function(e,t,i){"use strict";i.d(t,{h:function(){return n}});const n=Symbol("MicrotaskDelay")},80945:function(e,t,i){"use strict";i.d(t,{cB:function(){return c}});var n=i(43920);class s{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1,t=()=>!1){return new c(new a(e,t))}static forStrings(){return new c(new s)}static forConfigKeys(){return new c(new o)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new l,this._root.segment=i.value());const s=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new l,n.left.segment=i.value()),s.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new l,n.right.segment=i.value()),s.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),s.push([0,n]),n=n.mid}}const o=n.value;n.value=t,n.key=e;for(let e=s.length-1;e>=0;e--){const t=s[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=s[e][0],n=s[e+1][0];if(1===i&&1===n)s[e][1]=t.rotateLeft();else if(-1===i&&-1===n)s[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=s[e+1][1]=s[e+1][1].rotateRight(),s[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=s[e+1][1]=s[e+1][1].rotateLeft(),s[e][1]=t.rotateRight()}if(e>0)switch(s[e-1][0]){case-1:s[e-1][1].left=s[e][1];break;case 1:s[e-1][1].right=s[e][1];break;case 0:s[e-1][1].mid=s[e][1]}else this._root=s[0][1]}}return o}get(e){return this._getNode(e)?.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===t?.value&&void 0===t?.mid)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let s=this._root;for(;s;){const e=i.cmp(s.segment);if(e>0)n.push([-1,s]),s=s.left;else if(e<0)n.push([1,s]),s=s.right;else{if(!i.hasNext())break;i.next(),n.push([0,s]),s=s.mid}}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const e=this._min(s.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}}else{const e=s.left??s.right;if(n.length>0){const[t,i]=n[n.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=n.length-1;e>=0;e--){const t=n[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),n[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),n[e][1]=t.rotateRight()),e>0)switch(n[e-1][0]){case-1:n[e-1][1].left=n[e][1];break;case 1:n[e-1][1].right=n[e][1];break;case 0:n[e-1][1].mid=n[e][1]}else this._root=n[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}},56613:function(e,t,i){"use strict";i.d(t,{L:function(){return s}});var n,s,o=i(93231);!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(n||(n={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(o.W.error);const[,s,r]=n,a=["codicon","codicon-"+s];return r&&a.push("codicon-modifier-"+r.substring(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};const s=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=s.exec(e);if(!t)return;const[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){return e.id===t.id&&e.color?.id===t.color?.id}}(s||(s={}))},24219:function(e,t,i){"use strict";function n(e){return"string"==typeof e}function s(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){const t=Object.getPrototypeOf(Uint8Array);return"object"==typeof e&&e instanceof t}function r(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!!e&&"function"==typeof e[Symbol.iterator]}function l(e){return!0===e||!1===e}function c(e){return void 0===e}function d(e){return!h(e)}function h(e){return c(e)||null===e}function u(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function g(e){if(h(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function p(e){return"function"==typeof e}function f(e,t){const i=Math.min(e.length,t.length);for(let n=0;n255?255:0|e}function s(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{W:function(){return n},j:function(){return s}})},54244:function(e,t,i){"use strict";i.d(t,{I:function(){return _},r:function(){return h}});var n=i(68847),s=i(79783);const o=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//,l="",c="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,s,d=!1){"object"==typeof e?(this.scheme=e.scheme||l,this.authority=e.authority||l,this.path=e.path||l,this.query=e.query||l,this.fragment=e.fragment||l):(this.scheme=function(e,t){return e||t?e:"file"}(e,d),this.authority=t||l,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,i||l),this.query=n||l,this.fragment=s||l,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,d))}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=l),void 0===i?i=this.authority:null===i&&(i=l),void 0===n?n=this.path:null===n&&(n=l),void 0===s?s=this.query:null===s&&(s=l),void 0===o?o=this.fragment:null===o&&(o=l),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment?this:new g(t,i,n,s,o)}static parse(e,t=!1){const i=d.exec(e);return i?new g(i[2]||l,C(i[4]||l),C(i[5]||l),C(i[7]||l),C(i[9]||l),t):new g(l,l,l,l,l)}static file(e){let t=l;if(s.uF&&(e=e.replace(/\\/g,c)),e[0]===c&&e[1]===c){const i=e.indexOf(c,2);-1===i?(t=e.substring(2),e=c):(t=e.substring(2,i),e=e.substring(i)||c)}return new g("file",t,e,l,l)}static from(e,t){return new g(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=s.uF&&"file"===e.scheme?h.file(n.IN.join(_(e,!0),...t)).path:n.SA.join(e.path,...t),e.with({path:i})}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new g(e);return t._formatted=e.external??null,t._fsPath=e._sep===u?e.fsPath??null:null,t}}return e}}const u=s.uF?1:void 0;class g extends h{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=u),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function f(e,t,i){let n,s=-1;for(let o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));const t=p[r];void 0!==t?(-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),n+=t):-1===s&&(s=o)}}return-1!==s&&(n+=encodeURIComponent(e.substring(s))),void 0!==n?n:e}function m(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s.uF&&(i=i.replace(/\//g,"\\")),i}function v(e,t){const i=t?m:f;let n="",{scheme:s,authority:o,path:r,query:a,fragment:l}=e;if(s&&(n+=s,n+=":"),(o||"file"===s)&&(n+=c,n+=c),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}o=o.toLowerCase(),e=o.lastIndexOf(":"),-1===e?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:f(l,!1,!1)),n}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(w)?e.replace(w,(e=>b(e))):e}},20419:function(e,t,i){"use strict";i.d(t,{b:function(){return n}});const n=function(){if("object"==typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t{this._pendingReplies[n]={resolve:s,reject:o},this._send(new g(this._workerId,n,e,t,i))}))}listen(e,t,i){let n=null;const o=new s.vl({onWillAddFirstListener:()=>{n=String(++this._lastSentReq),this._pendingEmitters.set(n,o),this._send(new f(this._workerId,n,e,t,i))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(n),this._send(new _(this._workerId,n)),n=null}});return o.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}createProxyToRemoteChannel(e,t){const i={get:(i,n)=>("string"!=typeof n||i[n]||(C(n)?i[n]=t=>this.listen(e,n,t):w(n)?i[n]=this.listen(e,n,void 0):36===n.charCodeAt(0)&&(i[n]=async(...i)=>(await(t?.()),this.sendMessage(e,n,i)))),i[n])};return new Proxy(Object.create(null),i)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then((e=>{this._send(new p(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=(0,n.cU)(e.detail)),this._send(new p(this._workerId,t,void 0,(0,n.cU)(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.channel,e.eventName,e.arg)((e=>{this._send(new m(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{(0,n.dz)(e)}))),this._protocol=new v({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t,i)=>this._handleMessage(e,t,i),handleEvent:(e,t,i)=>this._handleEvent(e,t,i)}),this._protocol.setWorkerId(this._worker.getId());let i=null;const s=globalThis.require;void 0!==s&&"function"==typeof s.getConfig?i=s.getConfig():void 0!==globalThis.requirejs&&(i=globalThis.requirejs.s.contexts._.config),this._onModuleLoaded=this._protocol.sendMessage(c,d,[this._worker.getId(),JSON.parse(JSON.stringify(i)),t.amdModuleId]),this.proxy=this._protocol.createProxyToRemoteChannel(c,(async()=>{await this._onModuleLoaded})),this._onModuleLoaded.catch((e=>{this._onError("Worker failed to load "+t.amdModuleId,e)}))}_handleMessage(e,t,i){const n=this._localChannels.get(e);if(!n)return Promise.reject(new Error(`Missing channel ${e} on main thread`));if("function"!=typeof n[t])return Promise.reject(new Error(`Missing method ${t} on main thread channel ${e}`));try{return Promise.resolve(n[t].apply(n,i))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,i){const n=this._localChannels.get(e);if(!n)throw new Error(`Missing channel ${e} on main thread`);if(C(t)){const s=n[t].call(n,i);if("function"!=typeof s)throw new Error(`Missing dynamic event ${t} on main thread channel ${e}.`);return s}if(w(t)){const i=n[t];if("function"!=typeof i)throw new Error(`Missing event ${t} on main thread channel ${e}.`);return i}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}_onError(e,t){console.error(e),console.info(t)}}function w(e){return"o"===e[0]&&"n"===e[1]&&l.Wv(e.charCodeAt(2))}function C(e){return/^onDynamic/.test(e)&&l.Wv(e.charCodeAt(9))}class y{constructor(e,t){this._localChannels=new Map,this._remoteChannels=new Map,this._requestHandlerFactory=t,this._requestHandler=null,this._protocol=new v({sendMessage:(t,i)=>{e(t,i)},handleMessage:(e,t,i)=>this._handleMessage(e,t,i),handleEvent:(e,t,i)=>this._handleEvent(e,t,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,i){if(e===c&&t===d)return this.initialize(i[0],i[1],i[2]);const n=e===c?this._requestHandler:this._localChannels.get(e);if(!n)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));if("function"!=typeof n[t])return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(n[t].apply(n,i))}catch(e){return Promise.reject(e)}}_handleEvent(e,t,i){const n=e===c?this._requestHandler:this._localChannels.get(e);if(!n)throw new Error(`Missing channel ${e} on worker thread`);if(C(t)){const e=n[t].call(n,i);if("function"!=typeof e)throw new Error(`Missing dynamic event ${t} on request handler.`);return e}if(w(t)){const e=n[t];if("function"!=typeof e)throw new Error(`Missing event ${t} on request handler.`);return e}throw new Error(`Malformed event name ${t}`)}getChannel(e){if(!this._remoteChannels.has(e)){const t=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,t)}return this._remoteChannels.get(e)}async initialize(e,t,n){if(this._protocol.setWorkerId(e),!this._requestHandlerFactory){t&&(void 0!==t.baseUrl&&delete t.baseUrl,void 0!==t.paths&&void 0!==t.paths.vs&&delete t.paths.vs,void 0!==t.trustedTypesPolicy&&delete t.trustedTypesPolicy,t.catchError=!0,globalThis.require.config(t));{const e=r.zl.asBrowserUri(`${n}.js`).toString(!0);return i(12694)(`${e}`).then((e=>{if(this._requestHandler=e.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}))}}this._requestHandler=this._requestHandlerFactory(this)}}function S(e){return new y(e,null)}},12694:function(e,t,i){var n={"./simpleWorker":79757,"./simpleWorker.js":79757};function s(e){return Promise.resolve().then((function(){if(!i.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i(n[e])}))}s.keys=function(){return Object.keys(n)},s.id=12694,e.exports=s},71882:function(e,t,i){"use strict";i.d(t,{K:function(){return g}});var n=i(47091),s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||s(e,l,{get:()=>t[l],enumerable:!(n=o(t,l))||n.enumerable});return e},c={};l(c,n,"default");var d={},h={},u=class e{static getOrCreate(t){return h[t]||(h[t]=new e(t)),h[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,d[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function g(e){const t=e.id;d[t]=e,c.languages.register(e);const i=u.getOrCreate(t);c.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),c.languages.onLanguageEncountered(t,(async()=>{const e=await i.load();c.languages.setLanguageConfiguration(t,e.conf)}))}},55172:function(e,t,i){"use strict";(0,i(71882).K)({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(7714).then(i.bind(i,37714))})},43193:function(e,t,i){"use strict";i.d(t,{M:function(){return s}});var n=i(43999);function s(e,t){e instanceof n.D?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}},75083:function(e,t,i){"use strict";i.d(t,{u:function(){return r}});var n=i(35114),s=i(80670),o=i(84201);class r extends n.jG{constructor(e,t){super(),this._onDidChange=this._register(new s.vl),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const s=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{(0,o.PG)((0,o.zk)(this._referenceDomElement),(()=>{n=!1,s()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?{width:t[0].contentRect.width,height:t[0].contentRect.height}:null,i=!0,s()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}},57614:function(e,t,i){"use strict";i.d(t,{T:function(){return p}});var n=i(84201),s=i(8670),o=i(80670),r=i(35114),a=i(43193);class l{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class c{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),this._container?.remove(),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");(0,a.M)(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");(0,a.M)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");(0,a.M)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const s=[];for(const e of this._requests){let o;0===e.type&&(o=t),2===e.type&&(o=i),1===e.type&&(o=n),o.appendChild(document.createElement("br"));const r=document.createElement("span");c._render(r,e),o.appendChild(r),s.push(r)}this._container=e,this._testElements=s}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)}),5e3))}_evictUntrustedReadings(e){const t=this._ensureCache(e),i=t.getValues();let n=!1;for(const e of i)e.isTrusted||(n=!0,t.remove(e));n&&this._onDidChange.fire()}readFontInfo(e,t){const i=this._ensureCache(e);if(!i.has(t)){let i=this._actualReadFontInfo(e,t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new h.YJ({pixelRatio:s.c.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(e,t,i)}return i.get(t)}_createRequest(e,t,i,n){const s=new l(e,t);return i.push(s),n?.push(s),s}_actualReadFontInfo(e,t){const i=[],n=[],o=this._createRequest("n",0,i,n),r=this._createRequest("m",0,i,null),a=this._createRequest(" ",0,i,n),l=this._createRequest("0",0,i,n),u=this._createRequest("1",0,i,n),g=this._createRequest("2",0,i,n),p=this._createRequest("3",0,i,n),f=this._createRequest("4",0,i,n),m=this._createRequest("5",0,i,n),_=this._createRequest("6",0,i,n),v=this._createRequest("7",0,i,n),b=this._createRequest("8",0,i,n),w=this._createRequest("9",0,i,n),C=this._createRequest("→",0,i,n),y=this._createRequest("→",0,i,null),S=this._createRequest("·",0,i,n),k=this._createRequest(String.fromCharCode(11825),0,i,null),x="|/-_ilm%";for(let e=0,t=8;e.001){D=!1;break}}let N=!0;return D&&y.width!==E&&(N=!1),y.width>C.width&&(N=!1),new h.YJ({pixelRatio:s.c.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:D,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:a.width,middotWidth:S.width,wsmiddotWidth:k.width,maxDigitWidth:L},!0)}}class g{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const p=new u},52055:function(e,t,i){"use strict";i.d(t,{M:function(){return s}});var n=i(80670);const s=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new n.vl,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}}},55036:function(e,t,i){"use strict";i.d(t,{$D:function(){return n},Eq:function(){return b},M0:function(){return k},Mz:function(){return S},No:function(){return y},bs:function(){return w}});var n,s=i(75969),o=i(84201),r=i(26745),a=i(40478),l=i(56627),c=i(90890),d=i(80670),h=i(35114),u=i(5940),g=i(43920),p=i(41069),f=i(56218),m=i(68745),_=i(76925),v=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const b={forceCopyWithSyntaxHighlighting:!1};class w{static{this.INSTANCE=new w}constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}class C{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let y=class extends h.jG{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,o){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=o,this._onFocus=this._register(new d.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new d.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new d.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new d.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new d.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new d.vl),this.onPaste=this._onPaste.event,this._onType=this._register(new d.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new d.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new d.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new d.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new d.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new h.HE),this._asyncTriggerCut=this._register(new c.uC((()=>this._onCut.fire()),0)),this._textAreaState=p._O.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(d.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new c.uC((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)):this._asyncFocusGainWriteScreenReaderContent.clear()}))),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown((e=>{const t=new a.Z(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new a.Z(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{p.Hf&&console.log("[compositionstart]",e);const t=new C;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code))return p.Hf&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{p.Hf&&console.log("[compositionupdate]",e);const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=p._O.readFromTextArea(this._textArea,this._textAreaState),i=p._O.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p._O.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{p.Hf&&console.log("[compositionend]",e);const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=p._O.readFromTextArea(this._textArea,this._textAreaState),t=p._O.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=p._O.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(p.Hf&&console.log("[input]",e),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=p._O.readFromTextArea(this._textArea,this._textAreaState),i=p._O.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!g.pc(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=S.getTextData(e.clipboardData);t&&(i=i||w.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new c.uC((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return o.ko(this._textArea.ownerDocument,"selectionchange",(t=>{if(l.p.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100)return;if(!this._textAreaState.selection)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const c=this._textAreaState.deduceEditorPosition(r),d=this._host.deduceModelPosition(c[0],c[1],c[2]),h=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(h[0],h[1],h[2]),g=new f.L(d.lineNumber,d.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&"render"===e||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};w.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&S.setTextData(e.clipboardData,t.text,t.html,i)}};y=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([v(4,m.j),v(5,_.rr)],y);const S={getTextData(e){const t=e.getData(u.K.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return 0===t.length&&null===i&&e.files.length>0?[Array.prototype.slice.call(e.files,0).map((e=>e.name)).join("\n"),null]:[t,i]},setTextData(e,t,i,n){e.setData(u.K.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class k extends h.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new r.f(this._actual,"keydown")).event,this.onKeyUp=this._register(new r.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new r.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new r.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new r.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new r.f(this._actual,"beforeinput")).event,this.onInput=this._register(new r.f(this._actual,"input")).event,this.onCut=this._register(new r.f(this._actual,"cut")).event,this.onCopy=this._register(new r.f(this._actual,"copy")).event,this.onPaste=this._register(new r.f(this._actual,"paste")).event,this.onFocus=this._register(new r.f(this._actual,"focus")).event,this.onBlur=this._register(new r.f(this._actual,"blur")).event,this._onSyntheticTap=this._register(new d.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>l.p.onKeyDown()))),this._register(this.onBeforeInput((()=>l.p.onBeforeInput()))),this._register(this.onInput((()=>l.p.onInput()))),this._register(this.onKeyUp((()=>l.p.onKeyUp()))),this._register(o.ko(this._actual,n.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=o.jG(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&o.bq()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let r=null;const a=o.jG(n);r=a?a.activeElement:o.bq();const l=o.zk(r),c=r===n,d=n.selectionStart,h=n.selectionEnd;if(c&&d===t&&h===i)s.gm&&l.parent!==l&&n.focus();else{if(c)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(s.gm&&l.parent!==l&&n.focus());try{const e=o.zK(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),o.wk(n,e)}catch(e){}}}}},41069:function(e,t,i){"use strict";i.d(t,{Al:function(){return a},Hf:function(){return o},_O:function(){return r}});var n=i(43920),s=i(40393);const o=!1;class r{static{this.EMPTY=new r("",0,0,null,void 0)}constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),s=e.getSelectionEnd();let o;return t&&i.substring(0,n)===t.value.substring(0,t.selectionStart)&&(o=t.newlineCountBeforeSelection),new r(i,n,s,null,o)}collapseSelection(){return this.selectionStart===this.value.length?this:new r(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){o&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;-1!==(s=t.indexOf("\n",s+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};o&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));const s=Math.min(n.Qp(e.value,t.value),e.selectionStart,t.selectionStart),r=Math.min(n.Vi(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),a=e.value.substring(s,e.value.length-r),l=t.value.substring(s,t.value.length-r),c=e.selectionStart-s,d=e.selectionEnd-s,h=t.selectionStart-s,u=t.selectionEnd-s;if(o&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${c}, selectionEnd: ${d}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${h}, selectionEnd: ${u}`)),h===u){const t=e.selectionStart-s;return o&&console.log(`REMOVE PREVIOUS: ${t} chars`),{text:l,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:d-c,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(o&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Qp(e.value,t.value),e.selectionEnd),s=Math.min(n.Vi(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-s),a=t.value.substring(i,t.value.length-s),l=e.selectionStart-i,c=e.selectionEnd-i,d=t.selectionStart-i,h=t.selectionEnd-i;return o&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${d}, selectionEnd: ${h}`)),{text:a,replacePrevCharCnt:c,replaceNextCharCnt:r.length-c,positionDelta:h-a.length}}}class a{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,o=i+t;return new s.Q(n,1,o+1,1)}static fromEditorSelection(e,t,i,n){const o=500,l=a._getPageOfLine(t.startLineNumber,i),c=a._getRangeForPage(l,i),d=a._getPageOfLine(t.endLineNumber,i),h=a._getRangeForPage(d,i);let u=c.intersectRanges(new s.Q(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(u,1)>o){const t=e.modifyPosition(u.getEndPosition(),-500);u=s.Q.fromPositions(t,u.getEndPosition())}const g=e.getValueInRange(u,1),p=e.getLineCount(),f=e.getLineMaxColumn(p);let m=h.intersectRanges(new s.Q(t.endLineNumber,t.endColumn,p,f));if(n&&e.getValueLengthInRange(m,1)>o){const t=e.modifyPosition(m.getStartPosition(),o);m=s.Q.fromPositions(m.getStartPosition(),t)}const _=e.getValueInRange(m,1);let v;if(l===d||l+1===d)v=e.getValueInRange(t,1);else{const i=c.intersectRanges(t),n=h.intersectRanges(t);v=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&v.length>1e3&&(v=v.substring(0,o)+String.fromCharCode(8230)+v.substring(v.length-o,v.length)),new r(g+v+_,g.length,g.length+v.length,t,u.endLineNumber-u.startLineNumber)}}},34157:function(e,t,i){"use strict";i.d(t,{Yh:function(){return N},QM:function(){return f}});var n=i(14374),s=i(75969),o=i(24219),r=i(15075),a=i(52694),l=i(72777),c=i(30699),d=i(62993),h=i(40393);class u{static columnSelect(e,t,i,n,s,o){const r=Math.abs(s-i)+1,a=i>s,l=n>o,u=no)continue;if(_n)continue;if(m0&&n--,u.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=s;i<=o;i++){const s=t.getLineMaxColumn(i),o=e.visibleColumnFromColumn(t,new d.y(i,s));n=Math.max(n,o)}let r=i.toViewVisualColumn;return r{const i=e.get(l.T).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=(0,y.bq)();return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(i),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.T).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends k{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.c.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&2!==t.revealType&&e.revealAllCursors(t.source,!0,!0))}}e.MoveTo=(0,a.E_)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.E_)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends k{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>c.MF.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=(0,a.E_)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if(void 0===n.position||void 0===n.viewPosition||void 0===n.mouseColumn)return null;const s=e.model.validatePosition(n.position),o=e.coordinatesConverter.validateViewPosition(new d.y(n.viewPosition.lineNumber,n.viewPosition.column),s),r=n.doColumnSelect?i.fromViewLineNumber:o.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return u.columnSelect(e.cursorConfig,e,r,a,o.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.E_)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.E_)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectRight(e.cursorConfig,e,i)}});class o extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.E_)(new o({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.E_)(new o({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.E_)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.E_)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:3596,linux:{primary:0}}}));class f extends k{constructor(){super({id:"cursorMove",precondition:void 0,metadata:_.S.metadata})}runCoreEditorCommand(e,t){const i=_.S.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,f._move(e,e.getCursorStates(),i)),e.revealAllCursors(t,!0)}static _move(e,t,i){const n=i.select,s=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.c.simpleMove(e,t,i.direction,n,s,i.unit);case 11:case 13:case 12:case 14:return _.c.viewportMove(e,t,i.direction,n,s);default:return null}}}e.CursorMoveImpl=f,e.CursorMove=(0,a.E_)(new f);class m extends k{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.c.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealAllCursors(t.source,!0)}}e.CursorLeft=(0,a.E_)(new m({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.E_)(new m({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1039}})),e.CursorRight=(0,a.E_)(new m({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.E_)(new m({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1041}})),e.CursorUp=(0,a.E_)(new m({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.E_)(new m({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.E_)(new m({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.E_)(new m({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1035}})),e.CursorDown=(0,a.E_)(new m({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.E_)(new m({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.E_)(new m({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.E_)(new m({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.E_)(new class extends k{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?_.c.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.c.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const s=i.modelState?i.modelState.position:null,o=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;io&&(s=o);const r=new h.Q(s,1,s,e.model.getLineMaxColumn(s));let a=0;if(i.at)switch(i.at){case p.RawAtArgument.Top:a=3;break;case p.RawAtArgument.Center:a=1;break;case p.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends x{constructor(){super(a.tc)}runDOMCommand(e){s.gm&&(e.focus(),e.select()),e.ownerDocument.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.c.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.E_)(new class extends k{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[c.MF.fromModelSelection(t.selection)]))}})}(f||(f={}));const L=w.M$.and(b.R.textInputFocus,b.R.columnSelection);function D(e,t){C.f.registerKeybindingRule({id:e,primary:t,when:L,weight:1})}function E(e){return e.register(),e}var N;D(f.CursorColumnSelectLeft.id,1039),D(f.CursorColumnSelectRight.id,1041),D(f.CursorColumnSelectUp.id,1040),D(f.CursorColumnSelectPageUp.id,1035),D(f.CursorColumnSelectDown.id,1042),D(f.CursorColumnSelectPageDown.id,1036),function(e){class t extends a.DX{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.E_)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.R.writable,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,S.AO.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.E_)(new class extends t{constructor(){super({id:"outdent",precondition:b.R.writable,kbOpts:{weight:0,kbExpr:w.M$.and(b.R.editorTextFocus,b.R.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.T.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.E_)(new class extends t{constructor(){super({id:"tab",precondition:b.R.writable,kbOpts:{weight:0,kbExpr:w.M$.and(b.R.editorTextFocus,b.R.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.T.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.E_)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,s]=m.g.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.E_)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.R.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,s]=m.g.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(3)}}),e.Undo=new class extends x{constructor(){super(a.aU)}runDOMCommand(e){e.ownerDocument.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(92))return t.getModel().undo()}},e.Redo=new class extends x{constructor(){super(a.ih)}runDOMCommand(e){e.ownerDocument.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(92))return t.getModel().redo()}}}(N||(N={}));class I extends a.uB{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.T).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function M(e,t){E(new I("default:"+e,e)),E(new I(e,e,t))}M("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),M("replacePreviousChar"),M("compositionType"),M("compositionStart"),M("compositionEnd"),M("paste"),M("cut")},92559:function(e,t,i){"use strict";i.d(t,{l:function(){return h},q:function(){return l}});var n=i(88767),s=i(71859),o=i(5940),r=i(54244),a=i(19312);function l(e){const t=new s.Vq;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,(0,s.gf)(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,c(n))}}return t}function c(e){const t=e.path?r.r.parse(e.path):void 0;return(0,s.VX)(e.name,t,(async()=>new Uint8Array(await e.arrayBuffer())))}const d=Object.freeze([a.sV.EDITORS,a.sV.FILES,n.t.RESOURCES,n.t.INTERNAL_URI_LIST]);function h(e,t=!1){const i=l(e),a=i.get(n.t.INTERNAL_URI_LIST);if(a)i.replace(o.K.uriList,a);else if(t||!i.has(o.K.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(r.r.file(i).toString()):t.push(r.r.parse(e.name,!0).toString())}catch{}}}t.length&&i.replace(o.K.uriList,(0,s.gf)(s.jt.create(t)))}for(const e of d)i.delete(e);return i}},47010:function(e,t,i){"use strict";i.d(t,{Np:function(){return o},jA:function(){return r},z9:function(){return s}});var n=i(48872);function s(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n._.ICodeEditor}function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n._.IDiffEditor}function r(e){return s(e)?e:o(e)?e.getModifiedEditor():function(e){return!!e&&"object"==typeof e&&"function"==typeof e.onDidChangeActiveEditor}(e)&&s(e.activeCodeEditor)?e.activeCodeEditor:null}},55266:function(e,t,i){"use strict";i.d(t,{$z:function(){return m},BA:function(){return v},DW:function(){return _},Hh:function(){return d},Qn:function(){return b},dO:function(){return f},i_:function(){return p},nz:function(){return c},wt:function(){return g}});var n=i(84201),s=i(82884),o=i(34287),r=i(90890),a=i(35114),l=i(4195);class c{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new d(this.x-e.scrollX,this.y-e.scrollY)}}class d{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new c(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class h{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class u{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function g(e){const t=n.BK(e);return new h(t.left,t.top,t.width,t.height)}function p(e,t,i){const n=t.width/e.offsetWidth,s=t.height/e.offsetHeight,o=(i.x-t.x)/n,r=(i.y-t.y)/s;return new u(o,r)}class f extends o.P{constructor(e,t,i){super(n.zk(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new c(this.posx,this.posy),this.editorPos=g(i),this.relativePos=p(i,this.editorPos,this.pos)}}class m{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return n.ko(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return n.ko(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return n.ko(e,n.Bx.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return n.ko(e,n.Bx.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return n.ko(e,"mousemove",(e=>t(this._create(e))))}}class _{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return n.ko(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return n.ko(e,n.Bx.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return n.ko(e,"pointermove",(e=>t(this._create(e))))}}class v extends a.jG{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new s._),this._keydownListener=null}startMonitoring(e,t,i,s,o){this._keydownListener=n.b2(e.ownerDocument,"keydown",(e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{s(new f(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class b{static{this._idPool=0}constructor(e){this._editor=e,this._instanceId=++b._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new r.uC((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const s=this._counter++;i=new w(t,`dyn-rule-${this._instanceId}-${s}`,n.Cl(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}class w{constructor(e,t,i,s){this.key=e,this.className=t,this.properties=s,this._referenceCount=0,this._styleElementDisposables=new a.Cm,this._styleElement=n.li(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let s;s="object"==typeof n?(0,l.GuP)(n.id):n,i+=`\n\t${C(e)}: ${s};`}return i+="\n}",i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function C(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}},52694:function(e,t,i){"use strict";i.d(t,{DX:function(){return S},E_:function(){return E},Fl:function(){return N},HW:function(){return T},PF:function(){return x},aU:function(){return A},dS:function(){return n},fE:function(){return C},gW:function(){return I},ih:function(){return O},ke:function(){return D},ks:function(){return k},qO:function(){return L},tc:function(){return F},uB:function(){return w},xX:function(){return M}});var n,s=i(14374),o=i(54244),r=i(72777),a=i(62993),l=i(59266),c=i(20878),d=i(93223),h=i(21335),u=i(97848),g=i(63619),p=i(19561),f=i(56419),m=i(2727),_=i(24219),v=i(76925),b=i(84201);class w{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?u.M$.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};p.f.registerKeybindingRule(i)}}h.w.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){d.ZG.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class C extends w{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(u.fN).contextMatchesRules(i??void 0))return n(e,o,t)}))}runCommand(e,t){return S.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class k extends S{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=d.D8.EditorContext),t.title||(t.title=e.label),t.when=u.M$.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(k.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(m.k).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class x extends k{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e{const i=e.get(u.fN),s=e.get(v.rr);if(i.contextMatchesRules(this.desc.precondition??void 0))return this.runEditorCommand(e,n,...t);s.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize())}))}}function D(e,t){h.w.registerCommand(e,(function(e,...i){const n=e.get(g._Y),[s,r]=i;(0,_.j)(o.r.isUri(s)),(0,_.j)(a.y.isIPosition(r));const d=e.get(l.IModelService).getModel(s);if(d){const e=a.y.lift(r);return n.invokeFunction(t,d,e,...i.slice(2))}return e.get(c.ITextModelService).createModelReference(s).then((e=>new Promise(((s,o)=>{try{s(n.invokeFunction(t,e.object.textEditorModel,a.y.lift(r),i.slice(2)))}catch(e){o(e)}})).finally((()=>{e.dispose()}))))}))}function E(e){return R.INSTANCE.registerEditorCommand(e),e}function N(e){const t=new e;return R.INSTANCE.registerEditorAction(t),t}function I(e){return R.INSTANCE.registerEditorAction(e),e}function M(e){R.INSTANCE.registerEditorAction(e)}function T(e,t,i){R.INSTANCE.registerEditorContribution(e,t,i)}!function(e){e.getEditorCommand=function(e){return R.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return R.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return R.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return R.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return R.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class R{static{this.INSTANCE=new R}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function P(e){return e.register(),e}f.O.add("editor.contributions",R.INSTANCE);const A=P(new C({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:s.kg({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:d.D8.CommandPalette,group:"",title:s.kg("undo","Undo"),order:1}]}));P(new y(A,{id:"default:undo",precondition:void 0}));const O=P(new C({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:s.kg({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:d.D8.CommandPalette,group:"",title:s.kg("redo","Redo"),order:1}]}));P(new y(O,{id:"default:redo",precondition:void 0}));const F=P(new C({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:d.D8.MenubarSelectionMenu,group:"1_basic",title:s.kg({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:d.D8.CommandPalette,group:"",title:s.kg("selectAll","Select All"),order:1}]}))},90072:function(e,t,i){"use strict";i.d(t,{Qg:function(){return u},Ud:function(){return c},jD:function(){return h}});var n=i(57981),s=i(35114),o=i(73755),r=i(1878),a=i(98018),l=i(56218);function c(e){return d.get(e)}class d extends s.jG{static{this._map=new Map}static get(e){let t=d._map.get(e);if(!t){t=new d(e),d._map.set(e,t);const i=e.onDidDispose((()=>{const t=d._map.get(e);t&&(d._map.delete(e),t.dispose(),i.dispose())}))}return t}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&(this._currentTransaction=new r.XL((()=>{})))}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){const e=this._currentTransaction;this._currentTransaction=void 0,e.finish()}}constructor(e){super(),this.editor=e,this._updateCounter=0,this._currentTransaction=void 0,this._model=(0,o.FY)(this,this.editor.getModel()),this.model=this._model,this.isReadonly=(0,o.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(92))),this._versionId=(0,o.Zh)({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=(0,o.Zh)({owner:this,equalsFn:(0,n.KC)((0,n.S3)(l.L.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.isFocused=(0,o.y0)(this,(e=>{const t=this.editor.onDidFocusEditorWidget(e),i=this.editor.onDidBlurEditorWidget(e);return{dispose(){t.dispose(),i.dispose()}}}),(()=>this.editor.hasWidgetFocus())),this.value=(0,a.dQ)(this,(e=>(this.versionId.read(e),this.model.read(e)?.getValue()??"")),((e,t)=>{const i=this.model.get();null!==i&&e!==i.getValue()&&i.setValue(e)})),this.valueIsEmpty=(0,o.un)(this,(e=>(this.versionId.read(e),0===this.editor.getModel()?.getValueLength()))),this.cursorSelection=(0,o.C)({owner:this,equalsFn:(0,n.KC)(l.L.selectionsEqual)},(e=>this.selections.read(e)?.[0]??null)),this.onDidType=(0,o.Yd)(this),this.scrollTop=(0,o.y0)(this.editor.onDidScrollChange,(()=>this.editor.getScrollTop())),this.scrollLeft=(0,o.y0)(this.editor.onDidScrollChange,(()=>this.editor.getScrollLeft())),this.layoutInfo=(0,o.y0)(this.editor.onDidLayoutChange,(()=>this.editor.getLayoutInfo())),this.layoutInfoContentLeft=this.layoutInfo.map((e=>e.contentLeft)),this.layoutInfoDecorationsLeft=this.layoutInfo.map((e=>e.decorationsLeft)),this.contentWidth=(0,o.y0)(this.editor.onDidContentSizeChange,(()=>this.editor.getContentWidth())),this._overlayWidgetCounter=0,this._register(this.editor.onBeginUpdate((()=>this._beginUpdate()))),this._register(this.editor.onEndUpdate((()=>this._endUpdate()))),this._register(this.editor.onDidChangeModel((()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}}))),this._register(this.editor.onDidType((e=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,e)}finally{this._endUpdate()}}))),this._register(this.editor.onDidChangeModelContent((e=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,e),this._forceUpdate()}finally{this._endUpdate()}}))),this._register(this.editor.onDidChangeCursorSelection((e=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,e),this._forceUpdate()}finally{this._endUpdate()}})))}forceUpdate(e){this._beginUpdate();try{if(this._forceUpdate(),!e)return;return e(this._currentTransaction)}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(e){return(0,o.y0)(this,(t=>this.editor.onDidChangeConfiguration((i=>{i.hasChanged(e)&&t(void 0)}))),(()=>this.editor.getOption(e)))}setDecorations(e){const t=new s.Cm,i=this.editor.createDecorationsCollection();return t.add((0,o.zL)({owner:this,debugName:()=>`Apply decorations from ${e.debugName}`},(t=>{const n=e.read(t);i.set(n)}))),t.add({dispose:()=>{i.clear()}}),t}createOverlayWidget(e){const t="observableOverlayWidget"+this._overlayWidgetCounter++,i={getDomNode:()=>e.domNode,getPosition:()=>e.position.get(),getId:()=>t,allowEditorOverflow:e.allowEditorOverflow,getMinContentWidthInPx:()=>e.minContentWidthInPx.get()};this.editor.addOverlayWidget(i);const n=(0,o.fm)((t=>{e.position.read(t),e.minContentWidthInPx.read(t),this.editor.layoutOverlayWidget(i)}));return(0,s.s)((()=>{n.dispose(),this.editor.removeOverlayWidget(i)}))}}function h(e,t){return(0,o.ht)({createEmptyChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(t,i)=>{if(t.didChange(e)){const e=t.change;void 0!==e&&i.deltas.push(e),i.didChange=!0}return!0}},((i,n)=>{const s=e.read(i);n.didChange&&t(s,n.deltas)}))}function u(e,t){const i=new s.Cm,n=h(e,((e,n)=>{i.clear(),t(e,n,i)}));return{dispose(){n.dispose(),i.dispose()}}}},98325:function(e,t,i){"use strict";i.d(t,{cw:function(){return l},jN:function(){return a},nu:function(){return r}});var n=i(63619),s=i(54244),o=i(24219);const r=(0,n.u1)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(l.is(e))return l.lift(e);if(c.is(e))return c.lift(e);throw new Error("Unsupported edit")}))}}class l extends a{static is(e){return e instanceof l||(0,o.Gv)(e)&&s.r.isUri(e.resource)&&(0,o.Gv)(e.textEdit)}static lift(e){return e instanceof l?e:new l(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class c extends a{static is(e){return e instanceof c||(0,o.Gv)(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof c?e:new c(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},72777:function(e,t,i){"use strict";i.d(t,{T:function(){return n}});const n=(0,i(63619).u1)("codeEditorService")},61554:function(e,t,i){"use strict";i.d(t,{D:function(){return n}});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const s=e.getVisibleRanges();if(s.length>0){t=s[0].getStartPosition();const n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}},3916:function(e,t,i){"use strict";i.d(t,{BG:function(){return o},IO:function(){return a},Y:function(){return r},eh:function(){return s},pj:function(){return c},qN:function(){return l}});class n{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class s extends n{constructor(e,t,i){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class o{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class r{static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i=o.left?n.width=Math.max(n.width,o.left+o.width-n.left):(t[i++]=n,n=o)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let s=0,o=e.length;sr)return null;if((t=Math.min(r,Math.max(0,t)))===(n=Math.min(r,Math.max(0,n)))&&i===s&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return o.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,o.clientRectDeltaLeft,o.clientRectScale)}t!==n&&n>0&&0===s&&(n--,s=1073741824);let a=e.children[t].firstChild,l=e.children[n].firstChild;if(a&&l||(!a&&0===i&&t>0&&(a=e.children[t-1].firstChild,i=1073741824),!l&&0===s&&n>0&&(l=e.children[n-1].firstChild,s=1073741824)),!a||!l)return null;i=Math.min(a.textContent.length,Math.max(0,i)),s=Math.min(l.textContent.length,Math.max(0,s));const c=this._readClientRects(a,i,l,s,o.endNode);return o.markDidDomLayout(),this._createHorizontalRangesFromClientRects(c,o.clientRectDeltaLeft,o.clientRectScale)}}var l=i(10621),c=i(73055),d=i(39679),h=i(3520);const u=!!o.ib||!(o.j9||n.gm||n.nr);let g=!0;class p{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50),s=i.get(38);this.renderWhitespace="off"===s?i.get(100):"none",this.renderControlCharacters=i.get(95),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(118),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class f{static{this.CLASS_NAME="view-line"}constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,s.Z)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!(0,d.Bb)(this._options.themeType)&&"selection"!==this._options.renderWhitespace||(this._isMaybeInvalid=!0,0))}renderLine(e,t,i,n,s){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=n.getViewLineRenderingData(e),r=this._options,a=l.d.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let p=null;if((0,d.Bb)(r.themeType)||"selection"===this._options.renderWhitespace){const t=n.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t');const v=(0,c.UW)(_,s);s.appendString("");let w=null;return g&&u&&o.isBasicASCII&&r.useMonospaceOptimizations&&0===v.containsForeignElements&&(w=new m(this._renderedViewLine?this._renderedViewLine.domNode:null,_,v.characterMapping)),w||(w=b(this._renderedViewLine?this._renderedViewLine.domNode:null,_,v.characterMapping,v.containsRTL,v.containsForeignElements)),this._renderedViewLine=w,!0}layoutLine(e,t,i){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(i))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof m}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof m?this._renderedViewLine.monospaceAssumptionsAreValid():g}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof m&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const s=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==s&&t>s+1&&i>s+1)return new r.pj(!0,[new r.IO(this.getWidth(n),0)]);-1!==s&&t>s+1&&(t=s+1),-1!==s&&i>s+1&&(i=s+1);const o=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return o&&o.length>0?new r.pj(!1,o):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}class m{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),g=!1)}return g}toSlowRenderedLine(){return b(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const s=this._getColumnPixelOffset(e,t,n),o=this._getColumnPixelOffset(e,i,n);return[new r.IO(s,o-s)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,s=300*(n+1)+1;let o=-1;if(this._keyColumnPixelOffsetCache&&(o=this._keyColumnPixelOffsetCache[n],-1===o&&(o=this._actualReadPixelOffset(e,s,i),this._keyColumnPixelOffsetCache[n]=o)),-1===o){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(s),a=this._characterMapping.getHorizontalOffset(t);return o+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),s=a.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return s&&0!==s.length?s[0].left:-1}getColumnOfNodeOffset(e,t){return w(this._characterMapping,e,t)}}class _{constructor(e,t,i,n,s){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,e?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const s=this._readPixelOffset(this.domNode,e,t,n);if(-1===s)return null;const o=this._readPixelOffset(this.domNode,e,i,n);return-1===o?null:[new r.IO(s,o-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,s){if(i===n){const n=this._readPixelOffset(e,t,i,s);return-1===n?null:[new r.IO(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,s)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const s=this._pixelOffsetCache[i];if(-1!==s)return s;const o=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=o,o}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=a.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const s=this._characterMapping.getDomPosition(i),o=a.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n);if(!o||0===o.length)return-1;const r=o[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new r.IO(0,this.getWidth(n))];const s=this._characterMapping.getDomPosition(t),o=this._characterMapping.getDomPosition(i);return a.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,o.partIndex,o.charIndex,n)}getColumnOfNodeOffset(e,t){return w(this._characterMapping,e,t)}}class v extends _{_readVisibleRangesForRange(e,t,i,n,s){const o=super._readVisibleRangesForRange(e,t,i,n,s);if(!o||0===o.length||i===n||1===i&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,s);if(-1!==i){const e=o[o.length-1];e.left=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(r=1,a=n.IMarkerDecorationsService,function(e,t){a(e,t,r)})],o),(0,s.HW)(o.ID,o,0);var l=i(84201),c=i(20187),d=i(80670),h=i(35114),u=i(84756),g=i(43193),p=i(75969),f=i(97358),m=i(49134),_=i(79783),v=i(75083),b=i(57614);class w{static{this.items=[]}constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=w._read(e,this.key);this.migrate(t,(t=>w._read(e,t)),((t,i)=>w._write(e,t,i)))}static _read(e,t){if(void 0===e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const s=t.substring(0,n);return e[s]=e[s]||{},void this._write(e[s],t.substring(n+1),i)}e[t]=i}}function C(e,t){w.items.push(new w(e,t))}function y(e,t){C(e,((i,n,s)=>{if(void 0!==i)for(const[n,o]of t)if(i===n)return void s(e,o)}))}y("wordWrap",[[!0,"on"],[!1,"off"]]),y("lineNumbers",[[!0,"on"],[!1,"off"]]),y("cursorBlinking",[["visible","solid"]]),y("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),y("renderLineHighlight",[[!0,"line"],[!1,"none"]]),y("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),y("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),y("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("autoIndent",[[!1,"advanced"],[!0,"full"]]),y("matchBrackets",[[!0,"always"],[!1,"never"]]),y("renderFinalNewline",[[!0,"on"],[!1,"off"]]),y("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),y("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),y("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),C("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))})),C("renderIndentGuides",((e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))})),C("highlightActiveIndentGuide",((e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const S={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};C("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"==typeof e){for(const n of Object.entries(S))!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}})),C("quickSuggestions",((e,t,i)=>{if("boolean"==typeof e){const t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}})),C("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),C("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))})),C("codeActionsOnSave",((e,t,i)=>{if(e&&"object"==typeof e){let t=!1;const n={};for(const i of Object.entries(e))"boolean"==typeof i[1]?(t=!0,n[i[0]]=i[1]?"explicit":"never"):n[i[0]]=i[1];t&&i("codeActionsOnSave",n)}})),C("codeActionWidget.includeNearbyQuickfixes",((e,t,i)=>{"boolean"==typeof e&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),void 0===t("codeActionWidget.includeNearbyQuickFixes")&&i("codeActionWidget.includeNearbyQuickFixes",e))})),C("lightbulb.enabled",((e,t,i)=>{"boolean"==typeof e&&i("lightbulb.enabled",e?void 0:"off")}));var k=i(52055),x=i(3520),L=i(76543),D=i(78336),E=i(68745),N=i(8670);let I=class extends h.jG{constructor(e,t,i,n,s){super(),this._accessibilityService=s,this._onDidChange=this._register(new d.vl),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new d.vl),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new x.n0,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new v.u(n,i.dimension)),this._targetWindowId=(0,l.zk)(n).vscodeWindowId,this._rawOptions=A(i),this._validatedOptions=P.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(L.D.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(k.M.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(b.T.onDidChange((()=>this._recomputeOptions()))),this._register(N.c.getInstance((0,l.zk)(n)).onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=P.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=D._8.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:k.M.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return P.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:M(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:p.Tc||p.gm,pixelRatio:N.c.getInstance((0,l.ZF)(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return b.T.readFontInfo((0,l.ZF)(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=A(e);P.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=P.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function M(){let e="";return p.nr||p.c8||(e+="no-user-select "),p.nr&&(e+="no-minimap-shadow ",e+="enable-user-select "),_.zx&&(e+="mac "),e}I=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(4,E.j)],I);class T{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class R{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class P{static validateOptions(e){const t=new T;for(const i of x.BE){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new R;for(const n of x.BE)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&f.aI(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!P._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of x.BE){const o=!P._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new x.lw(i):null}static applyUpdate(e,t){let i=!1;for(const n of x.BE)if(t.hasOwnProperty(n.name)){const s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function A(e){const t=m.Go(e);return function(e){w.items.forEach((t=>t.apply(e)))}(t),t}var O=i(72777),F=i(43999),B=i(56627),W=i(55266);class H extends h.jG{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=4&&3===e[0]&&8===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&8===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&6===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&9===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&5===e[0]}}class te{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(146),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(67),this.stickyTabStops=n.get(117),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return te.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,s=e.viewModel.getLineCount();let o,r=null,a=null;return i.afterLineNumber!==s&&(a=new q.y(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new q.y(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),o=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,re._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class ne extends ie{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=z.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,i,n,s){super(e,t,i,n),this.hitTestResult=new Q.d((()=>re.doHitTest(this._ctx,this))),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=s;const o=Boolean(this._eventTarget);this._useHitTestTarget=!o}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columno.contentLeft+o.width)continue;const i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=s&&s<=i+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return ee.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.relativePos.x);const o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};if(s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth){const r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),a=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber);return o.glyphMarginLane=a[Math.floor(s/e.lineHeight)],t.fulfillMargin(2,n,i.range,o)}return s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,o))}return null}static _hitTestViewLines(e,t){if(!ee.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new q.y(1,1),se);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new q.y(i,n),se)}if(ee.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),s=oe(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new q.y(i,1),s)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const s=oe(t.mouseContentHorizontalOffset-n),o=new q.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}}const i=t.hitTestResult.value;return 1===i.type?re.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(ee.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new q.y(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(ee.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new q.y(i,n))}}return null}static _hitTestScrollbar(e,t){if(ee.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new q.y(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(146),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return re._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){const o=n.lineNumber,r=n.column,a=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>a){const e=oe(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const c=e.visibleRangeForPosition(o,r);if(!c)return t.fulfillUnknown(n);const d=c.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});const h=[];if(h.push({offset:c.left,column:r}),r>1){const t=e.visibleRangeForPosition(o,r-1);t&&h.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const u=t.pos.toClientCoordinates(l.zk(e.viewDomNode)),g=i.getBoundingClientRect(),p=g.left<=u.clientX&&u.clientX<=g.right;let f=null;for(let e=1;es)){const i=Math.floor((n+s)/2);let o=t.pos.y+(i-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const r=new W.nz(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(l.zk(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(l.zk(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=l.jG(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let s=e.elementFromPoint(t,i);if(null!==s){for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;const e=s.getBoundingClientRect(),i=l.zk(s),o=`${i.getComputedStyle(s,null).getPropertyValue("font-style")} ${i.getComputedStyle(s,null).getPropertyValue("font-variant")} ${i.getComputedStyle(s,null).getPropertyValue("font-weight")} ${i.getComputedStyle(s,null).getPropertyValue("font-size")}/${i.getComputedStyle(s,null).getPropertyValue("line-height")} ${i.getComputedStyle(s,null).getPropertyValue("font-family")}`,r=s.innerText;let a,c=e.left,d=0;if(t>e.left+e.width)d=r.length;else{const e=ae.getInstance();for(let i=0;ithis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(146).height;const n=new W.$z(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=l.ko(this.viewHelper.viewDomNode.ownerDocument,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new W.dO(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{s=t}))),this._register(l.ko(this.viewHelper.viewDomNode,l.Bx.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,s)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=ge.QC.INSTANCE;let t=0,i=L.D.getZoomLevel(),n=!1,s=0;function o(e){return _.zx?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(l.ko(this.viewHelper.viewDomNode,l.Bx.MOUSE_WHEEL,(r=>{if(this.viewController.emitMouseWheel(r),!this._context.configuration.options.get(76))return;const a=new he.$(r);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(o(r)){const e=L.D.getZoomLevel(),t=a.deltaY>0?1:-1;L.D.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=L.D.getZoomLevel(),n=o(r),s=0),t=Date.now(),s+=a.deltaY,n&&(L.D.setZoomLevel(i+s/5),a.preventDefault(),a.stopPropagation())}),{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(146)){const e=this._context.configuration.options.get(146).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new W.Hh(e,t).toPageCoordinates(l.zk(this.viewHelper.viewDomNode)),n=(0,W.wt)(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const s=(0,W.i_)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=l.jG(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(n||o&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(a){const n=i.detail;c&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class fe extends h.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new W.BA(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new me(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new ve,this._currentSelection=new ue.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const s=this._context.configuration.options;if(!s.get(92)&&s.get(35)&&!s.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);l.kx(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posyt.y+t.height){const o=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=te.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return J.createOutsideEditor(s,e,"below",o)}const l=n.getLineNumberAtVerticalOffset(r);return J.createOutsideEditor(s,new q.y(l,i.getLineMaxColumn(l)),"below",o)}const o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const n=e.posx-t.x-t.width;return J.createOutsideEditor(s,new q.y(o,i.getLineMaxColumn(o)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return J.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new q.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class me extends h.jG{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new _e(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class _e extends h.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=o,this._lastTime=Date.now(),this._animationFrameDisposable=l.PG(l.zk(o.browserEvent),(()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(67),t=this._context.configuration.options.get(146).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(67),t=this._getScrollSpeed()*(this._tick()/1e3)*e,i="above"===this._position.outsidePosition?-t:t;this._context.viewModel.viewLayout.deltaScrollNow(0,i),this._viewHelper.renderNow();const n=this._context.viewLayout.getLinesViewportData(),s="above"===this._position.outsidePosition?n.startLineNumber:n.endLineNumber;let o;{const e=(0,W.wt)(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(146).horizontalScrollbarHeight,i=new W.nz(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=(0,W.i_)(this._viewHelper.viewDomNode,e,i);o=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}o.position&&o.position.lineNumber===s||(o="above"===this._position.outsidePosition?J.createOutsideEditor(this._position.mouseColumn,new q.y(s,1),"above",this._position.outsideDistance):J.createOutsideEditor(this._position.mouseColumn,new q.y(s,this._context.viewModel.getLineMaxColumn(s)),"below",this._position.outsideDistance)),this._dispatchMouse(o,!0,2),this._animationFrameDisposable=l.PG(l.zk(o.element),(()=>this._execute()))}}class ve{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>ve.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var be=i(55036);class we extends pe{constructor(e,t,i){super(e,t,i),this._register(ce.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Tap,(e=>this.onTap(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Change,(e=>this.onChange(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Contextmenu,(e=>this._onContextMenu(new W.dO(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(l.ko(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new W.DW(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){const i=this._createMouseTarget(new W.dO(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class Ce extends pe{constructor(e,t,i){super(e,t,i),this._register(ce.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Tap,(e=>this.onTap(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Change,(e=>this.onChange(e)))),this._register(l.ko(this.viewHelper.linesContentDomNode,ce.B.Contextmenu,(e=>this._onContextMenu(new W.dO(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new W.dO(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(be.$D.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class ye extends h.jG{constructor(e,t,i){super(),(_.un||_.m0&&_.Fr)&&le.e.pointerEvents?this.handler=this._register(new we(e,t,i)):de.G.TouchEvent?this.handler=this._register(new Ce(e,t,i)):this.handler=this._register(new pe(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Se=i(14374),ke=i(43920),xe=i(41069);class Le extends H{}var De=i(40616),Ee=i(99851);class Ne extends Le{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new q.y(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const t=e.get(68);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(96);const i=e.get(146);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new q.y(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0||i===this._context.viewModel.getLineCount()?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=_.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter((e=>!!e.options.lineNumberClassName));s.sort(((e,t)=>K.Q.compareRangesUsingEnds(e.range,t.range)));let o=0;const r=this._context.viewModel.getLineCount(),a=[];for(let e=i;e<=n;e++){const n=e-i;let l=this._getLineRenderLineNumber(e),c="";for(;o${l}`):a[n]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,De.zy)(((e,t)=>{const i=e.getColor(Ee.Qt),n=e.getColor(Ee.JB);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));class Ie extends V{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,F.Z)(document.createElement("div")),this._domNode.setClassName(Ie.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,F.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Ie.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}var Me=i(59810);const Te="monaco-mouse-cursor-text";var Re=i(35720),Pe=i(59321),Ae=i(80175),Oe=i(87163),Fe=i(63619),Be=function(e,t){return function(i,n){t(i,n,e)}};class We{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new q.y(this.modelLineNumber,this.distanceToModelLineStart+1),i=new q.y(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const He=p.gm;let Ve=class extends V{constructor(e,t,i,n,s){super(e),this._keybindingService=n,this._instantiationService=s,this._primaryCursorPosition=new q.y(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const o=this._context.configuration.options,r=o.get(146);this._setAccessibilityOptions(o),this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,this._contentHeight=r.height,this._fontInfo=o.get(50),this._lineHeight=o.get(67),this._emptySelectionClipboard=o.get(37),this._copyWithSyntaxHighlighting=o.get(25),this._visibleTextArea=null,this._selections=[new ue.L(1,1,1,1)],this._modelSelections=[new ue.L(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,F.Z)(document.createElement("textarea")),z.write(this.textArea,7),this.textArea.setClassName(`inputarea ${Te}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:a}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=a*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(o)),this.textArea.setAttribute("aria-required",o.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(o.get(125))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",Se.kg("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",o.get(92)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,F.Z)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const l={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},c={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,_.uF),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,s=Array.isArray(e)?e.join(t):e;let o,r=null;if(be.Eq.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&s.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(o=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:s,html:o,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(_.zx&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new xe._O(i,i.length,i.length,K.Q.fromPositions(t),0)}const t=500;if(_.zx&&!e.isEmpty()&&l.getValueLengthInRange(e,0)0)return new xe._O(i,n,n,K.Q.fromPositions(t),0)}return xe._O.EMPTY}return xe.Al.fromEditorSelection(l,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},d=this._register(new be.M0(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(be.No,c,d,_.OS,{isAndroid:p.m0,isChrome:p.H8,isFirefox:p.gm,isSafari:p.nr})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(xe.Hf&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(xe.Hf&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:s}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),s=e.substring(n+1),o=s.lastIndexOf("\t"),r=s.length-o-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),c=a.column-1-l,d=s.substring(0,s.length-l),{tabSize:h}=this._context.viewModel.model.getOptions(),u=function(e,t,i,n){if(0===t.length)return 0;const s=e.createElement("div");s.style.position="absolute",s.style.top="-50000px",s.style.width="50000px";const o=e.createElement("span");(0,g.M)(o,i),o.style.whiteSpace="pre",o.style.tabSize=n*i.spaceWidth+"px",o.append(t),s.appendChild(o),e.body.appendChild(s);const r=o.offsetWidth;return s.remove(),r}(this.textArea.domNode.ownerDocument,d,this._fontInfo,h);return{distanceToModelLineStart:c,widthOfHiddenTextBefore:u}})(),{distanceToModelLineEnd:o}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),s=-1===n?e:e.substring(0,n),o=s.indexOf("\t"),r=-1===o?s.length:s.length-o-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,K.Q.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new We(this._context,i.startLineNumber,n,s,o),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${Te} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${Te}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(Ae.M.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,Me.i)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',[]);let n=!0,s=e.column,o=!0,r=e.column,a=0;for(;a<50&&(n||o);){if(n&&s<=1&&(n=!1),n){const e=t.charCodeAt(s-2);0!==i.get(e)?n=!1:s--}if(o&&r>t.length&&(o=!1),o){const e=t.charCodeAt(r-1);0!==i.get(e)?o=!1:r++}a++}return[t.substring(s-1,r-1),e.column-s]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,Me.i)(this._context.configuration.options.get(132),[]);let n=e.column,s=0;for(;n>1;){const o=t.charCodeAt(n-2);if(0!==i.get(o)||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!ke.pc(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){if(1===e.get(2)){const e=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),t=this._keybindingService.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),i=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),n=Se.kg("accessibilityModeOff","The editor is not accessible at this time.");return e?Se.kg("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",n,e):t?Se.kg("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",n,t):i?Se.kg("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",n,i):n}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===x.qB.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(146).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){const t=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=He?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(67),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(125))),(e.hasChanged(34)||e.hasChanged(92))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!Ae.M.enabled||e.get(34)&&e.get(92)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new q.y(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const s=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,o=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const c=this._context.viewModel.getViewLineData(i.lineNumber),d=c.tokens.findTokenIndexAtOffset(i.column-1),h=d===c.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(h?c.tokens.getPresentation(d):null);this.textArea.domNode.scrollTop=o*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:s,left:a,width:l,height:this._lineHeight,useCover:!1,color:(Re.dG.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)this._renderAtTopLeft();else if(_.zx||2===this._accessibilitySupport){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:He?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;i=e.indexOf("\n",i+1),-1!==i;)t++;return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:He?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;(0,g.M)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?Pe.Q1.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+Ie.OUTER_CLASS_NAME):0!==n.get(68).renderType?i.setClassName("monaco-editor-background textAreaCover "+Ne.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};Ve=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Be(3,Oe.b),Be(4,Fe._Y)],Ve);var ze=i(3916),Ue=i(34157);class je{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ue.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){Ue.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){Ue.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ue.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ue.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){Ue.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){Ue.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){Ue.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){Ue.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){Ue.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){Ue.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){Ue.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){Ue.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){Ue.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}var qe=i(38945),Ke=i(52192);class $e{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new c.D7("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let s=0,o=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===o?(s=i,o=1):o++)}if(e=n&&t<=s&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);const o=[];for(let e=0;ei)continue;const r=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class Ge{constructor(e){this._lineFactory=e,this.domNode=this._createDomNode(),this._linesCollection=new $e(this._lineFactory)}_createDomNode(){const e=(0,F.Z)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(146)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;ee})}constructor(e,t,i){this._domNode=e,this._lineFactory=t,this._viewportData=i}render(e,t,i,n){const s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1t){const e=t,o=Math.min(i,s.rendLineNumberStart-1);e<=o&&(this._insertLinesBefore(s,e,o,n,t),s.linesLength+=o-e+1)}else if(s.rendLineNumberStart0&&(this._removeLinesBefore(s,e),s.linesLength-=e)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1i){const e=Math.max(0,i-s.rendLineNumberStart+1),t=s.linesLength-1-e+1;t>0&&(this._removeLinesAfter(s,t),s.linesLength-=t)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const o=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=o+e;r[e].layoutLine(t,n[t-s],this._viewportData.lineHeight)}}_insertLinesBefore(e,t,i,n,s){const o=[];let r=0;for(let e=t;e<=i;e++)o[r++]=this._lineFactory.createLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");Qe._ttPolicy&&(t=Qe._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;tnew Ze(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(50);(0,g.M)(this.domNode,t),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),s.appendString(o),s.appendString(""),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i))}}class Xe extends Ye{constructor(e){super(e);const t=this._context.configuration.options.get(146);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(146);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Je extends Ye{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,g.M)(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;(0,g.M)(this.domNode,t.get(50));const i=t.get(146);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class et{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return et.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),5!==i.type&&8!==i.type||(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new q.y(e.afterLineNumber,1)).lineNumber}}}class tt extends V{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,F.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const t=this._context.configuration.options.get(146),i=t.contentWidth-t.verticalScrollbarWidth;this.contentWidth!==i&&(this.contentWidth=i,e=!0);const n=t.contentLeft;return this.contentLeft!==n&&(this.contentLeft=n,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;const i=e.getDecorationsInViewport();for(const n of i){if(!n.options.blockClassName)continue;let i,s,o=this.blocks[t];o||(o=this.blocks[t]=(0,F.Z)(document.createElement("div")),this.domNode.appendChild(o)),n.options.blockIsAfterEnd?(i=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!1),s=e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0)):(i=e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!0),s=n.range.isEmpty()&&!n.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(n.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(n.range.endLineNumber,!0));const[r,a,l,c]=n.options.blockPadding??[0,0,0,0];o.setClassName("blockDecorations-block "+n.options.blockClassName),o.setLeft(this.contentLeft-c),o.setWidth(this.contentWidth+c+a),o.setTop(i-e.scrollTop-r),o.setHeight(s-i+r+l),t++}for(let e=t;e0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const s=e.top,o=s,r=e.top+e.height,a=s-i,l=o>=i,c=r,d=n.viewportHeight-r>=i;let h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),ho){const e=a-(o-n);a-=e,i-=e}if(a=22,m=h+i<=u.height-22;return this._fixedOverflowWidgets?{fitsAbove:f,aboveTop:Math.max(d,22),fitsBelow:m,belowTop:h,left:p}:{fitsAbove:f,aboveTop:s,fitsBelow:m,belowTop:o,left:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new ot(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){return{primary:t(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),secondary:t(this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,this._affinity,this._lineHeight)};function t(t,i,n){if(!t)return null;const s=e.visibleRangeForPosition(t);if(!s)return null;const o=1===t.column&&3===i?0:s.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new rt(r,o,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let s=t.left;return s=se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||"offViewport"===this._renderData.kind)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,"offViewport"===this._renderData?.kind&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&at(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&at(this._actual.afterRender,this._actual,this._renderData.position)}}class st{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class ot{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class rt{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function at(e,t,...i){try{return e.call(t,...i)}catch{return null}}var lt=i(39679);class ct extends Le{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(146);this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new ue.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=new Set;for(const e of this._selections)t.add(e.positionLineNumber);const i=Array.from(t);i.sort(((e,t)=>e-t)),f.aI(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146);return this._renderLineHighlight=t.get(97),this._renderLineHighlightOnlyWhenFocus=t.get(98),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let e=t;e<=i;e++)n[e-t]="";if(this._wordWrap){const s=this._renderOne(e,!1);for(const e of this._cursorLineNumbers){const o=this._context.viewModel.coordinatesConverter,r=o.convertViewPositionToModelPosition(new q.y(e,1)).lineNumber,a=o.convertModelPositionToViewPosition(new q.y(r,1)).lineNumber,l=o.convertModelPositionToViewPosition(new q.y(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,c=Math.max(a,t),d=Math.min(l,i);for(let e=c;e<=d;e++)n[e-t]=s}}const s=this._renderOne(e,!0);for(const e of this._cursorLineNumbers)ei||(n[e-t]=s);this._renderData=n}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class dt extends ct{_renderOne(e,t){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class ht extends ct{_renderOne(e,t){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,De.zy)(((e,t)=>{const i=e.getColor(Ee.kG);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Ee.Mf)){const i=e.getColor(Ee.Mf);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),(0,lt.Bb)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}));class ut extends Le{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,s=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:K.Q.compareRangesUsingStarts(e.range,t.range)}));const s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=[];for(let e=s;e<=o;e++)r[e-s]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,o=t.length;e',a=Math.max(o.range.startLineNumber,n),l=Math.min(o.range.endLineNumber,s);for(let e=a;e<=l;e++)i[e-n]+=r}}_renderNormalDecorations(e,t,i){const n=e.visibleRange.startLineNumber;let s=null,o=!1,r=null,a=!1;for(let l=0,c=t.length;l';r[l]+=c}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class gt extends V{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(104),r=s.get(75),a=s.get(40),c=s.get(107),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,De.Pz)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:c,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new ge.oO(t.domNode,d,this._context.viewLayout.getScrollable())),z.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,F.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(l.ko(i.domNode,"scroll",(e=>h(i.domNode,!0,!0)))),this._register(l.ko(t.domNode,"scroll",(e=>h(t.domNode,!0,!1)))),this._register(l.ko(n.domNode,"scroll",(e=>h(n.domNode,!0,!1)))),this._register(l.ko(this.scrollbarDomNode.domNode,"scroll",(e=>h(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(146);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(73).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(104)||e.hasChanged(75)||e.hasChanged(40)){const e=this._context.configuration.options,t=e.get(104),i=e.get(75),n=e.get(40),s=e.get(107),o={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:s};this.scrollbar.updateOptions(o)}return e.hasChanged(146)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,De.Pz)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}var pt=i(62067);class ft{constructor(e,t,i,n,s){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=s??0}}class mt{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class _t{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class vt extends Le{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=new _t;if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.classNamen)continue;const a=Math.max(o,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new q.y(a,0)),c=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(e.preference.lane);t.push(new Ct(a,c,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.laneIndex===t.laneIndex?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className0;){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex));if(!n||0===n.length)break;const s=n[0];if(0===s.type){const e=[];for(const t of n){if(t.zIndex!==s.zIndex||t.type!==s.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(s.accept(e.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const e=this._managedDomNodes.pop();e?.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;ithis._decorationGlyphsToRender.length;){const e=this._managedDomNodes.pop();e?.domNode.remove()}}}class wt{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new yt(this.lineNumber,this.laneIndex,e)}}class Ct{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class yt{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}var St=i(24219),kt=i(49374),xt=i(79007);class Lt extends Le{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(147),n=t.get(50);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(147),n=t.get(50);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();return!this._primaryPosition?.equals(t)&&(this._primaryPosition=t,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.scrollWidth,s=this._primaryPosition,o=this.getGuidesByLine(t,Math.min(i+1,this._context.viewModel.getLineCount()),s),r=[];for(let s=t;s<=i;s++){const i=s-t,a=o[i];let l="";const c=e.visibleRangeForPosition(new q.y(s,1))?.left??0;for(const t of a){const i=-1===t.column?c+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new q.y(s,t.column)).left;if(i>n||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(e.visibleRangeForPosition(new q.y(s,t.horizontalLine.endColumn))?.left??i+this._spaceWidth)-i:this._spaceWidth;l+=`
    `}r[i]=l}this._renderResult=r}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?xt.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?xt.N6.EnabledForActive:xt.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let o=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);o=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let i=e;i<=t;i++){const t=new Array;c.push(t);const d=n?n[i-e]:[],h=new f.j3(d),u=s?s[i-e]:0;for(let e=1;e<=u;e++){const n=(e-1)*l+1,s=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===d.length)&&o<=i&&i<=r&&e===a;t.push(...h.takeWhile((e=>e.visibleColumn!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Dt(e){if(!e||!e.isTransparent())return e}(0,De.zy)(((e,t)=>{const i=[{bracketColor:Ee.sN,guideColor:Ee.n4,guideColorActive:Ee.bB},{bracketColor:Ee.lQ,guideColor:Ee.I2,guideColorActive:Ee.WS},{bracketColor:Ee.ss,guideColor:Ee.Bo,guideColorActive:Ee.Pe},{bracketColor:Ee.l5,guideColor:Ee.If,guideColorActive:Ee.WD},{bracketColor:Ee.sH,guideColor:Ee.BD,guideColorActive:Ee.P1},{bracketColor:Ee.zp,guideColor:Ee.IW,guideColorActive:Ee.WY}],n=new kt.k,s=[{indentColor:Ee.vV,indentColorActive:Ee.H0},{indentColor:Ee.ob,indentColorActive:Ee.Am},{indentColor:Ee.hz,indentColorActive:Ee.tK},{indentColor:Ee.ow,indentColorActive:Ee.A3},{indentColor:Ee.vP,indentColorActive:Ee.tp},{indentColor:Ee.CM,indentColorActive:Ee.As}],o=i.map((t=>{const i=e.getColor(t.bracketColor),n=e.getColor(t.guideColor),s=e.getColor(t.guideColorActive),o=Dt(Dt(n)??i?.transparent(.3)),r=Dt(Dt(s)??i);if(o&&r)return{guideColor:o,guideColorActive:r}})).filter(St.O9),r=s.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),s=Dt(i),o=Dt(n);if(s&&o)return{indentColor:s,indentColorActive:o}})).filter(St.O9);if(o.length>0){for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));var Et=i(90890);class Nt{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class It{constructor(){this._currentVisibleRange=new K.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Mt{constructor(e,t,i,n,s,o,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class Tt{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let o=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;enew j.Gb(this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,z.write(this.domNode,8),this.domNode.setClassName(`view-lines ${Te}`),(0,g.M)(this.domNode,s),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Et.uC((()=>{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new Et.uC((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new It,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(116).enabled,this._maxNumberStickyLines=n.get(116).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(147)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(147);return this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(101),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(116).enabled,this._maxNumberStickyLines=t.get(116).maxLineCount,(0,g.M)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(146)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new j.Ax(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Mt(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new Tt(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new q.y(n,1);const s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(no)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri)return-1;const n=new Nt(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=K.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const s=[];let o=0;const r=new Nt(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new q.y(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ec)continue;const d=e===n.startLineNumber?n.startColumn:1,h=e!==n.endLineNumber,u=h?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,u,r);if(g){if(t&&ethis._visibleLines.getEndLineNumber())return null;const n=new Nt(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new ze.qN(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let o=t;o<=i;o++){const t=this._visibleLines.getVisibleLine(o);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):s=!1}return s&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const i=this._visibleLines.getVisibleLine(s);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=s)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),_.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=s[0].startLineNumber,t=s[0].endLineNumber;for(let i=1,n=s.length;ia){if(!c)return-1;u=d}else if(5===o||6===o)if(6===o&&r<=d&&h<=l)u=r;else{const e=d-Math.max(5*this._lineHeight,.2*a),t=h-a;u=Math.max(t,e)}else if(1===o||2===o)if(2===o&&r<=d&&h<=l)u=r;else{const e=(d+h)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,d,h,3===o,4===o);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(146),n=t.left,s=n+t.width-i.verticalScrollbarWidth;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return e.minimalReveal||(o=Math.max(0,o-Rt.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,s,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,s,o){s=!!s,o=!!o;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}class Pt extends vt{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(146);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(146);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,s=t.length;e',o=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i].getDecorations();let a="";for(const e of r){let t='
    ';s[i]=r}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var Ot=i(82884);class Ft{static{this.Empty=new Ft(0,0,0,0)}constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Ft._clamp(e),this.g=Ft._clamp(t),this.b=Ft._clamp(i),this.a=Ft._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}class Bt extends h.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,h.lC)(new Bt)),this._INSTANCE}constructor(){super(),this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Re.dG.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=Re.dG.getColorMap();if(!e)return this._colors=[Ft.Empty],void(this._backgroundIsLight=!0);this._colors=[Ft.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}var Wt=i(68316),Ht=i(4195);const Vt=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var zt=i(18116);class Ut{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Ut.soften(e,.8),this.charDataLight=Ut.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=c?this.charDataLight:this.charDataNormal,f=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),m=4*e.width,_=r.r,v=r.g,b=r.b,w=s.r-_,C=s.g-v,y=s.b-b,S=Math.max(o,a),k=e.data;let x=f*h*u,L=i*m+4*t;for(let e=0;ee.width||i+d>e.height)return void console.warn("bad render request outside image data");const h=4*e.width,u=s/255*.5,g=o.r,p=o.g,f=o.b,m=g+(n.r-g)*u,_=p+(n.g-p)*u,v=f+(n.b-f)*u,b=Math.max(s,r),w=e.data;let C=i*h+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=qt[e[i]]<<4|15&qt[e[i+1]];return t},$t={1:(0,jt.P)((()=>Kt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,jt.P)((()=>Kt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class Gt{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=$t[e]?new Ut($t[e](),e):Gt.createFromSampleData(Gt.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of Vt)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=Gt._downsample(e,t);return new Ut(i,t)}static _downsampleChar(e,t,i,n,s){const o=1*s,r=2*s;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;tGt.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=Zt._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=Zt._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(Ht.ILr);return i?new Ft(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Ht.K1Z);return t?Ft._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){const i=e.getColor(Ht.By2);return i?new Ft(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class Xt{constructor(e,t,i,n,s,o,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,o,r,a,l,c,d){const h=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,s-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(s*s/t)),n=Math.max(0,e.minimapHeight-i),o=n/(c-s),d=l*o,h=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new Xt(l,c,h,o,d,i,g,1,Math.min(r,u))}let f;if(o&&i!==r){const e=i-t+1;f=Math.floor(e*u/h)}else{const e=s/p;f=Math.floor(e*u/h)}const m=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=s/p;v=Math.max(v,e-1)}_=v>0?(m+r+v-s/p-1)*u/h:Math.max(0,(m+r)*u/h-f),_=Math.min(e.minimapHeight-f,_);const b=_/(c-s),w=l*b;if(g>=m+r+v)return new Xt(l,c,_>0,b,w,f,m,1,r);{let i,s;i=t>1?t+m:Math.max(1,l/p);let o=Math.max(1,Math.floor(i-w*h/u));ol&&(o=Math.min(o,d.startLineNumber),s=Math.max(s,d.topPaddingLineCount)),d.scrollTop=e.paddingTop?(t-o+s+_)*u/h:l/e.paddingTop*(s+_)*u/h,new Xt(l,c,!0,b,v,f,s,o,a)}}}class Jt{static{this.INVALID=new Jt(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class ei{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new $e({createLine:()=>Jt.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=n-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=ii.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let s=0,o=t-e+1;s!e.options.minimap?.sectionHeaderStyle));if(this._samplingState){const e=[];for(const t of i){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),s=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new Wt.vo(new K.Q(n,i.startColumn,s,i.endColumn),t.options))}return e}return i}getSectionHeaderDecorationsInViewport(e,t){const i=this.options.minimapLineHeight,n=this.options.sectionHeaderFontSize/i;return e=Math.floor(Math.max(1,e-n)),this._getMinimapDecorationsInViewport(e,t).filter((e=>!!e.options.minimap?.sectionHeaderStyle))}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],s=this._samplingState.minimapLines[t-1];i=new K.Q(n,1,s,this._context.viewModel.getLineMaxColumn(s))}else i=new K.Q(e,1,t,this._context.viewModel.getLineMaxColumn(t));return this._context.viewModel.getMinimapDecorationsInRange(i)}getSectionHeaderText(e,t){const i=e.options.minimap?.sectionHeaderText;if(!i)return null;const n=this._sectionHeaderCache.get(i);if(n)return n;const s=t(i);return this._sectionHeaderCache.set(i,s),s}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new K.Q(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class si extends h.jG{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Ht.yr0),this._domNode=(0,F.Z)(document.createElement("div")),z.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,F.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,F.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,F.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,F.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,F.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=l.b2(this._domNode.domNode,l.Bx.POINTER_DOWN,(e=>{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=l.BK(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderPointerMoveMonitor=new Ot._,this._sliderPointerDownListener=l.b2(this._slider.domNode,l.Bx.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=ce.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=l.ko(this._domNode.domNode,ce.B.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=l.ko(this._domNode.domNode,ce.B.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=l.b2(this._domNode.domNode,ce.B.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!(e.target&&e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const s=(e,s)=>{const o=l.BK(this._domNode.domNode),r=Math.min(Math.abs(s-n),Math.abs(s-o.left),Math.abs(s-o.left-o.width));if(_.uF&&r>140)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>s(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new ti(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Ht.yr0),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=Xt.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(K.Q.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,s);const c=new oi(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,o),this._renderDecorationsLineHighlights(l,i,c,e,o);const d=new oi(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,o,a,r,n),this._renderDecorationsHighlights(l,i,d,e,o,a,r,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,c]=t;for(let e=l;e<=c;e++)i.set(e,!0);const d=n.getYForLineNumber(l,s),h=n.getYForLineNumber(c,s);r>=d||(r>o&&e.fillRect(x.xq,o,e.canvas.width,r-o),o=d),r=h}r>o&&e.fillRect(x.xq,o,e.canvas.width,r-o)}_renderDecorationsLineHighlights(e,t,i,n,s){const o=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||1!==l.position)continue;const c=n.intersectWithViewport(a.range);if(!c)continue;const[d,h]=c,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=o.get(u.toString());g||(g=u.transparent(.5).toString(),o.set(u.toString(),g)),e.fillStyle=g;for(let t=d;t<=h;t++){if(i.has(t))continue;i.set(t,!0);const o=n.getYForLineNumber(d,s);e.fillRect(x.xq,o,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[c,d]=t;for(let t=c;t<=d;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,s,s,o,r,a)}}_renderDecorationsHighlights(e,t,i,n,s,o,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=n.intersectWithViewport(l.range);if(!c)continue;const[d,h]=c,u=t.getColor(this._theme.value);if(u&&!u.isTransparent())for(let c=d;c<=h;c++)switch(t.position){case 1:this.renderDecorationOnLine(e,i,l.range,u,n,c,s,s,o,r,a);continue;case 2:{const t=n.getYForLineNumber(c,s),i=2;this.renderDecoration(e,u,i,t,2,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,o,r,a,l,c,d){const h=s.getYForLineNumber(o,a);if(h+r<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===o?i.startColumn:1,f=g===o?i.endColumn:this._model.getLineMaxColumn(o),m=this.getXOffsetForPosition(t,o,p,l,c,d),_=this.getXOffsetForPosition(t,o,f,l,c,d);this.renderDecoration(e,n,m,h,_-m,r)}getXOffsetForPosition(e,t,i,n,s,o){if(1===i)return x.xq;if((i-1)*s>=o)return o;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[x.xq];let a=x.xq;for(let e=1;e=o){r[e]=o;break}r[e]=l,a=l}e.set(t,r)}return i-1e.range.startLineNumber-t.range.startLineNumber));const g=si._fitSectionHeader.bind(null,h,o-x.xq);for(const n of u){const r=e.getYForLineNumber(n.range.startLineNumber,t)+i,l=r-i,d=l+2,u=this._model.getSectionHeaderText(n,g);si._renderSectionLabel(h,u,2===n.options.minimap?.sectionHeaderStyle,a,c,o,l,s,r,d)}}static _fitSectionHeader(e,t,i){if(!i)return i;const n=e.measureText(i).width,s=e.measureText("…").width;if(n<=t||n<=s)return i;const o=i.length,r=n/i.length,a=Math.floor((t-s)/r)-1;let l=Math.ceil(a/2);for(;l>0&&/\s/.test(i[l-1]);)--l;return i.substring(0,l)+"…"+i.substring(o-(a-l))}static _renderSectionLabel(e,t,i,n,s,o,r,a,l,c){t&&(e.fillStyle=n,e.fillRect(0,r,o,a),e.fillStyle=s,e.fillText(t,x.xq,l)),i&&(e.beginPath(),e.moveTo(0,c),e.lineTo(o,c),e.closePath(),e.stroke())}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new ei(e,t.imageData,t.lines)}const s=this._getBuffer();if(!s)return null;const[o,r,a]=si._renderUntouchedLines(s,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,h=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),f=this._model.options.renderMinimap,m=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===f?2:3)*_,w=n>b?Math.floor((n-b)/2):0,C=h.a/255,y=new Ft(Math.round((h.r-d.r)*C+d.r),Math.round((h.g-d.g)*C+d.g),Math.round((h.b-d.b)*C+d.b),255);let S=e.topPaddingLineCount*n;const k=[];for(let e=0,o=i-t+1;e=0&&n_)return;const r=f.charCodeAt(w);if(9===r){const e=h-(w+C)%h;C+=e-1,b+=e*o}else if(32===r)b+=o;else{const h=ke.ne(r)?2:1;for(let u=0;u_)return}}}}}class oi{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;ethis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}class ri extends V{constructor(e,t){super(e),this._viewDomNode=t;const i=this._context.configuration.options.get(146);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,F.Z)(document.createElement("div")),z.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,F.Z)(document.createElement("div")),z.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(146);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,F.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()],n=t?t.preference:null,s=t?.stackOridinal;return i.preference===n&&i.stack===s?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=s,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0;const t=Object.keys(this._widgets);for(let i=0,n=t.length;i0));t.sort(((e,t)=>(this._widgets[e].stack||0)-(this._widgets[t].stack||0)));for(let e=0,n=t.length;e=3){const t=Math.floor(n/3),i=Math.floor(n/3),s=n-t-i,o=e+t;return[[0,e,o,e,e+t+s,e,o,e],[0,t,s,t+s,i,t+s+i,s+i,t+s+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&Pe.Q1.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class li extends V{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,F.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Re.dG.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[{position:new q.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new ai(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t1&&(n=0===t?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort(((e,t)=>q.y.compare(e.position,t.position))),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return!!e.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return!!e.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes)return this._domNode.setBackgroundColor(e?Pe.Q1.Format.CSS.formatHexA(e):""),void this._domNode.setDisplay("none");const t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(Wt.Uv.compareByRenderingProps),1!==this._actualShouldRender||Wt.Uv.equalsArr(this._renderedDecorations,t)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,f.aI)(this._renderedCursorPositions,this._cursorPositions,((e,t)=>e.position.lineNumber===t.position.lineNumber&&e.color===t.color))||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,o=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,c=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(c.fillStyle=Pe.Q1.Format.CSS.formatHexA(e),c.fillRect(0,0,i,n)):(c.clearRect(0,0,i,n),c.fillStyle=Pe.Q1.Format.CSS.formatHexA(e),c.fillRect(0,0,i,n)):c.clearRect(0,0,i,n);const d=this._settings.x,h=this._settings.w;for(const e of t){const t=e.color,i=e.data;c.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=i.length/3;en&&(e=n-l),_=e-l,v=e+l}_>p+1||t!==u?(0!==e&&c.fillRect(d[u],g,h[u],p-g),u=t,g=_,p=v):v>p&&(p=v)}c.fillRect(d[u],g,h[u],p-g)}if(!this._settings.hideCursor){const e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],s=this._settings.w[7];let a=-100,l=-100,d=null;for(let h=0,u=this._cursorPositions.length;hn&&(p=n-t);const f=p-t,m=f+e;f>l+1||u!==d?(0!==h&&d&&c.fillRect(i,a,s,l-a),a=f,l=m):m>l&&(l=m),d=u,c.fillStyle=u}d&&c.fillRect(i,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(c.beginPath(),c.lineWidth=1,c.strokeStyle=this._settings.borderColor,c.moveTo(0,0),c.lineTo(0,n),c.moveTo(1,0),c.lineTo(i,0),c.stroke())}}var ci,di=i(81655);class hi extends H{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,F.Z)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new di.rW((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(67)),this._zoneManager.setPixelRatio(i.get(144)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(t.get(67)),this._render()),e.hasChanged(144)&&(this._zoneManager.setPixelRatio(t.get(144)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,o=0,r=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==s?(e.fillRect(0,o,n,r-o),s=t,e.fillStyle=i[s],o=l,r=c):r>=l?r=Math.max(r,c):(e.fillRect(0,o,n,r-o),o=l,r=c)}e.fillRect(0,o,n,r-o)}}class ui extends V{constructor(e){super(e),this.domNode=(0,F.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(103),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=(0,F.Z)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),s--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(146);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(104);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}class pi{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class fi{constructor(e,t){this.lineNumber=e,this.ranges=t}}function mi(e){return new pi(e)}function _i(e){return new fi(e.lineNumber,e.ranges.map(mi))}class vi extends Le{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._roundedSelection=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,o=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!s&&e=0;e--)i[e].lineNumber===r&&(o=i[e].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,s=t[e-1].ranges[0].left+t[e-1].ranges[0].width;bi(a-i)i&&(c.top=1),bi(l-s)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const s=!!n[0].ranges[0].startStyle,o=n[0].lineNumber,r=n[n.length-1].lineNumber;for(let a=0,l=n.length;a1,r)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function bi(e){return e<0?-e:e}(0,De.zy)(((e,t)=>{const i=e.getColor(Ht.rm4);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));class wi{constructor(e,t,i,n,s,o,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=o,this.textContentClassName=r}}!function(e){e[e.Single=0]="Single",e[e.MultiPrimary=1]="MultiPrimary",e[e.MultiSecondary=2]="MultiSecondary"}(ci||(ci={}));class Ci{constructor(e,t){this._context=e;const i=this._context.configuration.options,n=i.get(50);this._cursorStyle=i.get(28),this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,F.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${Te}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,g.M)(this._domNode,n),this._domNode.setDisplay("none"),this._position=new q.y(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case ci.Single:this._pluralityClass="";break;case ci.MultiPrimary:this._pluralityClass="cursor-primary";break;case ci.MultiSecondary:this._pluralityClass="cursor-secondary"}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),(0,g.M)(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=ke.m(i,t-1);return[new q.y(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="";const[n,s]=this._getGraphemeAwarePosition();if(this._cursorStyle===x.m9.Line||this._cursorStyle===x.m9.LineThin){const o=e.visibleRangeForPosition(n);if(!o||o.outsideRenderedLine)return null;const r=l.zk(this._domNode.domNode);let a;this._cursorStyle===x.m9.Line?(a=l.vT(r,this._lineCursorWidth>0?this._lineCursorWidth:2),a>2&&(t=s,i=this._getTokenClassName(n))):a=l.vT(r,1);let c=o.left,d=0;a>=2&&c>=1&&(d=1,c-=d);const h=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new wi(h,c,d,a,this._lineHeight,t,i)}const o=e.linesVisibleRangesForRange(new K.Q(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],c="\t"===s||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===x.m9.Block&&(t=s,i=this._getTokenClassName(n));let d=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==x.m9.Underline&&this._cursorStyle!==x.m9.UnderlineThin||(d+=this._lineHeight-2,h=2),new wi(d,a.left,0,c,h,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${Te} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class yi extends V{static{this.BLINK_INTERVAL=500}constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new Ci(this._context,ci.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,F.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Et.pc,this._cursorFlatBlinkInterval=new l.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(92),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),yi.BLINK_INTERVAL,(0,l.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),yi.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case x.m9.Line:e+=" cursor-line-style";break;case x.m9.Block:e+=" cursor-block-style";break;case x.m9.Underline:e+=" cursor-underline-style";break;case x.m9.LineThin:e+=" cursor-line-thin-style";break;case x.m9.BlockOutline:e+=" cursor-block-outline-style";break;case x.m9.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=[{class:".cursor",foreground:Ee.D0,background:Ee.kM},{class:".cursor-primary",foreground:Ee.sC,background:Ee.je},{class:".cursor-secondary",foreground:Ee.we,background:Ee.L0}];for(const n of i){const i=e.getColor(n.foreground);if(i){let s=e.getColor(n.background);s||(s=i.opposite()),t.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${i}; border-color: ${i}; color: ${s}; }`),(0,lt.Bb)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}}}));const Si=()=>{throw new Error("Invalid change accessor")};class ki extends V{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(146);this._lineHeight=t.get(67),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,F.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,F.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let s=0,o=n.length;s{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(e){(0,c.dz)(e)}}(e,n),n.addZone=Si,n.removeZone=Si,n.layoutZone=Si})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,F.Z)(t.domNode),marginDomNode:t.marginDomNode?(0,F.Z)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,c.dz)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,c.dz)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const s=Object.keys(this._zones);for(let t=0,n=s.length;tt)continue;const e=i.startLineNumber===t?i.startColumn:n.minColumn,s=i.endLineNumber===t?i.endColumn:n.maxColumn;e=S.endOffset&&(y++,S=i&&i[y]),9!==s&&32!==s)continue;if(h&&!w&&n<=v)continue;if(d&&n>=C&&n<=v&&32===s){const e=n-1>=0?r.charCodeAt(n-1):0,t=n+1=0?r.charCodeAt(n-1):0;if(32===s&&32!==e&&9!==e)continue}if(i&&(!S||S.startOffset>n||S.endOffset<=n))continue;const c=e.visibleRangeForPosition(new q.y(t,n+1));c&&(o?(k=Math.max(k,c.left),b+=9===s?this._renderArrow(u,f,c.left):``):b+=9===s?`
    ${_?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:`
    ${String.fromCharCode(m)}
    `)}return o?(k=Math.round(k+f),``+b+""):b}_renderArrow(e,t,i){const n=e/2,s=i,o={x:0,y:t/7/2},r={x:.8*t,y:o.y},a={x:r.x-.2*r.x,y:r.y+.2*r.x},l={x:a.x+.1*r.x,y:a.y+.1*r.x},c={x:l.x+.35*r.x,y:l.y-.35*r.x};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Di{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(100),this.renderWithSVG=!0):(this.renderWhitespace=t.get(100),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(67),this.stopRenderingLineAfter=t.get(118)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class Ei{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.lineHeight=0|t.lineHeight,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new K.Q(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Ni{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class Ii{constructor(e,t,i){this.configuration=e,this.theme=new Ni(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}let Mi=class extends H{constructor(e,t,i,n,s,o,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new ue.L(1,1,1,1)],this._renderAnimationFrame=null;const a=new je(t,n,s,e);this._context=new Ii(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(Ve,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,F.Z)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,F.Z)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,F.Z)(document.createElement("div")),z.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new gt(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Rt(this._context,this._linesContent),this._viewZones=new ki(this._context),this._viewParts.push(this._viewZones);const l=new li(this._context);this._viewParts.push(l);const c=new gi(this._context);this._viewParts.push(c);const d=new Xe(this._context);this._viewParts.push(d),d.addDynamicOverlay(new dt(this._context)),d.addDynamicOverlay(new vi(this._context)),d.addDynamicOverlay(new Lt(this._context)),d.addDynamicOverlay(new ut(this._context)),d.addDynamicOverlay(new Li(this._context));const h=new Je(this._context);this._viewParts.push(h),h.addDynamicOverlay(new ht(this._context)),h.addDynamicOverlay(new At(this._context)),h.addDynamicOverlay(new Pt(this._context)),h.addDynamicOverlay(new Ne(this._context)),this._glyphMarginWidgets=new bt(this._context),this._viewParts.push(this._glyphMarginWidgets);const u=new Ie(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(h.getDomNode()),u.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(u),this._contentWidgets=new it(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new yi(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new ri(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const g=new ui(this._context);this._viewParts.push(g);const p=new tt(this._context);this._viewParts.push(p);const f=new ni(this._context);if(this._viewParts.push(f),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),o?(o.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),o.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new ye(this._context,a,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes;let i=[],n=0;i=i.concat(e.getAllMarginDecorations().map((e=>{const t=e.options.glyphMargin?.position??pt.ZS.Center;return n=Math.max(n,e.range.endLineNumber),{range:e.range,lane:t,persist:e.options.glyphMargin?.persistLane}}))),i=i.concat(this._glyphMarginWidgets.getWidgets().map((t=>{const i=e.validateRange(t.preference.range);return n=Math.max(n,i.endLineNumber),{range:i,lane:t.preference.lane}}))),i.sort(((e,t)=>K.Q.compareRangesUsingStarts(e.range,t.range))),t.reset(n);for(const e of i)t.push(e.lane,e.range,e.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new X(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new q.y(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(146);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(143)+" "+(0,De.Pz)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new c.D7;if(null===this._renderAnimationFrame){const e=this._createCoordinatedRendering();this._renderAnimationFrame=Ri.INSTANCE.scheduleCoordinatedRendering({window:l.zk(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new c.D7;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new c.D7;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new c.D7;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new c.D7;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();Ti((()=>e.prepareRenderText()));const t=Ti((()=>e.renderText()));if(t){const[i,n]=t;Ti((()=>e.prepareRender(i,n))),Ti((()=>e.render(i,n)))}}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}B.p.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new Ei(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new ze.eh(this._context.viewLayout,i,this._viewLines)]},prepareRender:(e,t)=>{for(const i of e)i.prepareRender(t)},render:(e,t)=>{for(const i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new q.y(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?et.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new hi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};function Ti(e){try{return e()}catch(e){return(0,c.dz)(e),null}}Mi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,Fe._Y)],Mi);class Ri{static{this.INSTANCE=new Ri}constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(-1!==t&&(this._coordinatedRenderings.splice(t,1),0===this._coordinatedRenderings.length)){for(const[e,t]of this._animationFrameRunners)t.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,l.Oq(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const t of e)Ti((()=>t.prepareRenderText()));const t=[];for(let i=0,n=e.length;in.renderText()))}for(let i=0,n=e.length;in.prepareRender(o,r)))}for(let i=0,n=e.length;in.render(o,r)))}}}var Pi=i(93066);class Ai{constructor(e,t,i,n,s){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;ethis.injectionOffsets[e];e++)i0?this.breakOffsets[s-1]:0,0===t)if(e<=o)n=s-1;else{if(!(e>r))break;i=s+1}else if(e=r))break;i=s+1}}let r=e-o;return s>0&&(r+=this.wrappedTextIndentLength),new Bi(s,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new Bi(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&Oi(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(Fi(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!Oi(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!Fi(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}(0,Pi.xb)(t)}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let s=0;se)break;if(e<=a)return{injectedTextIndex:s,offsetInInputWithInjections:r,length:o};n+=o}}}}function Oi(e){return null==e||e===pt.VW.Right||e===pt.VW.Both}function Fi(e){return null==e||e===pt.VW.Left||e===pt.VW.Both}class Bi{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new q.y(e+this.outputLineIndex,this.outputOffset+1)}}var Wi=i(40699);const Hi=(0,qe.H)("domLineBreaksComputer",{createHTML:e=>e});class Vi{static create(e){return new Vi(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,s){const o=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t)},finalize:()=>function(e,t,i,n,s,o,r,a){function l(e){const i=a[e];if(i){const n=Wi.uK.applyInjectedText(t[e],i),s=i.map((e=>e.options)),o=i.map((e=>e.column-1));return new Ai(o,s,[n.length],[],0)}return null}if(-1===s){const e=[];for(let i=0,n=t.length;ic?(r=0,l=0):d=c-e}const h=s.substr(r),g=zi(h,l,n,d,f,u);m[e]=r,_[e]=l,v[e]=h,b[e]=g[0],w[e]=g[1]}const C=f.build(),y=Hi?.createHTML(C)??C;p.innerHTML=y,p.style.position="absolute",p.style.top="10000","keepAll"===r?(p.style.wordBreak="keep-all",p.style.overflowWrap="anywhere"):(p.style.wordBreak="inherit",p.style.overflowWrap="break-word"),e.document.body.appendChild(p);const S=document.createRange(),k=Array.prototype.slice.call(p.children,0),x=[];for(let e=0;ee.options)),c=d.map((e=>e.column-1))):(r=null,c=null),x[e]=new Ai(c,r,t,o,n)}return p.remove(),x}((0,St.eU)(this.targetWindow.deref()),o,e,t,i,n,s,r)}}}function zi(e,t,i,n,s,o){if(0!==o){const e=String(o);s.appendString('
    ');const r=e.length;let a=t,l=0;const c=[],d=[];let h=0");for(let t=0;t"),c[t]=l,d[t]=a;const n=h;h=t+1"),c[e.length]=l,d[e.length]=a,s.appendString("
    "),[c,d]}function Ui(e,t,i,n){if(i.length<=1)return null;const s=Array.prototype.slice.call(t.children,0),o=[];try{ji(e,s,n,0,null,i.length-1,null,o)}catch(e){return console.log(e),null}return 0===o.length?null:(o.push(i.length),o)}function ji(e,t,i,n,s,o,r,a){if(n===o)return;if(s=s||qi(e,t,i[n],i[n+1]),r=r||qi(e,t,i[o],i[o+1]),Math.abs(s[0].top-r[0].top)<=.1)return;if(n+1===o)return void a.push(o);const l=n+(o-n)/2|0,c=qi(e,t,i[l],i[l+1]);ji(e,t,i,n,s,l,c,a),ji(e,t,i,l,c,o,r,a)}function qi(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class Ki extends h.jG{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new h.$w),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const e of t)this._pending.has(e.id)?(0,c.dz)(new Error(`Cannot have two contributions with the same id ${e.id}`)):this._pending.set(e.id,e);this._instantiateSome(0),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(1)}))),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(2)}))),this._register((0,l.U3)((0,l.zk)(this._editor.getDomNode()),(()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return(0,l.U3)((0,l.zk)(this._editor?.getDomNode()),(()=>{this._instantiateSome(1)}),50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const e of t)this._instantiateById(e.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(e){(0,c.dz)(e)}}}}var $i=i(40469),Gi=i(19527),Qi=i(48872),Yi=i(49678),Zi=i(8494),Xi=i(49079),Ji=i(69122),en=i(82282);class tn{static create(e){return new tn(e.get(135),e.get(134))}constructor(e,t){this.classifier=new nn(e,t)}createLineBreaksComputer(e,t,i,n,s){const o=[],r=[],a=[];return{addRequest:(e,t,i)=>{o.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,c=[];for(let e=0,d=o.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let sn=[],on=[];function rn(e,t,i,n,s,o,r,a){if(-1===s)return null;const l=i.length;if(l<=1)return null;const c="keepAll"===a,d=t.breakOffsets,h=t.breakOffsetsVisibleColumn,u=hn(i,n,s,o,r),g=s-u,p=sn,f=on;let m=0,_=0,v=0,b=s;const w=d.length;let C=0;if(C>=0){let e=Math.abs(h[C]-b);for(;C+1=e)break;e=t,C++}}for(;Ct&&(t=_,s=v);let r=0,a=0,u=0,y=0;if(s<=b){let v=s,w=0===t?0:i.charCodeAt(t-1),C=0===t?0:e.get(w),S=!0;for(let s=t;s_&&dn(0,C,l,d,c)&&(r=t,a=v),v+=h,v>b){t>_?(u=t,y=v-h):(u=s+1,y=v),v-a>g&&(r=0),S=!1;break}w=l,C=d}if(S){m>0&&(p[m]=d[d.length-1],f[m]=h[d.length-1],m++);break}}if(0===r){let l=s,d=i.charCodeAt(t),h=e.get(d),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,s=i.charCodeAt(n);if(9===s){p=!0;break}let f,m;if(ke.LJ(s)?(n--,f=0,m=2):(f=e.get(s),m=ke.ne(s)?o:1),l<=b){if(0===u&&(u=t,y=l),l<=b-g)break;if(dn(0,f,d,h,c)){r=t,a=l;break}}l-=m,d=s,h=f}if(0!==r){const e=g-(y-a);if(e<=n){const t=i.charCodeAt(u);let s;s=ke.pc(t)?2:ln(t,y,n,o),e-s<0&&(r=0)}}if(p){C--;continue}}if(0===r&&(r=u,a=y),r<=_){const e=i.charCodeAt(_);ke.pc(e)?(r=_+2,a=v+2):(r=_+1,a=v+ln(e,v,n,o))}for(_=r,p[m]=r,v=a,f[m]=a,m++,b=a+g;C<0||C=S)break;S=e,C++}}return 0===m?null:(p.length=m,f.length=m,sn=t.breakOffsets,on=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=f,t.wrappedTextIndentLength=u,t)}function an(e,t,i,n,s,o,r,a){const l=Wi.uK.applyInjectedText(t,i);let c,d;if(i&&i.length>0?(c=i.map((e=>e.options)),d=i.map((e=>e.column-1))):(c=null,d=null),-1===s)return c?new Ai(d,c,[l.length],[],0):null;const h=l.length;if(h<=1)return c?new Ai(d,c,[l.length],[],0):null;const u="keepAll"===a,g=hn(l,n,s,o,r),p=s-g,f=[],m=[];let _=0,v=0,b=0,w=s,C=l.charCodeAt(0),y=e.get(C),S=ln(C,0,n,o),k=1;ke.pc(C)&&(S+=1,C=l.charCodeAt(1),y=e.get(C),k++);for(let t=k;tw&&((0===v||S-b>p)&&(v=i,b=S-a),f[_]=v,m[_]=b,_++,w=b+p,v=0),C=s,y=r}return 0!==_||i&&0!==i.length?(f[_]=h,m[_]=S,new Ai(d,c,f,m,g)):null}function ln(e,t,i,n){return 9===e?i-t%i:ke.ne(e)||e<32?n:1}function cn(e,t){return t-e%t}function dn(e,t,i,n,s){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!s&&3===t&&2!==n||!s&&3===n&&1!==t)}function hn(e,t,i,n,s){let o=0;if(0!==s){const r=ke.HG(e);if(-1!==r){for(let i=0;ii&&(o=0)}}return o}var un=i(64429),gn=i(30699);class pn{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new gn.mG(new K.Q(1,1,1,1),0,0,new q.y(1,1),0),new gn.mG(new K.Q(1,1,1,1),0,0,new q.y(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new gn.MF(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?ue.L.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):ue.L.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),o=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,o),a=this._validatePositionWithCache(e,s,n,r);return i.equals(o)&&n.equals(r)&&s.equals(a)?t:new gn.mG(K.Q.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,o,t.leftoverVisibleColumns+i.column-o.column)}_setState(e,t,i){if(i&&(i=pn._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),o=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new gn.mG(i,t.selectionStartKind,n,s,o)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new gn.mG(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new gn.mG(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new q.y(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new q.y(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new K.Q(n.lineNumber,n.column,s.lineNumber,s.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new gn.mG(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class fn{constructor(e){this.context=e,this.cursors=[new pn(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return(0,un.kh)(this.cursors,(0,f.VE)((e=>e.viewState.position),q.y.compare)).viewState.position}getBottomMostViewPosition(){return(0,un.ot)(this.cursors,(0,f.VE)((e=>e.viewState.position),q.y.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(gn.MF.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),K.Q.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class mn{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var _n=i(97494),vn=i(93997),bn=i(67041);class wn{constructor(){this.type=0}}class Cn{constructor(){this.type=1}}class yn{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Sn{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class kn{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class xn{constructor(){this.type=5}}class Ln{constructor(e){this.type=6,this.isFocused=e}}class Dn{constructor(){this.type=7}}class En{constructor(){this.type=8}}class Nn{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class In{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class Mn{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class Tn{constructor(e,t,i,n,s,o,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=o,this.scrollType=r,this.type=12}}class Rn{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Pn{constructor(e){this.theme=e,this.type=14}}class An{constructor(e){this.type=15,this.ranges=e}}class On{constructor(){this.type=16}}class Fn{constructor(){this.type=17}}class Bn extends h.jG{constructor(){super(),this._onEvent=this._register(new d.vl),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Wn{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Hn{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new Hn(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Vn{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new Vn(this.oldHasFocus,e.hasFocus)}}class zn{constructor(e,t,i,n,s,o,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}attemptToMerge(e){return e.kind!==this.kind?null:new zn(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Un{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class jn{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class qn{constructor(e,t,i,n,s,o,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=o,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;to&&(n=n.slice(0,o),s=!0);const r=es.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,i,n,s,o){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=K.Q.fromPositions(r[0],r[0]),e.emitViewEvent(new Tn(t,i,a,l,n,s,o))}revealPrimary(e,t,i,n,s,o){const r=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new Tn(t,i,null,r,n,s,o))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const t=gn.MF.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,gn.MF.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,gn.MF.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let s=0,o=e.length;s0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const o=es.from(this._model,this);if(o.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new Sn(a,r,i)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new qn(a,r,l,o.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const s=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;const o=s[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-s[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let s=null;"snippet"===t&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);const o=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(s)for(let t=0,i=s.length;t0&&this._pushAutoClosedAction(o,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=es.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,c.dz)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return ts.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new ss(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(vn.T.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(vn.T.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))}),e,o);else if(0!==s){const t=this.getSelections().map((e=>{const t=e.getPosition();return new ue.L(t.lineNumber,t.column+s,t.lineNumber,t.column+s)}));this.setSelections(e,o,t,0)}}paste(e,t,i,n,s){this._executeEdit((()=>{this._executeEditOperation(vn.T.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,s,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(_n.g.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new gn.vY(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new gn.vY(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class es{static from(e,t){return new es(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class is{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e0&&(o[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,o,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,o=[];for(let i=0;i0?(n[i].sort(s),o[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new ue.L(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new ue.L(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):o[i]=e.selectionsBefore[i];return o}));r||(r=e.selectionsBefore);const a=[];for(const e in s)s.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{K.Q.isEmpty(e)&&""===o||n.push({identifier:{major:t,minor:s++},range:e,text:o,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a={addEditOperation:o,addTrackedEditOperation:(e,t,i)=>{r=!0,o(e,t,i)},trackSelection:(t,i)=>{const n=ue.L.liftSelection(t);let s;if(n.isEmpty())if("boolean"==typeof i)s=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);s=n.startColumn===t?2:3}else s=1;const o=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,s);return e.trackedRanges[o]=r,e.trackedRangesDirection[o]=n.getDirection(),o.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,c.dz)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-K.Q.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;is.identifier.major?n.identifier.major:s.identifier.major,t[o.toString()]=!0;for(let t=0;t0&&i--}}return t}}class ns{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class ss{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new ns(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=ss._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=ss._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let e=0,t=this._original.length;e>>1;t===e[o].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,s|=0;const o=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new cs(o,e,i,n,s)),o},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const s=new Map;for(const e of t)s.set(e.id,e);const o=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(s.has(i.id)){const e=s.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=o(this._arr).concat(o(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=ds.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[s+1].afterLineNumber>=e)return s;i=s+1|0}else n=s-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0,i+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0))+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){return this._checkPendingChanges(),e|=0,this._lineHeight*e+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0))+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,s=t;for(;n=o+i)n=t+1;else{if(e>=o)return t;s=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(n);let o=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===r?(r=a,c=o+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let d=s,h=d;const u=5e5;let g=0;s>=u&&(g=Math.floor(s/u)*u,g=Math.floor(g/i)*i,h-=g);const p=[],f=e+(t-e)/2;let m=-1;for(let e=n;e<=o;e++){for(-1===m&&(d<=f&&ff)&&(m=e),d+=i,p[e-n]=h,h+=i;c===e;)h+=l,d+=l,r++,r>=a?c=o+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){o=e;break}}-1===m&&(m=o);const _=0|this.getVerticalOffsetForLineNumber(o);let v=n,b=o;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:o,relativeVerticalOffset:p,centeredLineNumber:m,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=s+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=s)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const s=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;s.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}class hs{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class us extends h.jG{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new d.vl),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new hs(0,0,0,0),this._scrollable=this._register(new as.yE({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new Hn(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class gs extends h.jG{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(146),o=n.get(84);this._linesLayout=new ds(t,n.get(67),o.top,o.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new us(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new hs(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(115)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(t.get(67)),e.hasChanged(84)){const e=t.get(84);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(146)){const e=t.get(146),i=e.contentWidth,n=e.height,s=this._scrollable.getScrollDimensions(),o=s.contentWidth;this._scrollable.setScrollDimensions(new hs(i,s.contentWidth,n,this._getContentHeight(i,n,o)))}else this._updateHeight();e.hasChanged(115)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(104);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(106)?s+=Math.max(0,t-n.get(67)-n.get(84).bottom):n.get(104).ignoreHorizontalScrollbarInContentHeight||(s+=this._getHorizontalScrollbarHeight(e,i)),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new hs(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Wt.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Wt.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(147),n=e.get(50),s=e.get(146);if(i.isViewportWrapping){const i=e.get(73);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+s.verticalScrollbarWidth:t}{const i=e.get(105)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+s.verticalScrollbarWidth,o,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new hs(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var ps=i(77002),fs=i(44425);function ms(e,t){return null===e?t?vs.INSTANCE:bs.INSTANCE:new _s(e,t)}class _s{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,s=this._projectionData.breakOffsets[i];let o;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new Wi.uK(0,0,e+1,this._projectionData.injectionOptions[t],0)));o=Wi.uK.applyInjectedText(e.getLineContent(t),i).substring(n,s)}else o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(o=Cs(this._projectionData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,o,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,c=a.injectionOptions;let d,h=null;if(l){h=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,o=a.breakOffsets[i];for(;to)break;if(s0?a.wrappedTextIndentLength:0,r=t+Math.max(d-s,0),l=t+Math.min(h-s,o-s);r!==l&&n.push(new Wt.or(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(h<=o))break;e+=r,t++}}}d=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:fs.f.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let e=i;e0?n.wrappedTextIndentLength:0,o=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(o,r,s);let l=a.getLineContent();i>0&&(l=Cs(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,h=i+1=ws.length)for(let t=1;t<=e;t++)ws[t]=ys(t);return ws[e]}function ys(e){return new Array(e+1).join(" ")}var Ss=i(45354);class ks{constructor(e,t,i,n,s,o,r,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Ds(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,o=this.createLineBreaksComputer(),r=new f.j3(Wi.uK.fromDecorations(n));for(let e=0;et.lineNumber===e+1));o.addRequest(i[e],n,t?t[e]:null)}const a=o.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(K.Q.compareRangesUsingStarts);let d=1,h=0,u=-1,g=u+1=d&&t<=h,n=ms(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new Ss.c2(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(K.Q.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,s=t[0].endLineNumber;for(let e=1,o=t.length;es+1?(i.push(new K.Q(n,1,s,1)),n=o.startLineNumber,s=o.endLineNumber):o.endLineNumber>s&&(s=o.endLineNumber)}return i.push(new K.Q(n,1,s,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(K.Q.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n({range:e,options:Xi.kI.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const s=t;let o=1,r=0,a=-1,l=a+1=o&&t<=r?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(c=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,c=this.wordBreak===s;if(o&&r&&a&&l&&c)return!1;const d=o&&r&&!a&&l&&c;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let h=null;if(d){h=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),o=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let e=0,t=n.length;er?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+r-1,u=c+1,g=u+(s-r)-1,a=!0):st?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new xs(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new q.y(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new q.y(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let o=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const s=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,o=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=s;t{if(-1!==e.forWrappedLinesAfterColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=n.modelLineWrappedLineIdx)return;if(-1!==e.forWrappedLinesBeforeOrAtColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumbern.modelLineWrappedLineIdx)return}const i=this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn),s=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return s.lineNumber===n.modelLineWrappedLineIdx?new xt.TH(e.visibleColumn,t,e.className,new xt.pv(e.horizontalLine.top,i.column),-1,-1):s.lineNumber!!e)))}}return o}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[];const o=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),s=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=s-n+1;let d=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,s)&&(d=0===n?1:2),o.push(l),r.push(d),null===c&&(c=new q.y(e+1,0))}else null!==c&&(s=s.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(s=s.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const d=t-e+1,h=new Array(d);let u=0;for(let e=0,t=s.length;et&&(h=!0,d=t-s+1),l.getViewLinesData(this.model,n+1,c,d,s-e,i,a),s+=d,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,o=n.remainder,r=this.modelLineProjections[s],a=r.getViewLineMinColumn(this.model,s+1,o),l=r.getViewLineMaxColumn(this.model,s+1,o);tl&&(t=l);const c=r.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new q.y(s+1,c)).equals(i)?new q.y(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new K.Q(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new q.y(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new K.Q(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){const o=this.model.validatePosition(new q.y(e,t)),r=o.lineNumber,a=o.column;let l=r-1,c=!1;if(s)for(;l0&&!this.modelLineProjections[l].isVisible();)l--,c=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new q.y(n?0:1,1);const d=1+this.projectedModelLineLineCounts.getPrefixSum(l);let h;return h=c?s?this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(d,a,i),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return K.Q.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new K.Q(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s){const o=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-o.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new K.Q(o.lineNumber,1,r.lineNumber,r.column),t,i,n,s);let a=[];const l=o.lineNumber-1,c=r.lineNumber-1;let d=null;for(let e=l;e<=c;e++)if(this.modelLineProjections[e].isVisible())null===d&&(d=new q.y(e+1,e===l?o.column:1));else if(null!==d){const s=this.model.getLineMaxColumn(e);a=a.concat(this.model.getDecorationsInRange(new K.Q(d.lineNumber,d.column,e,s),t,i,n)),d=null}null!==d&&(a=a.concat(this.model.getDecorationsInRange(new K.Q(d.lineNumber,d.column,r.lineNumber,r.column),t,i,n)),d=null),a.sort(((e,t)=>{const i=K.Q.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));const h=[];let u=0,g=null;for(const e of a){const t=e.id;g!==t&&(g=t,h[u++]=e)}return h}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class xs{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class Ls{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Ds{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class Es{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Ns(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new In(t,i)}onModelLinesInserted(e,t,i,n){return new Mn(t,i)}onModelLineChanged(e,t,i){return[!1,new Nn(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let e=0;et)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}const Is=pt.ZS.Right;class Ms{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*Is/8))}reset(e){const t=Math.ceil((e+1)*Is/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=Rs.create(this.model),this.glyphLanes=new Ms(0),this.model.isTooLargeForTokenization())this._lines=new Es(this.model);else{const e=this._configuration.options,t=e.get(50),i=e.get(140),o=e.get(147),r=e.get(139),a=e.get(130);this._lines=new ks(this._editorId,this.model,n,s,t,this.model.getOptions().tabSize,i,o.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Jn(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new gs(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new Rn(e)),this._eventDispatcher.emitOutgoingEvent(new zn(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new ps.UB(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(Bt.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new On)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new Pn(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new K.Q(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Ln(e)),this._eventDispatcher.emitOutgoingEvent(new Vn(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new wn)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Cn)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new q.y(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new Fs(t,this._viewportStart.startLineDelta)}return new Fs(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,s=n.get(50),o=n.get(140),r=n.get(147),a=n.get(139),l=n.get(130);this._lines.setWrappingSettings(s,o,r.wrappingColumn,a,l)&&(e.emitViewEvent(new xn),e.emitViewEvent(new En),e.emitViewEvent(new kn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(92)&&(this._decorations.reset(),e.emitViewEvent(new kn(null))),t.hasChanged(99)&&(this._decorations.reset(),e.emitViewEvent(new kn(null))),e.emitViewEvent(new yn(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),gn.d$.shouldRecreate(t)&&(this.cursorConfig=new gn.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const s=e instanceof Wi.Ic?e.rawContentChangedEvent.changes:e.changes,o=e instanceof Wi.Ic?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of s)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new f.j3(a);for(const e of s)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new xn),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(o,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),s=this._lines.onModelLinesInserted(o,e.fromLineNumber,e.toLineNumber,n);null!==s&&(t.emitViewEvent(s),this.viewLayout.onLinesInserted(s.fromLineNumber,s.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[s,r,a,c]=this._lines.onModelLineChanged(o,e.lineNumber,i);n=s,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}}null!==o&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new En),t.emitViewEvent(new kn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof Wi.Ic&&t.emitOutgoingEvent(new Yn(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new Dn),this.cursorConfig=new gn.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Qn(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new gn.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Gn(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new xn),e.emitViewEvent(new En),e.emitViewEvent(new kn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new gn.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new Zn(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new kn(e)),this._eventDispatcher.emitOutgoingEvent(new $n(e))})))}setHiddenAreas(e,t){this.hiddenAreasModel.setHiddenAreas(t,e);const i=this.hiddenAreasModel.getMergedRanges();if(i===this.previousHiddenAreas)return;this.previousHiddenAreas=i;const n=this._captureStableViewport();let s=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();s=this._lines.setHiddenAreas(i),s&&(e.emitViewEvent(new xn),e.emitViewEvent(new En),e.emitViewEvent(new kn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const t=n.viewportStartModelPosition?.lineNumber;t&&i.some((e=>e.startLineNumber<=t&&t<=e.endLineNumber))||n.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),s&&this._eventDispatcher.emitOutgoingEvent(new jn)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(146),t=this._configuration.options.get(67),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),o=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new K.Q(s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let s=0,o=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(ot.toInlineDecoration(e)))]),new Wt.qL(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,i,n,o.tokens,t,s,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new Wt.nt(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,x.$C)(this._configuration.options)),i=new Ps;for(const n of t){const t=n.options,s=t.overviewRuler;if(!s)continue;const o=s.position;if(0===o)continue;const r=s.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,o)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e?.invalidateCachedColor();const i=t.options.minimap;i?.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e),n=this.model.modifyPosition(i,t);return this.coordinatesConverter.convertModelPositionToViewPosition(n)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const s=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(K.Q.compareRangesUsingStarts);let s=!1,o=!1;for(const t of e)t.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";const i=e.map((e=>e.startLineNumber));let s="";for(let e=0;e0&&i[e-1]===i[e]||(s+=this.model.getLineContent(i[e])+n);return s}if(s&&t){const t=[];let n=0;for(const s of e){const e=s.startLineNumber;s.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(s,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===os.vH)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new K.Q(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const s=this._configuration.options.get(50),o=this._getColorMap();let r;return/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===x.jU.fontFamily?r=x.jU.fontFamily:(r=s.fontFamily,r=r.replace(/"/g,"'"),/[,']/.test(r)||/[+ ]/.test(r)&&(r=`'${r}'`),r=`${r}, ${x.jU.fontFamily}`),{mode:i,html:`
    `+this._getHTMLToCopy(n,o)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=s;e++){const l=this.model.tokenization.getLineTokens(e),c=l.getLineContent(),d=e===i?n-1:0,h=e===s?o-1:c.length;a+=""===c?"
    ":(0,rs.s0)(c,l.inflate(),t,d,h,r,_.uF)}return a}_getColorMap(){const e=Re.dG.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Kn):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,s){this._executeCursorEdit((o=>this._cursor.compositionType(o,e,t,i,n,s)))}paste(e,t,i,n){this._executeCursorEdit((s=>this._cursor.paste(s,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealAll(n,e,i,0,t,0)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new K.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Tn(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new K.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Tn(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,s){this._withViewEventsCollector((o=>o.emitViewEvent(new Tn(e,!1,i,null,n,t,s))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Fn),this._eventDispatcher.emitOutgoingEvent(new Un))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges((()=>{try{const t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}))}batchEvents(e){this._withViewEventsCollector((()=>{e()}))}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class Rs{static create(e){const t=e._setTrackedRange(null,new K.Q(1,1,1,1),1);return new Rs(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new q.y(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new K.Q(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),o=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=o-s}invalidate(){this._isValid=!1}}class Ps{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){const o=this._asMap[e];if(o){const e=o.data,t=e[e.length-3],r=e[e.length-1];if(t===s&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(s,i,n)}else{const o=new Wt.Uv(e,t,[s,i,n]);this._asMap[e]=o,this.asArray.push(o)}}}class As{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&Os(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>function(e,t){const i=[];let n=0,s=0;for(;n{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(146)){const e=t.get(146);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=u,this._codeEditorService=o,this._commandService=r,this._themeService=h,this._register(new Ys(this,this._contextKeyService)),this._register(new Zs(this,this._contextKeyService,f)),this._instantiationService=this._register(n.createChild(new Vs.a([Hs.fN,this._contextKeyService]))),this._modelData=null,this._focusTracker=new Xs(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},_=Array.isArray(i.contributions)?i.contributions:s.dS.getEditorContributions(),this._contributions.initialize(this,_,this._instantiationService);for(const e of s.dS.getEditorActions()){if(this._actions.has(e.id)){(0,c.dz)(new Error(`Cannot have two actions with the same id ${e.id}`));continue}const t=new Gi.f(e.id,e.label,e.alias,e.metadata,e.precondition??void 0,(t=>this._instantiationService.invokeFunction((i=>Promise.resolve(e.runEditorCommand(i,this,t))))),this._contextKeyService);this._actions.set(t.id,t)}const v=()=>!this._configuration.options.get(92)&&this._configuration.options.get(36).enabled;this._register(new l.pN(this._domElement,{onDragOver:e=>{if(!v())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this.showDropIndicatorAt(t.position)},onDrop:async e=>{if(!v())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this._onDropIntoEditor.fire({position:t.position,event:e})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i,n){return new I(e,t,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Qi._.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?$i.z.getWordAtPosition(this._modelData.model,this._configuration.options.get(132),this._configuration.options.get(131),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{this._beginUpdate();const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:t?.uri||null};this._onWillChangeModel.fire(i);const n=this.hasTextFocus(),s=this._detachModel();this._attachModel(t),n&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(i),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(o.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?Bs._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?Bs._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber,n)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return-1;const i=this._modelData.model.getLineMaxColumn(e);return Bs._getVerticalOffsetAfterPosition(this._modelData,e,i,t)}setHiddenAreas(e,t){this._modelData?.viewModel.setHiddenAreas(e.map((e=>K.Q.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return $.A.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!q.y.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!K.Q.isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,o,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new K.Q(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!q.y.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new K.Q(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=ue.L.isISelection(e),n=K.Q.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new ue.L(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new K.Q(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!K.Q.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(K.Q.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){i=i||{};try{switch(this._beginUpdate(),t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null,t.clipboardEvent)}case"cut":return void this._cut(e)}const n=this.getAction(t);if(n)return void Promise.resolve(n.run(i)).then(void 0,c.dz);if(!this._modelData)return;if(this._triggerEditorCommand(e,t,i))return;this._triggerCommand(t,i)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s,o){if(!this._modelData)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({clipboardEvent:o,range:new K.Q(a.lineNumber,a.column,l.lineNumber,l.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=s.dS.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,c.dz)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(92)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(92)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(92))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new Js(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,x.$C)(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,(0,x.$C)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations((e=>e.deltaDecorations(t,[]))),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(146)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(146);return{top:Bs._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),height:i.get(67)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.viewModel.batchEvents((()=>{this._modelData.view.render(!0,e)}))}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,g.M)(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new Ts(this._id,this._configuration,e,Vi.create(l.zk(this._domElement)),tn.create(this._configuration.options),(e=>l.PG(l.zk(this._domElement),e)),this.languageConfigurationService,this._themeService,i,{batchChanges:e=>{try{return this._beginUpdate(),e()}finally{this._endUpdate()}}});t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=this.getOption(80),t=Se.kg("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",e);this._notificationService.prompt(zs.AI.Warning,t,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:Se.kg("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let i=0,n=t.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const s={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",s)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const s={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",s)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new et(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new Mi(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new K.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:Bs.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,0===this._updateCounter&&this._onEndUpdate.fire()}};qs=Bs=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([js(3,Fe._Y),js(4,O.T),js(5,Ws.d),js(6,Hs.fN),js(7,De.Gy),js(8,zs.Ot),js(9,E.j),js(10,Zi.JZ),js(11,Ji.ILanguageFeaturesService)],qs);let Ks=0;class $s{constructor(e,t,i,n,s,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=o}dispose(){(0,h.AS)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class Gs extends h.jG{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new d.vl(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new d.vl(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class Qs extends d.vl{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class Ys extends h.jG{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Yi.R.editorSimpleInput.bindTo(t),this._editorFocus=Yi.R.focus.bindTo(t),this._textInputFocus=Yi.R.textInputFocus.bindTo(t),this._editorTextFocus=Yi.R.editorTextFocus.bindTo(t),this._tabMovesFocus=Yi.R.tabMovesFocus.bindTo(t),this._editorReadonly=Yi.R.readOnly.bindTo(t),this._inDiffEditor=Yi.R.inDiffEditor.bindTo(t),this._editorColumnSelection=Yi.R.columnSelection.bindTo(t),this._hasMultipleSelections=Yi.R.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Yi.R.hasNonEmptySelection.bindTo(t),this._canUndo=Yi.R.canUndo.bindTo(t),this._canRedo=Yi.R.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._register(k.M.onDidChangeTabFocus((e=>this._tabMovesFocus.set(e)))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(k.M.getTabFocusMode()),this._editorReadonly.set(e.get(92)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Zs extends h.jG{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=Yi.R.languageId.bindTo(t),this._hasCompletionItemProvider=Yi.R.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Yi.R.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Yi.R.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Yi.R.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Yi.R.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Yi.R.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Yi.R.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Yi.R.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Yi.R.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Yi.R.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Yi.R.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Yi.R.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Yi.R.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Yi.R.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Yi.R.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Yi.R.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Yi.R.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Yi.R.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=Yi.R.isInEmbeddedEditor.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===u.ny.walkThroughSnippet||e.uri.scheme===u.ny.vscodeChatCodeBlock)})):this.reset()}}class Xs extends h.jG{constructor(e,t){super(),this._onChange=this._register(new d.vl),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(l.w5(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus((()=>{this._hasDomElementFocus=!0,this._update()}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasDomElementFocus=!1,this._update()}))),t&&(this._overflowWidgetsDomNode=this._register(l.w5(t)),this._register(this._overflowWidgetsDomNode.onDidFocus((()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()}))),this._register(this._overflowWidgetsDomNode.onDidBlur((()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()}))))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}class Js{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations((i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)}))}finally{this._isChangingDecorations=!1}return t}}const eo=encodeURIComponent("");function io(e){return eo+encodeURIComponent(e.toString())+to}const no=encodeURIComponent('');(0,De.zy)(((e,t)=>{const i=e.getColor(Ht.Rbi);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${io(i)}") repeat-x bottom left; }`);const n=e.getColor(Ht.Hng);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${io(n)}") repeat-x bottom left; }`);const s=e.getColor(Ht.pOz);s&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${io(s)}") repeat-x bottom left; }`);const o=e.getColor(Ht.i61);o&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return no+encodeURIComponent(e.toString())+so}(o)}") no-repeat bottom left; }`);const r=e.getColor(Ee.yw);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}))},11797:function(e,t,i){"use strict";i.d(t,{t:function(){return f}});var n=i(49134),s=i(72777),o=i(16827),r=i(8494),a=i(69122),l=i(68745),c=i(21335),d=i(97848),h=i(63619),u=i(31835),g=i(40616),p=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends o.x{constructor(e,t,i,n,s,o,r,a,l,c,d,h,u){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,s,o,r,a,l,c,d,h,u),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.co(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([p(4,h._Y),p(5,s.T),p(6,c.d),p(7,d.fN),p(8,g.Gy),p(9,u.Ot),p(10,l.j),p(11,r.JZ),p(12,a.ILanguageFeaturesService)],f)},71955:function(e,t,i){"use strict";var n=i(93231),s=i(84201),o=i(52694),r=i(72777),a=i(68831),l=i(49678),c=i(14374),d=i(93223),h=i(47901),u=i(97848);i(51903);class g extends d.L{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:(0,c.aS)("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:n.W.map,toggled:u.M$.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:u.M$.has("isInDiffEditor"),menu:{when:u.M$.has("isInDiffEditor"),id:d.D8.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(h.pG),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}class p extends d.L{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:(0,c.aS)("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:u.M$.has("isInDiffEditor")})}run(e,...t){const i=e.get(h.pG),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class f extends d.L{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:(0,c.aS)("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:u.M$.has("isInDiffEditor")})}run(e,...t){const i=e.get(h.pG),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const m=(0,c.aS)("diffEditor","Diff Editor");class _ extends o.qO{constructor(){super({id:"diffEditor.switchSide",title:(0,c.aS)("switchSide","Switch Side"),icon:n.W.arrowSwap,precondition:u.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,i){const n=x(e);if(n instanceof a.T){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}class v extends o.qO{constructor(){super({id:"diffEditor.exitCompareMove",title:(0,c.aS)("exitCompareMove","Exit Compare Move"),icon:n.W.close,precondition:l.R.comparingMovedCode,f1:!1,category:m,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=x(e);n instanceof a.T&&n.exitCompareMove()}}class b extends o.qO{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:(0,c.aS)("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:n.W.fold,precondition:u.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,...i){const n=x(e);n instanceof a.T&&n.collapseAllUnchangedRegions()}}class w extends o.qO{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:(0,c.aS)("showAllUnchangedRegions","Show All Unchanged Regions"),icon:n.W.unfold,precondition:u.M$.has("isInDiffEditor"),f1:!0,category:m})}runEditorCommand(e,t,...i){const n=x(e);n instanceof a.T&&n.showAllUnchangedRegions()}}class C extends d.L{constructor(){super({id:"diffEditor.revert",title:(0,c.aS)("revert","Revert"),f1:!1,category:m})}run(e,t){const i=function(e,t,i){return e.get(r.T).listDiffEditors().find((e=>{const n=e.getModifiedEditor(),s=e.getOriginalEditor();return n&&n.getModel()?.uri.toString()===i.toString()&&s&&s.getModel()?.uri.toString()===t.toString()}))||null}(e,t.originalUri,t.modifiedUri);i instanceof a.T&&i.revertRangeMappings(t.mapping.innerChanges??[])}}const y=(0,c.aS)("accessibleDiffViewer","Accessible Diff Viewer");class S extends d.L{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:S.id,title:(0,c.aS)("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:y,precondition:u.M$.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=x(e);t?.accessibleDiffViewerNext()}}class k extends d.L{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:k.id,title:(0,c.aS)("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:y,precondition:u.M$.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=x(e);t?.accessibleDiffViewerPrev()}}function x(e){const t=e.get(r.T).listDiffEditors(),i=(0,s.bq)();if(i)for(const e of t)if(L(e.getContainerDomNode(),i))return e;return null}function L(e,t){let i=t;for(;i;){if(i===e)return!0;i=i.parentElement}return!1}var D=i(21335);(0,d.ug)(g),(0,d.ug)(p),(0,d.ug)(f),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:(new f).desc.id,title:(0,c.kg)("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:u.M$.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:u.M$.has("isInDiffEditor")},order:11,group:"1_diff",when:u.M$.and(l.R.diffEditorRenderSideBySideInlineBreakpointReached,u.M$.has("isInDiffEditor"))}),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:(new p).desc.id,title:(0,c.kg)("showMoves","Show Moved Code Blocks"),icon:n.W.move,toggled:u.f1.create("config.diffEditor.experimental.showMoves",!0),precondition:u.M$.has("isInDiffEditor")},order:10,group:"1_diff",when:u.M$.has("isInDiffEditor")}),(0,d.ug)(C);for(const e of[{icon:n.W.arrowRight,key:l.R.diffEditorInlineMode.toNegated()},{icon:n.W.discard,key:l.R.diffEditorInlineMode}])d.ZG.appendMenuItem(d.D8.DiffEditorHunkToolbar,{command:{id:(new C).desc.id,title:(0,c.kg)("revertHunk","Revert Block"),icon:e.icon},when:u.M$.and(l.R.diffEditorModifiedWritable,e.key),order:5,group:"primary"}),d.ZG.appendMenuItem(d.D8.DiffEditorSelectionToolbar,{command:{id:(new C).desc.id,title:(0,c.kg)("revertSelection","Revert Selection"),icon:e.icon},when:u.M$.and(l.R.diffEditorModifiedWritable,e.key),order:5,group:"primary"});(0,d.ug)(_),(0,d.ug)(v),(0,d.ug)(b),(0,d.ug)(w),d.ZG.appendMenuItem(d.D8.EditorTitle,{command:{id:S.id,title:(0,c.kg)("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:u.M$.has("isInDiffEditor")},order:10,group:"2_diff",when:u.M$.and(l.R.accessibleDiffViewerVisible.negate(),u.M$.has("isInDiffEditor"))}),D.w.registerCommandAlias("editor.action.diffReview.next",S.id),(0,d.ug)(S),D.w.registerCommandAlias("editor.action.diffReview.prev",k.id),(0,d.ug)(k)},68831:function(e,t,i){"use strict";i.d(t,{T:function(){return Mt}});var n=i(84201),s=i(64429),o=i(20187),r=i(80670),a=i(35114),l=i(73755),c=i(98018),d=i(52694),h=i(72777),u=i(61554),g=i(16827),p=i(38945),f=i(98099),m=i(5390),_=i(30981),v=i(97358),b=i(93231),w=i(56613),C=i(43193),y=i(72540),S=i(3520),k=i(80487),x=i(28376),L=i(62993),D=i(40393),E=i(17191),N=i(41750),I=i(44425),M=i(73055),T=i(68316),R=i(14374),P=i(54673),A=i(63619),O=i(51310),F=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},B=function(e,t){return function(i,n){t(i,n,e)}};const W=(0,O.pU)("diff-review-insert",b.W.add,(0,R.kg)("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer.")),H=(0,O.pU)("diff-review-remove",b.W.remove,(0,R.kg)("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer.")),V=(0,O.pU)("diff-review-close",b.W.close,(0,R.kg)("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));let z=class extends a.jG{static{this._ttPolicy=(0,p.H)("diffReview",{createHTML:e=>e})}constructor(e,t,i,n,s,o,r,a,c){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=o,this._diffs=r,this._models=a,this._instantiationService=c,this._state=(0,l.rm)(this,((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(U,this._diffs,this._models,this._setVisible,this._canClose));return{model:n,view:t.add(this._instantiationService.createInstance(Z,this._parentNode,n,this._width,this._height,this._models))}})).recomputeInitiallyAndOnChange(this._store)}next(){(0,l.Rn)((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)}))}prev(){(0,l.Rn)((e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)}))}close(){(0,l.Rn)((e=>{this._setVisible(!1,e)}))}};z=F([B(8,A._Y)],z);let U=class extends a.jG{constructor(e,t,i,n,s){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=s,this._groups=(0,l.FY)(this,[]),this._currentGroupIdx=(0,l.FY)(this,0),this._currentElementIdx=(0,l.FY)(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>this.currentGroup.read(t)?.lines[e])),this._register((0,l.fm)((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=function(e,t,i){const n=[];for(const s of(0,v.n)(e,((e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<2*j))){const e=[];e.push(new $);const o=new k.M(Math.max(1,s[0].original.startLineNumber-j),Math.min(s[s.length-1].original.endLineNumberExclusive+j,t+1)),r=new k.M(Math.max(1,s[0].modified.startLineNumber-j),Math.min(s[s.length-1].modified.endLineNumberExclusive+j,i+1));(0,v.pN)(s,((t,i)=>{const n=new k.M(t?t.original.endLineNumberExclusive:o.startLineNumber,i?i.original.startLineNumber:o.endLineNumberExclusive),s=new k.M(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new Y(t,s.startLineNumber+(t-n.startLineNumber)))})),i&&(i.original.forEach((t=>{e.push(new G(i,t))})),i.modified.forEach((t=>{e.push(new Q(i,t))})))}));const a=s[0].modified.join(s[s.length-1].modified),l=s[0].original.join(s[s.length-1].original);n.push(new K(new E.WL(a,l),e))}return n}(t,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());(0,l.Rn)((e=>{const t=this._models.getModifiedPosition();if(t){const n=i.findIndex((e=>t?.lineNumber{const t=this.currentElement.read(e);t?.type===q.Deleted?this._accessibilitySignalService.playSignal(P.Rh.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):t?.type===q.Added&&this._accessibilitySignalService.playSignal(P.Rh.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register((0,l.fm)((e=>{const t=this.currentElement.read(e);if(t&&t.type!==q.Header){const e=t.modifiedLineNumber??t.diff.modified.startLineNumber;this._models.modifiedSetSelection(D.Q.fromPositions(new L.y(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||(0,l.PO)(t,(t=>{this._currentGroupIdx.set(x.L.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||(0,l.Rn)((i=>{this._currentElementIdx.set(x.L.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);-1!==i&&(0,l.Rn)((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===q.Deleted?this._models.originalReveal(D.Q.fromPositions(new L.y(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==q.Header?D.Q.fromPositions(new L.y(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};U=F([B(4,P.Nt)],U);const j=3;var q;!function(e){e[e.Header=0]="Header",e[e.Unchanged=1]="Unchanged",e[e.Deleted=2]="Deleted",e[e.Added=3]="Added"}(q||(q={}));class K{constructor(e,t){this.range=e,this.lines=t}}class ${constructor(){this.type=q.Header}}class G{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=q.Deleted,this.modifiedLineNumber=void 0}}class Q{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=q.Added,this.originalLineNumber=void 0}}class Y{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=q.Unchanged}}let Z=class extends a.jG{constructor(e,t,i,s,o,r){super(),this._element=e,this._model=t,this._width=i,this._height=s,this._models=o,this._languageService=r,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const c=document.createElement("div");c.className="diff-review-actions",this._actionBar=this._register(new f.E(c)),this._register((0,l.fm)((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new _.rc("diffreview.close",(0,R.kg)("label.close","Close"),"close-diff-review "+w.L.asClassName(V),!0,(async()=>t.close())),{label:!1,icon:!0})}))),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new m.MU(this._content,{})),(0,n.Ln)(this.domNode,this._scrollbar.getDomNode(),c),this._register((0,l.fm)((e=>{this._height.read(e),this._width.read(e),this._scrollbar.scanDomNode()}))),this._register((0,a.s)((()=>{(0,n.Ln)(this.domNode)}))),this._register((0,y.AV)(this.domNode,{width:this._width,height:this._height})),this._register((0,y.AV)(this._content,{width:this._width,height:this._height})),this._register((0,l.yC)(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register((0,n.b2)(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),s=document.createElement("div");s.className="diff-review-table",s.setAttribute("role","list"),s.setAttribute("aria-label",(0,R.kg)("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate.")),(0,C.M)(s,i.get(50)),(0,n.Ln)(this._content,s);const o=this._models.getOriginalModel(),r=this._models.getModifiedModel();if(!o||!r)return;const a=o.getOptions(),c=r.getOptions(),d=i.get(67),h=this._model.currentGroup.get();for(const u of h?.lines||[]){if(!h)break;let g;if(u.type===q.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=h.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,s=e=>0===e?(0,R.kg)("no_lines_changed","no lines changed"):1===e?(0,R.kg)("one_line_changed","1 line changed"):(0,R.kg)("more_lines_changed","{0} lines changed",e),o=s(t.original.length),r=s(t.modified.length);e.setAttribute("aria-label",(0,R.kg)({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,o,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),g=e}else g=this._createRow(u,d,this._width.get(),t,o,a,i,r,c);s.appendChild(g);const p=(0,l.un)((e=>this._model.currentElement.read(e)===u));e.add((0,l.fm)((e=>{const t=p.read(e);g.tabIndex=t?0:-1,t&&g.focus()}))),e.add((0,n.ko)(g,"focus",(()=>{this._model.goToLine(u)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,o,r,a,l){const c=n.get(146),d=c.glyphMarginWidth+c.lineNumbersWidth,h=r.get(146),u=10+h.glyphMarginWidth+h.lineNumbersWidth;let g="diff-review-row",p="",f=null;switch(e.type){case q.Added:g="diff-review-row line-insert",p=" char-insert",f=W;break;case q.Deleted:g="diff-review-row line-delete",p=" char-delete",f=H}const m=document.createElement("div");m.style.minWidth=i+"px",m.className=g,m.setAttribute("role","listitem"),m.ariaLevel="";const _=document.createElement("div");_.className="diff-review-cell",_.style.height=`${t}px`,m.appendChild(_);const v=document.createElement("span");v.style.width=d+"px",v.style.minWidth=d+"px",v.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?v.appendChild(document.createTextNode(String(e.originalLineNumber))):v.innerText=" ",_.appendChild(v);const b=document.createElement("span");b.style.width=u+"px",b.style.minWidth=u+"px",b.style.paddingRight="10px",b.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?b.appendChild(document.createTextNode(String(e.modifiedLineNumber))):b.innerText=" ",_.appendChild(b);const C=document.createElement("span");if(C.className="diff-review-spacer",f){const e=document.createElement("span");e.className=w.L.asClassName(f),e.innerText="  ",C.appendChild(e)}else C.innerText="  ";let y;if(_.appendChild(C),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);z._ttPolicy&&(t=z._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),y=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(s,n,o.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);z._ttPolicy&&(t=z._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),y=s.getLineContent(e.originalLineNumber)}0===y.length&&(y=(0,R.kg)("blankLine","blank"));let S="";switch(e.type){case q.Unchanged:S=e.originalLineNumber===e.modifiedLineNumber?(0,R.kg)({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",y,e.originalLineNumber):(0,R.kg)("equalLine","{0} original line {1} modified line {2}",y,e.originalLineNumber,e.modifiedLineNumber);break;case q.Added:S=(0,R.kg)("insertLine","+ {0} modified line {1}",y,e.modifiedLineNumber);break;case q.Deleted:S=(0,R.kg)("deleteLine","- {0} original line {1}",y,e.originalLineNumber)}return m.setAttribute("aria-label",S),m}_getLineHtml(e,t,i,n,s){const o=e.getLineContent(n),r=t.get(50),a=I.f.createEmpty(o,s),l=T.qL.isBasicASCII(o,e.mightContainNonBasicASCII()),c=T.qL.containsRTL(o,l,e.mightContainRTL());return(0,M.Md)(new M.zL(r.isMonospace&&!t.get(33),r.canUseHalfwidthRightwardsArrow,o,!1,l,c,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(118),t.get(100),t.get(95),t.get(51)!==S.Bc.OFF,null)).html}};Z=F([B(5,N.L)],Z);class X{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}var J=i(90890),ee=i(24219),te=i(51903),ie=i(76611),ne=i(41006),se=i(64523),oe=i(32720),re=i(96750),ae=i(60824),le=i(76922),ce=i(93066);let de=class extends a.jG{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=(0,l.FY)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,l.FY)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,l.FY)(this,void 0),this.unchangedRegions=(0,l.un)(this,(e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e)?.regions??[]:((0,l.Rn)((e=>{for(const t of this._unchangedRegions.get()?.regions||[])t.collapseAll(e)})),[]))),this.movedTextToCompare=(0,l.FY)(this,void 0),this._activeMovedText=(0,l.FY)(this,void 0),this._hoveredMovedText=(0,l.FY)(this,void 0),this.activeMovedText=(0,l.un)(this,(e=>this.movedTextToCompare.read(e)??this._hoveredMovedText.read(e)??this._activeMovedText.read(e))),this._cancellationTokenSource=new ie.Qi,this._diffProvider=(0,l.un)(this,(e=>{const t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)});return{diffProvider:t,onChangeSignal:(0,l.yQ)("onDidChange",t.onDidChange)}})),this._register((0,a.s)((()=>this._cancellationTokenSource.cancel())));const n=(0,l.Yd)("contentChangedSignal"),s=this._register(new J.uC((()=>n.trigger(void 0)),200));this._register((0,l.fm)((t=>{const i=this._unchangedRegions.read(t);if(!i||i.regions.some((e=>e.isDragged.read(t))))return;const n=i.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),s=i.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),o=i.regions.map(((e,i)=>n[i]&&s[i]?new fe(n[i].startLineNumber,s[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0)).filter(ee.O9),r=[];let a=!1;for(const e of(0,v.n)(o,((e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber)))if(e.length>1){a=!0;const t=e.reduce(((e,t)=>e+t.lineCount),0),i=new fe(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.get(),e[e.length-1].visibleLineCountBottom.get());r.push(i)}else r.push(e[0]);if(a){const t=e.original.deltaDecorations(i.originalDecorationIds,r.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));(0,l.Rn)((e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)}))}})));const o=(t,i,n)=>{const s=fe.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n));let o;const r=this._unchangedRegions.get();if(r){const t=r.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0)),i=r.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?k.M.fromRangeInclusive(e):void 0));let s=(0,y.EK)(r.regions.map(((e,n)=>{if(!t[n]||!i[n])return;const s=t[n].length;return new fe(t[n].startLineNumber,i[n].startLineNumber,s,Math.min(e.visibleLineCountTop.get(),s),Math.min(e.visibleLineCountBottom.get(),s-e.visibleLineCountTop.get()))})).filter(ee.O9),((e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount)).map((e=>new E.WL(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n))));s=E.WL.clip(s,k.M.ofLength(1,e.original.getLineCount()),k.M.ofLength(1,e.modified.getLineCount())),o=E.WL.inverse(s,e.original.getLineCount(),e.modified.getLineCount())}const a=[];if(o)for(const e of s){const t=o.filter((t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange)));a.push(...e.setVisibleRanges(t,i))}else a.push(...s);const l=e.original.deltaDecorations(r?.originalDecorationIds||[],a.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),c=e.modified.deltaDecorations(r?.modifiedDecorationIds||[],a.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:c},i)};this._register(e.modified.onDidChangeContent((t=>{if(this._diff.get()){re.c.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,(0,l.Rn)((e=>{this._diff.set(ge.fromDiffResult(this._lastDiff),e),o(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),s.schedule()}))),this._register(e.original.onDidChangeContent((t=>{if(this._diff.get()){re.c.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,(0,l.Rn)((e=>{this._diff.set(ge.fromDiffResult(this._lastDiff),e),o(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),s.schedule()}))),this._register((0,l.yC)((async(t,i)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),s.cancel(),n.read(t);const r=this._diffProvider.read(t);r.onChangeSignal.read(t),(0,se.b)(oe.D8,t),(0,se.b)(le.NC,t),this._isDiffUpToDate.set(!1,void 0);let a=[];i.add(e.original.onDidChangeContent((e=>{const t=re.c.fromModelContentChanges(e.changes);a=(0,ae.M)(a,t)})));let c=[];i.add(e.modified.onDidChangeContent((e=>{const t=re.c.fromModelContentChanges(e.changes);c=(0,ae.M)(c,t)})));let d=await r.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);var h,u,g;this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(h=d,u=e.original,g=e.modified,d={changes:h.changes.map((e=>new E.wm(e.original,e.modified,e.innerChanges?e.innerChanges.map((e=>function(e,t,i){let n=e.originalRange,s=e.modifiedRange;return 1===n.startColumn&&1===s.startColumn&&(1!==n.endColumn||1!==s.endColumn)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&s.endColumn===i.getLineMaxColumn(s.endLineNumber)&&n.endLineNumber{o(d,e),this._lastDiff=d;const t=ge.fromDiffResult(d);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))}ensureModifiedLineIsVisible(e,t,i){if(0===this.diff.get()?.mappings.length)return;const n=this._unchangedRegions.get()?.regions||[];for(const s of n)if(s.getHiddenModifiedRange(void 0).contains(e))return void s.showModifiedLine(e,t,i)}ensureOriginalLineIsVisible(e,t,i){if(0===this.diff.get()?.mappings.length)return;const n=this._unchangedRegions.get()?.regions||[];for(const s of n)if(s.getHiddenOriginalRange(void 0).contains(e))return void s.showOriginalLine(e,t,i)}async waitForDiff(){await(0,l.oJ)(this.isDiffUpToDate,(e=>e))}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){const t=e.collapsedRegions?.map((e=>k.M.deserialize(e.range))),i=this._unchangedRegions.get();i&&t&&(0,l.Rn)((e=>{for(const n of i.regions)for(const i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}}))}};var he,ue;de=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(he=2,ue=ne.Hg,function(e,t){ue(e,t,he)})],de);class ge{static fromDiffResult(e){return new ge(e.changes.map((e=>new pe(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class pe{constructor(e){this.lineRangeMapping=e}}class fe{static fromDiffs(e,t,i,n,s){const o=E.wm.inverse(e,t,i),r=[];for(const e of o){let o=e.original.startLineNumber,a=e.modified.startLineNumber,l=e.original.length;const c=1===o&&1===a,d=o+l===t+1&&a+l===i+1;(c||d)&&l>=s+n?(c&&!d&&(l-=s),d&&!c&&(o+=s,a+=s,l-=s),r.push(new fe(o,a,l,0,0))):l>=2*s+n&&(o+=s,a+=s,l-=2*s,r.push(new fe(o,a,l,0,0)))}return r}get originalUnchangedRange(){return k.M.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return k.M.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,l.FY)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,l.FY)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,l.un)(this,(e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=(0,l.FY)(this,void 0);const o=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(s,this.lineCount-n),0);(0,ce.V7)(n===o),(0,ce.V7)(s===r),this._visibleLineCountTop.set(o,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){const i=[],n=new k.S(e.map((e=>e.modified))).subtractFrom(this.modifiedUnchangedRange);let s=this.originalLineNumber,o=this.modifiedLineNumber;const r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(const a of n.ranges){const l=e===n.ranges.length-1;e++;const c=(l?r:a.endLineNumberExclusive)-o,d=new fe(s,o,c,0,0);d.setHiddenModifiedRange(a,t),i.push(d),s=d.originalUnchangedRange.endLineNumberExclusive,o=d.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return k.M.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return k.M.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){const n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),s=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n{this._contextMenuService.showContextMenu({domForShadowRoot:u?i.getDomNode()??void 0:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=s.modified.isEmpty;return e.push(new _.rc("diff.clipboard.copyDeletedContent",t?s.original.length>1?(0,R.kg)("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):(0,R.kg)("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):s.original.length>1?(0,R.kg)("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):(0,R.kg)("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(async()=>{const e=this._originalTextModel.getValueInRange(s.original.toExclusiveRange());await this._clipboardService.writeText(e)}))),s.original.length>1&&e.push(new _.rc("diff.clipboard.copyDeletedLineContent",t?(0,R.kg)("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",s.original.startLineNumber+h):(0,R.kg)("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",s.original.startLineNumber+h),void 0,!0,(async()=>{let e=this._originalTextModel.getLineContent(s.original.startLineNumber+h);""===e&&(e=0===this._originalTextModel.getEndOfLineSequence()?"\n":"\r\n"),await this._clipboardService.writeText(e)}))),i.getOption(92)||e.push(new _.rc("diff.inline.revertChange",(0,R.kg)("diff.inline.revertChange.label","Revert this change"),void 0,!0,(async()=>{this._editor.revert(this._diff)}))),e},autoSelectFirstItem:!0})};this._register((0,n.b2)(this._diffActions,"mousedown",(e=>{if(!e.leftButton)return;const{top:t,height:i}=(0,n.BK)(this._diffActions),s=Math.floor(d/3);e.preventDefault(),g(e.posx,t+i+s)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{!e.event.leftButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._getViewZoneId()&&(e.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),g(e.event.posx,e.event.posy+d))})))}_updateLightBulbPosition(e,t,i){const{top:s}=(0,n.BK)(e),o=t-s,r=Math.floor(o/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let e=0;for(let t=0;te});function Ce(e,t,i,n){(0,C.M)(n,t.fontInfo);const s=i.length>0,o=new ve.fe(1e4);let r=0,a=0;const l=[];for(let n=0;n');const l=t.getLineContent(),c=T.qL.isBasicASCII(l,s),d=T.qL.containsRTL(l,c,o),h=(0,M.UW)(new M.zL(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,c,d,0,t,i,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==S.Bc.OFF,null),a);return a.appendString(""),h.characterMapping.getHorizontalOffset(h.characterMapping.length)}var xe=i(42558),Le=i(14280),De=function(e,t){return function(i,n){t(i,n,e)}};let Ee=class extends a.jG{constructor(e,t,i,s,o,r,c,d,h,u){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=s,this._diffEditorWidget=o,this._canIgnoreViewZoneUpdateEvent=r,this._origViewZonesToIgnore=c,this._modViewZonesToIgnore=d,this._clipboardService=h,this._contextMenuService=u,this._originalTopPadding=(0,l.FY)(this,0),this._originalScrollOffset=(0,l.FY)(this,0),this._originalScrollOffsetAnimated=(0,y.Nu)(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,l.FY)(this,0),this._modifiedScrollOffset=(0,l.FY)(this,0),this._modifiedScrollOffsetAnimated=(0,y.Nu)(this._targetWindow,this._modifiedScrollOffset,this._store);const g=(0,l.FY)("invalidateAlignmentsState",0),p=this._register(new J.uC((()=>{g.set(g.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||p.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(147)||e.hasChanged(67))&&p.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(147)||e.hasChanged(67))&&p.schedule()})));const f=this._diffModel.map((e=>e?(0,l.y0)(this,e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>e?.read(t))),m=(0,l.un)((e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!t||!i)return null;g.read(e);const n=this._options.renderSideBySide.read(e);return Ne(this._editors.original,this._editors.modified,i.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,n)})),_=(0,l.un)((e=>{const t=this._diffModel.read(e)?.movedTextToCompare.read(e);if(!t)return null;g.read(e);const i=t.changes.map((e=>new pe(e)));return Ne(this._editors.original,this._editors.modified,i,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)}));function v(){const e=document.createElement("div");return e.className="diagonal-fill",e}const S=this._register(new a.Cm);this.viewZones=(0,l.rm)(this,((e,t)=>{S.clear();const i=m.read(e)||[],s=[],r=[],a=this._modifiedTopPadding.read(e);a>0&&r.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:a,showInHiddenAreas:!0,suppressMouseDown:!0});const l=this._originalTopPadding.read(e);l>0&&s.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:l,showInHiddenAreas:!0,suppressMouseDown:!0});const c=this._options.renderSideBySide.read(e),d=c?void 0:this._editors.modified._getViewModel()?.createLineBreaksComputer();if(d){const L=this._editors.original.getModel();for(const D of i)if(D.diff)for(let E=D.originalRange.startLineNumber;EL.getLineCount())return{orig:s,mod:r};d?.addRequest(L.getLineContent(E),null,null)}}const h=d?.finalize()??[];let u=0;const g=this._editors.modified.getOption(67),p=this._diffModel.read(e)?.movedTextToCompare.read(e),y=this._editors.original.getModel()?.mightContainNonBasicASCII()??!1,k=this._editors.original.getModel()?.mightContainRTL()??!1,x=Se.fromEditor(this._editors.modified);for(const N of i)if(!N.diff||c||this._options.useTrueInlineDiffRendering.read(e)&&Me(N.diff)){const I=N.modifiedHeightInPx-N.originalHeightInPx;if(I>0){if(p?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(N.originalRange.endLineNumberExclusive-1))continue;s.push({afterLineNumber:N.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:I,showInHiddenAreas:!0,suppressMouseDown:!0})}else{if(p?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(N.modifiedRange.endLineNumberExclusive-1))continue;function M(){const e=document.createElement("div");return e.className="arrow-revert-change "+w.L.asClassName(b.W.arrowRight),t.add((0,n.ko)(e,"mousedown",(e=>e.stopPropagation()))),t.add((0,n.ko)(e,"click",(e=>{e.stopPropagation(),o.revert(N.diff)}))),(0,n.$)("div",{},e)}let R;N.diff&&N.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(e)&&(R=M()),r.push({afterLineNumber:N.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-I,marginDomNode:R,showInHiddenAreas:!0,suppressMouseDown:!0})}}else{if(!N.originalRange.isEmpty){f.read(e);const A=document.createElement("div");A.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const O=this._editors.original.getModel();if(N.originalRange.endLineNumberExclusive-1>O.getLineCount())return{orig:s,mod:r};const F=new ye(N.originalRange.mapToLineArray((e=>O.tokenization.getLineTokens(e))),N.originalRange.mapToLineArray((e=>h[u++])),y,k),B=[];for(const z of N.diff.innerChanges||[])B.push(new T.kI(z.originalRange.delta(-(N.diff.original.startLineNumber-1)),te.Zb.className,0));const W=Ce(F,x,B,A),H=document.createElement("div");if(H.className="inline-deleted-margin-view-zone",(0,C.M)(H,x.fontInfo),this._options.renderIndicators.read(e))for(let U=0;U(0,ee.eU)(V)),H,this._editors.modified,N.diff,this._diffEditorWidget,W.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let q=0;q1&&s.push({afterLineNumber:N.originalRange.startLineNumber+q,domNode:v(),heightInPx:(K-1)*g,showInHiddenAreas:!0,suppressMouseDown:!0})}r.push({afterLineNumber:N.modifiedRange.startLineNumber-1,domNode:A,heightInPx:W.heightInLines*g,minWidthInPx:W.minWidthInPx,marginDomNode:H,setZoneId(e){V=e},showInHiddenAreas:!0,suppressMouseDown:!0})}const P=document.createElement("div");P.className="gutter-delete",s.push({afterLineNumber:N.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:N.modifiedHeightInPx,marginDomNode:P,showInHiddenAreas:!0,suppressMouseDown:!0})}for(const $ of _.read(e)??[]){if(!p?.lineRangeMapping.original.intersect($.originalRange)||!p?.lineRangeMapping.modified.intersect($.modifiedRange))continue;const G=$.modifiedHeightInPx-$.originalHeightInPx;G>0?s.push({afterLineNumber:$.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:G,showInHiddenAreas:!0,suppressMouseDown:!0}):r.push({afterLineNumber:$.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-G,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:s,mod:r}}));let k=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!k&&(k=!0,this._editors.modified.setScrollLeft(e.scrollLeft),k=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!k&&(k=!0,this._editors.original.setScrollLeft(e.scrollLeft),k=!1)}))),this._originalScrollTop=(0,l.y0)(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.y0)(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register((0,l.fm)((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register((0,l.fm)((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register((0,l.fm)((e=>{const t=this._diffModel.read(e)?.movedTextToCompare.read(e);let i=0;if(t){const e=this._editors.original.getTopForLineNumber(t.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();i=this._editors.modified.getTopForLineNumber(t.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-e}i>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(i,void 0)):i<0?(this._modifiedTopPadding.set(-i,void 0),this._originalTopPadding.set(0,void 0)):setTimeout((()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)}),400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-i,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+i,void 0,!0)})))}};function Ne(e,t,i,n,s,o){const r=new v.j3(Ie(e,n)),a=new v.j3(Ie(t,s)),l=e.getOption(67),c=t.getOption(67),d=[];let h=0,u=0;function g(e,t){for(;;){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const s=i?i.lineNumber-h:Number.MAX_VALUE,o=n?n.lineNumber-u:Number.MAX_VALUE;so?(a.dequeue(),i={lineNumber:n.lineNumber-u+h,heightInPx:0}):(r.dequeue(),a.dequeue()),d.push({originalRange:k.M.ofLength(i.lineNumber,1),modifiedRange:k.M.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:c+n.heightInPx,diff:void 0})}}for(const p of i){const f=p.lineRangeMapping;g(f.original.startLineNumber,f.modified.startLineNumber);let m=!0,_=f.modified.startLineNumber,b=f.original.startLineNumber;function w(e,t,i=!1){if(et.lineNumbere+t.heightInPx),0)??0,h=a.takeWhile((e=>e.lineNumbere+t.heightInPx),0)??0;d.push({originalRange:n,modifiedRange:s,originalHeightInPx:n.length*l+o,modifiedHeightInPx:s.length*c+h,diff:p.lineRangeMapping}),b=e,_=t}if(o)for(const C of f.innerChanges||[]){C.originalRange.startColumn>1&&C.modifiedRange.startColumn>1&&w(C.originalRange.startLineNumber,C.modifiedRange.startLineNumber);const y=e.getModel(),S=C.originalRange.endLineNumber<=y.getLineCount()?y.getLineMaxColumn(C.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;C.originalRange.endColumn1&&n.push({lineNumber:t,heightInPx:r*(e-1)})}for(const n of e.getWhitespaces()){if(t.has(n.id))continue;const e=0===n.afterLineNumber?0:o.convertViewPositionToModelPosition(new L.y(n.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:n.height})}return(0,y.Am)(i,n,(e=>e.lineNumber),((e,t)=>({lineNumber:e.lineNumber,heightInPx:e.heightInPx+t.heightInPx})))}function Me(e){return!!e.innerChanges&&e.innerChanges.every((e=>Te(e.modifiedRange)&&Te(e.originalRange)||e.originalRange.equalsRange(new D.Q(1,1,1,1))))}function Te(e){return e.startLineNumber===e.endLineNumber}Ee=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([De(8,xe.h),De(9,Le.Z)],Ee);class Re extends a.jG{static{this.movedCodeBlockPadding=4}constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=(0,l.y0)(this,this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=(0,l.y0)(this,this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=(0,l.yQ)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,l.FY)(this,0),this._modifiedViewZonesChangedSignal=(0,l.yQ)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,l.yQ)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,l.rm)(this,((e,t)=>{this._element.replaceChildren();const i=this._diffModel.read(e),n=i?.diff.read(e)?.movedTexts;if(!n||0===n.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const s=this._originalEditorLayoutInfo.read(e),o=this._modifiedEditorLayoutInfo.read(e);if(!s||!o)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const r=n.map((t=>{function i(e,t){return(t.getTopForLineNumber(e.startLineNumber,!0)+t.getTopForLineNumber(e.endLineNumberExclusive,!0))/2}const n=i(t.lineRangeMapping.original,this._editors.original),s=this._originalScrollTop.read(e),o=i(t.lineRangeMapping.modified,this._editors.modified),r=n-s,a=o-this._modifiedScrollTop.read(e),l=Math.min(n,o),c=Math.max(n,o);return{range:new x.L(l,c),from:r,to:a,fromWithoutScroll:n,toWithoutScroll:o,move:t}}));r.sort((0,v.nH)((0,v.VE)((e=>e.fromWithoutScroll>e.toWithoutScroll),v.TS),(0,v.VE)((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),v.U9)));const a=Pe.compute(r.map((e=>e.range))),c=s.verticalScrollbarWidth,d=10*(a.getTrackCount()-1)+20,h=c+d+(o.contentLeft-Re.movedCodeBlockPadding);let u=0;for(const e of r){const n=c+10+10*a.getTrack(u),s=15,r=15,d=h,g=o.glyphMarginWidth+o.lineNumbersWidth,p=18,f=document.createElementNS("http://www.w3.org/2000/svg","rect");f.classList.add("arrow-rectangle"),f.setAttribute("x",""+(d-g)),f.setAttribute("y",""+(e.to-p/2)),f.setAttribute("width",`${g}`),f.setAttribute("height",`${p}`),this._element.appendChild(f);const m=document.createElementNS("http://www.w3.org/2000/svg","g"),_=document.createElementNS("http://www.w3.org/2000/svg","path");_.setAttribute("d",`M 0 ${e.from} L ${n} ${e.from} L ${n} ${e.to} L ${d-r} ${e.to}`),_.setAttribute("fill","none"),m.appendChild(_);const v=document.createElementNS("http://www.w3.org/2000/svg","polygon");v.classList.add("arrow"),t.add((0,l.fm)((t=>{_.classList.toggle("currentMove",e.move===i.activeMovedText.read(t)),v.classList.toggle("currentMove",e.move===i.activeMovedText.read(t))}))),v.setAttribute("points",`${d-r},${e.to-s/2} ${d},${e.to} ${d-r},${e.to+s/2}`),m.appendChild(v),this._element.appendChild(m),u++}this.width.set(d,void 0)})),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,a.s)((()=>this._element.remove()))),this._register((0,l.fm)((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-Re.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register((0,l.OI)(this._state));const o=(0,l.un)((e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new y.D1((0,l.lk)(e.lineRangeMapping.original.startLineNumber-1),18),modified:new y.D1((0,l.lk)(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register((0,y.Vs)(this._editors.original,o.map((e=>e.map((e=>e.original)))))),this._register((0,y.Vs)(this._editors.modified,o.map((e=>e.map((e=>e.modified)))))),this._register((0,l.yC)(((e,t)=>{const i=o.read(e);for(const e of i)t.add(new Ae(this._editors.original,e.original,e.move,"original",this._diffModel.get())),t.add(new Ae(this._editors.modified,e.modified,e.move,"modified",this._diffModel.get()))})));const r=(0,l.yQ)("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),c=(0,l.yQ)("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let d="modified";this._register((0,l.Y)({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(r)&&(d="original"),e.didChange(c)&&(d="modified"),!0)},(e=>{r.read(e),c.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===d){const t=this._editors.originalCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===d){const t=this._editors.modifiedCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}class Pe{static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=(0,s.TM)(t,(0,v.VE)((e=>e.intersectWithRangeLength(n)),v.U9)):(e=t.length,t.push(new x.h))}t[e].addRange(n),i.push(e)}return new Pe(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class Ae extends y.uN{constructor(e,t,i,s,o){const r=(0,n.h)("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=s,this._diffModel=o,this._nodes=(0,n.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,n.h)("div.text-content@textContent"),(0,n.h)("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);const a=(0,l.y0)(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let c;this._register((0,y.AV)(this._nodes.root,{paddingRight:a.map((e=>e.verticalScrollbarWidth))})),c=i.changes.length>0?"original"===this._kind?(0,R.kg)("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,R.kg)("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?(0,R.kg)("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,R.kg)("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const d=this._register(new f.E(this._nodes.actionBar,{highlightToggledItems:!0})),h=new _.rc("",c,"",!1);d.push(h,{icon:!1,label:!0});const u=new _.rc("","Compare",w.L.asClassName(b.W.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register((0,l.fm)((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;u.checked=t}))),d.push(u,{icon:!1,label:!0})}}class Oe extends a.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),s=this._options.renderIndicators.read(e),o=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const n of i.mappings)if(n.lineRangeMapping.original.isEmpty||r.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:s?te.Ob:te.XT}),n.lineRangeMapping.modified.isEmpty||a.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:s?te.Kl:te.Zw}),n.lineRangeMapping.modified.isEmpty||n.lineRangeMapping.original.isEmpty)n.lineRangeMapping.original.isEmpty||r.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:te.KL}),n.lineRangeMapping.modified.isEmpty||a.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:te.Ou});else{const i=this._options.useTrueInlineDiffRendering.read(e)&&Me(n.lineRangeMapping);for(const e of n.lineRangeMapping.innerChanges||[])if(n.lineRangeMapping.original.contains(e.originalRange.startLineNumber)&&r.push({range:e.originalRange,options:e.originalRange.isEmpty()&&o?te.wp:te.Zb}),n.lineRangeMapping.modified.contains(e.modifiedRange.startLineNumber)&&a.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()&&o&&!i?te.GM:te.bk}),i){const i=t.model.original.getValueInRange(e.originalRange);a.push({range:e.modifiedRange,options:{description:"deleted-text",before:{content:i,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(n)for(const e of n.changes){const t=e.original.toInclusiveRange();t&&r.push({range:t,options:s?te.Ob:te.XT});const i=e.modified.toInclusiveRange();i&&a.push({range:i,options:s?te.Kl:te.Zw});for(const t of e.innerChanges||[])r.push({range:t.originalRange,options:te.Zb}),a.push({range:t.modifiedRange,options:te.bk})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const e of i.movedTexts)r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(e===l?" currentMove":""),blockPadding:[Re.movedCodeBlockPadding,0,Re.movedCodeBlockPadding,Re.movedCodeBlockPadding]}}),a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(e===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register((0,y.pY)(this._editors.original,this._decorations.map((e=>e?.originalDecorations||[])))),this._register((0,y.pY)(this._editors.modified,this._decorations.map((e=>e?.modifiedDecorations||[]))))}}var Fe=i(38175);class Be{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=(0,c.dQ)(this,(e=>{const t=this._sashRatio.read(e)??this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(t,e)}),((e,t)=>{const i=this.dimensions.width.get();this._sashRatio.set(e/i,t)})),this._sashRatio=(0,l.FY)(this,void 0)}_computeSashLeft(e,t){const i=this.dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,o=100;return i<=200?n:si-o?i-o:s}}class We extends a.jG{constructor(e,t,i,n,s,o){super(),this._domNode=e,this._dimensions=t,this._enabled=i,this._boundarySashes=n,this.sashLeft=s,this._resetSash=o,this._sash=this._register(new Fe.m(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()}))),this._register(this._sash.onDidChange((e=>{this.sashLeft.set(this._startSashPosition+(e.currentX-e.startX),void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._resetSash()))),this._register((0,l.fm)((e=>{const t=this._boundarySashes.read(e);t&&(this._sash.orthogonalEndSash=t.bottom)}))),this._register((0,l.fm)((e=>{const t=this._enabled.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()})))}}class He extends a.jG{constructor(e,t,i){super(),this._editor=e,this._domNode=t,this.itemProvider=i,this.scrollTop=(0,l.y0)(this,this._editor.onDidScrollChange,(e=>this._editor.getScrollTop())),this.isScrollTopZero=this.scrollTop.map((e=>0===e)),this.modelAttached=(0,l.y0)(this,this._editor.onDidChangeModel,(e=>this._editor.hasModel())),this.editorOnDidChangeViewZones=(0,l.yQ)("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=(0,l.yQ)("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=(0,l.Yd)("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const s=this._domNode.appendChild((0,n.h)("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),o=new ResizeObserver((()=>{(0,l.Rn)((e=>{this.domNodeSizeChanged.trigger(e)}))}));o.observe(this._domNode),this._register((0,a.s)((()=>o.disconnect()))),this._register((0,l.fm)((e=>{s.className=this.isScrollTopZero.read(e)?"":"scroll-decoration"}))),this._register((0,l.fm)((e=>this.render(e))))}dispose(){super.dispose(),(0,n.Ln)(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const t=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),n=new Set(this.views.keys()),s=x.L.ofStartAndLength(0,this._domNode.clientHeight);if(!s.isEmpty)for(const o of i){const i=new k.M(o.startLineNumber,o.endLineNumber+1),r=this.itemProvider.getIntersectingGutterItems(i,e);(0,l.Rn)((e=>{for(const o of r){if(!o.range.intersect(i))continue;n.delete(o.id);let r=this.views.get(o.id);if(r)r.item.set(o,e);else{const e=document.createElement("div");this._domNode.appendChild(e);const t=(0,l.FY)("item",o),i=this.itemProvider.createView(t,e);r=new Ve(t,i,e),this.views.set(o.id,r)}const a=o.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(o.range.startLineNumber,!0)-t:this._editor.getBottomForLineNumber(o.range.startLineNumber-1,!1)-t,c=(1===o.range.endLineNumberExclusive?Math.max(a,this._editor.getTopForLineNumber(o.range.startLineNumber,!1)-t):Math.max(a,this._editor.getBottomForLineNumber(o.range.endLineNumberExclusive-1,!0)-t))-a;r.domNode.style.top=`${a}px`,r.domNode.style.height=`${c}px`,r.gutterItemView.layout(x.L.ofStartAndLength(a,c),s)}}))}for(const e of n){const t=this.views.get(e);t.gutterItemView.dispose(),t.domNode.remove(),this.views.delete(e)}}}class Ve{constructor(e,t,i){this.item=e,this.gutterItemView=t,this.domNode=i}}var ze=i(41667),Ue=i(30479),je=i(13233);class qe extends Ue.CO{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){const e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new je.W(e-1,t)}}var Ke=i(86051),$e=i(93223),Ge=i(97848),Qe=i(74856),Ye=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ze=function(e,t){return function(i,n){t(i,n,e)}};const Xe=[];let Je=class extends a.jG{constructor(e,t,i,s,o,r,a,d,h){super(),this._diffModel=t,this._editors=i,this._options=s,this._sashLayout=o,this._boundarySashes=r,this._instantiationService=a,this._contextKeyService=d,this._menuService=h,this._menu=this._register(this._menuService.createMenu($e.D8.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=(0,l.y0)(this,this._menu.onDidChange,(()=>this._menu.getActions())),this._hasActions=this._actions.map((e=>e.length>0)),this._showSash=(0,l.un)(this,(e=>this._options.renderSideBySide.read(e)&&this._hasActions.read(e))),this.width=(0,l.un)(this,(e=>this._hasActions.read(e)?35:0)),this.elements=(0,n.h)("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:"35px"}},[]),this._currentDiff=(0,l.un)(this,(e=>{const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e)?.mappings,n=this._editors.modifiedCursor.read(e);return n?i?.find((e=>e.lineRangeMapping.modified.contains(n.lineNumber))):void 0})),this._selectedDiffs=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return Xe;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return Xe;const s=new k.S(n.map((e=>k.M.fromRangeInclusive(e)))),o=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&s.intersects(e.lineRangeMapping.modified))).map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>D.Q.areIntersecting(e.modifiedRange,t)))))})));return 0===o.length||o.every((e=>0===e.rangeMappings.length))?Xe:o})),this._register((0,y.$y)(e,this.elements.root)),this._register((0,n.ko)(this.elements.root,"click",(()=>{this._editors.modified.focus()}))),this._register((0,y.AV)(this.elements.root,{display:this._hasActions.map((e=>e?"block":"none"))})),(0,c.a0)(this,(t=>this._showSash.read(t)?new We(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,(0,c.dQ)(this,(e=>this._sashLayout.sashLeft.read(e)-35),((e,t)=>this._sashLayout.sashLeft.set(e+35,t))),(()=>this._sashLayout.resetSash())):void 0)).recomputeInitiallyAndOnChange(this._store),this._register(new He(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(e,t)=>{const i=this._diffModel.read(t);if(!i)return[];const n=i.diff.read(t);if(!n)return[];const s=this._selectedDiffs.read(t);if(s.length>0){const e=E.wm.fromRangeMappings(s.flatMap((e=>e.rangeMappings)));return[new et(e,!0,$e.D8.DiffEditorSelectionToolbar,void 0,i.model.original.uri,i.model.modified.uri)]}const o=this._currentDiff.read(t);return n.mappings.map((e=>new et(e.lineRangeMapping.withInnerChangesFromLineRanges(),e.lineRangeMapping===o?.lineRangeMapping,$e.D8.DiffEditorHunkToolbar,void 0,i.model.original.uri,i.model.modified.uri)))},createView:(e,t)=>this._instantiationService.createInstance(tt,e,t,this)})),this._register((0,n.ko)(this.elements.gutter,n.Bx.MOUSE_WHEEL,(e=>{this._editors.modified.getOption(104).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1}))}computeStagedValue(e){const t=e.innerChanges??[],i=new qe(this._editors.modifiedModel.get()),n=new qe(this._editors.original.getModel()),s=new Ue.mF(t.map((e=>e.toTextEdit(i))));return s.apply(n)}layout(e){this.elements.gutter.style.left=e+"px"}};Je=Ye([Ze(6,A._Y),Ze(7,Ge.fN),Ze(8,$e.ez)],Je);class et{constructor(e,t,i,n,s,o){this.mapping=e,this.showAlways=t,this.menuId=i,this.rangeOverride=n,this.originalUri=s,this.modifiedUri=o}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let tt=class extends a.jG{constructor(e,t,i,s){super(),this._item=e,this._elements=(0,n.h)("div.gutterItem",{style:{height:"20px",width:"34px"}},[(0,n.h)("div.background@background",{},[]),(0,n.h)("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,(e=>e.showAlways)),this._menuId=this._item.map(this,(e=>e.menuId)),this._isSmall=(0,l.FY)(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const o=this._register(s.createInstance(Qe.fO,"element",!0,{position:{hoverPosition:1}}));this._register((0,y.rX)(t,this._elements.root)),this._register((0,l.fm)((e=>{const t=this._showAlways.read(e);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",t),setTimeout((()=>{this._elements.root.classList.toggle("noTransition",!1)}),0)}))),this._register((0,l.yC)(((e,t)=>{this._elements.buttons.replaceChildren();const n=t.add(s.createInstance(Ke.m,this._elements.buttons,this._menuId.read(e),{orientation:1,hoverDelegate:o,toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(e)?1:3},hiddenItemStrategy:0,actionRunner:new ze.I((()=>{const e=this._item.get(),t=e.mapping;return{mapping:t,originalWithModifiedChanges:i.computeStagedValue(t),originalUri:e.originalUri,modifiedUri:e.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));t.add(n.onDidChangeMenuItems((()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)})))})))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let i=this._elements.buttons.clientHeight;this._isSmall.set(1===this._item.get().mapping.original.startLineNumber&&e.length<30,void 0),i=this._elements.buttons.clientHeight;const n=e.length/2-i/2,s=i;let o=e.start+n;const r=x.L.tryCreate(s,t.endExclusive-s-i),a=x.L.tryCreate(e.start+s,e.endExclusive-i-s);a&&r&&a.startthis._themeService.getColorTheme())),d=(0,l.un)((e=>{const t=c.read(e);return{insertColor:t.getColor(at.ld8)||(t.getColor(at.Gj6)||at.EY1).transparent(2),removeColor:t.getColor(at.$BZ)||(t.getColor(at.GNm)||at.ZEf).transparent(2)}})),h=(0,st.Z)(document.createElement("div"));h.setClassName("diffViewport"),h.setPosition("absolute");const u=(0,n.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:it.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register((0,y.rX)(u,h.domNode)),this._register((0,n.b2)(u,n.Bx.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),this._register((0,n.ko)(u,n.Bx.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),this._register((0,y.rX)(this._rootElement,u)),this._register((0,l.yC)(((e,t)=>{const i=this._diffModel.read(e),n=this._editors.original.createOverviewRuler("original diffOverviewRuler");n&&(t.add(n),t.add((0,y.rX)(u,n.getDomNode())));const s=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(s&&(t.add(s),t.add((0,y.rX)(u,s.getDomNode()))),!n||!s)return;const o=(0,l.yQ)("viewZoneChanged",this._editors.original.onDidChangeViewZones),r=(0,l.yQ)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),a=(0,l.yQ)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),c=(0,l.yQ)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add((0,l.fm)((e=>{o.read(e),r.read(e),a.read(e),c.read(e);const t=d.read(e),l=i?.diff.read(e)?.mappings;function h(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new L.y(e.startLineNumber,1)),s=n.coordinatesConverter.convertModelPositionToViewPosition(new L.y(e.endLineNumberExclusive,1)),o=s.lineNumber-i.lineNumber;return new rt.iE(i.lineNumber,s.lineNumber,o,t.toString())})):[]}const u=h((l||[]).map((e=>e.lineRangeMapping.original)),t.removeColor,this._editors.original),g=h((l||[]).map((e=>e.lineRangeMapping.modified)),t.insertColor,this._editors.modified);n?.setZones(u),s?.setZones(g)}))),t.add((0,l.fm)((e=>{const t=this._rootHeight.read(e),i=this._rootWidth.read(e),o=this._modifiedEditorLayoutInfo.read(e);if(o){const i=it.ENTIRE_DIFF_OVERVIEW_WIDTH-2*it.ONE_OVERVIEW_WIDTH;n.setLayout({top:0,height:t,right:i+it.ONE_OVERVIEW_WIDTH,width:it.ONE_OVERVIEW_WIDTH}),s.setLayout({top:0,height:t,right:0,width:it.ONE_OVERVIEW_WIDTH});const r=this._editors.modifiedScrollTop.read(e),a=this._editors.modifiedScrollHeight.read(e),l=this._editors.modified.getOption(104),c=new ot.m(l.verticalHasArrows?l.arrowSize:0,l.verticalScrollbarSize,0,o.height,a,r);h.setTop(c.getSliderPosition()),h.setHeight(c.getSliderSize())}else h.setTop(0),h.setHeight(0);u.style.height=t+"px",u.style.left=i-it.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",h.setWidth(it.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))}};ct=it=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,lt.Gy)],ct);var dt=i(43014),ht=i(62067);const ut=[];class gt extends a.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=(0,l.un)(this,(e=>{const t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return ut;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return ut;const s=new k.S(n.map((e=>k.M.fromRangeInclusive(e)))),o=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&s.intersects(e.lineRangeMapping.modified))).map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>D.Q.areIntersecting(e.modifiedRange,t)))))})));return 0===o.length||o.every((e=>0===e.rangeMappings.length))?ut:o})),this._register((0,l.yC)(((e,t)=>{if(!this._options.shouldRenderOldRevertArrows.read(e))return;const i=this._diffModel.read(e),n=i?.diff.read(e);if(!i||!n)return;if(i.movedTextToCompare.read(e))return;const s=[],o=this._selectedDiffs.read(e),r=new Set(o.map((e=>e.mapping)));if(o.length>0){const i=this._editors.modifiedSelections.read(e),n=t.add(new pt(i[i.length-1].positionLineNumber,this._widget,o.flatMap((e=>e.rangeMappings)),!0));this._editors.modified.addGlyphMarginWidget(n),s.push(n)}for(const e of n.mappings)if(!r.has(e)&&!e.lineRangeMapping.modified.isEmpty&&e.lineRangeMapping.innerChanges){const i=t.add(new pt(e.lineRangeMapping.modified.startLineNumber,this._widget,e.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(i),s.push(i)}t.add((0,a.s)((()=>{for(const e of s)this._editors.modified.removeGlyphMarginWidget(e)})))})))}}class pt extends a.jG{static{this.counter=0}getId(){return this._id}constructor(e,t,i,s){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=s,this._id="revertButton"+pt.counter++,this._domNode=(0,n.h)("div.revertButton",{title:this._revertSelection?(0,R.kg)("revertSelectedChanges","Revert Selected Changes"):(0,R.kg)("revertChange","Revert Change")},[(0,dt.s)(b.W.arrowRight)]).root,this._register((0,n.ko)(this._domNode,n.Bx.MOUSE_DOWN,(e=>{2!==e.button&&(e.stopPropagation(),e.preventDefault())}))),this._register((0,n.ko)(this._domNode,n.Bx.MOUSE_UP,(e=>{e.stopPropagation(),e.preventDefault()}))),this._register((0,n.ko)(this._domNode,n.Bx.CLICK,(e=>{this._diffs instanceof E.WL?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),e.stopPropagation(),e.preventDefault()})))}getDomNode(){return this._domNode}getPosition(){return{lane:ht.ZS.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}var ft=i(74827),mt=i(48872),_t=i(49678),vt=i(24813),bt=i(86171),wt=i(90072),Ct=i(87163),yt=function(e,t){return function(i,n){t(i,n,e)}};let St=class extends a.jG{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,s,o,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._argCodeEditorWidgetOptions=n,this._createInnerEditor=s,this._instantiationService=o,this._keybindingService=a,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new r.vl),this.modifiedScrollTop=(0,l.y0)(this,this.modified.onDidScrollChange,(()=>this.modified.getScrollTop())),this.modifiedScrollHeight=(0,l.y0)(this,this.modified.onDidScrollChange,(()=>this.modified.getScrollHeight())),this.modifiedObs=(0,wt.Ud)(this.modified),this.originalObs=(0,wt.Ud)(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=(0,l.y0)(this,this.modified.onDidChangeCursorSelection,(()=>this.modified.getSelections()??[])),this.modifiedCursor=(0,l.C)({owner:this,equalsFn:L.y.equals},(e=>this.modifiedSelections.read(e)[0]?.getPosition()??new L.y(1,1))),this.originalCursor=(0,l.y0)(this,this.original.onDidChangeCursorPosition,(()=>this.original.getPosition()??new L.y(1,1))),this._argCodeEditorWidgetOptions=null,this._register((0,l.Y)({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+ct.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),s}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=S.qB.revealHorizontalRightPadding.defaultValue+ct.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");const t=(0,R.kg)("diff-aria-navigation-tip"," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};St=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([yt(5,A._Y),yt(6,Ct.b)],St);class kt extends a.jG{constructor(){super(...arguments),this._id=++kt.idCounter,this._onDidDispose=this._register(new r.vl),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}var xt=i(84230),Lt=i(42415),Dt=i(68745);let Et=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=(0,l.FY)(this,0),this._screenReaderMode=(0,l.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this.couldShowInlineViewBecauseOfSize=(0,l.un)(this,(e=>this._options.read(e).renderSideBySide&&this._diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=(0,l.un)(this,(e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=(0,l.un)(this,(e=>(!this.compactMode.read(e)||!this.shouldRenderInlineViewInSmartMode.read(e))&&this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)&&!this._screenReaderMode.read(e)))),this.readOnly=(0,l.un)(this,(e=>this._options.read(e).readOnly)),this.shouldRenderOldRevertArrows=(0,l.un)(this,(e=>!(!this._options.read(e).renderMarginRevertIcon||!this.renderSideBySide.read(e)||this.readOnly.read(e)||this.shouldRenderGutterMenu.read(e)))),this.shouldRenderGutterMenu=(0,l.un)(this,(e=>this._options.read(e).renderGutterMenu)),this.renderIndicators=(0,l.un)(this,(e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=(0,l.un)(this,(e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=(0,l.un)(this,(e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=(0,l.un)(this,(e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=(0,l.un)(this,(e=>this._options.read(e).maxComputationTime)),this.showMoves=(0,l.un)(this,(e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=(0,l.un)(this,(e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=(0,l.un)(this,(e=>this._options.read(e).diffWordWrap)),this.originalEditable=(0,l.un)(this,(e=>this._options.read(e).originalEditable)),this.diffCodeLens=(0,l.un)(this,(e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=(0,l.un)(this,(e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=(0,l.un)(this,(e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=(0,l.un)(this,(e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=(0,l.un)(this,(e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.compactMode=(0,l.un)(this,(e=>this._options.read(e).compactMode)),this.trueInlineDiffRenderingEnabled=(0,l.un)(this,(e=>this._options.read(e).experimental.useTrueInlineView)),this.useTrueInlineDiffRendering=(0,l.un)(this,(e=>!this.renderSideBySide.read(e)&&this.trueInlineDiffRenderingEnabled.read(e))),this.hideUnchangedRegions=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsMinimumLineCount=(0,l.un)(this,(e=>this._options.read(e).hideUnchangedRegions.minimumLineCount)),this._model=(0,l.FY)(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,(e=>(0,xt.t)(this,(t=>{const i=e?.diff.read(t);return i?(n=i,s=this.trueInlineDiffRenderingEnabled.read(t),n.mappings.every((e=>0===e.lineRangeMapping.original.length||0===e.lineRangeMapping.modified.length||s&&Me(e.lineRangeMapping)))):void 0;var n,s})))).flatten().map(this,(e=>!!e)),this.inlineViewHideOriginalLineNumbers=this.compactMode;const i={...e,...Nt(e,Lt.q)};this._options=(0,l.FY)(this,i)}updateOptions(e){const t=Nt(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};function Nt(e,t){return{enableSplitViewResizing:(0,S.zM)(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:(0,S.ls)(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,S.zM)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,S.zM)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,S.wA)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,S.wA)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,S.zM)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,S.zM)(e.renderIndicators,t.renderIndicators),originalEditable:(0,S.zM)(e.originalEditable,t.originalEditable),diffCodeLens:(0,S.zM)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,S.zM)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(0,S.O4)(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,S.O4)(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,S.zM)(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:(0,S.zM)(e.experimental?.showMoves,t.experimental.showMoves),showEmptyDecorations:(0,S.zM)(e.experimental?.showEmptyDecorations,t.experimental.showEmptyDecorations),useTrueInlineView:(0,S.zM)(e.experimental?.useTrueInlineView,t.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:(0,S.zM)(e.hideUnchangedRegions?.enabled??e.experimental?.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:(0,S.wA)(e.hideUnchangedRegions?.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,S.wA)(e.hideUnchangedRegions?.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,S.wA)(e.hideUnchangedRegions?.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,S.zM)(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,S.zM)(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,S.wA)(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,S.zM)(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited),renderGutterMenu:(0,S.zM)(e.renderGutterMenu,t.renderGutterMenu),compactMode:(0,S.zM)(e.compactMode,t.compactMode)}}Et=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,Dt.j)],Et);var It=function(e,t){return function(i,n){t(i,n,e)}};let Mt=class extends kt{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,s,d,h,g,p){super(),this._domElement=e,this._parentContextKeyService=s,this._parentInstantiationService=d,this._accessibilitySignalService=g,this._editorProgressService=p,this.elements=(0,n.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,n.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,n.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register((0,l.X2)(this,void 0)),this._diffModel=(0,l.un)(this,(e=>this._diffModelSrc.read(e)?.object)),this.onDidChangeModel=r.Jh.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new vt.a([Ge.fN,this._contextKeyService]))),this._boundarySashes=(0,l.FY)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,l.FY)(this,!1),this._accessibleDiffViewerVisible=(0,l.un)(this,(e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this._movedBlocksLinesPart=(0,l.FY)(this,void 0),this._layoutInfo=(0,l.un)(this,(e=>{const t=this._rootSizeObserver.width.read(e),i=this._rootSizeObserver.height.read(e);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=i+"px";const n=this._sash.read(e),s=this._gutter.read(e),o=s?.width.read(e)??0,r=this._overviewRulerPart.read(e)?.width??0;let a,l,c,d,h;if(n){const i=n.sashLeft.read(e);a=0,l=i-o-(this._movedBlocksLinesPart.read(e)?.width.read(e)??0),h=i-o,c=i,d=t-c-r}else h=0,a=o,l=this._options.inlineViewHideOriginalLineNumbers.read(e)?0:Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(e)),c=o+l,d=t-c-r;return this.elements.original.style.left=a+"px",this.elements.original.style.width=l+"px",this._editors.original.layout({width:l,height:i},!0),s?.layout(h),this.elements.modified.style.left=c+"px",this.elements.modified.style.width=d+"px",this._editors.modified.layout({width:d,height:i},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>e?.diff.read(t))),this.onDidUpdateDiff=r.Jh.fromObservableLight(this._diffValue),h.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,a.s)((()=>this.elements.root.remove()))),this._rootSizeObserver=this._register(new y.pN(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(Et,t),this._register((0,l.fm)((e=>{this._options.setWidth(this._rootSizeObserver.width.read(e))}))),this._contextKeyService.createKey(_t.R.isEmbeddedDiffEditor.key,!1),this._register((0,ft.w)(_t.R.isEmbeddedDiffEditor,this._contextKeyService,(e=>this._options.isInEmbeddedEditor.read(e)))),this._register((0,ft.w)(_t.R.comparingMovedCode,this._contextKeyService,(e=>!!this._diffModel.read(e)?.movedTextToCompare.read(e)))),this._register((0,ft.w)(_t.R.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,(e=>this._options.couldShowInlineViewBecauseOfSize.read(e)))),this._register((0,ft.w)(_t.R.diffEditorInlineMode,this._contextKeyService,(e=>!this._options.renderSideBySide.read(e)))),this._register((0,ft.w)(_t.R.hasChanges,this._contextKeyService,(e=>(this._diffModel.read(e)?.diff.read(e)?.mappings.length??0)>0))),this._editors=this._register(this._instantiationService.createInstance(St,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._register((0,ft.w)(_t.R.diffEditorOriginalWritable,this._contextKeyService,(e=>this._options.originalEditable.read(e)))),this._register((0,ft.w)(_t.R.diffEditorModifiedWritable,this._contextKeyService,(e=>!this._options.readOnly.read(e)))),this._register((0,ft.w)(_t.R.diffEditorOriginalUri,this._contextKeyService,(e=>this._diffModel.read(e)?.model.original.uri.toString()??""))),this._register((0,ft.w)(_t.R.diffEditorModifiedUri,this._contextKeyService,(e=>this._diffModel.read(e)?.model.modified.uri.toString()??""))),this._overviewRulerPart=(0,c.a0)(this,(e=>this._options.renderOverviewRuler.read(e)?this._instantiationService.createInstance((0,se.b)(ct,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor))):void 0)).recomputeInitiallyAndOnChange(this._store);const f={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>e-(this._overviewRulerPart.read(t)?.width??0)))};this._sashLayout=new Be(this._options,f),this._sash=(0,c.a0)(this,(e=>{const t=this._options.renderSideBySide.read(e);return this.elements.root.classList.toggle("side-by-side",t),t?new We(this.elements.root,f,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,(()=>this._sashLayout.resetSash())):void 0})).recomputeInitiallyAndOnChange(this._store);const m=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(nt.N,e),this._editors,this._diffModel,this._options))).recomputeInitiallyAndOnChange(this._store);(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(Oe,e),this._editors,this._diffModel,this._options,this))).recomputeInitiallyAndOnChange(this._store);const _=new Set,v=new Set;let b=!1;const w=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(Ee,e),(0,n.zk)(this._domElement),this._editors,this._diffModel,this._options,this,(()=>b||m.get().isUpdatingHiddenAreas),_,v))).recomputeInitiallyAndOnChange(this._store),C=(0,l.un)(this,(e=>{const t=w.read(e).viewZones.read(e).orig,i=m.read(e).viewZones.read(e).origViewZones;return t.concat(i)})),S=(0,l.un)(this,(e=>{const t=w.read(e).viewZones.read(e).mod,i=m.read(e).viewZones.read(e).modViewZones;return t.concat(i)}));let k;this._register((0,y.Vs)(this._editors.original,C,(e=>{b=e}),_)),this._register((0,y.Vs)(this._editors.modified,S,(e=>{b=e,b?k=u.D.capture(this._editors.modified):(k?.restore(this._editors.modified),k=void 0)}),v)),this._accessibleDiffViewer=(0,c.a0)(this,(e=>this._instantiationService.createInstance((0,se.b)(z,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>e?.diff.read(t)?.mappings.map((e=>e.lineRangeMapping)))),new X(this._editors)))).recomputeInitiallyAndOnChange(this._store);const x=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register((0,y.AV)(this.elements.modified,{visibility:x})),this._register((0,y.AV)(this.elements.original,{visibility:x})),this._createDiffEditorContributions(),h.addDiffEditor(this),this._gutter=(0,c.a0)(this,(e=>this._options.shouldRenderGutterMenu.read(e)?this._instantiationService.createInstance((0,se.b)(Je,e),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0)),this._register((0,l.OI)(this._layoutInfo)),(0,c.a0)(this,(e=>new((0,se.b)(Re,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors))).recomputeInitiallyAndOnChange(this._store,(e=>{this._movedBlocksLinesPart.set(e,void 0)})),this._register(r.Jh.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!0)))),this._register(r.Jh.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!1))));const L=this._diffModel.map(this,((e,t)=>{if(e)return void 0===e.diff.read(t)&&!e.isDiffUpToDate.read(t)}));this._register((0,l.yC)(((e,t)=>{if(!0===L.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add((0,a.s)((()=>e.done())))}}))),this._register((0,l.yC)(((e,t)=>{t.add(new((0,se.b)(gt,e))(this._editors,this._diffModel,this._options,this))}))),this._register((0,l.yC)(((e,t)=>{const i=this._diffModel.read(e);if(i)for(const e of[i.model.original,i.model.modified])t.add(e.onWillDispose((e=>{(0,o.dz)(new o.D7("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)})))}))),this._register((0,l.fm)((e=>{this._options.setModel(this._diffModel.read(e))})))}_createInnerEditor(e,t,i,n){return e.createInstance(g.x,t,i,n)}_createDiffEditorContributions(){const e=d.dS.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(e){(0,o.dz)(e)}}get _targetEditor(){return this._editors.modified}getEditorType(){return mt._.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){return{original:this._editors.original.saveViewState(),modified:this._editors.modified.saveViewState(),modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._editors.original.restoreViewState(t.original),this._editors.modified.restoreViewState(t.modified),t.modelState&&this._diffModel.get()?.restoreSerializedState(t.modelState)}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(de,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){const t=e?"model"in e?y.O8.create(e).createNewRef(this):y.O8.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){const i=this._diffModel.get();!e&&i&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&(0,l.PO)(t,(t=>{const i=e?.object;l.y0.batchEventsGlobally(t,(()=>{this._editors.original.setModel(i?i.model.original:null),this._editors.modified.setModel(i?i.model.modified:null)}));const n=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),t),setTimeout((()=>{n?.dispose()}),0)}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){const e=this._diffModel.get()?.diff.get();return e?e.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,s,o,r=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,r=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,o=0,r=void 0):(s=t.modified.startLineNumber,o=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:o,charChanges:r?.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}})):null}revert(e){const t=this._diffModel.get();t&&t.isDiffUpToDate.get()&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map((e=>({range:e.modifiedRange,text:t.model.original.getValueInRange(e.originalRange)})));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new L.y(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){const t=this._diffModel.get()?.diff.get()?.mappings;if(!t||0===t.length)return;const i=this._editors.modified.getPosition().lineNumber;let n;n="next"===e?t.find((e=>e.lineRangeMapping.modified.startLineNumber>i))??t[0]:(0,s.Uk)(t,(e=>e.lineRangeMapping.modified.startLineNumber{const t=e.diff.get()?.mappings;t&&0!==t.length&&this._goTo(t[0])}))}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){const e=this._editors.modified.hasWidgetFocus(),t=e?this._editors.modified:this._editors.original,i=e?this._editors.original:this._editors.modified;let n;const s=t.getSelection();if(s){const t=this._diffModel.get()?.diff.get()?.mappings.map((t=>e?t.lineRangeMapping.flip():t.lineRangeMapping));if(t){const e=(0,y.Mu)(s.getStartPosition(),t),i=(0,y.Mu)(s.getEndPosition(),t);n=D.Q.plusRange(e,i)}}return{destination:i,destinationSelection:n}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&(0,l.Rn)((t=>{for(const i of e)i.collapseAll(t)}))}showAllUnchangedRegions(){const e=this._diffModel.get()?.unchangedRegions.get();e&&(0,l.Rn)((t=>{for(const i of e)i.showAll(t)}))}_handleCursorPositionChange(e,t){if(3===e?.reason){const i=this._diffModel.get()?.diff.get()?.mappings.find((i=>t?i.lineRangeMapping.modified.contains(e.position.lineNumber):i.lineRangeMapping.original.contains(e.position.lineNumber)));i?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(P.Rh.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):i?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(P.Rh.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):i&&this._accessibilitySignalService.playSignal(P.Rh.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};Mt=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([It(3,Ge.fN),It(4,A._Y),It(5,h.T),It(6,P.Nt),It(7,bt.N8)],Mt)},41006:function(e,t,i){"use strict";i.d(t,{Hg:function(){return p}});var n,s=i(48682),o=i(63619),r=i(80670),a=i(43857),l=i(80487),c=i(17191),d=i(56812),h=i(2727),u=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t){return function(i,n){t(i,n,e)}};const p=(0,o.u1)("diffProviderFactoryService");let f=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(m,e)}};f=u([g(0,o._Y)],f),(0,s.v)(p,f,1);let m=class{static{n=this}static{this.diffCache=new Map}constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new r.vl,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,i,s){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,s);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new c.wm(new l.M(1,2),new l.M(1,t.getLineCount()+1),[new c.q6(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const o=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),d=n.diffCache.get(o);if(d&&d.context===r)return d.result;const h=a.W.create(),u=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),g=h.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:g,timedOut:u?.quitEarly??!0,detectedMoves:i.computeMoves?u?.moves.length??0:-1}),s.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!u)throw new Error("no diff result available");return n.diffCache.size>10&&n.diffCache.delete(n.diffCache.keys().next().value),n.diffCache.set(o,{result:u,context:r}),u}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),t=!0),t&&this.onDidChangeEventEmitter.fire()}};m=n=u([g(1,d.IEditorWorkerService),g(2,h.k)],m)},78537:function(e,t,i){"use strict";i.d(t,{N:function(){return C}});var n,s=i(84201),o=i(43014),r=i(93231),a=i(85584),l=i(35114),c=i(73755),d=i(98018),h=i(56613),u=i(24219),g=i(90072),p=i(72540),f=i(80487),m=i(62993),_=i(40393),v=i(35720),b=i(14374),w=i(63619);let C=class extends l.jG{static{n=this}static{this._breadcrumbsSourceFactory=(0,c.FY)(n,(()=>({dispose(){},getBreadcrumbItems(e,t){return[]}})))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,s){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=s,this._modifiedOutlineSource=(0,d.a0)(this,(e=>{const t=this._editors.modifiedModel.read(e),i=n._breadcrumbsSourceFactory.read(e);return t&&i?i(t,this._instantiationService):void 0})),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();(0,c.Rn)((e=>{for(const i of this._editors.original.getSelections()||[])t?.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,0,e)}))}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();(0,c.Rn)((e=>{for(const i of this._editors.modified.getSelections()||[])t?.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,0,e)}))})));const o=this._diffModel.map(((e,t)=>{const i=e?.unchangedRegions.read(t)??[];return 1===i.length&&1===i[0].modifiedLineNumber&&i[0].lineCount===this._editors.modifiedModel.read(t)?.getLineCount()?[]:i}));this.viewZones=(0,c.rm)(this,((e,t)=>{const i=this._modifiedOutlineSource.read(e);if(!i)return{origViewZones:[],modViewZones:[]};const n=[],s=[],r=this._options.renderSideBySide.read(e),a=this._options.compactMode.read(e),l=o.read(e);for(let o=0;od.getHiddenOriginalRange(e).startLineNumber-1)),i=new p.D1(e,12);n.push(i),t.add(new k(this._editors.original,i,d,!r))}{const e=(0,c.un)(this,(e=>d.getHiddenModifiedRange(e).startLineNumber-1)),i=new p.D1(e,12);s.push(i),t.add(new k(this._editors.modified,i,d))}}else{{const e=(0,c.un)(this,(e=>d.getHiddenOriginalRange(e).startLineNumber-1)),s=new p.D1(e,24);n.push(s),t.add(new x(this._editors.original,s,d,d.originalUnchangedRange,!r,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}{const e=(0,c.un)(this,(e=>d.getHiddenModifiedRange(e).startLineNumber-1)),n=new p.D1(e,24);s.push(n),t.add(new x(this._editors.modified,n,d,d.modifiedUnchangedRange,!1,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}}}return{origViewZones:n,modViewZones:s}}));const l={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},g={description:"Fold Unchanged",glyphMarginHoverMessage:new a.Bc(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,b.kg)("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+h.L.asClassName(r.W.fold),zIndex:10001};this._register((0,p.pY)(this._editors.original,(0,c.un)(this,(e=>{const t=o.read(e),i=t.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:_.Q.fromPositions(new m.y(n.originalLineNumber,1)),options:g});return i})))),this._register((0,p.pY)(this._editors.modified,(0,c.un)(this,(e=>{const t=o.read(e),i=t.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:l})));for(const n of t)n.shouldHideControls(e)&&i.push({range:f.M.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:g});return i})))),this._register((0,c.fm)((e=>{const t=o.read(e);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(u.O9)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(u.O9))}finally{this._isUpdatingHiddenAreas=!1}}))),this._register(this._editors.modified.onMouseUp((e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};var y,S;C=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(y=3,S=w._Y,function(e,t){S(e,t,y)})],C);class k extends p.uN{constructor(e,t,i,n=!1){const o=(0,s.h)("div.diff-hidden-lines-widget");super(e,t,o.root),this._unchangedRegion=i,this._hide=n,this._nodes=(0,s.h)("div.diff-hidden-lines-compact",[(0,s.h)("div.line-left",[]),(0,s.h)("div.text@text",[]),(0,s.h)("div.line-right",[])]),o.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register((0,c.fm)((e=>{if(!this._hide){const t=this._unchangedRegion.getHiddenModifiedRange(e).length,i=(0,b.kg)("hiddenLines","{0} hidden lines",t);this._nodes.text.innerText=i}})))}}class x extends p.uN{constructor(e,t,i,n,a,l,d,h){const u=(0,s.h)("div.diff-hidden-lines-widget");super(e,t,u.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=a,this._modifiedOutlineSource=l,this._revealModifiedHiddenLine=d,this._options=h,this._nodes=(0,s.h)("div.diff-hidden-lines",[(0,s.h)("div.top@top",{title:(0,b.kg)("diff.hiddenLines.top","Click or drag to show more above")}),(0,s.h)("div.center@content",{style:{display:"flex"}},[(0,s.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,s.$)("a",{title:(0,b.kg)("showUnchangedRegion","Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,o.n)("$(unfold)"))]),(0,s.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,s.h)("div.bottom@bottom",{title:(0,b.kg)("diff.bottom","Click or drag to show more below"),role:"button"})]),u.root.appendChild(this._nodes.root),this._hide?(0,s.Ln)(this._nodes.first):this._register((0,p.AV)(this._nodes.first,{width:(0,g.Ud)(this._editor).layoutInfoContentLeft})),this._register((0,c.fm)((e=>{const t=this._unchangedRegion.visibleLineCountTop.read(e)+this._unchangedRegion.visibleLineCountBottom.read(e)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!t),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),this._nodes.top.classList.toggle("canMoveBottom",!t);const i=this._unchangedRegion.isDragged.read(e),n=this._editor.getDomNode();n&&(n.classList.toggle("draggingUnchangedRegion",!!i),"top"===i?(n.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),n.classList.toggle("canMoveBottom",!t)):"bottom"===i?(n.classList.toggle("canMoveTop",!t),n.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0)):(n.classList.toggle("canMoveTop",!1),n.classList.toggle("canMoveBottom",!1)))})));const f=this._editor;this._register((0,s.ko)(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const o=(0,s.zk)(this._nodes.top),r=(0,s.ko)(o,"mousemove",(e=>{const s=e.clientY-t;i=i||Math.abs(s)>2;const o=Math.round(s/f.getOption(67)),r=Math.max(0,Math.min(n+o,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(r,void 0)})),a=(0,s.ko)(o,"mouseup",(e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),r.dispose(),a.dispose()}))}))),this._register((0,s.ko)(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const o=(0,s.zk)(this._nodes.bottom),r=(0,s.ko)(o,"mousemove",(e=>{const s=e.clientY-t;i=i||Math.abs(s)>2;const o=Math.round(s/f.getOption(67)),r=Math.max(0,Math.min(n-o,this._unchangedRegion.getMaxVisibleLineCountBottom())),a=this._unchangedRegionRange.endLineNumberExclusive>f.getModel().getLineCount()?f.getContentHeight():f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(r,void 0);const l=this._unchangedRegionRange.endLineNumberExclusive>f.getModel().getLineCount()?f.getContentHeight():f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);f.setScrollTop(f.getScrollTop()+(l-a))})),a=(0,s.ko)(o,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!i){const e=f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=f.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);f.setScrollTop(f.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),r.dispose(),a.dispose()}))}))),this._register((0,c.fm)((e=>{const t=[];if(!this._hide){const n=i.getHiddenModifiedRange(e).length,a=(0,b.kg)("hiddenLines","{0} hidden lines",n),l=(0,s.$)("span",{title:(0,b.kg)("diff.hiddenLines.expandAll","Double click to unfold")},a);l.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))})),t.push(l);const c=this._unchangedRegion.getHiddenModifiedRange(e),d=this._modifiedOutlineSource.getBreadcrumbItems(c,e);if(d.length>0){t.push((0,s.$)("span",void 0,"  |  "));for(let e=0;e{this._revealModifiedHiddenLine(i.startLineNumber)}}}}(0,s.Ln)(this._nodes.others,...t)})))}}},51903:function(e,t,i){"use strict";i.d(t,{GM:function(){return _},KL:function(){return b},Kl:function(){return h},Ob:function(){return u},Ou:function(){return m},XT:function(){return p},Zb:function(){return v},Zw:function(){return g},bk:function(){return f},dv:function(){return d},wp:function(){return w}});var n=i(93231),s=i(56613),o=i(49079),r=i(14374),a=i(4195),l=i(51310);(0,a.x1A)("diffEditor.move.border","#8b8b8b9c",(0,r.kg)("diffEditor.move.border","The border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.moveActive.border","#FFA500",(0,r.kg)("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},(0,r.kg)("diffEditor.unchangedRegionShadow","The color of the shadow around unchanged region widgets."));const c=(0,l.pU)("diff-insert",n.W.add,(0,r.kg)("diffInsertIcon","Line decoration for inserts in the diff editor.")),d=(0,l.pU)("diff-remove",n.W.remove,(0,r.kg)("diffRemoveIcon","Line decoration for removals in the diff editor.")),h=o.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+s.L.asClassName(c),marginClassName:"gutter-insert"}),u=o.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+s.L.asClassName(d),marginClassName:"gutter-delete"}),g=o.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),p=o.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),f=o.kI.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),m=o.kI.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),_=o.kI.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),v=o.kI.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),b=o.kI.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),w=o.kI.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})},72540:function(e,t,i){"use strict";i.d(t,{$y:function(){return p},AV:function(){return w},Am:function(){return h},D1:function(){return v},EK:function(){return k},MZ:function(){return y},Mu:function(){return S},Nu:function(){return m},O8:function(){return x},Vs:function(){return C},pN:function(){return f},pY:function(){return u},rX:function(){return g},uN:function(){return _}});var n=i(64429),s=i(76611),o=i(35114),r=i(73755),a=i(75083),l=i(62993),c=i(40393),d=i(13233);function h(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const s=[];let o=0,r=0;for(;od?(s.push(l),r++):(s.push(n(a,l)),o++,r++)}for(;o`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function g(e,t){return e.appendChild(t),(0,o.s)((()=>{t.remove()}))}function p(e,t){return e.prepend(t),(0,o.s)((()=>{t.remove()}))}class f extends o.jG{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new a.u(e,t)),this._width=(0,r.FY)(this,this.elementSizeObserver.getWidth()),this._height=(0,r.FY)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>(0,r.Rn)((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function m(e,t,i){let n=t.get(),s=n,o=n;const a=(0,r.FY)("animatedValue",n);let l,c=-1;function d(){const t=Date.now()-c;var i,r,h;o=Math.floor((r=s,h=n-s,(i=t)===300?r+h:h*(1-Math.pow(2,-10*i/300))+r)),t<300?l=e.requestAnimationFrame(d):o=n,a.set(o,void 0)}return i.add((0,r.Y)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(e,i)=>(e.didChange(t)&&(i.animate=i.animate||e.change),!0)},((i,r)=>{void 0!==l&&(e.cancelAnimationFrame(l),l=void 0),s=o,n=t.read(i),c=Date.now()-(r.animate?0:300),d()}))),a}class _ extends o.jG{constructor(e,t,i){super(),this._register(new b(e,i)),this._register(w(i,{height:t.actualHeight,top:t.actualTop}))}}class v{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=(0,r.FY)(this,void 0),this._actualHeight=(0,r.FY)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class b{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+b._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function w(e,t){return(0,r.fm)((i=>{for(let[n,s]of Object.entries(t))s&&"object"==typeof s&&"read"in s&&(s=s.read(i)),"number"==typeof s&&(s=`${s}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=s}))}function C(e,t,i,n){const s=new o.Cm,a=[];return s.add((0,r.yC)(((s,o)=>{const l=t.read(s),c=new Map,d=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of a)e.removeZone(t),n?.delete(t);a.length=0;for(const t of l){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),a.push(i),n?.add(i),c.set(t,i)}})),i&&i(!1),o.add((0,r.Y)({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(e,t){const i=d.get(e.changedObservable);return void 0!==i&&t.zoneIds.push(i),!0}},((t,n)=>{for(const e of l)e.onChange&&(d.set(e.onChange,c.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n.zoneIds)e.layoutZone(t)})),i&&i(!1)})))}))),s.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of a)e.removeZone(t)})),n?.clear(),i&&i(!1)}}),s}class y extends s.Qi{dispose(){super.dispose(!0)}}function S(e,t){const i=(0,n.Uk)(t,(t=>t.original.startLineNumber<=e.lineNumber));if(!i)return c.Q.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){const t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return c.Q.fromPositions(new l.y(t,e.column))}if(!i.innerChanges)return c.Q.fromPositions(new l.y(i.modified.startLineNumber,1));const s=(0,n.Uk)(i.innerChanges,(t=>t.originalRange.getStartPosition().isBeforeOrEqual(e)));if(!s){const t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return c.Q.fromPositions(new l.y(t,e.column))}if(s.originalRange.containsPosition(e))return s.modifiedRange;{const t=(o=s.originalRange.getEndPosition(),r=e,o.lineNumber===r.lineNumber?new d.W(0,r.column-o.column):new d.W(r.lineNumber-o.lineNumber,r.column-1));return c.Q.fromPositions(t.addToPosition(s.modifiedRange.getEndPosition()))}var o,r}function k(e,t){let i;return e.filter((e=>{const n=t(e,i);return i=e,n}))}class x{static create(e,t=void 0){return new L(e,e,t)}static createWithDisposable(e,t,i=void 0){const n=new o.Cm;return n.add(t),n.add(e),new L(e,n,i)}}class L extends x{constructor(e,t,i){super(),this.object=e,this._disposable=t,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new D(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,0===this._refCount&&this._disposable.dispose(),e){const t=this._owners.indexOf(e);-1!==t&&this._owners.splice(t,1)}}}class D extends x{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}},69498:function(e,t,i){"use strict";i.d(t,{T:function(){return f},i:function(){return m}});var n,s=i(96710),o=i(38945),r=i(20187),a=i(80670),l=i(35114),c=i(43193),d=i(41750),h=i(11521),u=i(55878),g=i(95607),p=function(e,t){return function(i,n){t(i,n,e)}};let f=class{static{n=this}static{this._ttpTokenizer=(0,o.H)("tokenizeToString",{createHTML(e){return e}})}constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new a.vl,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new l.Cm,o=n.add((0,s.Gc)(e,{...this._getRenderOptions(e,n),...t},i));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(e,t)=>{let i;e?i=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(i=this._options.editor.getModel()?.getLanguageId()),i||(i=h.vH);const s=await(0,u.Yj)(this._languageService,t,i),o=document.createElement("span");if(o.innerHTML=n._ttpTokenizer?.createHTML(s)??s,this._options.editor){const e=this._options.editor.getOption(50);(0,c.M)(o,e)}else this._options.codeBlockFontFamily&&(o.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(o.style.fontSize=this._options.codeBlockFontSize),o},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>m(this._openerService,t,e.isTrusted),disposables:t}}}};async function m(e,t,i){try{return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:_(i)})}catch(e){return(0,r.dz)(e),!1}}function _(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}f=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([p(1,d.L),p(2,g.C)],f)},41667:function(e,t,i){"use strict";i.d(t,{I:function(){return s}});var n=i(30981);class s extends n.LN{constructor(e){super(),this._getContext=e}runAction(e,t){const i=this._getContext();return super.runAction(e,i)}}},24608:function(e,t,i){"use strict";i.d(t,{iP:function(){return a},iu:function(){return s},q2:function(){return r},tA:function(){return o},ui:function(){return l}});var n=i(56218);class s{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.L.fromPositions(i.getEndPosition())}}class o{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.L.fromRange(i,0)}}class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.L.fromPositions(i.getStartPosition())}}class a{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.L.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},97988:function(e,t,i){"use strict";i.d(t,{Y:function(){return u}});var n,s=i(43920),o=i(39841),r=i(40393),a=i(56218),l=i(7326),c=i(8494);const d=Object.create(null);function h(e,t){if(t<=0)return"";d[e]||(d[e]=["",e]);const i=d[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let u=n=class{static unshiftIndent(e,t,i,n,s){const r=o.A.visibleColumnFromColumn(e,t,i);if(s){const e=h(" ",n);return h(e,o.A.prevIndentTabStop(r,n)/n)}return h("\t",o.A.prevRenderTabStop(r,i)/i)}static shiftIndent(e,t,i,n,s){const r=o.A.visibleColumnFromColumn(e,t,i);if(s){const e=h(" ",n);return h(e,o.A.nextIndentTabStop(r,n)/n)}return h("\t",o.A.nextRenderTabStop(r,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let a=this._selection.endLineNumber;1===this._selection.endColumn&&i!==a&&(a-=1);const{tabSize:c,indentSize:d,insertSpaces:u}=this._opts,g=i===a;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let h=0,p=0;for(let f=i;f<=a;f++,h=p){p=0;const a=e.getLineContent(f);let m,_=s.HG(a);if((!this._opts.isUnshift||0!==a.length&&0!==_)&&(g||this._opts.isUnshift||0!==a.length)){if(-1===_&&(_=a.length),f>1&&o.A.visibleColumnFromColumn(a,_+1,c)%d!=0&&e.tokenization.isCheapToTokenize(f-1)){const t=(0,l.h)(this._opts.autoIndent,e,new r.Q(f-1,e.getLineMaxColumn(f-1),f-1,e.getLineMaxColumn(f-1)),this._languageConfigurationService);if(t){if(p=h,t.appendText)for(let e=0,i=t.appendText.length;e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(g=2,p=c.JZ,function(e,t){p(e,t,g)})],u)},88808:function(e,t,i){"use strict";i.d(t,{i:function(){return o},y:function(){return r}});var n=i(40393),s=i(56218);class o{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new n.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new s.L(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class r{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new s.L(i.endLineNumber,i.startColumn,i.endLineNumber,i.endColumn-this._charAfter.length)}}},42415:function(e,t,i){"use strict";i.d(t,{q:function(){return n}});const n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}},38047:function(e,t,i){"use strict";i.d(t,{Gn:function(){return f},JJ:function(){return c},vf:function(){return p}});var n=i(42415),s=i(3520),o=i(31634),r=i(14374),a=i(16434),l=i(56419);const c=Object.freeze({id:"editor",order:5,type:"object",title:r.kg("editorConfigurationTitle","Editor"),scope:5}),d={...c,properties:{"editor.tabSize":{type:"number",default:o.R.tabSize,minimum:1,markdownDescription:r.kg("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:r.kg("indentSize",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:o.R.insertSpaces,markdownDescription:r.kg("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:o.R.detectIndentation,markdownDescription:r.kg("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:o.R.trimAutoWhitespace,description:r.kg("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:o.R.largeFileOptimizations,description:r.kg("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[r.kg("wordBasedSuggestions.off","Turn off Word Based Suggestions."),r.kg("wordBasedSuggestions.currentDocument","Only suggest words from the active document."),r.kg("wordBasedSuggestions.matchingDocuments","Suggest words from all open documents of the same language."),r.kg("wordBasedSuggestions.allDocuments","Suggest words from all open documents.")],description:r.kg("wordBasedSuggestions","Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[r.kg("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),r.kg("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),r.kg("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:r.kg("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:r.kg("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:r.kg("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!0,description:r.kg("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:r.kg("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:r.kg("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.experimental.treeSitterTelemetry":{type:"boolean",default:!1,markdownDescription:r.kg("editor.experimental.treeSitterTelemetry","Controls whether tree sitter parsing should be turned on and telemetry collected. Setting `editor.experimental.preferTreeSitter` for specific languages will take precedence."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:r.kg("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:r.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:r.kg("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:r.kg("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:r.kg("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:n.q.maxComputationTime,description:r.kg("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:n.q.maxFileSize,description:r.kg("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:n.q.renderSideBySide,description:r.kg("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:n.q.renderSideBySideInlineBreakpoint,description:r.kg("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:n.q.useInlineViewWhenSpaceIsLimited,description:r.kg("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:n.q.renderMarginRevertIcon,description:r.kg("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:n.q.renderGutterMenu,description:r.kg("renderGutterMenu","When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:n.q.ignoreTrimWhitespace,description:r.kg("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:n.q.renderIndicators,description:r.kg("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:n.q.diffCodeLens,description:r.kg("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:n.q.diffWordWrap,markdownEnumDescriptions:[r.kg("wordWrap.off","Lines will never wrap."),r.kg("wordWrap.on","Lines will wrap at the viewport width."),r.kg("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:n.q.diffAlgorithm,markdownEnumDescriptions:[r.kg("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),r.kg("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:n.q.hideUnchangedRegions.enabled,markdownDescription:r.kg("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:n.q.hideUnchangedRegions.revealLineCount,markdownDescription:r.kg("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:n.q.hideUnchangedRegions.minimumLineCount,markdownDescription:r.kg("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:n.q.hideUnchangedRegions.contextLineCount,markdownDescription:r.kg("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:n.q.experimental.showMoves,markdownDescription:r.kg("showMoves","Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:n.q.experimental.showEmptyDecorations,description:r.kg("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")},"diffEditor.experimental.useTrueInlineView":{type:"boolean",default:n.q.experimental.useTrueInlineView,description:r.kg("useTrueInlineView","If enabled and the editor uses the inline view, word changes are rendered inline.")}}};for(const e of s.BE){const t=e.schema;if(void 0!==t)if(void 0!==(h=t).type||void 0!==h.anyOf)d.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(d.properties[e]=t[e])}var h;let u=null;function g(){return null===u&&(u=Object.create(null),Object.keys(d.properties).forEach((e=>{u[e]=!0}))),u}function p(e){return g()[`editor.${e}`]||!1}function f(e){return g()[`diffEditor.${e}`]||!1}l.O.as(a.Fd.Configuration).registerConfiguration(d)},3520:function(e,t,i){"use strict";i.d(t,{$C:function(){return R},BE:function(){return W},Bc:function(){return N},O4:function(){return k},Of:function(){return O},XR:function(){return A},hZ:function(){return g},jT:function(){return E},jU:function(){return B},ls:function(){return C},lw:function(){return d},m9:function(){return D},n0:function(){return h},qB:function(){return V},r_:function(){return I},wA:function(){return b},xZ:function(){return T},xq:function(){return c},zM:function(){return _}});var n=i(97358),s=i(49134),o=i(79783),r=i(31634),a=i(86506),l=i(14374);const c=8;class d{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class h{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}compute(e,t,i){return i}}class g{constructor(e,t){this.newValue=e,this.didChange=t}}function p(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new g(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&n.aI(e,t);return new g(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const s=p(e[n],t[n]);s.didChange&&(e[n]=s.newValue,i=!0)}return new g(e,i)}class f{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return p(e,t)}validate(e){return this.defaultValue}}class m{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return p(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function _(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class v extends m{constructor(e,t,i,n=void 0){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _(e,this.defaultValue)}}function b(e,t,i,n){if(void 0===e)return t;let s=parseInt(e,10);return isNaN(s)?t:(s=Math.max(i,s),s=Math.min(n,s),0|s)}class w extends m{static clampedInt(e,t,i,n){return b(e,t,i,n)}constructor(e,t,i,n,s,o=void 0){void 0!==o&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=s),super(e,t,i,o),this.minimum=n,this.maximum=s}validate(e){return w.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function C(e,t,i,n){if(void 0===e)return t;const s=y.float(e,t);return y.clamp(s,i,n)}class y extends m{static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){void 0!==s&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(y.float(e,this.defaultValue))}}class S extends m{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return S.string(e,this.defaultValue)}}function k(e,t,i,n){return"string"!=typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class x extends m{constructor(e,t,i,n,s=void 0){void 0!==s&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return k(e,this.defaultValue,this._allowedValues)}}class L extends u{constructor(e,t,i,n,s,o,r=void 0){void 0!==r&&(r.type="string",r.enum=s,r.default=n),super(e,t,i,r),this._allowedValues=s,this._convert=o}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var D,E;!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"}(D||(D={}));class N extends u{static{this.OFF='"liga" off, "calt" off'}static{this.ON='"liga" on, "calt" on'}constructor(){super(51,"fontLigatures",N.OFF,{anyOf:[{type:"boolean",description:l.kg("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:l.kg("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:l.kg("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e||0===e.length?N.OFF:"true"===e?N.ON:e:Boolean(e)?N.ON:N.OFF}}class I extends u{static{this.OFF="normal"}static{this.TRANSLATE="translate"}constructor(){super(54,"fontVariations",I.OFF,{anyOf:[{type:"boolean",description:l.kg("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:l.kg("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:l.kg("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?I.OFF:"true"===e?I.TRANSLATE:e:Boolean(e)?I.TRANSLATE:I.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}class M extends u{static{this.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"]}static{this.MINIMUM_VALUE=1}static{this.MAXIMUM_VALUE=1e3}constructor(){super(53,"fontWeight",B.fontWeight,{anyOf:[{type:"number",minimum:M.MINIMUM_VALUE,maximum:M.MAXIMUM_VALUE,errorMessage:l.kg("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:M.SUGGESTION_VALUES}],default:B.fontWeight,description:l.kg("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(w.clampedInt(e,B.fontWeight,M.MINIMUM_VALUE,M.MAXIMUM_VALUE))}}class T extends f{constructor(){super(146)}compute(e,t,i){return T.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:Math.floor(e.viewLineCount/s)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const o=t.stableMinimapLayoutInput,r=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.paddingTop===o.paddingTop&&e.paddingBottom===o.paddingBottom&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,f=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,w=h?2:3;let C=Math.floor(s*n);const y=C/s;let S=!1,k=!1,x=w*u,L=u/s,D=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:o,extraLinesBeyondLastLine:l,desiredRatio:c,minimapLineCount:h}=T.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:s});if(_/h>1)S=!0,k=!0,u=1,x=1,L=u/s;else{let n=!1,d=u+1;if("fit"===p){const e=Math.ceil((o+_+l)*x);b&&r&&v<=t.stableFitRemainingWidth?(n=!0,d=t.stableFitMaxMinimapScale):n=e>C}if("fill"===p||n){S=!0;const n=u;x=Math.min(a*s,Math.max(1,Math.floor(1/c))),b&&r&&v<=t.stableFitRemainingWidth&&(d=t.stableFitMaxMinimapScale),u=Math.min(d,Math.max(1,Math.floor(x/w))),u>n&&(D=Math.min(2,u/n)),L=u/s/D,C=Math.ceil(Math.max(i,o+_+l)*x),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const E=Math.floor(g*L),N=Math.min(E,Math.max(0,Math.floor((v-m-2)*L/(l+L)))+c);let I=Math.floor(s*N);const M=I/s;return I=Math.floor(I*D),{renderMinimap:h?1:2,minimapLeft:"left"===f?0:i-N-m,minimapWidth:N,minimapHeightIsEditorHeight:S,minimapIsSampling:k,minimapScale:u,minimapLineHeight:x,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:C,minimapCanvasOuterWidth:M,minimapCanvasOuterHeight:y}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,s=0|t.lineHeight,o=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(138),u="inherit"===d?e.get(137):d,g="inherit"===u?e.get(133):u,p=e.get(136),f=t.isDominatedByLongLines,m=e.get(57),_=0!==e.get(68).renderType,v=e.get(69),b=e.get(106),w=e.get(84),C=e.get(73),y=e.get(104),S=y.verticalScrollbarSize,k=y.verticalHasArrows,x=y.arrowSize,L=y.horizontalScrollbarSize,D=e.get(43),E="never"!==e.get(111);let N=e.get(66);D&&E&&(N+=16);let I=0;if(_){const e=Math.max(o,v);I=Math.round(e*a)}let M=0;m&&(M=s*t.glyphMarginDecorationLaneCount);let R=0,P=R+M,A=P+I,O=A+N;const F=i-M-I-N;let B=!1,W=!1,H=-1;"inherit"===u&&f?(B=!0,W=!0):"on"===g||"bounded"===g?W=!0:"wordWrapColumn"===g&&(H=p);const V=T._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,paddingTop:w.top,paddingBottom:w.bottom,minimap:C,verticalScrollbarWidth:S,viewLineCount:c,remainingWidth:F,isViewportWrapping:W},t.memory||new h);0!==V.renderMinimap&&0===V.minimapLeft&&(R+=V.minimapWidth,P+=V.minimapWidth,A+=V.minimapWidth,O+=V.minimapWidth);const z=F-V.minimapWidth,U=Math.max(1,Math.floor((z-S-2)/r)),j=k?x:0;return W&&(H=Math.max(1,U),"bounded"===g&&(H=Math.min(H,p))),{width:i,height:n,glyphMarginLeft:R,glyphMarginWidth:M,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:P,lineNumbersWidth:I,decorationsLeft:A,decorationsWidth:N,contentLeft:O,contentWidth:z,minimap:V,viewportColumn:U,isWordWrapMinified:B,isViewportWrapping:W,wrappingColumn:H,verticalScrollbarWidth:S,horizontalScrollbarHeight:L,overviewRuler:{top:j,width:S,height:n-2*j,right:0}}}}function R(e){const t=e.get(99);return"editable"===t?e.get(92):"on"!==t}function P(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}!function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(E||(E={}));const A="inUntrustedWorkspace",O={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};function F(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const B={fontFamily:o.zx?"Menlo, Monaco, 'Courier New', monospace":o.j9?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:o.zx?12:14,lineHeight:0,letterSpacing:0},W=[];function H(e){return W[e.id]=e,e}const V={acceptSuggestionOnCommitCharacter:H(new v(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:l.kg("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:H(new x(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",l.kg("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:l.kg("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:H(new class extends u{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[l.kg("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),l.kg("accessibilitySupport.on","Optimize for usage with a Screen Reader."),l.kg("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:l.kg("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:H(new w(3,"accessibilityPageSize",10,1,1073741824,{description:l.kg("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:H(new S(4,"ariaLabel",l.kg("editorViewAccessibleLabel","Editor content"))),ariaRequired:H(new v(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:H(new v(8,"screenReaderAnnounceInlineSuggestion",!0,{description:l.kg("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:H(new x(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),l.kg("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:H(new x(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),l.kg("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:H(new x(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",l.kg("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:l.kg("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:H(new x(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",l.kg("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:l.kg("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:H(new x(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",l.kg("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),l.kg("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:l.kg("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:H(new L(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[l.kg("editor.autoIndent.none","The editor will not insert indentation automatically."),l.kg("editor.autoIndent.keep","The editor will keep the current line's indentation."),l.kg("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),l.kg("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),l.kg("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:l.kg("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:H(new v(13,"automaticLayout",!1)),autoSurround:H(new x(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[l.kg("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),l.kg("editor.autoSurround.quotes","Surround with quotes but not brackets."),l.kg("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:l.kg("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:H(new class extends u{constructor(){const e={enabled:r.R.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:r.R.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:l.kg("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:_(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}),bracketPairGuides:H(new class extends u{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.kg("editor.guides.bracketPairs.true","Enables bracket pair guides."),l.kg("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),l.kg("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:l.kg("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[l.kg("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),l.kg("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),l.kg("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:l.kg("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:l.kg("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:l.kg("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[l.kg("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),l.kg("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),l.kg("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:l.kg("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:F(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:F(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:F(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}),stickyTabStops:H(new v(117,"stickyTabStops",!1,{description:l.kg("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:H(new v(17,"codeLens",!0,{description:l.kg("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:H(new S(18,"codeLensFontFamily","",{description:l.kg("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:H(new w(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:l.kg("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:H(new v(20,"colorDecorators",!0,{description:l.kg("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:H(new x(149,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[l.kg("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),l.kg("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),l.kg("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:l.kg("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:H(new w(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:l.kg("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:H(new v(22,"columnSelection",!1,{description:l.kg("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:H(new class extends u{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:l.kg("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:l.kg("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:_(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:H(new v(24,"contextmenu",!0)),copyWithSyntaxHighlighting:H(new v(25,"copyWithSyntaxHighlighting",!0,{description:l.kg("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:H(new L(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:l.kg("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:H(new x(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[l.kg("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),l.kg("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),l.kg("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:l.kg("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:H(new L(28,"cursorStyle",D.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return D.Line;case"block":return D.Block;case"underline":return D.Underline;case"line-thin":return D.LineThin;case"block-outline":return D.BlockOutline;case"underline-thin":return D.UnderlineThin}}),{description:l.kg("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:H(new w(29,"cursorSurroundingLines",0,0,1073741824,{description:l.kg("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:H(new x(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[l.kg("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),l.kg("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:l.kg("cursorSurroundingLinesStyle","Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:H(new w(31,"cursorWidth",0,0,1073741824,{markdownDescription:l.kg("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:H(new v(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:H(new v(33,"disableMonospaceOptimizations",!1)),domReadOnly:H(new v(34,"domReadOnly",!1)),dragAndDrop:H(new v(35,"dragAndDrop",!0,{description:l.kg("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:H(new class extends v{constructor(){super(37,"emptySelectionClipboard",!0,{description:l.kg("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:H(new class extends u{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:l.kg("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[l.kg("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),l.kg("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showDropSelector:k(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}),stickyScroll:H(new class extends u{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(116,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:l.kg("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:l.kg("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:l.kg("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:l.kg("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),maxLineCount:w.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:k(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:_(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}),experimentalWhitespaceRendering:H(new x(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[l.kg("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),l.kg("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),l.kg("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:l.kg("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:H(new S(39,"extraEditorClassName","")),fastScrollSensitivity:H(new y(40,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:l.kg("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:H(new class extends u{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:l.kg("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[l.kg("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),l.kg("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),l.kg("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:l.kg("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[l.kg("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),l.kg("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),l.kg("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:l.kg("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:l.kg("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:o.zx},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:l.kg("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:l.kg("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":k(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":k(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:H(new v(42,"fixedOverflowWidgets",!1)),folding:H(new v(43,"folding",!0,{description:l.kg("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:H(new x(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[l.kg("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),l.kg("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:l.kg("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:H(new v(45,"foldingHighlight",!0,{description:l.kg("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:H(new v(46,"foldingImportsByDefault",!1,{description:l.kg("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:H(new w(47,"foldingMaximumRegions",5e3,10,65e3,{description:l.kg("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:H(new v(48,"unfoldOnClickAfterEndOfLine",!1,{description:l.kg("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:H(new S(49,"fontFamily",B.fontFamily,{description:l.kg("fontFamily","Controls the font family.")})),fontInfo:H(new class extends f{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:H(new N),fontSize:H(new class extends m{constructor(){super(52,"fontSize",B.fontSize,{type:"number",minimum:6,maximum:100,default:B.fontSize,description:l.kg("fontSize","Controls the font size in pixels.")})}validate(e){const t=y.float(e,this.defaultValue);return 0===t?B.fontSize:y.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:H(new M),fontVariations:H(new I),formatOnPaste:H(new v(55,"formatOnPaste",!1,{description:l.kg("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:H(new v(56,"formatOnType",!1,{description:l.kg("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:H(new v(57,"glyphMargin",!0,{description:l.kg("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:H(new class extends u{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",multipleTests:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:"",alternativeTestsCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[l.kg("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),l.kg("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),l.kg("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:l.kg("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:l.kg("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:l.kg("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:l.kg("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:l.kg("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:l.kg("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:l.kg("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:l.kg("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:l.kg("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:l.kg("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:l.kg("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{multiple:k(t.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:t.multipleDefinitions??k(t.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:t.multipleTypeDefinitions??k(t.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:t.multipleDeclarations??k(t.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:t.multipleImplementations??k(t.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:t.multipleReferences??k(t.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),multipleTests:t.multipleTests??k(t.multipleTests,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:S.string(t.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:S.string(t.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:S.string(t.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:S.string(t.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:S.string(t.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand),alternativeTestsCommand:S.string(t.alternativeTestsCommand,this.defaultValue.alternativeTestsCommand)}}}),hideCursorInOverviewRuler:H(new v(59,"hideCursorInOverviewRuler",!1,{description:l.kg("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:H(new class extends u{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:l.kg("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:l.kg("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:l.kg("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:l.kg("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:l.kg("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),delay:w.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_(t.sticky,this.defaultValue.sticky),hidingDelay:w.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:_(t.above,this.defaultValue.above)}}}),inDiffEditor:H(new v(61,"inDiffEditor",!1)),letterSpacing:H(new y(64,"letterSpacing",B.letterSpacing,(e=>y.clamp(e,-5,20)),{description:l.kg("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:H(new class extends u{constructor(){const e={enabled:E.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[E.Off,E.OnCode,E.On],default:e.enabled,enumDescriptions:[l.kg("editor.lightbulb.enabled.off","Disable the code action menu."),l.kg("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),l.kg("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:l.kg("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:k(e.enabled,this.defaultValue.enabled,[E.Off,E.OnCode,E.On])}:this.defaultValue}}),lineDecorationsWidth:H(new class extends u{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return"string"==typeof e&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):w.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?w.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}),lineHeight:H(new class extends y{constructor(){super(67,"lineHeight",B.lineHeight,(e=>y.clamp(e,0,150)),{markdownDescription:l.kg("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:H(new class extends u{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[l.kg("lineNumbers.off","Line numbers are not rendered."),l.kg("lineNumbers.on","Line numbers are rendered as absolute number."),l.kg("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),l.kg("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:l.kg("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:H(new w(69,"lineNumbersMinChars",5,1,300)),linkedEditing:H(new v(70,"linkedEditing",!1,{description:l.kg("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:H(new v(71,"links",!0,{description:l.kg("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:H(new x(72,"matchBrackets","always",["always","near","never"],{description:l.kg("matchBrackets","Highlight matching brackets.")})),minimap:H(new class extends u{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:l.kg("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:l.kg("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[l.kg("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),l.kg("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),l.kg("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:l.kg("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:l.kg("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:l.kg("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:l.kg("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:l.kg("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:l.kg("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:l.kg("minimap.showRegionSectionHeaders","Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:l.kg("minimap.showMarkSectionHeaders","Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:l.kg("minimap.sectionHeaderFontSize","Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:l.kg("minimap.sectionHeaderLetterSpacing","Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),autohide:_(t.autohide,this.defaultValue.autohide),size:k(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:k(t.side,this.defaultValue.side,["right","left"]),showSlider:k(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_(t.renderCharacters,this.defaultValue.renderCharacters),scale:w.clampedInt(t.scale,1,1,3),maxColumn:w.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:_(t.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:_(t.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:y.clamp(t.sectionHeaderFontSize??this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:y.clamp(t.sectionHeaderLetterSpacing??this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}),mouseStyle:H(new x(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:H(new y(75,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:l.kg("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:H(new v(76,"mouseWheelZoom",!1,{markdownDescription:o.zx?l.kg("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):l.kg("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:H(new v(77,"multiCursorMergeOverlapping",!0,{description:l.kg("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:H(new L(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?o.zx?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[l.kg("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),l.kg("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:l.kg({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:H(new x(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[l.kg("multiCursorPaste.spread","Each cursor pastes a single line of the text."),l.kg("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:l.kg("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:H(new w(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:l.kg("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:H(new x(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[l.kg("occurrencesHighlight.off","Does not highlight occurrences."),l.kg("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),l.kg("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:l.kg("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:H(new v(82,"overviewRulerBorder",!0,{description:l.kg("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:H(new w(83,"overviewRulerLanes",3,0,3)),padding:H(new class extends u{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:l.kg("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:l.kg("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:w.clampedInt(t.top,0,0,1e3),bottom:w.clampedInt(t.bottom,0,0,1e3)}}}),pasteAs:H(new class extends u{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:l.kg("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:l.kg("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[l.kg("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),l.kg("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showPasteSelector:k(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}),parameterHints:H(new class extends u{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:l.kg("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:l.kg("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),cycle:_(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:H(new x(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[l.kg("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),l.kg("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:l.kg("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),placeholder:H(new class extends u{constructor(){super(88,"placeholder",void 0)}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?e:this.defaultValue}}),definitionLinkOpensInPeek:H(new v(89,"definitionLinkOpensInPeek",!1,{description:l.kg("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:H(new class extends u{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[l.kg("on","Quick suggestions show inside the suggest widget"),l.kg("inline","Quick suggestions show as ghost text"),l.kg("off","Quick suggestions are disabled")]}];super(90,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:l.kg("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:l.kg("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:l.kg("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:l.kg("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.","`#editor.suggestOnTriggerCharacters#`")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let o,r,a;return o="boolean"==typeof t?t?"on":"off":k(t,this.defaultValue.other,s),r="boolean"==typeof i?i?"on":"off":k(i,this.defaultValue.comments,s),a="boolean"==typeof n?n?"on":"off":k(n,this.defaultValue.strings,s),{other:o,comments:r,strings:a}}}),quickSuggestionsDelay:H(new w(91,"quickSuggestionsDelay",10,0,1073741824,{description:l.kg("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:H(new v(92,"readOnly",!1)),readOnlyMessage:H(new class extends u{constructor(){super(93,"readOnlyMessage",void 0)}validate(e){return e&&"object"==typeof e?e:this.defaultValue}}),renameOnType:H(new v(94,"renameOnType",!1,{description:l.kg("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:l.kg("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:H(new v(95,"renderControlCharacters",!0,{description:l.kg("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:H(new x(96,"renderFinalNewline",o.j9?"dimmed":"on",["off","on","dimmed"],{description:l.kg("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:H(new x(97,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",l.kg("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:l.kg("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:H(new v(98,"renderLineHighlightOnlyWhenFocus",!1,{description:l.kg("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:H(new x(99,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:H(new x(100,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",l.kg("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),l.kg("renderWhitespace.selection","Render whitespace characters only on selected text."),l.kg("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:l.kg("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:H(new w(101,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:H(new v(102,"roundedSelection",!0,{description:l.kg("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:H(new class extends u{constructor(){const e=[],t={type:"number",description:l.kg("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(103,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:l.kg("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:l.kg("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"==typeof i)t.push({column:w.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:w.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:H(new class extends u{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(104,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.kg("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),l.kg("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),l.kg("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:l.kg("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[l.kg("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),l.kg("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),l.kg("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:l.kg("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:l.kg("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:l.kg("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:l.kg("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:l.kg("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=w.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=w.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:w.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:P(t.vertical,this.defaultValue.vertical),horizontal:P(t.horizontal,this.defaultValue.horizontal),useShadows:_(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:w.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:w.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:_(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}}),scrollBeyondLastColumn:H(new w(105,"scrollBeyondLastColumn",4,0,1073741824,{description:l.kg("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:H(new v(106,"scrollBeyondLastLine",!0,{description:l.kg("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:H(new v(107,"scrollPredominantAxis",!0,{description:l.kg("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:H(new v(108,"selectionClipboard",!0,{description:l.kg("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:o.j9})),selectionHighlight:H(new v(109,"selectionHighlight",!0,{description:l.kg("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:H(new v(110,"selectOnLineNumbers",!0)),showFoldingControls:H(new x(111,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[l.kg("showFoldingControls.always","Always show the folding controls."),l.kg("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),l.kg("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:l.kg("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:H(new v(112,"showUnused",!0,{description:l.kg("showUnused","Controls fading out of unused code.")})),showDeprecated:H(new v(141,"showDeprecated",!0,{description:l.kg("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:H(new class extends u{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(142,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:l.kg("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[l.kg("editor.inlayHints.on","Inlay hints are enabled"),l.kg("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",o.zx?"Ctrl+Option":"Ctrl+Alt"),l.kg("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",o.zx?"Ctrl+Option":"Ctrl+Alt"),l.kg("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:l.kg("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:l.kg("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:l.kg("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return"boolean"==typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:k(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:w.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),padding:_(t.padding,this.defaultValue.padding)}}}),snippetSuggestions:H(new x(113,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[l.kg("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),l.kg("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),l.kg("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),l.kg("snippetSuggestions.none","Do not show snippet suggestions.")],description:l.kg("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:H(new class extends u{constructor(){super(114,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:l.kg("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:l.kg("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:_(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:_(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}),smoothScrolling:H(new v(115,"smoothScrolling",!1,{description:l.kg("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:H(new w(118,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:H(new class extends u{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(119,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[l.kg("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),l.kg("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:l.kg("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:l.kg("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:l.kg("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:l.kg("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[l.kg("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),l.kg("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),l.kg("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),l.kg("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:l.kg("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions ({0} and {1}) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","`#editor.quickSuggestions#`","`#editor.suggestOnTriggerCharacters#`")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:l.kg("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:l.kg("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:l.kg("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:l.kg("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:l.kg("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:l.kg("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:l.kg("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:l.kg("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:k(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:k(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:_(t.showIcons,this.defaultValue.showIcons),showStatusBar:_(t.showStatusBar,this.defaultValue.showStatusBar),preview:_(t.preview,this.defaultValue.preview),previewMode:k(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_(t.showMethods,this.defaultValue.showMethods),showFunctions:_(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:_(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:_(t.showFields,this.defaultValue.showFields),showVariables:_(t.showVariables,this.defaultValue.showVariables),showClasses:_(t.showClasses,this.defaultValue.showClasses),showStructs:_(t.showStructs,this.defaultValue.showStructs),showInterfaces:_(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_(t.showModules,this.defaultValue.showModules),showProperties:_(t.showProperties,this.defaultValue.showProperties),showEvents:_(t.showEvents,this.defaultValue.showEvents),showOperators:_(t.showOperators,this.defaultValue.showOperators),showUnits:_(t.showUnits,this.defaultValue.showUnits),showValues:_(t.showValues,this.defaultValue.showValues),showConstants:_(t.showConstants,this.defaultValue.showConstants),showEnums:_(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_(t.showKeywords,this.defaultValue.showKeywords),showWords:_(t.showWords,this.defaultValue.showWords),showColors:_(t.showColors,this.defaultValue.showColors),showFiles:_(t.showFiles,this.defaultValue.showFiles),showReferences:_(t.showReferences,this.defaultValue.showReferences),showFolders:_(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_(t.showSnippets,this.defaultValue.showSnippets),showUsers:_(t.showUsers,this.defaultValue.showUsers),showIssues:_(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:H(new class extends u{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:l.kg("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.kg("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),l.kg("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),l.kg("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:l.kg("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:l.kg("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:l.kg("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),mode:k(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:k(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:_(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily)}}}),inlineEdit:H(new class extends u{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:l.kg("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[l.kg("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),l.kg("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),l.kg("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:l.kg("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:l.kg("inlineEdit.fontFamily","Controls the font family of the inline edit.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),showToolbar:k(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:S.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:_(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}),inlineCompletionsAccessibilityVerbose:H(new v(150,"inlineCompletionsAccessibilityVerbose",!1,{description:l.kg("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:H(new w(120,"suggestFontSize",0,0,1e3,{markdownDescription:l.kg("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:H(new w(121,"suggestLineHeight",0,0,1e3,{markdownDescription:l.kg("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:H(new v(122,"suggestOnTriggerCharacters",!0,{description:l.kg("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:H(new x(123,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[l.kg("suggestSelection.first","Always select the first suggestion."),l.kg("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),l.kg("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:l.kg("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:H(new x(124,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[l.kg("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),l.kg("tabCompletion.off","Disable tab completions."),l.kg("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:l.kg("tabCompletion","Enables tab completions.")})),tabIndex:H(new w(125,"tabIndex",0,-1,1073741824)),unicodeHighlight:H(new class extends u{constructor(){const e={nonBasicASCII:A,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:A,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(126,"unicodeHighlight",e,{[O.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.nonBasicASCII,description:l.kg("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[O.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:l.kg("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[O.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:l.kg("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[O.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeComments,description:l.kg("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[O.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,A],default:e.includeStrings,description:l.kg("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[O.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:l.kg("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[O.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:l.kg("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(s.aI(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(s.aI(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new g(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:F(t.nonBasicASCII,A,[!0,!1,A]),invisibleCharacters:_(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:F(t.includeComments,A,[!0,!1,A]),includeStrings:F(t.includeStrings,A,[!0,!1,A]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:H(new x(127,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[l.kg("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),l.kg("unusualLineTerminators.off","Unusual line terminators are ignored."),l.kg("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:l.kg("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:H(new v(128,"useShadowDOM",!0)),useTabStops:H(new v(129,"useTabStops",!0,{description:l.kg("useTabStops","Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:H(new x(130,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[l.kg("wordBreak.normal","Use the default line break rule."),l.kg("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:l.kg("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:H(new class extends u{constructor(){super(131,"wordSegmenterLocales",[],{anyOf:[{description:l.kg("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:l.kg("wordSegmenterLocales","Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){const t=[];for(const i of e)if("string"==typeof i)try{Intl.Segmenter.supportedLocalesOf(i).length>0&&t.push(i)}catch{}return t}return this.defaultValue}}),wordSeparators:H(new S(132,"wordSeparators",a.J3,{description:l.kg("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:H(new x(133,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[l.kg("wordWrap.off","Lines will never wrap."),l.kg("wordWrap.on","Lines will wrap at the viewport width."),l.kg({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),l.kg({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:l.kg({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:H(new S(134,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:H(new S(135,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:H(new w(136,"wordWrapColumn",80,1,1073741824,{markdownDescription:l.kg({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:H(new x(137,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:H(new x(138,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:H(new class extends f{constructor(){super(143)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(74)?n.push("mouse-default"):"copy"===t.get(74)&&n.push("mouse-copy"),t.get(112)&&n.push("showUnused"),t.get(141)&&n.push("showDeprecated"),n.join(" ")}}),defaultColorDecorators:H(new v(148,"defaultColorDecorators",!1,{markdownDescription:l.kg("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:H(new class extends f{constructor(){super(144)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:H(new v(145,"tabFocusMode",!1,{markdownDescription:l.kg("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:H(new T),wrappingInfo:H(new class extends f{constructor(){super(147)}compute(e,t,i){const n=t.get(146);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}),wrappingIndent:H(new class extends u{constructor(){super(139,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[l.kg("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),l.kg("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),l.kg("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),l.kg("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:l.kg("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return 2===t.get(2)?0:i}}),wrappingStrategy:H(new class extends u{constructor(){super(140,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[l.kg("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),l.kg("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:l.kg("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return k(e,"simple",["simple","advanced"])}compute(e,t,i){return 2===t.get(2)?"advanced":i}})}},76543:function(e,t,i){"use strict";i.d(t,{D:function(){return s}});var n=i(80670);const s=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},78336:function(e,t,i){"use strict";i.d(t,{YJ:function(){return l},_8:function(){return a}});var n=i(79783),s=i(3520),o=i(76543);const r=n.zx?1.5:1.35;class a{static createFromValidatedSettings(e,t,i){const n=e.get(49),s=e.get(53),o=e.get(52),r=e.get(51),l=e.get(54),c=e.get(67),d=e.get(64);return a._create(n,s,o,r,l,c,d,t,i)}static _create(e,t,i,n,l,c,d,h,u){0===c?c=r*i:c<8&&(c*=i),(c=Math.round(c))<8&&(c=8);const g=1+(u?0:.1*o.D.getZoomLevel());return i*=g,c*=g,l===s.r_.TRANSLATE&&("normal"===t||"bold"===t?l=s.r_.OFF:(l=`'wght' ${parseInt(t,10)}`,t="normal")),new a({pixelRatio:h,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,fontVariationSettings:l,lineHeight:c,letterSpacing:d})}constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.fontVariationSettings=e.fontVariationSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const e=s.jU.fontFamily,t=a._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class l extends a{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=2,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.fontVariationSettings===e.fontVariationSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},82282:function(e,t,i){"use strict";i.d(t,{V:function(){return s},y:function(){return o}});var n=i(18116);class s{constructor(e){const t=(0,n.W)(e);this._defaultValue=t,this._asciiMap=s._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=(0,n.W)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class o{constructor(){this._actual=new s(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},39841:function(e,t,i){"use strict";i.d(t,{A:function(){return s}});var n=i(43920);class s{static _nextVisibleColumn(e,t,i){return 9===e?s.nextRenderTabStop(t,i):n.ne(e)||n.Ss(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const s=Math.min(t-1,e.length),o=e.substring(0,s),r=new n.km(o);let a=0;for(;!r.eol();){const e=n.Z5(o,s,r.offset);r.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const s=e.length,o=new n.km(e);let r=0,a=1;for(;!o.eol();){const l=n.Z5(e,s,o.offset);o.nextGraphemeLength();const c=this._nextVisibleColumn(l,r,i),d=o.offset+1;if(c>=t)return c-t{const i=e.getColor(o.YtV),n=e.getColor(a),s=n&&!n.isTransparent()?n:i;s&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${s}; }`)}))},64266:function(e,t,i){"use strict";function n(e){let t=0,i=0,n=0,s=0;for(let o=0,r=e.length;ot)throw new n.D7(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=(0,r.lx)(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=(0,r.lx)(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let i=0,n=0,s=null;for(;i=o.startLineNumber?s=new a(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(t.push(s),s=o)}return null!==s&&t.push(s),new l(t)}subtractFrom(e){const t=(0,r.hw)(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),i=(0,r.iM)(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return new l([e]);const n=[];let s=e.startLineNumber;for(let e=t;es&&n.push(new a(s,t.startLineNumber)),s=t.endLineNumberExclusive}return se.toString())).join(", ")}getIntersection(e){const t=[];let i=0,n=0;for(;it.delta(e))))}}},28376:function(e,t,i){"use strict";i.d(t,{L:function(){return s},h:function(){return o}});var n=i(20187);class s{static addRange(e,t){let i=0;for(;it))return new s(e,t)}static ofLength(e){return new s(0,e)}static ofStartAndLength(e,t){return new s(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new n.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new s(this.start+e,this.endExclusive+e)}deltaStart(e){return new s(this.start+e,this.endExclusive)}deltaEnd(e){return new s(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString())).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length),0)}}},62993:function(e,t,i){"use strict";i.d(t,{y:function(){return n}});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumberi||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return s.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return s.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return s.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return s.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return s.plusRange(this,e)}static plusRange(e,t){let i,n,o,r;return t.startLineNumbere.endLineNumber?(o=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,r=e.endColumn),new s(i,n,o,r)}intersectRanges(e){return s.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;const a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn;return ic?(o=c,r=d):o===c&&(r=Math.min(r,d)),i>o||i===o&&n>r?null:new s(i,n,o,r)}equalsRange(e){return s.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return s.getEndPosition(this)}static getEndPosition(e){return new n.y(e.endLineNumber,e.endColumn)}getStartPosition(){return s.getStartPosition(this)}static getStartPosition(e){return new n.y(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new s(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new s(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return s.collapseToStart(this)}static collapseToStart(e){return new s(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return s.collapseToEnd(this)}static collapseToEnd(e){return new s(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new s(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},56218:function(e,t,i){"use strict";i.d(t,{L:function(){return o}});var n=i(62993),s=i(40393);class o extends s.Q{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return o.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new o(this.startLineNumber,this.startColumn,e,t):new o(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.y(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.y(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new o(e,t,this.endLineNumber,this.endColumn):new o(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new o(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new o(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i0&&(65279===n[0]||65534===n[0])?function(e,t,i){const n=[];let s=0;for(let r=0;r=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i(0,n.Xo)(e,((e,t)=>e.range.getEndPosition().isBeforeOrEqual(t.range.getStartPosition())))))}apply(e){let t="",i=new o.y(1,1);for(const n of this.edits){const s=n.range,o=s.getStartPosition(),r=s.getEndPosition(),a=u(i,o);a.isEmpty()||(t+=e.getValueOfRange(a)),t+=n.text,i=r}const n=u(i,e.endPositionExclusive);return n.isEmpty()||(t+=e.getValueOfRange(n)),t}applyToString(e){const t=new p(e);return this.apply(t)}getNewRanges(){const e=[];let t=0,i=0,n=0;for(const s of this.edits){const r=a.W.ofText(s.text),l=o.y.lift({lineNumber:s.range.startLineNumber+i,column:s.range.startColumn+(s.range.startLineNumber===t?n:0)}),c=r.createRange(l);e.push(c),i=c.endLineNumber-s.range.endLineNumber,n=c.endColumn-s.range.endColumn,t=s.range.endLineNumber}return e}}class h{constructor(e,t){this.range=e,this.text=t}toSingleEditOperation(){return{range:this.range,text:this.text}}}function u(e,t){if(e.lineNumber===t.lineNumber&&e.column===Number.MAX_SAFE_INTEGER)return c.Q.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new s.D7("start must be before end");return new c.Q(e.lineNumber,e.column,t.lineNumber,t.column)}class g{get endPositionExclusive(){return this.length.addToPosition(new o.y(1,1))}}class p extends g{constructor(e){super(),this.value=e,this._t=new l(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}},13233:function(e,t,i){"use strict";i.d(t,{W:function(){return o}});var n=i(62993),s=i(40393);class o{static{this.zero=new o(0,0)}static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new o(0,t.column-e.column):new o(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return o.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,i=0;for(const n of e)"\n"===n?(t++,i=0):i++;return new o(t,i)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new s.Q(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new s.Q(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new n.y(e.lineNumber,e.column+this.columnCount):new n.y(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}},31634:function(e,t,i){"use strict";i.d(t,{R:function(){return n}});const n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}},59810:function(e,t,i){"use strict";i.d(t,{i:function(){return a}});var n=i(52732),s=i(82282);class o extends s.V{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let t=0,i=e.length;tt)break;i=n}return i}findNextIntlWordAtOrAfterOffset(e,t){for(const i of this._getIntlSegmenterWordsOnLine(e))if(!(i.index/?",r=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of o)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function a(e){let t=r;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const l=new s.w;function c(e,t,i,s,o){if(t=a(t),o||(o=n.f.first(l)),i.length>o.maxLen){let n=e-o.maxLen/2;return n<0?n=0:s+=n,c(e,t,i=i.substring(n,e+o.maxLen/2),s,o)}const r=Date.now(),h=e-1-s;let u=-1,g=null;for(let e=1;!(Date.now()-r>=o.timeBudget);e++){const n=h-o.windowSize*e;t.lastIndex=Math.max(0,n);const s=d(t,i,h,u);if(!s&&g)break;if(g=s,n<=0)break;u=n}if(g){const e={word:g[0],startColumn:s+1+g.index,endColumn:s+1+g.index+g[0].length};return t.lastIndex=0,e}return null}function d(e,t,i,n){let s;for(;s=e.exec(t);){const t=s.index||0;if(t<=i&&e.lastIndex>=i)return s;if(n>0&&t>n)return null}return null}l.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},26397:function(e,t,i){"use strict";i.d(t,{s:function(){return s}});var n=i(39841);class s{static whitespaceVisibleColumn(e,t,i){const s=e.length;let o=0,r=-1,a=-1;for(let l=0;l=h.length+1)return!1;const u=h.charAt(d.column-2),g=n.get(u);if(!g)return!1;if((0,o.vG)(u)){if("never"===i)return!1}else if("never"===t)return!1;const p=h.charAt(d.column-1);let f=!1;for(const e of g)e.open===u&&e.close===p&&(f=!0);if(!f)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){const e=t.getLineContent(s.lineNumber),o=n.HG(e),a=-1===o?e.length+1:o+1;if(s.column<=a){const e=i.visibleColumnFromColumn(t,s),n=r.A.prevIndentTabStop(e,i.indentSize),o=i.columnFromVisibleColumn(t,s.lineNumber,n);return new l.Q(s.lineNumber,o,s.lineNumber,s.column)}}return l.Q.fromPositions(d.getPositionAfterDeleteLeft(s,t),s)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.Wd(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new c.y(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let r=null;i.sort(((e,t)=>c.y.compare(e.getStartPosition(),t.getEndPosition())));for(let o=0,a=i.length;o1&&r?.endLineNumber!==e.lineNumber?(i=e.lineNumber-1,c=t.getLineMaxColumn(e.lineNumber-1),d=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,c=1,d=e.lineNumber,h=t.getLineMaxColumn(e.lineNumber));const u=new l.Q(i,c,d,h);r=u,u.isEmpty()?n[o]=null:n[o]=new s.iu(u,"")}else n[o]=null;else n[o]=new s.iu(a,"")}return new o.vY(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},66092:function(e,t,i){"use strict";i.d(t,{S:function(){return n},c:function(){return d}});var n,s=i(24219),o=i(30699),r=i(71792),a=i(40469),l=i(62993),c=i(40393);class d{static addCursorDown(e,t,i){const n=[];let s=0;for(let a=0,l=t.length;at&&(i=t,n=e.model.getLineMaxColumn(i)),o.MF.fromModelState(new o.mG(new c.Q(r.lineNumber,1,i,n),2,0,new l.y(i,n),0))}const d=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberd){const i=e.getLineCount();let n=a.lineNumber+1,s=1;return n>i&&(n=i,s=e.getLineMaxColumn(n)),o.MF.fromViewState(t.viewState.move(!0,n,s,0))}{const e=t.modelState.selectionStart.getEndPosition();return o.MF.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return o.MF.fromModelState(a.z.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new o.MF(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return o.MF.fromViewState(new o.mG(new c.Q(i,n,i,n),0,0,new l.y(i,n),0))}static moveTo(e,t,i,n,s){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,s)}const r=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new l.y(s.lineNumber,s.column),r):e.coordinatesConverter.convertModelPositionToViewPosition(r);return o.MF.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,s,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return 2===a?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return 2===a?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return 2===a?t.map((t=>o.MF.fromViewState(r.I.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>o.MF.fromModelState(r.I.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>o.MF.fromViewState(r.I.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>o.MF.fromModelState(r.I.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,s){const o=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 14:{const i=[];for(let s=0,r=t.length;si.endLineNumber-1?i.endLineNumber-1:so.MF.fromViewState(r.I.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let s=0,a=t.length;so.MF.fromViewState(r.I.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let s=0,a=t.length;se.getLineMinColumn(t.lineNumber))return t.delta(void 0,-n.MV(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new o.y(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),r=a.s.atomicPosition(s,t.column-1,i,0);if(-1!==r&&r+1>=n)return new o.y(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,i,e.tabSize):d.leftPosition(t,i);return new c(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let o,r;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(s-1)),a=t.normalizePosition(d.clipPositionColumn(n,t),0),l=d.left(e,t,a);o=l.lineNumber,r=l.column}return i.move(n,o,r,0)}static clipPositionColumn(e,t){return new o.y(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return iu?(i=u,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,h),r=f?0:h-s.A.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==d){const e=new o.y(i,n),s=t.normalizePosition(e,d);r+=n-s.column,i=s.lineNumber,n=s.column}return new c(i,n,r)}static down(e,t,i,n,s,o,r){return this.vertical(e,t,i,n,s,i+o,r,4)}static moveDown(e,t,i,n,s){let r,a;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let l,c=0;do{if(l=d.down(e,t,r+c,a,i.leftoverVisibleColumns,s,!0),t.normalizePosition(new o.y(l.lineNumber,l.column),2).lineNumber>r)break}while(c++<10&&r+c1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){const s=t.getLineCount();let o=i.position.lineNumber;for(;oB(e,t),unshiftIndent:t=>W(e,t)},e.languageConfigurationService);if(null===s)return null;const o=(0,g.Cw)(t,i.startLineNumber,i.startColumn);return s===e.normalizeIndentation(o)?null:s}static _getIndentationAndAutoClosingPairEdits(e,t,i,n,s){const o=i.map((({selection:i,indentation:o})=>{if(null!==s){const r=this._getEditFromIndentationAndSelection(e,t,o,i,n,!1);return new M(r,i,n,s)}{const s=this._getEditFromIndentationAndSelection(e,t,o,i,n,!0);return F(s.range,s.text,!1)}}));return new l.vY(4,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _getEditFromIndentationAndSelection(e,t,i,n,s,o=!0){const r=n.startLineNumber,a=t.getLineFirstNonWhitespaceColumn(r);let l=e.normalizeIndentation(i);return 0!==a&&(l+=t.getLineContent(r).substring(a-1,n.startColumn-1)),l+=o?s:"",{range:new d.Q(r,1,n.endLineNumber,n.endColumn),text:l}}}class v{static getEdits(e,t,i,n,s,o){if(O(t,i,n,s,o))return this._runAutoClosingOvertype(e,n,o)}static _runAutoClosingOvertype(e,t,i){const n=[];for(let e=0,s=t.length;enew o.iu(new d.Q(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new l.vY(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}}class w{static getEdits(e,t,i,n,s,o){if(!o){const o=this.getAutoClosingPairClose(e,t,i,n,s);if(null!==o)return this._runAutoClosingOpenCharType(i,n,s,o)}}static _runAutoClosingOpenCharType(e,t,i,n){const s=[];for(let o=0,r=e.length;o{const t=e.getPosition();return s?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),r=this._findAutoClosingPairOpen(e,t,o.map((e=>new h.y(e.lineNumber,e.beforeColumn))),n);if(!r)return null;let a,d;if((0,l.vG)(n)?(a=e.autoClosingQuotes,d=e.shouldAutoCloseBefore.quote):e.blockCommentStartToken&&r.open.includes(e.blockCommentStartToken)?(a=e.autoClosingComments,d=e.shouldAutoCloseBefore.comment):(a=e.autoClosingBrackets,d=e.shouldAutoCloseBefore.bracket),"never"===a)return null;const u=this._findContainedAutoClosingPair(e,r),g=u?u.close:"";let f=!0;for(const i of o){const{lineNumber:s,beforeColumn:o,afterColumn:l}=i,h=t.getLineContent(s),u=h.substring(0,o-1),m=h.substring(l-1);if(m.startsWith(g)||(f=!1),m.length>0){const t=m.charAt(0);if(!this._isBeforeClosingBrace(e,m)&&!d(t))return null}if(1===r.open.length&&("'"===n||'"'===n)&&"always"!==a){const t=(0,c.i)(e.wordSeparators,[]);if(u.length>0){const e=u.charCodeAt(u.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(s))return null;t.tokenization.forceTokenization(s);const _=t.tokenization.getLineTokens(s),v=(0,p.BQ)(_,o-1);if(!r.shouldAutoClose(v,o-v.firstCharOffset))return null;const b=r.findNeutralCharacter();if(b){const e=t.tokenization.getTokenTypeIfInsertingCharacter(s,o,b);if(!r.isOK(e))return null}}return f?r.close.substring(0,r.close.length-g.length):r.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!s||e.open.length>s.open.length)&&(s=e);return s}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(const e of s)if(null===o||e.open.length>o.open.length){let s=!0;for(const o of i)if(t.getValueInRange(new d.Q(o.lineNumber,o.column-e.open.length+1,o.lineNumber,o.column))+n!==e.open){s=!1;break}s&&(o=e)}return o}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],o=n.some((e=>t.startsWith(e.open))),r=s.some((e=>t.startsWith(e.close)));return!o&&r}}class C{static getEdits(e,t,i,n,s){if(!s&&this._isSurroundSelectionType(e,t,i,n))return this._runSurroundSelectionType(e,i,n)}static _runSurroundSelectionType(e,t,i){const n=[];for(let s=0,o=t.length;s=4){const r=(0,f.MU)(e.autoIndent,t,n,{unshiftIndent:t=>W(e,t),shiftIndent:t=>B(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition());const l=n.endColumn,c=t.getLineContent(n.endLineNumber),d=s.HG(c);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new o.q2(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new o.iP(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return F(n,"\n"+e.normalizeIndentation(l),i)}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];const n=[];for(let s=0,r=i.length;sthis._compositionType(i,e,s,o,r,a)));return new l.vY(4,c,{shouldPushStackElementBefore:R(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),h=new d.Q(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(h)===i&&0===r?null:new o.iP(h,i,0,r)}}class D{static getEdits(e,t,i){const n=[];for(let e=0,s=t.length;e1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(s.lT(e)>=0)break}if(n<1)return null;const r=t.getLineMaxColumn(n),a=(0,m.h)(e.autoIndent,t,new d.Q(n,r,n,r),e.languageConfigurationService);a&&(o=a.indentation+a.appendText)}return n&&(n===u.l.Indent&&(o=B(e,o)),n===u.l.Outdent&&(o=W(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let s="";const r=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,r),n=e.indentSize,o=n-i%n;for(let e=0;e2?c.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t=0;o--){const i=e.charCodeAt(o),r=t.get(i);if(s&&o===s.index)return this._createIntlWord(s,r);if(0===r){if(2===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const s=t.findNextIntlWordAtOrAfterOffset(e,n),o=e.length;for(let r=n;r=0;o--){const n=e.charCodeAt(o),r=t.get(n);if(s&&o===s.index)return o;if(1===r)return o+1;if(1===i&&2===r)return o+1;if(2===i&&0===r)return o+1}return 0}static moveWordLeft(e,t,i,n,s){let o=i.lineNumber,r=i.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let l=c._findPreviousWordOnLine(e,t,new a.y(o,r));if(0===n)return new a.y(o,l?l.start+1:1);if(1===n)return!s&&l&&2===l.wordType&&l.end-l.start==1&&0===l.nextCharClass&&(l=c._findPreviousWordOnLine(e,t,new a.y(o,l.start+1))),new a.y(o,l?l.start+1:1);if(3===n){for(;l&&2===l.wordType;)l=c._findPreviousWordOnLine(e,t,new a.y(o,l.start+1));return new a.y(o,l?l.start+1:1)}return l&&r<=l.end+1&&(l=c._findPreviousWordOnLine(e,t,new a.y(o,l.start+1))),new a.y(o,l?l.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,s=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.y(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=o.charCodeAt(e-2),r=o.charCodeAt(e-1);if(95===t&&95!==r)return new a.y(i,e);if(45===t&&45!==r)return new a.y(i,e);if((n.Lv(t)||n.DB(t))&&n.Wv(r))return new a.y(i,e);if(n.Wv(t)&&n.Wv(r)&&e+1=l.start+1&&(l=c._findNextWordOnLine(e,t,new a.y(s,l.end+1))),o=l?l.start+1:t.getLineMaxColumn(s);return new a.y(s,o)}static _moveWordPartRight(e,t){const i=t.lineNumber,s=e.getLineMaxColumn(i);if(t.column===s)return i1?u=1:(h--,u=n.getLineMaxColumn(h)):(g&&u<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new a.y(h,g.start+1))),g?u=g.end+1:u>1?u=1:(h--,u=n.getLineMaxColumn(h))),new l.Q(h,u,d.lineNumber,d.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.y(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,s))return null;let o=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,o))return null;for(;s>0&&this._charAtIsWhitespace(i,s-1);)s--;for(;o+11?new l.Q(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.Q(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,o=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},d=c._findPreviousWordOnLine(e,t,i);if(d&&o(d))return a(d);const h=c._findNextWordOnLine(e,t,i);return h&&o(h)?a(h):d&&h?r(d.end+1,h.start+1):d?r(d.start+1,d.end+1):h?r(h.start+1,h.end+1):r(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new l.Q(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=p.start+1&&(p=c._findNextWordOnLine(i,n,new a.y(d,p.end+1))),p?h=p.start+1:hBoolean(e)))}},30699:function(e,t,i){"use strict";i.d(t,{MF:function(){return g},d$:function(){return u},mG:function(){return m},vG:function(){return v},vY:function(){return _}});var n=i(62993),s=i(40393),o=i(56218),r=i(38364),a=i(39841),l=i(6947);const c=()=>!0,d=()=>!1,h=e=>" "===e||"\t"===e;class u{static shouldRecreate(e){return e.hasChanged(146)||e.hasChanged(132)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(129)||e.hasChanged(50)||e.hasChanged(92)||e.hasChanged(131)}constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const s=i.options,o=s.get(146),r=s.get(50);this.readOnly=s.get(92),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(117),this.lineHeight=r.lineHeight,this.typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=s.get(129),this.wordSeparators=s.get(132),this.emptySelectionClipboard=s.get(37),this.copyWithSyntaxHighlighting=s.get(25),this.multiCursorMergeOverlapping=s.get(77),this.multiCursorPaste=s.get(79),this.multiCursorLimit=s.get(80),this.autoClosingBrackets=s.get(6),this.autoClosingComments=s.get(7),this.autoClosingQuotes=s.get(11),this.autoClosingDelete=s.get(9),this.autoClosingOvertype=s.get(10),this.autoSurround=s.get(14),this.autoIndent=s.get(12),this.wordSegmenterLocales=s.get(131),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const a=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(a)for(const e of a)this.surroundingPairs[e.open]=e.close;const l=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=l?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};const e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=(0,r.BQ)(t,i-1),s=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.P)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return h;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return c;case"never":return d}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return a.A.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=a.A.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),s=e.getLineMinColumn(t);if(no?o:n}}class g{static fromModelState(e){return new p(e)}static fromViewState(e){return new f(e)}static fromModelSelection(e){const t=o.L.liftSelection(e),i=new m(s.Q.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i{i.push(a.fromOffsetPairs(e?e.getEndExclusives():l.zero,n?n.getStarts():new l(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),i}static fromOffsetPairs(e,t){return new a(new o.L(e.offset1,t.offset1),new o.L(e.offset2,t.offset2))}static assertSorted(e){let t;for(const i of e){if(t&&!(t.seq1Range.endExclusive<=i.seq1Range.start&&t.seq2Range.endExclusive<=i.seq2Range.start))throw new s.D7("Sequence diffs must be sorted");t=i}}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new a(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new a(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new a(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new a(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new a(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(t&&i)return new a(t,i)}getStarts(){return new l(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new l(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class l{static{this.zero=new l(0,0)}static{this.max=new l(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new l(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class c{static{this.instance=new c}isValid(){return!0}}class d{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new s.D7("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&c>0&&3===o.get(r-1,c-1)&&(u+=a.get(r-1,c-1)),u+=n?n(r,c):1):u=-1;const g=Math.max(d,h,u);if(g===u){const e=r>0&&c>0?a.get(r-1,c-1):0;a.set(r,c,e+1),o.set(r,c,3)}else g===d?(a.set(r,c,0),o.set(r,c,1)):g===h&&(a.set(r,c,0),o.set(r,c,2));s.set(r,c,g)}const d=[];let h=e.length,u=t.length;function g(e,t){e+1===h&&t+1===u||d.push(new l.$8(new r.L(e+1,h),new r.L(t+1,u))),h=e,u=t}let p=e.length-1,f=t.length-1;for(;p>=0&&f>=0;)3===o.get(p,f)?(g(p,f),p--,f--):1===o.get(p,f)?p--:f--;return g(-1,-1),d.reverse(),new l.SL(d,!1)}}class g{compute(e,t,i=l.uY.instance){if(0===e.length||0===t.length)return l.SL.trivial(e,t);const n=e,s=t;function o(e,t){for(;en.length||u>s.length)continue;const g=o(l,u);c.set(h,g);const f=l===r?d.get(h+1):d.get(h-1);if(d.set(h,g!==l?new p(f,l,u,g-l):f),c.get(h)===n.length&&c.get(h)-h===s.length)break e}}let u=d.get(h);const g=[];let _=n.length,v=s.length;for(;;){const e=u?u.x+u.length:0,t=u?u.y+u.length:0;if(e===_&&t===v||g.push(new l.$8(new r.L(e,_),new r.L(t,v))),!u)break;_=u.x,v=u.y,u=u.prev}return g.reverse(),new l.SL(g,!1)}}class p{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class f{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class m{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}var _=i(17191),v=i(64429),b=i(52732),w=i(62993);class C{constructor(e,t,i){this.lines=e,this.range=t,this.considerWhitespaceChanges=i,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let t=this.range.startLineNumber;t<=this.range.endLineNumber;t++){let n=e[t-1],s=0;t===this.range.startLineNumber&&this.range.startColumn>1&&(s=this.range.startColumn-1,n=n.substring(s)),this.lineStartOffsets.push(s);let o=0;if(!i){const e=n.trimStart();o=n.length-e.length,n=e.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const r=t===this.range.endLineNumber?Math.min(this.range.endColumn-1-s-o,n.length):n.length;for(let e=0;eString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=x(e>0?this.elements[e-1]:-1),i=x(et<=e)),n=e-this.firstElementOffsetByLineIdx[i];return new w.y(this.range.startLineNumber+i,1+this.lineStartOffsets[i]+n+(0===n&&"left"===t?0:this.trimmedWsLengthsByLineIdx[i]))}translateRange(e){const t=this.translateOffset(e.start,"right"),i=this.translateOffset(e.endExclusive,"left");return i.isBefore(t)?a.Q.fromPositions(i,i):a.Q.fromPositions(t,i)}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!y(this.elements[e]))return;let t=e;for(;t>0&&y(this.elements[t-1]);)t--;let i=e;for(;it<=e.start))??0,i=(0,v.XP)(this.firstElementOffsetByLineIdx,(t=>e.endExclusive<=t))??this.elements.length;return new r.L(t,i)}}function y(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const S={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function k(e){return S[e]}function x(e){return 10===e?8:13===e?7:d(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function L(e,t,i){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const n=(new g).compute(new C([e],new a.Q(1,1,1,e.length),!1),new C([t],new a.Q(1,1,1,t.length),!1),i);let s=0;const o=l.$8.invert(n.diffs,e.length);for(const t of o)t.seq1Range.forEach((t=>{d(e.charCodeAt(t))||s++}));const r=function(t){let i=0;for(let n=0;nt.length?e:t);return s/r>.6&&r>10}var D=i(76922);class E{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:N(this.lines[e-1]))+(e===this.lines.length?0:N(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function N(e){let t=0;for(;te===t)))return new I.p([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new I.p([new _.wm(new o.M(1,e.length+1),new o.M(1,t.length+1),[new _.q6(new a.Q(1,1,e.length,e[e.length-1].length+1),new a.Q(1,1,t.length,t[t.length-1].length+1))])],[],!1);const c=0===i.maxComputationTimeMs?l.uY.instance:new l.aY(i.maxComputationTimeMs),d=!i.ignoreTrimWhitespace,h=new Map;function u(e){let t=h.get(e);return void 0===t&&(t=h.size,h.set(e,t)),t}const g=e.map((e=>u(e.trim()))),p=t.map((e=>u(e.trim()))),f=new E(g,e),m=new E(p,t),v=(()=>f.length+m.length<1700?this.dynamicProgrammingDiffing.compute(f,m,c,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(f,m,c))();let b=v.diffs,w=v.hitTimeout;b=(0,D.NC)(f,m,b),b=(0,D.X5)(f,m,b);const C=[],y=i=>{if(d)for(let n=0;ni.seq1Range.start-S==i.seq2Range.start-k)),y(i.seq1Range.start-S),S=i.seq1Range.endExclusive,k=i.seq2Range.endExclusive;const n=this.refineDiff(e,t,i,c,d);n.hitTimeout&&(w=!0);for(const e of n.mappings)C.push(e)}y(e.length-S);const x=T(C,e,t);let L=[];return i.computeMoves&&(L=this.computeMoves(x,e,t,g,p,c,d)),(0,s.Ft)((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const s of x){if(!s.innerChanges)return!1;for(const n of s.innerChanges)if(!(i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e)))return!1;if(!n(s.modified,t)||!n(s.original,e))return!1}return!0})),new I.p(x,L,w)}computeMoves(e,t,i,s,r,a,c){return function(e,t,i,s,r,a){let{moves:l,excludedChanges:c}=function(e,t,i,n){const s=[],o=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new h(e.original,t,e))),r=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new h(e.modified,i,e)))),a=new Set;for(const e of o){let t,i=-1;for(const n of r){const s=e.computeSimilarity(n);s>i&&(i=s,t=n)}if(i>.9&&t&&(r.delete(t),s.push(new _.WL(e.range,t.range)),a.add(e.source),a.add(t.source)),!n.isValid())return{moves:s,excludedChanges:a}}return{moves:s,excludedChanges:a}}(e,t,i,a);if(!a.isValid())return[];const d=function(e,t,i,s,r,a){const l=[],c=new b.db;for(const i of e)for(let e=i.original.startLineNumber;ee.modified.startLineNumber),n.U9));for(const t of e){let e=[];for(let n=t.modified.startLineNumber;n{for(const i of e)if(i.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&i.modifiedLineRange.endLineNumberExclusive+1===s.endLineNumberExclusive)return i.originalLineRange=new o.M(i.originalLineRange.startLineNumber,t.endLineNumberExclusive),i.modifiedLineRange=new o.M(i.modifiedLineRange.startLineNumber,s.endLineNumberExclusive),void r.push(i);const i={modifiedLineRange:s,originalLineRange:t};d.push(i),r.push(i)})),e=r}if(!a.isValid())return[]}d.sort((0,n.Hw)((0,n.VE)((e=>e.modifiedLineRange.length),n.U9)));const h=new o.S,u=new o.S;for(const e of d){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,i=h.subtractFrom(e.modifiedLineRange),n=u.subtractFrom(e.originalLineRange).getWithDelta(t),s=i.getIntersection(n);for(const e of s.ranges){if(e.length<3)continue;const i=e,n=e.delta(-t);l.push(new _.WL(n,i)),h.addRange(i),u.addRange(n)}}l.sort((0,n.VE)((e=>e.original.startLineNumber),n.U9));const g=new v.vJ(e);for(let t=0;te.original.startLineNumber<=i.original.startLineNumber)),c=(0,v.lx)(e,(e=>e.modified.startLineNumber<=i.modified.startLineNumber)),d=Math.max(i.original.startLineNumber-n.original.startLineNumber,i.modified.startLineNumber-c.modified.startLineNumber),p=g.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbers.length||t>r.length)break;if(h.contains(t)||u.contains(e))break;if(!L(s[e-1],r[t-1],a))break}for(b>0&&(u.addRange(new o.M(i.original.startLineNumber-b,i.original.startLineNumber)),h.addRange(new o.M(i.modified.startLineNumber-b,i.modified.startLineNumber))),w=0;ws.length||t>r.length)break;if(h.contains(t)||u.contains(e))break;if(!L(s[e-1],r[t-1],a))break}w>0&&(u.addRange(new o.M(i.original.endLineNumberExclusive,i.original.endLineNumberExclusive+w)),h.addRange(new o.M(i.modified.endLineNumberExclusive,i.modified.endLineNumberExclusive+w))),(b>0||w>0)&&(l[t]=new _.WL(new o.M(i.original.startLineNumber-b,i.original.endLineNumberExclusive+w),new o.M(i.modified.startLineNumber-b,i.modified.endLineNumberExclusive+w)))}return l}(e.filter((e=>!c.has(e))),s,r,t,i,a);return(0,n.E4)(l,d),l=function(e){if(0===e.length)return e;e.sort((0,n.VE)((e=>e.original.startLineNumber),n.U9));const t=[e[0]];for(let i=1;i=0&&r>=0&&o+r<=2?t[t.length-1]=n.join(s):t.push(s)}return t}(l),l=l.filter((e=>{const i=e.original.toOffsetRange().slice(t).map((e=>e.trim()));return i.join("\n").length>=15&&function(e){let t=0;for(const i of e)i.length>=2&&t++;return t}(i)>=2})),l=function(e,t){const i=new v.vJ(e);return t.filter((t=>(i.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber{const n=T(this.refineDiff(t,i,new l.$8(e.original.toOffsetRange(),e.modified.toOffsetRange()),a,c).mappings,t,i,!0);return new I.t(e,n)}))}refineDiff(e,t,i,n,s){var r;const a=(r=i,new _.WL(new o.M(r.seq1Range.start+1,r.seq1Range.endExclusive+1),new o.M(r.seq2Range.start+1,r.seq2Range.endExclusive+1))).toRangeMapping2(e,t),l=new C(e,a.originalRange,s),c=new C(t,a.modifiedRange,s),d=l.length+c.length<500?this.dynamicProgrammingDiffing.compute(l,c,n):this.myersDiffingAlgorithm.compute(l,c,n);let h=d.diffs;h=(0,D.NC)(l,c,h),h=(0,D.Lk)(l,c,h),h=(0,D.sq)(l,c,h),h=(0,D.Rl)(l,c,h);return{mappings:h.map((e=>new _.q6(l.translateRange(e.seq1Range),c.translateRange(e.seq2Range)))),hitTimeout:d.hitTimeout}}}function T(e,t,i,r=!1){const a=[];for(const s of(0,n.n)(e.map((e=>function(e,t,i){let n=0,s=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+n<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+n<=e.modifiedRange.endLineNumber&&(s=-1),e.modifiedRange.startColumn-1>=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+s&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+s&&(n=1);const r=new o.M(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+s),a=new o.M(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+s);return new _.wm(r,a,[e])}(e,t,i))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=s[0],t=s[s.length-1];a.push(new _.wm(e.original.join(t.original),e.modified.join(t.modified),s.map((e=>e.innerChanges[0]))))}return(0,s.Ft)((()=>{if(!r&&a.length>0){if(a[0].modified.startLineNumber!==a[0].original.startLineNumber)return!1;if(i.length-a[a.length-1].modified.endLineNumberExclusive!=t.length-a[a.length-1].original.endLineNumberExclusive)return!1}return(0,s.Xo)(a,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive0?i[n-1]:void 0,r=i[n],a=n+10&&(l=l.delta(c))}r.push(l)}return n.length>0&&r.push(n[n.length-1]),r}function l(e,t,i,n,s){let o=1;for(;e.seq1Range.start-o>=n.start&&e.seq2Range.start-o>=s.start&&i.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let r=0;for(;e.seq1Range.start+rl&&(l=c,a=n)}return e.delta(a)}function c(e,t,i){const n=[];for(const e of i){const t=n[n.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?n[n.length-1]=new o.$8(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):n.push(e)}return n}function d(e,t,i){const n=o.$8.invert(i,e.length),s=[];let r=new o._3(0,0);function a(i,a){if(i.offset10;){const i=n[0];if(!i.seq1Range.intersects(d.seq1Range)&&!i.seq2Range.intersects(d.seq2Range))break;const s=e.findWordContaining(i.seq1Range.start),r=t.findWordContaining(i.seq2Range.start),a=new o.$8(s,r),l=a.intersect(i);if(u+=l.seq1Range.length,g+=l.seq2Range.length,d=d.join(a),!(d.seq1Range.endExclusive>=i.seq1Range.endExclusive))break;n.shift()}u+g<2*(d.seq1Range.length+d.seq2Range.length)/3&&s.push(d),r=d.getEndExclusives()}for(;n.length>0;){const e=n.shift();e.seq1Range.isEmpty||(a(e.getStarts(),e),a(e.getEndExclusives().delta(-1),e))}return function(e,t){const i=[];for(;e.length>0||t.length>0;){const n=e[0],s=t[0];let o;o=n&&(!s||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=o.seq1Range.start?i[i.length-1]=i[i.length-1].join(o):i.push(o)}return i}(i,s)}function h(e,t,i){let n=i;if(0===n.length)return n;let o,r=0;do{o=!1;const a=[n[0]];for(let l=1;l5||i.seq1Range.length+i.seq2Range.length>5)}h(d,c)?(o=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}n=a}while(r++<10&&o);return n}function u(e,t,i){let r=i;if(0===r.length)return r;let a,l=0;do{a=!1;const d=[r[0]];for(let h=1;h5||o.length>500)return!1;const r=e.getText(o).trim();if(r.length>20||r.split(/\r\n|\r|\n/).length>1)return!1;const a=e.countLinesIn(i.seq1Range),l=i.seq1Range.length,c=t.countLinesIn(i.seq2Range),d=i.seq2Range.length,h=e.countLinesIn(n.seq1Range),p=n.seq1Range.length,f=t.countLinesIn(n.seq2Range),m=n.seq2Range.length;function _(e){return Math.min(e,130)}return Math.pow(Math.pow(_(40*a+l),1.5)+Math.pow(_(40*c+d),1.5),1.5)+Math.pow(Math.pow(_(40*h+p),1.5)+Math.pow(_(40*f+m),1.5),1.5)>74184.96480721243}p(g,u)?(a=!0,d[d.length-1]=d[d.length-1].join(u)):d.push(u)}r=d}while(l++<10&&a);const c=[];return(0,n.kj)(r,((t,i,n)=>{let r=i;function a(e){return e.length>0&&e.trim().length<=3&&i.seq1Range.length+i.seq2Range.length>100}const l=e.extendToFullLines(i.seq1Range),d=e.getText(new s.L(l.start,i.seq1Range.start));a(d)&&(r=r.deltaStart(-d.length));const h=e.getText(new s.L(i.seq1Range.endExclusive,l.endExclusive));a(h)&&(r=r.deltaEnd(h.length));const u=o.$8.fromOffsetPairs(t?t.getEndExclusives():o._3.zero,n?n.getStarts():o._3.max),g=r.intersect(u);c.length>0&&g.getStarts().equals(c[c.length-1].getEndExclusives())?c[c.length-1]=c[c.length-1].join(g):c.push(g)})),c}},52049:function(e,t,i){"use strict";i.d(t,{p:function(){return n},t:function(){return s}});class n{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class s{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}},17191:function(e,t,i){"use strict";i.d(t,{WL:function(){return l},q6:function(){return u},wm:function(){return h}});var n=i(20187),s=i(80487),o=i(62993),r=i(40393),a=i(30479);class l{static inverse(e,t,i){const n=[];let o=1,r=1;for(const t of e){const e=new l(new s.M(o,t.original.startLineNumber),new s.M(r,t.modified.startLineNumber));e.modified.isEmpty||n.push(e),o=t.original.endLineNumberExclusive,r=t.modified.endLineNumberExclusive}const a=new l(new s.M(o,t+1),new s.M(r,i+1));return a.modified.isEmpty||n.push(a),n}static clip(e,t,i){const n=[];for(const s of e){const e=s.original.intersect(t),o=s.modified.intersect(i);e&&!e.isEmpty&&o&&!o.isEmpty&&n.push(new l(e,o))}return n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new l(this.modified,this.original)}join(e){return new l(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new u(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new n.D7("not a valid diff");return new u(new r.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new r.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new u(new r.Q(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new r.Q(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,t){if(d(this.original.endLineNumberExclusive,e)&&d(this.modified.endLineNumberExclusive,t))return new u(new r.Q(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new r.Q(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new u(r.Q.fromPositions(new o.y(this.original.startLineNumber,1),c(new o.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),r.Q.fromPositions(new o.y(this.modified.startLineNumber,1),c(new o.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new u(r.Q.fromPositions(c(new o.y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),c(new o.y(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),r.Q.fromPositions(c(new o.y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),c(new o.y(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new n.D7}}function c(e,t){if(e.lineNumber<1)return new o.y(1,1);if(e.lineNumber>t.length)return new o.y(t.length,t[t.length-1].length+1);const i=t[e.lineNumber-1];return e.column>i.length+1?new o.y(e.lineNumber,i.length+1):e}function d(e,t){return e>=1&&e<=t.length}class h extends l{static fromRangeMappings(e){const t=s.M.join(e.map((e=>s.M.fromRangeInclusive(e.originalRange)))),i=s.M.join(e.map((e=>s.M.fromRangeInclusive(e.modifiedRange))));return new h(t,i,e)}constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){return new h(this.modified,this.original,this.innerChanges?.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new h(this.original,this.modified,[this.toRangeMapping()])}}class u{static assertSorted(e){for(let t=1;t${this.modifiedRange.toString()}}`}flip(){return new u(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new a.WR(this.originalRange,t)}}},19527:function(e,t,i){"use strict";i.d(t,{f:function(){return n}});class n{constructor(e,t,i,n,s,o,r){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=s,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}},48872:function(e,t,i){"use strict";i.d(t,{_:function(){return n}});const n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},49678:function(e,t,i){"use strict";i.d(t,{R:function(){return n}});var n,s=i(14374),o=i(97848);!function(e){e.editorSimpleInput=new o.N1("editorSimpleInput",!1,!0),e.editorTextFocus=new o.N1("editorTextFocus",!1,s.kg("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new o.N1("editorFocus",!1,s.kg("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new o.N1("textInputFocus",!1,s.kg("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new o.N1("editorReadonly",!1,s.kg("editorReadonly","Whether the editor is read-only")),e.inDiffEditor=new o.N1("inDiffEditor",!1,s.kg("inDiffEditor","Whether the context is a diff editor")),e.isEmbeddedDiffEditor=new o.N1("isEmbeddedDiffEditor",!1,s.kg("isEmbeddedDiffEditor","Whether the context is an embedded diff editor")),e.inMultiDiffEditor=new o.N1("inMultiDiffEditor",!1,s.kg("inMultiDiffEditor","Whether the context is a multi diff editor")),e.multiDiffEditorAllCollapsed=new o.N1("multiDiffEditorAllCollapsed",void 0,s.kg("multiDiffEditorAllCollapsed","Whether all files in multi diff editor are collapsed")),e.hasChanges=new o.N1("diffEditorHasChanges",!1,s.kg("diffEditorHasChanges","Whether the diff editor has changes")),e.comparingMovedCode=new o.N1("comparingMovedCode",!1,s.kg("comparingMovedCode","Whether a moved code block is selected for comparison")),e.accessibleDiffViewerVisible=new o.N1("accessibleDiffViewerVisible",!1,s.kg("accessibleDiffViewerVisible","Whether the accessible diff viewer is visible")),e.diffEditorRenderSideBySideInlineBreakpointReached=new o.N1("diffEditorRenderSideBySideInlineBreakpointReached",!1,s.kg("diffEditorRenderSideBySideInlineBreakpointReached","Whether the diff editor render side by side inline breakpoint is reached")),e.diffEditorInlineMode=new o.N1("diffEditorInlineMode",!1,s.kg("diffEditorInlineMode","Whether inline mode is active")),e.diffEditorOriginalWritable=new o.N1("diffEditorOriginalWritable",!1,s.kg("diffEditorOriginalWritable","Whether modified is writable in the diff editor")),e.diffEditorModifiedWritable=new o.N1("diffEditorModifiedWritable",!1,s.kg("diffEditorModifiedWritable","Whether modified is writable in the diff editor")),e.diffEditorOriginalUri=new o.N1("diffEditorOriginalUri","",s.kg("diffEditorOriginalUri","The uri of the original document")),e.diffEditorModifiedUri=new o.N1("diffEditorModifiedUri","",s.kg("diffEditorModifiedUri","The uri of the modified document")),e.columnSelection=new o.N1("editorColumnSelection",!1,s.kg("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new o.N1("editorHasSelection",!1,s.kg("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new o.N1("editorHasMultipleSelections",!1,s.kg("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new o.N1("editorTabMovesFocus",!1,s.kg("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new o.N1("isInEmbeddedEditor",!1,!0),e.canUndo=new o.N1("canUndo",!1,!0),e.canRedo=new o.N1("canRedo",!1,!0),e.hoverVisible=new o.N1("editorHoverVisible",!1,s.kg("editorHoverVisible","Whether the editor hover is visible")),e.hoverFocused=new o.N1("editorHoverFocused",!1,s.kg("editorHoverFocused","Whether the editor hover is focused")),e.stickyScrollFocused=new o.N1("stickyScrollFocused",!1,s.kg("stickyScrollFocused","Whether the sticky scroll is focused")),e.stickyScrollVisible=new o.N1("stickyScrollVisible",!1,s.kg("stickyScrollVisible","Whether the sticky scroll is visible")),e.standaloneColorPickerVisible=new o.N1("standaloneColorPickerVisible",!1,s.kg("standaloneColorPickerVisible","Whether the standalone color picker is visible")),e.standaloneColorPickerFocused=new o.N1("standaloneColorPickerFocused",!1,s.kg("standaloneColorPickerFocused","Whether the standalone color picker is focused")),e.inCompositeEditor=new o.N1("inCompositeEditor",void 0,s.kg("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new o.N1("editorLangId","",s.kg("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new o.N1("editorHasCompletionItemProvider",!1,s.kg("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new o.N1("editorHasCodeActionsProvider",!1,s.kg("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new o.N1("editorHasCodeLensProvider",!1,s.kg("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new o.N1("editorHasDefinitionProvider",!1,s.kg("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new o.N1("editorHasDeclarationProvider",!1,s.kg("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new o.N1("editorHasImplementationProvider",!1,s.kg("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new o.N1("editorHasTypeDefinitionProvider",!1,s.kg("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new o.N1("editorHasHoverProvider",!1,s.kg("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new o.N1("editorHasDocumentHighlightProvider",!1,s.kg("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new o.N1("editorHasDocumentSymbolProvider",!1,s.kg("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new o.N1("editorHasReferenceProvider",!1,s.kg("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new o.N1("editorHasRenameProvider",!1,s.kg("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new o.N1("editorHasSignatureHelpProvider",!1,s.kg("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new o.N1("editorHasInlayHintsProvider",!1,s.kg("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new o.N1("editorHasDocumentFormattingProvider",!1,s.kg("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new o.N1("editorHasDocumentSelectionFormattingProvider",!1,s.kg("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new o.N1("editorHasMultipleDocumentFormattingProvider",!1,s.kg("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new o.N1("editorHasMultipleDocumentSelectionFormattingProvider",!1,s.kg("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},23534:function(e,t,i){"use strict";i.d(t,{T:function(){return o},x:function(){return s}});const n=[];function s(e){n.push(e)}function o(){return n.slice(0)}},36138:function(e,t,i){"use strict";i.d(t,{x:function(){return n}});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;1&n&&(s+="font-style: italic;"),2&n&&(s+="font-weight: bold;");let o="";return 4&n&&(o+=" underline"),8&n&&(o+=" line-through"),o&&(s+=`text-decoration:${o};`),s}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}},71543:function(e,t,i){"use strict";i.d(t,{f:function(){return o}});var n=i(90562),s=i(68847);function o(e,t,i,r,a,l){if(Array.isArray(e)){let n=0;for(const s of e){const e=o(s,t,i,r,a,l);if(10===e)return e;e>n&&(n=e)}return n}if("string"==typeof e)return r?"*"===e?5:e===i?10:0:0;if(e){const{language:o,pattern:c,scheme:d,hasAccessToAllModels:h,notebookType:u}=e;if(!r&&!h)return 0;u&&a&&(t=a);let g=0;if(d)if(d===t.scheme)g=10;else{if("*"!==d)return 0;g=5}if(o)if(o===i)g=10;else{if("*"!==o)return 0;g=Math.max(g,5)}if(u)if(u===l)g=10;else{if("*"!==u||void 0===l)return 0;g=Math.max(g,5)}if(c){let e;if(e="string"==typeof c?c:{...c,base:(0,s.S8)(c.base)},e!==t.fsPath&&!(0,n.YW)(e,t.fsPath))return 0;g=10}return g}return 0}},35720:function(e,t,i){"use strict";i.d(t,{uB:function(){return D},HC:function(){return h},Kb:function(){return f},FX:function(){return g},rY:function(){return b},lO:function(){return N},M$:function(){return d},r4:function(){return E},qw:function(){return u},sm:function(){return R},v_:function(){return I},OV:function(){return x},YT:function(){return L},GE:function(){return w},WA:function(){return p},gP:function(){return k},ou:function(){return _},dG:function(){return M},$M:function(){return v},OB:function(){return T},PK:function(){return S},Iu:function(){return C}});var n=i(93231),s=i(54244),o=i(40393),r=i(80670),a=i(35114);class l{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),(0,a.s)((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){this._factories.get(e)?.dispose();const i=new c(this,e,t);return this._factories.set(e,i),(0,a.s)((()=>{const t=this._factories.get(e);t&&t===i&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class c extends a.jG{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}var d,h,u,g,p,f,m=i(14374);class _{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class v{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class b{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}!function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(d||(d={})),function(e){const t=new Map;t.set(0,n.W.symbolMethod),t.set(1,n.W.symbolFunction),t.set(2,n.W.symbolConstructor),t.set(3,n.W.symbolField),t.set(4,n.W.symbolVariable),t.set(5,n.W.symbolClass),t.set(6,n.W.symbolStruct),t.set(7,n.W.symbolInterface),t.set(8,n.W.symbolModule),t.set(9,n.W.symbolProperty),t.set(10,n.W.symbolEvent),t.set(11,n.W.symbolOperator),t.set(12,n.W.symbolUnit),t.set(13,n.W.symbolValue),t.set(15,n.W.symbolEnum),t.set(14,n.W.symbolConstant),t.set(15,n.W.symbolEnum),t.set(16,n.W.symbolEnumMember),t.set(17,n.W.symbolKeyword),t.set(27,n.W.symbolSnippet),t.set(18,n.W.symbolText),t.set(19,n.W.symbolColor),t.set(20,n.W.symbolFile),t.set(21,n.W.symbolReference),t.set(22,n.W.symbolCustomColor),t.set(23,n.W.symbolFolder),t.set(24,n.W.symbolTypeParameter),t.set(25,n.W.account),t.set(26,n.W.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=n.W.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(h||(h={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(u||(u={}));class w{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return o.Q.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}function C(e){return e&&s.r.isUri(e.uri)&&o.Q.isIRange(e.range)&&(o.Q.isIRange(e.originSelectionRange)||o.Q.isIRange(e.targetSelectionRange))}!function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"}(g||(g={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(p||(p={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(f||(f={}));const y={17:(0,m.kg)("Array","array"),16:(0,m.kg)("Boolean","boolean"),4:(0,m.kg)("Class","class"),13:(0,m.kg)("Constant","constant"),8:(0,m.kg)("Constructor","constructor"),9:(0,m.kg)("Enum","enumeration"),21:(0,m.kg)("EnumMember","enumeration member"),23:(0,m.kg)("Event","event"),7:(0,m.kg)("Field","field"),0:(0,m.kg)("File","file"),11:(0,m.kg)("Function","function"),10:(0,m.kg)("Interface","interface"),19:(0,m.kg)("Key","key"),5:(0,m.kg)("Method","method"),1:(0,m.kg)("Module","module"),2:(0,m.kg)("Namespace","namespace"),20:(0,m.kg)("Null","null"),15:(0,m.kg)("Number","number"),18:(0,m.kg)("Object","object"),24:(0,m.kg)("Operator","operator"),3:(0,m.kg)("Package","package"),6:(0,m.kg)("Property","property"),14:(0,m.kg)("String","string"),22:(0,m.kg)("Struct","struct"),25:(0,m.kg)("TypeParameter","type parameter"),12:(0,m.kg)("Variable","variable")};function S(e,t){return(0,m.kg)("symbolAriaLabel","{0} ({1})",e,y[t])}var k,x,L,D,E;!function(e){const t=new Map;t.set(0,n.W.symbolFile),t.set(1,n.W.symbolModule),t.set(2,n.W.symbolNamespace),t.set(3,n.W.symbolPackage),t.set(4,n.W.symbolClass),t.set(5,n.W.symbolMethod),t.set(6,n.W.symbolProperty),t.set(7,n.W.symbolField),t.set(8,n.W.symbolConstructor),t.set(9,n.W.symbolEnum),t.set(10,n.W.symbolInterface),t.set(11,n.W.symbolFunction),t.set(12,n.W.symbolVariable),t.set(13,n.W.symbolConstant),t.set(14,n.W.symbolString),t.set(15,n.W.symbolNumber),t.set(16,n.W.symbolBoolean),t.set(17,n.W.symbolArray),t.set(18,n.W.symbolObject),t.set(19,n.W.symbolKey),t.set(20,n.W.symbolNull),t.set(21,n.W.symbolEnumMember),t.set(22,n.W.symbolStruct),t.set(23,n.W.symbolEvent),t.set(24,n.W.symbolOperator),t.set(25,n.W.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=n.W.symbolProperty),i}}(k||(k={}));class N{static{this.Comment=new N("comment")}static{this.Imports=new N("imports")}static{this.Region=new N("region")}static fromValue(e){switch(e){case"comment":return N.Comment;case"imports":return N.Imports;case"region":return N.Region}return new N(e)}constructor(e){this.value=e}}!function(e){e[e.AIGenerated=1]="AIGenerated"}(x||(x={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(L||(L={})),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(D||(D={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(E||(E={}));class I{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then((e=>{e&&e.dispose()}))}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const M=new l,T=new l;var R;!function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(R||(R={}))},78265:function(e,t,i){"use strict";i.d(t,{$f:function(){return a},MU:function(){return l},Yb:function(){return d},_t:function(){return c},vn:function(){return r}});var n=i(43920),s=i(30618),o=i(38884);function r(e,t,i,r=!0,a){if(e<4)return null;const l=a.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!l)return null;const c=new o.no(t,l,a);if(i<=1)return{indentation:"",action:null};for(let e=i-1;e>0&&""===t.getLineContent(e);e--)if(1===e)return{indentation:"",action:null};const d=function(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let s,o=-1;for(s=t-1;s>=1;s--){if(e.tokenization.getLanguageIdAtPosition(s,0)!==n)return o;const t=e.getLineContent(s);if(!i.shouldIgnore(s)&&!/^\s+$/.test(t)&&""!==t)return s;o=s}}return-1}(t,i,c);if(d<0)return null;if(d<1)return{indentation:"",action:null};if(c.shouldIncrease(d)||c.shouldIndentNextLine(d)){const e=t.getLineContent(d);return{indentation:n.UU(e),action:s.l.Indent,line:d}}if(c.shouldDecrease(d)){const e=t.getLineContent(d);return{indentation:n.UU(e),action:null,line:d}}{if(1===d)return{indentation:n.UU(t.getLineContent(d)),action:null,line:d};const e=d-1,i=l.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let t=e-1;t>0;t--)if(!c.shouldIndentNextLine(t)){i=t;break}return{indentation:n.UU(t.getLineContent(i+1)),action:null,line:i+1}}if(r)return{indentation:n.UU(t.getLineContent(d)),action:null,line:d};for(let e=d;e>0;e--){if(c.shouldIncrease(e))return{indentation:n.UU(t.getLineContent(e)),action:s.l.Indent,line:e};if(c.shouldIndentNextLine(e)){let i=0;for(let t=e-1;t>0;t--)if(!c.shouldIndentNextLine(e)){i=t;break}return{indentation:n.UU(t.getLineContent(i+1)),action:null,line:i+1}}if(c.shouldDecrease(e))return{indentation:n.UU(t.getLineContent(e)),action:null,line:e}}return{indentation:n.UU(t.getLineContent(1)),action:null,line:1}}}function a(e,t,i,a,l,c){if(e<4)return null;const d=c.getLanguageConfiguration(i);if(!d)return null;const h=c.getLanguageConfiguration(i).indentRulesSupport;if(!h)return null;const u=new o.no(t,h,c),g=r(e,t,a,void 0,c);if(g){const i=g.line;if(void 0!==i){let o=!0;for(let e=i;en===t?i:e.tokenization.getLineTokens(n),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:n=>n===t?i.getLineContent():e.getLineContent(n)}}(t,i.startLineNumber,g),m=(0,o.WR)(t,i.getStartPosition()),_=t.getLineContent(i.startLineNumber),v=n.UU(_),b=r(e,f,i.startLineNumber+1,void 0,l);if(!b){const e=m?v:p;return{beforeEnter:e,afterEnter:e}}let w=m?v:b.indentation;return b.action===s.l.Indent&&(w=a.shiftIndent(w)),d.shouldDecrease(u.getLineContent())&&(w=a.unshiftIndent(w)),{beforeEnter:m?v:p,afterEnter:w}}function c(e,t,i,a,l,c){const d=e.autoIndent;if(d<4)return null;if((0,o.WR)(t,i.getStartPosition()))return null;const h=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),u=c.getLanguageConfiguration(h).indentRulesSupport;if(!u)return null;const g=new o.V(t,c).getProcessedTokenContextAroundRange(i),p=g.beforeRangeProcessedTokens.getLineContent(),f=g.afterRangeProcessedTokens.getLineContent(),m=p+f,_=p+a+f;if(!u.shouldDecrease(m)&&u.shouldDecrease(_)){const e=r(d,t,i.startLineNumber,!1,c);if(!e)return null;let n=e.indentation;return e.action!==s.l.Indent&&(n=l.unshiftIndent(n)),n}const v=i.startLineNumber-1;if(v>0){const s=t.getLineContent(v);if(u.shouldIndentNextLine(s)&&u.shouldIncrease(_)){const s=r(d,t,i.startLineNumber,!1,c),o=s?.indentation;if(void 0!==o){const s=t.getLineContent(i.startLineNumber),r=n.UU(s),c=l.shiftIndent(o)===r,d=/^\s*$/.test(m),h=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(a),u=h&&h.length>0;if(c&&u&&d)return o}}}return null}function d(e,t,i){const n=i.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}},7326:function(e,t,i){"use strict";i.d(t,{h:function(){return r}});var n=i(30618),s=i(8494),o=i(38884);function r(e,t,i,r){t.tokenization.forceTokenization(i.startLineNumber);const a=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),l=r.getLanguageConfiguration(a);if(!l)return null;const c=new o.V(t,r).getProcessedTokenContextAroundRange(i),d=c.previousLineProcessedTokens.getLineContent(),h=c.beforeRangeProcessedTokens.getLineContent(),u=c.afterRangeProcessedTokens.getLineContent(),g=l.onEnter(e,d,h,u);if(!g)return null;const p=g.indentAction;let f=g.appendText;const m=g.removeText||0;f?p===n.l.Indent&&(f="\t"+f):f=p===n.l.Indent||p===n.l.IndentOutdent?"\t":"";let _=(0,s.Cw)(t,i.startLineNumber,i.startColumn);return m&&(_=_.substring(0,_.length-m)),{indentAction:p,appendText:f,removeText:m,indentation:_}}},41750:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=(0,i(63619).u1)("languageService")},30618:function(e,t,i){"use strict";var n;i.d(t,{GB:function(){return o},i3:function(){return s},l:function(){return n}}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class s{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t \n\t"}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.i3(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.i3({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.i3({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}var c=i(97358),d=i(38364),h=i(82848);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return(0,c.dM)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,d.Yo)(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,r=h.Fu.findPrevBracketInRange(s,1,o,0,o.length);if(!r)return null;const a=o.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var f=i(20187);class m{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=m._createOpenBracketRegExp(e[0]),i=m._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,s=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return s.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e{const t=new Set;return{info:new L(this,e,t),closing:t}})),s=new y.VV((e=>{const t=new Set,i=new Set;return{info:new D(this,e,t,i),opening:t,openingColorized:i}}));for(const[e,t]of i){const i=n.get(e),o=s.get(t);i.closing.add(o.info),o.opening.add(i.info)}const o=t.colorizedBracketPairs?k(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of o){const i=n.get(e),o=s.get(t);i.closing.add(o.info),o.openingColorized.add(i.info),o.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...s.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){const t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return(0,h.xb)(t,e)}}function k(e){return e.filter((([e,t])=>""!==e&&""!==t))}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class L extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class D extends x{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var E=function(e,t){return function(i,n){t(i,n,e)}};class N{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const I=(0,_.u1)("languageConfigurationService");let M=class extends s.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new W),this.onDidChangeEmitter=this._register(new n.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(T));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new N(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new N(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new N(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let s=t.getLanguageConfiguration(e);if(!s){if(!n.isRegisteredLanguageId(e))return new H(e,{});s=new H(e,{})}const o=function(e,t){const i=t.getValue(T.brackets,{overrideIdentifier:e}),n=t.getValue(T.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:R(i),colorizedBracketPairs:R(n)}}(s.languageId,i),r=O([s.underlyingConfig,o]);return new H(s.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([E(0,v.pG),E(1,b.L)],M);const T={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function R(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function P(e,t,i){const n=e.getLineContent(t);let s=o.UU(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}class A{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new F(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,s.s)((()=>{for(let e=0;ee.configuration))))}}function O(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class F{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class B{constructor(e){this.languageId=e}}class W extends s.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(C.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new A(e),this._entries.set(e,n));const o=n.register(t,i);return this._onDidChange.fire(new B(e)),(0,s.s)((()=>{o.dispose(),this._onDidChange.fire(new B(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class H{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new m(this.underlyingConfig):null,this.comments=H._handleComments(this.underlyingConfig),this.characterPair=new l(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new h.az(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.GB(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,w.v)(I,M,1)},11521:function(e,t,i){"use strict";i.d(t,{W6:function(){return l},vH:function(){return c}});var n=i(14374),s=i(80670),o=i(56419),r=i(5940),a=i(16434);const l=new class{constructor(){this._onDidChangeLanguages=new s.vl,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t>>0,new n.rY(i,null===t?s:t)}},38364:function(e,t,i){"use strict";function n(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n);let r=n;for(;r+10&&e.getLanguageId(a-1)===o;)a--;return new s(e,o,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{BQ:function(){return n},Yo:function(){return o}});class s{constructor(e,t,i,n,s,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=o,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function o(e){return!!(3&e)}},38884:function(e,t,i){"use strict";i.d(t,{V:function(){return a},WR:function(){return c},no:function(){return r}});var n=i(43920),s=i(38364),o=i(44425);class r{constructor(e,t,i){this._indentRulesSupport=t,this._indentationLineProcessor=new l(e,i)}shouldIncrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(i)}shouldDecrease(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(i)}shouldIgnore(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(i)}shouldIndentNextLine(e,t){const i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(i)}}class a{constructor(e,t){this.model=e,this.indentationLineProcessor=new l(e,t)}getProcessedTokenContextAroundRange(e){return{beforeRangeProcessedTokens:this._getProcessedTokensBeforeRange(e),afterRangeProcessedTokens:this._getProcessedTokensAfterRange(e),previousLineProcessedTokens:this._getProcessedPreviousLineTokens(e)}}_getProcessedTokensBeforeRange(e){this.model.tokenization.forceTokenization(e.startLineNumber);const t=this.model.tokenization.getLineTokens(e.startLineNumber),i=(0,s.BQ)(t,e.startColumn-1);let n;if(c(this.model,e.getStartPosition())){const s=e.startColumn-1-i.firstCharOffset,o=i.firstCharOffset,r=o+s;n=t.sliceAndInflate(o,r,0)}else{const i=e.startColumn-1;n=t.sliceAndInflate(0,i,0)}return this.indentationLineProcessor.getProcessedTokens(n)}_getProcessedTokensAfterRange(e){const t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);const i=this.model.tokenization.getLineTokens(t.lineNumber),n=(0,s.BQ)(i,t.column-1),o=t.column-1-n.firstCharOffset,r=n.firstCharOffset+o,a=n.firstCharOffset+n.getLineLength(),l=i.sliceAndInflate(r,a,0);return this.indentationLineProcessor.getProcessedTokens(l)}_getProcessedPreviousLineTokens(e){this.model.tokenization.forceTokenization(e.startLineNumber);const t=this.model.tokenization.getLineTokens(e.startLineNumber),i=(0,s.BQ)(t,e.startColumn-1),n=o.f.createEmpty("",i.languageIdCodec),r=e.startLineNumber-1;if(0===r)return n;if(0!==i.firstCharOffset)return n;const a=(e=>{this.model.tokenization.forceTokenization(e);const t=this.model.tokenization.getLineTokens(e),i=this.model.getLineMaxColumn(e)-1;return(0,s.BQ)(t,i)})(r);if(i.languageId!==a.languageId)return n;const l=a.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(l)}}class l{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){this.model.tokenization.forceTokenization?.(e);const i=this.model.tokenization.getLineTokens(e);let s=this.getProcessedTokens(i).getLineContent();return void 0!==t&&(s=((e,t)=>{const i=n.UU(e);return t+e.substring(i.length)})(s,t)),s}getProcessedTokens(e){const t=e.getLanguageId(0),i=this.languageConfigurationService.getLanguageConfiguration(t).bracketsNew.getBracketRegExp({global:!0}),n=[];return e.forEach((t=>{const s=e.getStandardTokenType(t);let o=e.getTokenText(t);(e=>2===e||3===e||1===e)(s)&&(o=o.replace(i,""));const r=e.getMetadata(t);n.push({text:o,metadata:r})})),o.f.createFromTextAndMetadata(n,e.languageIdCodec)}}function c(e,t){e.tokenization.forceTokenization(t.lineNumber);const i=e.tokenization.getLineTokens(t.lineNumber),n=(0,s.BQ)(i,t.column-1),o=0===n.firstCharOffset,r=i.getLanguageId(0)===n.languageId;return!o&&!r}},82848:function(e,t,i){"use strict";i.d(t,{Fu:function(){return p},az:function(){return a},xb:function(){return u}});var n=i(43920),s=i(52192),o=i(40393);class r{constructor(e,t,i,n,s,o){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=o,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[s,o]=t;return i===s||i===o||n===s||n===o},s=(e,n)=>{const s=Math.min(e,n),o=Math.max(e,n);for(let e=0;e0&&o.push({open:s,close:r})}return o}(t);this.brackets=i.map(((t,n)=>new r(e,n,t.open,t.close,function(e,t,i,n){let s=[];s=s.concat(e),s=s.concat(t);for(let e=0,t=s.length;e=0&&n.push(t);for(const t of o.close)t.indexOf(e)>=0&&n.push(t)}}function c(e,t){return e.length-t.length}function d(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function h(e){const t=/^[\w ]+$/.test(e);return e=n.bm(e),t?`\\b${e}\\b`:e}function u(e,t){const i=`(${e.map(h).join(")|(")})`;return n.OS(i,!0,t)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return s.b7().decode(t)}(e)),t}}();class p{static _findPrevBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=i.length-(s.index||0),a=s[0].length,l=n+r;return new o.Q(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const o=g(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,o,n)}static findNextBracketInText(e,t,i,n){const s=i.match(e);if(!s)return null;const r=s.index||0,a=s[0].length;if(0===a)return null;const l=n+r;return new o.Q(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}},55878:function(e,t,i){"use strict";i.d(t,{Yj:function(){return l},s0:function(){return c}});var n=i(43920),s=i(44425),o=i(35720),r=i(5032);const a={getInitialState:()=>r.r3,tokenizeEncoded:(e,t,i)=>(0,r.Lh)(0,i)};async function l(e,t,i){if(!i)return d(t,e.languageIdCodec,a);const n=await o.dG.getOrCreate(i);return d(t,e.languageIdCodec,n||a)}function c(e,t,i,n,s,o,r){let a="
    ",l=n,c=0,d=!0;for(let h=0,u=t.getCount();h0;)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,u>s||l>=s)break}return a+="
    ",a}function d(e,t,i){let o='
    ';const r=n.uz(e);let a=i.getInitialState();for(let e=0,l=r.length;e0&&(o+="
    ");const c=i.tokenizeEncoded(l,!0,a);s.f.convertToEndOffset(c.tokens,l.length);const d=new s.f(c.tokens,l,t).inflate();let h=0;for(let e=0,t=d.getCount();e${n.ih(l.substring(h,i))}`,h=i}a=c.endState}return o+="
    ",o}},62067:function(e,t,i){"use strict";i.d(t,{A5:function(){return n},Dg:function(){return l},F4:function(){return u},L5:function(){return h},VW:function(){return o},Wo:function(){return d},X2:function(){return a},ZS:function(){return s},nk:function(){return c},vd:function(){return g}});var n,s,o,r=i(49134);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(s||(s={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(o||(o={}));class a{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,r.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function c(e){return e&&"function"==typeof e.read}class d{constructor(e,t,i,n,s,o){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=o}}class h{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class u{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function g(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},14799:function(e,t,i){"use strict";i.d(t,{Gc:function(){return v},Nn:function(){return l},Xw:function(){return c},rh:function(){return _},yF:function(){return m}});var n=i(20187),s=i(39841),o=i(91727),r=i(24536);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,o.QB)(n,t.length)),i&&(n=(0,o.QB)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.gV.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,s){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,o.QB)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class c extends a{static create23(e,t,i,n=!1){let s=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(s=(0,o.QB)(s,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");s=(0,o.QB)(s,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new h(s,e.listHeight+1,e,t,i,r):new d(s,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(o.Vp,0,[],r.gV.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;if(0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){const e=t.childrenLength;if(0===e)throw new n.D7;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n{const t=n.Q.lift(e.range);return new o((0,s.VL)(t.getStartPosition()),(0,s.VL)(t.getEndPosition()),(0,s.rR)(e.text))})).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${(0,s.l4)(this.startOffset)}...${(0,s.l4)(this.endOffset)}) -> ${(0,s.l4)(this.newLength)}`}}class r{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>a.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:(0,s.MS)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,s.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,s.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=(0,s.l4)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,s.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,s.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdxfunction(e){let t=(0,n.bm)(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class c{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},60824:function(e,t,i){"use strict";i.d(t,{M:function(){return r}});var n=i(97358),s=i(96750),o=i(91727);function r(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new n.j3(l(e)),r=l(t);r.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let c=i.dequeue();function d(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return c&&e.unshift(c),e}const t=[];for(;c&&!(0,o.Vh)(e);){const[n,s]=c.splitAt(e);t.push(n),e=(0,o.MS)(n.lengthAfter,e),c=s??i.dequeue()}return(0,o.Vh)(e)||t.push(new a(!1,e,e)),t}const h=[];function u(e,t,i){if(h.length>0&&(0,o.wP)(h[h.length-1].endOffset,e)){const e=h[h.length-1];h[h.length-1]=new s.c(e.startOffset,t,(0,o.QB)(e.newLength,i))}else h.push({startOffset:e,endOffset:t,newLength:i})}let g=o.Vp;for(const e of r){const t=d(e.lengthBefore);if(e.modified){const i=(0,o.pW)(t,(e=>e.lengthBefore)),n=(0,o.QB)(g,i);u(g,n,e.lengthAfter),g=n}else for(const e of t){const t=g;g=(0,o.QB)(g,e.lengthBefore),e.modified&&u(t,g,e.lengthAfter)}}return h}class a{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=(0,o.MS)(e,this.lengthAfter);return(0,o.wP)(t,o.Vp)?[this,void 0]:this.modified?[new a(this.modified,this.lengthBefore,e),new a(this.modified,o.Vp,t)]:[new a(this.modified,e,e),new a(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${(0,o.l4)(this.lengthBefore)} -> ${(0,o.l4)(this.lengthAfter)}`}}function l(e){const t=[];let i=o.Vp;for(const n of e){const e=(0,o.MS)(i,n.startOffset);(0,o.Vh)(e)||t.push(new a(!1,e,e));const s=(0,o.MS)(n.startOffset,n.endOffset);t.push(new a(!0,s,n.newLength)),i=n.endOffset}return t}},91727:function(e,t,i){"use strict";i.d(t,{C7:function(){return r},MS:function(){return _},QB:function(){return p},Qx:function(){return y},VL:function(){return C},Vh:function(){return l},Vp:function(){return a},eu:function(){return u},l4:function(){return h},o0:function(){return w},pW:function(){return f},qe:function(){return d},rR:function(){return S},sS:function(){return g},vr:function(){return b},wP:function(){return m},zG:function(){return v}});var n=i(43920),s=i(40393),o=i(13233);function r(e,t,i,n){return e!==i?d(i-e,n):d(0,n-t)}const a=0;function l(e){return 0===e}const c=2**26;function d(e,t){return e*c+t}function h(e){const t=e,i=Math.floor(t/c),n=t-i*c;return new o.W(i,n)}function u(e){return Math.floor(e/c)}function g(e){return e}function p(e,t){let i=e+t;return t>=c&&(i-=e%c),i}function f(e,t){return e.reduce(((e,i)=>p(e,t(i))),a)}function m(e,t){return e===t}function _(e,t){const i=e,n=t;if(n-i<=0)return a;const s=Math.floor(i/c),o=Math.floor(n/c),r=n-o*c;return s===o?d(0,r-(i-s*c)):d(o-s,r)}function v(e,t){return e=t}function C(e){return d(e.lineNumber-1,e.column-1)}function y(e,t){const i=e,n=Math.floor(i/c),o=i-n*c,r=t,a=Math.floor(r/c),l=r-a*c;return new s.Q(n+1,o+1,a+1,l+1)}function S(e){const t=(0,n.uz)(e);return d(t.length-1,t[t.length-1].length)}},4138:function(e,t,i){"use strict";i.d(t,{T:function(){return g}});var n=i(14799),s=i(96750),o=i(24536),r=i(91727);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const s=i>>1;for(let o=0;o=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function c(e,t){return e.listHeight===t.listHeight?n.Xw.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const s=[];let o;for(;;){if(t.listHeight===i.listHeight){o=t;break}if(4!==i.kind)throw new Error("unexpected");s.push(i),i=i.makeLastElementMutable()}for(let e=s.length-1;e>=0;e--){const t=s[e];o?t.childrenLength>=3?o=n.Xw.create23(t.unappendChild(),o,null,!1):(t.appendChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?n.Xw.create23(e,o,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const s=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");s.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=s.length-1;e>=0;e--){const t=s[e];o?t.childrenLength>=3?o=n.Xw.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?n.Xw.create23(o,e,null,!1):e}(t,e)}class d{constructor(e){this.lastOffset=r.Vp,this.nextNodes=[e],this.offsets=[r.Vp],this.idxs=[]}readLongestNodeAt(e,t){if((0,r.zG)(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=u(this.nextNodes);if(!i)return;const n=u(this.offsets);if((0,r.zG)(e,n))return;if((0,r.zG)(n,e))if((0,r.QB)(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=h(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=h(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=u(this.offsets),t=u(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=u(this.nextNodes),n=h(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,r.QB)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function h(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function u(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){return new p(e,t,i,n).parseDocument()}class p{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new d(i):void 0,this.positionMapper=new s.W(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(o.gV.getEmpty(),0);return e||(e=n.Xw.getEmpty()),e}parseList(e,t){const i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),s=i();if(!s)return n;for(let e=i();e;e=i())l(n,s)<=l(s,e)?(n=c(n,s),s=e):s=c(s,e);return c(n,s)}(i):a(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!(0,r.Vh)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!(null!==t&&!(0,r.zG)(i.length,t))&&i.canBeReused(e)));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new n.Gc(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new n.yF(i.length);const s=e.merge(i.bracketIds),o=this.parseList(s,t+1),r=this.tokenizer.peek();return r&&2===r.kind&&(r.bracketId===i.bracketId||r.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),n.Nn.create(i.astNode,o,r.astNode)):n.Nn.create(i.astNode,o,null)}default:throw new Error("unexpected")}}}},24536:function(e,t,i){"use strict";i.d(t,{FD:function(){return o},Mg:function(){return r},gV:function(){return s}});const n=[];class s{static{this.cache=new Array(129)}static create(e,t){if(e<=128&&0===t.length){let i=s.cache[e];return i||(i=new s(e,t),s.cache[e]=i),i}return new s(e,t)}static{this.empty=s.create(0,n)}static getEmpty(){return this.empty}constructor(e,t){this.items=e,this.additionalItems=t}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,o=n.getCount();let a=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(0,r.C7)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.gV.getEmpty(),new o.yF(n))}}class h{constructor(e,t){this.text=e,this._offset=r.Vp,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,s=[];let c,d=0,h=0,u=0,g=0;const p=[];for(let e=0;e<60;e++)p.push(new l((0,r.qe)(0,e),0,-1,a.gV.getEmpty(),new o.yF((0,r.qe)(0,e))));const f=[];for(let e=0;e<60;e++)f.push(new l((0,r.qe)(1,e),0,-1,a.gV.getEmpty(),new o.yF((0,r.qe)(1,e))));if(n)for(n.lastIndex=0;null!==(c=n.exec(e));){const e=c.index,i=c[0];if("\n"===i)d++,h=e+1;else{if(u!==e){let t;if(g===d){const i=e-u;if(i0&&(this.changes=(0,a.x)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.Sw(e,t?t.length:0,i),i+=4,t)for(const n of t)l.Sw(e,n.selectionStartLineNumber,i),i+=4,l.Sw(e,n.selectionStartColumn,i),i+=4,l.Sw(e,n.positionLineNumber,i),i+=4,l.Sw(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.bb(e,t);t+=4;for(let s=0;se.toString())).join(", ")}matchesResource(e){return(r.r.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof h}append(e,t,i,n,s){this._data instanceof h&&this._data.append(e,t,i,n,s)}close(){this._data instanceof h&&(this._data=this._data.serialize())}open(){this._data instanceof h||(this._data=h.deserialize(this._data))}undo(){if(r.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r.r.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof h&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=d(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=d(e);return this._editStackElementsMap.has(t)}setModel(e){const t=d(r.r.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=d(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,s){const o=d(e.uri);this._editStackElementsMap.get(o).append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=d(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${(0,c.P8)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){return"\n"===e.getEOL()?0:1}function f(e){return!!e&&(e instanceof u||e instanceof g)}class m{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(f(i)&&i.canAppend(this._model))return i;const s=new u(n.kg("edit","Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(s,t),s}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const s=this._getOrCreateEditStackElement(e,n),o=this._model.applyEdits(t,!0),r=m._computeCursorState(i,o),a=o.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),s.append(this._model,a.map((e=>e.textChange)),p(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,s.dz)(e),null}}}},49374:function(e,t,i){"use strict";i.d(t,{P:function(){return h},k:function(){return u}});var n=i(64429),s=i(43920),o=i(39841),r=i(40393),a=i(97997),l=i(43573),c=i(79007),d=i(20187);class h extends a._{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,l.G)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new d.D7("Illegal value for lineNumber");const s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide);let r=-2,a=-1,l=-2,c=-1;const h=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let u=-2,g=-1,p=-2,f=-1;const m=e=>{if(-2===u){u=-1,g=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){u=t,g=e;break}}}if(-1!==p&&(-2===p||p=0){p=t,f=e;break}}}};let _=0,v=!0,b=0,w=!0,C=0,y=0;for(let s=0;v||w;s++){const r=e-s,d=e+s;s>1&&(r<1||r1&&(d>n||d>i)&&(w=!1),s>5e4&&(v=!1,w=!1);let p=-1;if(v&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,c=e,p=Math.ceil(e/this.textModel.getOptions().indentSize)):(h(r),p=this._getIndentLevelForWhitespaceLine(o,a,c))}let S=-1;if(w&&d<=n){const e=this._computeIndentLevel(d-1);e>=0?(u=d-1,g=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(d),S=this._getIndentLevelForWhitespaceLine(o,g,f))}if(0!==s){if(1===s){if(d<=n&&S>=0&&y+1===S){v=!1,_=d,b=d,C=S;continue}if(r>=1&&p>=0&&p-1===y){w=!1,_=r,b=r,C=p;continue}if(_=e,b=e,C=y,0===C)return{startLineNumber:_,endLineNumber:b,indent:C}}v&&(p>=C?_=r:v=!1),w&&(S>=C?b=d:w=!1)}else y=p}return{startLineNumber:_,endLineNumber:b,indent:C}}getLinesBracketGuides(e,t,i,o){const a=[];for(let i=e;i<=t;i++)a.push([]);const l=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new r.Q(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let d;if(i&&l.length>0){const s=(e<=i.lineNumber&&i.lineNumber<=t?l:this.textModel.bracketPairs.getBracketPairsInRange(r.Q.fromPositions(i)).toArray()).filter((e=>r.Q.strictContainsPosition(e.range,i)));d=(0,n.Uk)(s,(e=>true))?.range}const h=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,g=new u;for(const i of l){if(!i.closingBracketRange)continue;const n=d&&i.range.equalsRange(d);if(!n&&!o.includeInactive)continue;const r=g.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,h)+(o.highlightActive&&n?" "+g.activeClassName:""),l=i.openingBracketRange.getStartPosition(),u=i.closingBracketRange.getStartPosition(),p=o.horizontalGuides===c.N6.Enabled||o.horizontalGuides===c.N6.EnabledForActive&&n;if(i.range.startLineNumber===i.range.endLineNumber){p&&a[i.range.startLineNumber-e].push(new c.TH(-1,i.openingBracketRange.getEndPosition().column,r,new c.pv(!1,u.column),-1,-1));continue}const f=this.getVisibleColumnFromPosition(u),m=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),_=Math.min(m,f,i.minVisibleColumnIndentation+1);let v=!1;s.HG(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))=e&&m>_&&a[l.lineNumber-e].push(new c.TH(_,-1,r,new c.pv(!1,l.column),-1,-1)),u.lineNumber<=t&&f>_&&a[u.lineNumber-e].push(new c.TH(_,-1,r,new c.pv(!v,u.column),-1,-1)))}for(const e of a)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return a}getVisibleColumnFromPosition(e){return o.A.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),s=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(s&&s.offSide),r=new Array(t-e+1);let a=-2,l=-1,c=-2,d=-1;for(let s=e;s<=t;s++){const t=s-e,h=this._computeIndentLevel(s-1);if(h>=0)a=s-1,l=h,r[t]=Math.ceil(h/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=s-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,l,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,s.j)(e),t=(0,s.j)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,s.j)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,s=0,o=0;for(;t<=i;)if(n=t+(i-t)/2|0,s=this.prefixSum[n],o=s-this.values[n],e=s))break;t=n+1}return new a(n,e-o)}}class r{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.nK)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;nnew k.c((0,L.qe)(e.fromLineNumber-1,0),(0,L.qe)(e.toLineNumber,0),(0,L.qe)(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=k.c.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=(0,I.M)(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,I.M)(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new N.tk(this.textModel,this.brackets);return(0,D.T)(s,e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=(0,L.qe)(e.startLineNumber-1,e.startColumn-1),s=(0,L.qe)(e.endLineNumber-1,e.endColumn-1);return new n.c1((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens;P(n,L.Vp,n.length,i,s,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=(0,L.VL)(e.getStartPosition()),s=(0,L.VL)(e.getEndPosition());return new n.c1((e=>{const n=this.initialAstWithoutTokens||this.astWithTokens,o=new A(e,t,this.textModel);O(n,L.Vp,n.length,i,s,o,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return R(t,L.Vp,t.length,(0,L.VL)(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return T(t,L.Vp,t.length,(0,L.VL)(e))}}function T(e,t,i,n){if(4===e.kind||2===e.kind){const s=[];for(const n of e.children)i=(0,L.QB)(t,n.length),s.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=s.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:o}=s[t];if((0,L.zG)(i,n)){const s=T(e.children[t],i,o,n);if(s)return s}}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,L.Qx)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function R(e,t,i,n){if(4===e.kind||2===e.kind){for(const s of e.children){if(i=(0,L.QB)(t,s.length),(0,L.zG)(n,i)){const e=R(s,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=(0,L.Qx)(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function P(e,t,i,n,s,o,r,a,l,c,d=!1){if(r>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let d=0;d200)return!0;let l=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const d=(0,L.QB)(t,e.openingBracket.length);let h=-1;if(o.includeMinIndentation&&(h=e.computeMinIndentation(t,o.textModel)),l=o.push(new S((0,L.Qx)(t,i),(0,L.Qx)(t,d),e.closingBracket?(0,L.Qx)((0,L.QB)(d,e.child?.length||L.Vp),i):void 0,r,c,e,h)),t=d,l&&e.child){const c=e.child;if(i=(0,L.QB)(t,c.length),(0,L.vr)(t,s)&&(0,L.o0)(i,n)&&(l=O(c,t,i,n,s,o,r+1,a),!l))return!1}a?.set(e.openingBracket.text,c)}else{let i=t;for(const t of e.children){const e=i;if(i=(0,L.QB)(i,t.length),(0,L.vr)(e,s)&&(0,L.vr)(n,i)&&(l=O(t,e,i,n,s,o,r,a),!l))return!1}}return l}class F extends a.jG{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.HE),this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1}handleLanguageConfigurationServiceChange(e){e.languageId&&!this.bracketPairsTree.value?.object.didLanguageChange(e.languageId)||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){this.bracketPairsTree.value?.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){this.bracketPairsTree.value?.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const i=new a.Cm;this.bracketPairsTree.value=(e=i.add(new M(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>t?.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!1)||n.c1.empty}getBracketPairsInRangeWithMinIndentation(e){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(e,!0)||n.c1.empty}getBracketsInRange(e,t=!1){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(e,t)||n.c1.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),s=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(g.Q.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),o=this.languageConfigurationService.getLanguageConfiguration(s).brackets;if(!o)return null;const r=o.textIsBracket[t];return r?H(this._findMatchingBracketUp(r,n,B(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(g.Q.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy((0,n.VE)((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),g.Q.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=B(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),o=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if((0,b.Yo)(t.getStandardTokenType(e))||t.getLanguageId(e)!==o){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,b.Yo)(t.getStandardTokenType(e))||t.getLanguageId(e)!==o){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),s=this.textModel.getLineContent(i),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(o)).brackets;if(r&&!(0,b.Yo)(n.getStandardTokenType(o))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,o),c=null;for(;;){const n=w.Fu.findNextBracketInRange(r.forwardRegex,i,s,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=s.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof W)return null;c=i}}a=n.endColumn-1}if(c)return c}if(o>0&&n.getStartOffset(o)===e.column-1){const r=o-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!(0,b.Yo)(n.getStandardTokenType(r))){const{searchStartOffset:o,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),c=w.Fu.findPrevBracketInRange(a.reversedRegex,i,s,o,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=s.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),i=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof W?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof W?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,s=e.reversedRegex;let o=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return W.INSTANCE;const c=w.Fu.findPrevBracketInRange(s,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.tokenization.getLineTokens(e),s=i.getCount(),o=this.textModel.getLineContent(e);let r=s-1,l=o.length,c=o.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!(0,b.Yo)(i.getStandardTokenType(r));if(t)d?l=i.getStartOffset(r):(l=i.getStartOffset(r),c=i.getEndOffset(r));else if(d&&l!==c){const t=a(e,o,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,o,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,s=e.forwardRegex;let o=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return W.INSTANCE;const c=w.Fu.findNextBracketInRange(s,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?o++:e.isClose(d)&&o--,0===o)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.tokenization.getLineTokens(e),s=i.getCount(),o=this.textModel.getLineContent(e);let r=0,l=0,c=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r=1;e--){const o=this.textModel.tokenization.getLineTokens(e),r=o.getCount(),a=this.textModel.getLineContent(e);let l=r-1,c=a.length,d=a.length;if(e===t.lineNumber){l=o.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1;const e=o.getLanguageId(l);i!==e&&(i=e,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew)}let h=!0;for(;l>=0;l--){const t=o.getLanguageId(l);if(i!==t){if(n&&s&&h&&c!==d){const t=w.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(s,t);h=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets,s=this.languageConfigurationService.getLanguageConfiguration(i).bracketsNew}const r=!!n&&!(0,b.Yo)(o.getStandardTokenType(l));if(r)h?c=o.getStartOffset(l):(c=o.getStartOffset(l),d=o.getEndOffset(l));else if(s&&n&&h&&c!==d){const t=w.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(s,t)}h=r}if(s&&n&&h&&c!==d){const t=w.Fu.findPrevBracketInRange(n.reversedRegex,e,a,c,d);if(t)return this._toFoundBracket(s,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(t)||null;const i=this.textModel.getLineCount();let n=null,s=null,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this.textModel.tokenization.getLineTokens(e),r=i.getCount(),a=this.textModel.getLineContent(e);let l=0,c=0,d=0;if(e===t.lineNumber){l=i.findTokenIndexAtOffset(t.column-1),c=t.column-1,d=t.column-1;const e=i.getLanguageId(l);n!==e&&(n=e,s=this.languageConfigurationService.getLanguageConfiguration(n).brackets,o=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let h=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=B(t),s=this.textModel.getLineCount(),o=new Map;let r=[];const a=(e,t)=>{if(!o.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(n&&++l%100==0&&!n())return W.INSTANCE;const a=w.Fu.findNextBracketInRange(e.forwardRegex,t,i,s,o);if(!a)break;const c=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?r[d.index]++:d.isClose(c)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,n);s=a.endColumn-1}return null};let d=null,h=null;for(let e=i.lineNumber;e<=s;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),s=this.textModel.getLineContent(e);let o=0,r=0,l=0;if(e===i.lineNumber){o=t.findTokenIndexAtOffset(i.column-1),r=i.column-1,l=i.column-1;const e=t.getLanguageId(o);d!==e&&(d=e,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,h))}let u=!0;for(;o!0;{const t=Date.now();return()=>Date.now()-t<=e}}class W{static{this.INSTANCE=new W}constructor(){this._searchCanceledBrand=void 0}}function H(e){return e instanceof W?null:e}var V=i(99851),z=i(40616);class U extends a.jG{constructor(e){super(),this.textModel=e,this.colorProvider=new j,this.onDidChangeEmitter=new r.vl,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){return n||void 0===t?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray():[]}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new g.Q(1,1,this.textModel.getLineCount(),1),e,t):[]}}class j{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,z.zy)(((e,t)=>{const i=[V.sN,V.lQ,V.ss,V.l5,V.sH,V.zp],n=new j;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(V.s7)}; }`);const s=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));var q=i(38428),K=i(49374);class ${constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function G(e,t,i,n,s){let o;for(s.spacesDiff=0,s.looksLikeAlignment=!1,o=0;o0&&a>0)return;if(l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(r-l);if(0===d)return s.spacesDiff=h,void(h>0&&0<=l-1&&l-10?s++:f>1&&o++,G(r,a,h,p,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;const _=d.spacesDiff;_<=8&&c[_]++,r=h,a=p}let h=i;s!==o&&(h=s{const i=c[t];i>e&&(e=i,u=t)})),4===u&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function Y(e){return(1&e.metadata)>>>0}function Z(e,t){e.metadata=254&e.metadata|t}function X(e){return(2&e.metadata)>>>1==1}function J(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function ee(e){return(4&e.metadata)>>>2==1}function te(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function ie(e){return(64&e.metadata)>>>6==1}function ne(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function se(e,t){e.metadata=231&e.metadata|t<<3}function oe(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class re{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Z(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,te(this,!1),ne(this,!1),se(this,1),oe(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,J(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;te(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),ne(this,null!==this.options.glyphMarginClassName),se(this,this.options.stickiness),oe(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const ae=new re(null,0,0);ae.parent=ae,ae.left=ae,ae.right=ae,Z(ae,0);class le{constructor(){this.root=ae,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s,o){return this.root===ae?[]:function(e,t,i,n,s,o,r){let a=e.root,l=0,c=0,d=0,h=0;const u=[];let g=0;for(;a!==ae;)if(X(a))J(a.left,!1),J(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!X(a.left)){if(c=l+a.maxEnd,ci)J(a,!0);else{if(h=l+a.end,h>=t){a.setCachedOffsets(d,h,o);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),s&&ee(a)&&(e=!1),r&&!ie(a)&&(e=!1),e&&(u[g++]=a)}J(a,!0),a.right===ae||X(a.right)||(l+=a.delta,a=a.right)}}return J(e.root,!1),u}(this,e,t,i,n,s,o)}search(e,t,i,n){return this.root===ae?[]:function(e,t,i,n,s){let o=e.root,r=0,a=0,l=0;const c=[];let d=0;for(;o!==ae;){if(X(o)){J(o.left,!1),J(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==ae&&!X(o.left)){o=o.left;continue}a=r+o.start,l=r+o.end,o.setCachedOffsets(a,l,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&ee(o)&&(e=!1),s&&!ie(o)&&(e=!1),e&&(c[d++]=o),J(o,!0),o.right===ae||X(o.right)||(r+=o.delta,o=o.right)}return J(e.root,!1),c}(this,e,t,i,n)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let s=0;for(;i!==ae;)X(i)?(J(i.left,!1),J(i.right,!1),i=i.parent):i.left===ae||X(i.left)?(i.ownerId===t&&(n[s++]=i),J(i,!0),i.right===ae||X(i.right)||(i=i.right)):i=i.left;return J(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==ae;)X(t)?(J(t.left,!1),J(t.right,!1),t=t.parent):t.left===ae||X(t.left)?t.right===ae||X(t.right)?(i[n++]=t,J(t,!0)):t=t.right:t=t.left;return J(e.root,!1),i}(this)}insert(e){he(this,e),this._normalizeDeltaIfNecessary()}delete(e){ue(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,o=i.end+n;i.setCachedOffsets(s,o,t)}acceptReplace(e,t,i,n){const s=function(e,t,i){let n=e.root,s=0,o=0,r=0,a=0;const l=[];let c=0;for(;n!==ae;)if(X(n))J(n.left,!1),J(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;else{if(!X(n.left)){if(o=s+n.maxEnd,oi?J(n,!0):(a=s+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[c++]=n),J(n,!0),n.right===ae||X(n.right)||(s+=n.delta,n=n.right))}return J(e.root,!1),l}(this,e,e+t);for(let e=0,t=s.length;ei?(s.start+=l,s.end+=l,s.delta+=l,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0),J(s,!0)):(J(s,!0),s.right===ae||X(s.right)||(o+=s.delta,s=s.right))}J(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let o=0,r=s.length;oi)&&1!==n&&(2===n||t)}function de(e,t,i,n,s){const o=function(e){return(24&e.metadata)>>>3}(e),r=0===o||2===o,a=1===o||2===o,l=i-t,c=n,d=Math.min(l,c),h=e.start;let u=!1;const g=e.end;let p=!1;t<=h&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=s?1:l>0?2:0;!u&&ce(h,r,t,e)&&(u=!0),!p&&ce(g,a,t,e)&&(p=!0)}if(d>0&&!s){const e=l>c?2:0;!u&&ce(h,r,t+d,e)&&(u=!0),!p&&ce(g,a,t+d,e)&&(p=!0)}{const n=s?1:0;!u&&ce(h,r,i,n)&&(e.start=t+c,u=!0),!p&&ce(g,a,i,n)&&(e.end=t+c,p=!0)}const f=c-l;u||(e.start=Math.max(0,h+f)),p||(e.end=Math.max(0,g+f)),e.start>e.end&&(e.end=e.start)}function he(e,t){if(e.root===ae)return t.parent=ae,t.left=ae,t.right=ae,Z(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const s=t.start,o=t.end;for(;;)if(r=s,a=o,l=n.start+i,c=n.end+i,(r===l?a-c:r-l)<0){if(n.left===ae){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===ae){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var r,a,l,c;t.parent=n,t.left=ae,t.right=ae,Z(t,1)}(e,t),ve(t.parent);let i=t;for(;i!==e.root&&1===Y(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===Y(t)?(Z(i.parent,0),Z(t,0),Z(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,pe(e,i)),Z(i.parent,0),Z(i.parent.parent,1),fe(e,i.parent.parent))}else{const t=i.parent.parent.left;1===Y(t)?(Z(i.parent,0),Z(t,0),Z(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,fe(e,i)),Z(i.parent,0),Z(i.parent.parent,1),pe(e,i.parent.parent))}return Z(e.root,0),t}function ue(e,t){let i,n;if(t.left===ae?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===ae?(i=t.left,n=t):(n=function(e){for(;e.left!==ae;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,Z(i,0),t.detach(),ge(),_e(i),void(e.root.parent=ae);const s=1===Y(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,Z(n,Y(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==ae&&(n.left.parent=n),n.right!==ae&&(n.right.parent=n)),t.detach(),s)return ve(i.parent),n!==t&&(ve(n),ve(n.parent)),void ge();let o;for(ve(i),ve(i.parent),n!==t&&(ve(n),ve(n.parent));i!==e.root&&0===Y(i);)i===i.parent.left?(o=i.parent.right,1===Y(o)&&(Z(o,0),Z(i.parent,1),pe(e,i.parent),o=i.parent.right),0===Y(o.left)&&0===Y(o.right)?(Z(o,1),i=i.parent):(0===Y(o.right)&&(Z(o.left,0),Z(o,1),fe(e,o),o=i.parent.right),Z(o,Y(i.parent)),Z(i.parent,0),Z(o.right,0),pe(e,i.parent),i=e.root)):(o=i.parent.left,1===Y(o)&&(Z(o,0),Z(i.parent,1),fe(e,i.parent),o=i.parent.left),0===Y(o.left)&&0===Y(o.right)?(Z(o,1),i=i.parent):(0===Y(o.left)&&(Z(o.right,0),Z(o,1),pe(e,o),o=i.parent.left),Z(o,Y(i.parent)),Z(i.parent,0),Z(o.left,0),fe(e,i.parent),i=e.root));Z(i,0),ge()}function ge(){ae.parent=ae,ae.delta=0,ae.start=0,ae.end=0}function pe(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==ae&&(i.left.parent=t),i.parent=t.parent,t.parent===ae?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,_e(t),_e(i)}function fe(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==ae&&(i.right.parent=t),i.parent=t.parent,t.parent===ae?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,_e(t),_e(i)}function me(e){let t=e.end;if(e.left!==ae){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==ae){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function _e(e){e.maxEnd=me(e)}function ve(e){for(;e!==ae;){const t=me(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class be{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==we)return Ce(this.right);let e=this;for(;e.parent!==we&&e.parent.left!==e;)e=e.parent;return e.parent===we?we:e.parent}prev(){if(this.left!==we)return ye(this.left);let e=this;for(;e.parent!==we&&e.parent.right!==e;)e=e.parent;return e.parent===we?we:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const we=new be(null,0);function Ce(e){for(;e.left!==we;)e=e.left;return e}function ye(e){for(;e.right!==we;)e=e.right;return e}function Se(e){return e===we?0:e.size_left+e.piece.length+Se(e.right)}function ke(e){return e===we?0:e.lf_left+e.piece.lineFeedCnt+ke(e.right)}function xe(){we.parent=we}function Le(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==we&&(i.left.parent=t),i.parent=t.parent,t.parent===we?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function De(e,t){const i=t.left;t.left=i.right,i.right!==we&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===we?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Ee(e,t){let i,n;if(t.left===we?(n=t,i=n.right):t.right===we?(n=t,i=n.left):(n=Ce(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),xe(),void(e.root.parent=we);const s=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Me(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Me(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==we&&(n.left.parent=n),n.right!==we&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Me(e,n)),t.detach(),i.parent.left===i){const t=Se(i),n=ke(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const s=t-i.parent.size_left,o=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,Ie(e,i.parent,s,o)}}if(Me(e,i.parent),s)return void xe();let o;for(;i!==e.root&&0===i.color;)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,Le(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,De(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,Le(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,De(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,Le(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,De(e,i.parent),i=e.root));i.color=0,xe()}function Ne(e,t){for(Me(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Le(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,De(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&De(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Le(e,t.parent.parent))}e.root.color=0}function Ie(e,t,i,n){for(;t!==e.root&&t!==we;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Me(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=Se((t=t.parent).left)-t.size_left,n=ke(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}we.parent=we,we.left=we,we.right=we,we.color=0;var Te=i(58980);const Re=65535;function Pe(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Ae{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function Oe(e,t=!0){const i=[0];let n=1;for(let t=0,s=e.length;t(e!==we&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class He{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class Ve{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Be("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=we,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=Oe(e[t].buffer));const i=new Fe(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new He(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",s=0;const o=[];if(this.iterate(this.root,(r=>{const a=this.getNodeContent(r),l=a.length;if(s<=t||s+l0){const t=n.replace(/\r\n|\r|\n/g,e);o.push(new Be(t,Oe(t)))}this.create(o,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new We(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==we;)if(n.left!==we&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==we;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){const e=n-this.getOffsetAt(i+1,1);return new u.y(i+1,e+1)}return new u.y(i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===we){const t=n-e-this.getOffsetAt(i+1,1);return new u.y(i+1,t+1)}t=t.right}return new u.y(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(s+e.remainder,s+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let o=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==we;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){o+=e.substring(n,n+t.remainder);break}o+=e.substr(n,i.piece.length),i=i.next()}return o}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(s=>{if(s===we)return!0;const o=s.piece;let r=o.length;if(0===r)return!0;const a=this._buffers[o.bufferIndex].buffer,l=this._buffers[o.bufferIndex].lineStarts,c=o.start.line,d=o.end.line;let h=l[c]+o.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(c===d)return this._EOLNormalized||13!==a.charCodeAt(h+r-1)?i+=a.substr(h,r):(n=!0,i+=a.substr(h,r-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[c+1]-this._EOLLength)):a.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+p,t.reset(0)):(v=h.buffer,b=e=>e,t.reset(p));do{if(m=t.next(v),m){if(b(m.index)>=f)return c;this.positionInBuffer(e,b(m.index)-u,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,s,_),o=_.line===s.line?_.column-s.column+n:_.column+1,r=o+m[0].length;if(d[c++]=(0,Te.dr)(new g.Q(i+t,o,i+t,r),m,a),b(m.index)+m[0].length>=f)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,i,n){const s=[];let o=0;const r=new Te.W5(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,c,d,t,i,n,o,s),s;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[c.line+l],p=h===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(u,r,h,p,c,this.positionInBuffer(u,g-d),t,i,n,o,s),o>=n)return s;h+=l}const d=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(d,e.endColumn-1);return o=this._findMatchesInLine(t,r,a,e.endLineNumber,d,o,s,i,n),s}if(o=this._findMatchesInLine(t,r,this.getLineContent(h).substr(d),h,d,o,s,i,n),o>=n)return s;h++,a=this.nodeAt2(h,1),u=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){const a=h===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(h).substring(a,e.endColumn-1);return o=this._findMatchesInLine(t,r,l,e.endLineNumber,a,o,s,i,n),s}const g=h===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(l.node,r,h,g,c,d,t,i,n,o,s),s}_findMatchesInLine(e,t,i,n,s,o,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let h=-a;for(;-1!==(h=i.indexOf(t,h+a));)if((!c||(0,Te.wC)(c,i,d,h,a))&&(r[o++]=new v.Dg(new g.Q(n,h+1+s,n,h+1+a+s),null),o>=l))return o;return o}let d;t.reset(0);do{if(d=t.next(i),d&&(r[o++]=(0,Te.dr)(new g.Q(n,d.index+1+s,n,d.index+1+d[0].length+s),d,a),o>=l))return o}while(d);return o}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==we){const{node:i,remainder:n,nodeStartOffset:s}=this.nodeAt(e),o=i.piece,r=o.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&s+o.length===e&&t.lengthe){const e=[];let s=new Fe(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),this.offsetInBuffer(r,o.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){const e={line:s.start.line+1,column:0};s=new Fe(s.bufferIndex,e,s.end,this.getLineFeedCnt(s.bufferIndex,e,s.end),s.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){const s=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,s),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);s.length>0&&this.rbInsertRight(i,s);let c=i;for(let e=0;e=0;e--)s=this.rbInsertLeft(s,n[e]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let s=n;for(let e=1;e=d))break;a=c+1}return i?(i.line=c,i.column=r-h,null):{line:c,column:r-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const s=n[i.line+1],o=n[i.line]+i.column;if(s>o+1)return i.line-t.line;const r=o-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tRe){const t=[];for(;e.length>Re;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,Re),e=e.substring(Re));const s=Oe(n);t.push(new Fe(this._buffers.length,{line:0,column:0},{line:s.length-1,column:n.length-s[s.length-1]},s.length-1,n.length)),this._buffers.push(new Be(n,s))}const i=Oe(e);return t.push(new Fe(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new Be(e,i)),t}let t=this._buffers[0].buffer.length;const i=Oe(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return s+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:s,nodeStartLineNumber:o-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),s=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=s.substring(o+t,o+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,s+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==we;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(i,0),o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(o,o+s-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==we;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==s)return{index:t,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),o=t,r=this.offsetInBuffer(i.bufferIndex,o),a=this.getLineFeedCnt(i.bufferIndex,i.start,o),l=a-n,c=r-s,d=i.length+c;e.piece=new Fe(i.bufferIndex,i.start,o,a,d),Ie(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),o=t,r=this.getLineFeedCnt(i.bufferIndex,o,i.end),a=r-n,l=s-this.offsetInBuffer(i.bufferIndex,o),c=i.length+l;e.piece=new Fe(i.bufferIndex,o,i.end,r,c),Ie(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,s=n.start,o=n.end,r=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new Fe(n.bufferIndex,n.start,l,c,d),Ie(this,e,d-r,c-a);const h=new Fe(n.bufferIndex,i,o,this.getLineFeedCnt(n.bufferIndex,i,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=Oe(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==we;)if(i.left!==we&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2),o=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,o),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==we;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===we||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n!==i.length-1&&(!(i[n+1]>s+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(s))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==we&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let s;s=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new Fe(e.piece.bufferIndex,e.piece.start,s,r,o),Ie(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Fe(t.piece.bufferIndex,a,t.piece.end,c,l),Ie(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const p=this._doApplyEdits(a);let f=null;if(t&&u.length>0){u.sort(((e,t)=>t.lineNumber-e.lineNumber)),f=[];for(let e=0,t=u.length;e0&&u[e-1].lineNumber===t)continue;const i=u[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.HG(n)&&f.push(t)}}return this._onDidChangeContent.fire(),new v.F4(g,p,f)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new g.Q(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,r=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),o=s.endLineNumber,r=s.endColumn}const l=a.join(""),[c,h,u]=(0,d.W)(l);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Ue._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;c=1===e?new g.Q(a,l,a,l+r.firstLineLength):new g.Q(a,l,a+e-1,r.lastLineLength+1)}else c=new g.Q(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),s=r}return t}static _sortOpsAscending(e,t){const i=g.Q.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=g.Q.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class je{constructor(e,t,i,n,s,o,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,s=0,o=0,r=!0;for(let a=0,l=t.length;a126)&&(r=!1)}const a=new Ae(Pe(e),n,s,o,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new Be(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=l.E_(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.$X(e)))}finish(e=!0){return this._finish(),new je(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=Oe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Ke=i(80487),$e=i(86506),Ge=i(35720),Qe=i(97997),Ye=i(90890),Ze=i(79783),Xe=i(43857),Je=i(28376),et=i(5032);class tt{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),s=this._store.slice(e+t),o=function(e,t){const i=[];for(let n=0;n=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new it(e,[t]))}finalize(){return this._tokens}}var st=i(44425);class ot{constructor(e,t){this.tokenizationSupport=t,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new at(e)}getStartState(e){return this.store.getStartState(e,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}class rt extends ot{constructor(e,t,i,n){super(e,t),this._textModel=i,this._languageIdCodec=n}updateTokensUntilLine(e,t){const i=this._textModel.getLanguageId();for(;;){const n=this.getFirstInvalidLine();if(!n||n.lineNumber>t)break;const s=this._textModel.getLineContent(n.lineNumber),o=dt(this._languageIdCodec,i,this.tokenizationSupport,s,!0,n.startState);e.add(n.lineNumber,o.tokens),this.store.setEndState(n.lineNumber,o.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),s=this._textModel.getLineContent(e.lineNumber),o=s.substring(0,e.column-1)+t+s.substring(e.column-1),r=dt(this._languageIdCodec,n,this.tokenizationSupport,o,!0,i),a=new st.f(r.tokens,o,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,s=e.column,o=this.getStartState(n);if(!o)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,s-1)+i+r.substring(s-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),c=dt(this._languageIdCodec,l,this.tokenizationSupport,a,!0,o);return new st.f(c.tokens,a,this._languageIdCodec)}hasAccurateTokensForLine(e){return e1&&s>=1;s--){const e=this._textModel.getLineFirstNonWhitespaceColumn(s);if(0!==e&&e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class ct{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new Je.L(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new Je.L(i.start,e):this._ranges.splice(t,1,new Je.L(i.start,e),new Je.L(e+1,i.endExclusive))}}addRange(e){Je.L.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function dt(e,t,i,n,s,r){let a=null;if(i)try{a=i.tokenizeEncoded(n,s,r.clone())}catch(e){(0,o.dz)(e)}return a||(a=(0,et.Lh)(e.encodeLanguageId(t),r)),st.f.convertToEndOffset(a.tokens,n.length),a}class ht{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,(0,Ye.$6)((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){const t=this._tokenizerWithStateStore?.getFirstInvalidLine();return t?(this._tokenizerWithStateStore.updateTokensUntilLine(e,t.lineNumber),t.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Ke.M(e,t))}}class ut{constructor(){this._onDidChangeVisibleRanges=new r.vl,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new gt((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class gt{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new Ke.M(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}class pt extends a.jG{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Ye.uC((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,n.aI)(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class ft extends a.jG{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(e,t,i){super(),this._languageIdCodec=e,this._textModel=t,this.getLanguageId=i,this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new r.vl),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}}class mt extends ft{constructor(e,t,i,n){super(t,i,n),this._treeSitterService=e,this._tokenizationSupport=null,this._initialize()}_initialize(){const e=this.getLanguageId();this._tokenizationSupport&&this._lastLanguageId===e||(this._lastLanguageId=e,this._tokenizationSupport=Ge.OB.get(e))}getLineTokens(e){const t=this._textModel.getLineContent(e);if(this._tokenizationSupport){const i=this._tokenizationSupport.tokenizeEncoded(e,this._textModel);if(i)return new st.f(i,t,this._languageIdCodec)}return st.f.createEmpty(t,this._languageIdCodec)}resetTokenization(e=!0){e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]}),this._initialize()}handleDidChangeAttached(){}handleDidChangeContent(e){e.isFlush&&this.resetTokenization(!1)}forceTokenization(e){}hasAccurateTokensForLine(e){return!0}isCheapToTokenize(e){return!0}getTokenTypeIfInsertingCharacter(e,t,i){return 0}tokenizeLineWithEdit(e,t,i){return null}get hasTokens(){return void 0!==this._treeSitterService.getParseResult(this._textModel)}}var _t=i(10948);const vt=new Uint32Array(0).buffer;class bt{static deleteBeginning(e,t){return null===e||e===vt?e:bt.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===vt)return e;const i=wt(e),n=i[i.length-2];return bt.delete(e,t,n)}static delete(e,t,i){if(null===e||e===vt||t===i)return e;const n=wt(e),s=n.length>>>1;if(0===t&&n[n.length-2]===i)return vt;const o=st.f.findIndexInTokensArray(n,t),r=o>0?n[o-1<<1]:0;if(il&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const d=new Uint32Array(a);return d.set(n.subarray(0,a),0),d.buffer}static append(e,t){if(t===vt)return e;if(e===vt)return t;if(null===e)return e;if(null===t)return null;const i=wt(e),n=wt(t),s=n.length>>>1,o=new Uint32Array(i.length+n.length);o.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e>>1;let o=st.f.findIndexInTokensArray(n,t);o>0&&n[o-1<<1]===t&&o--;for(let e=o;e0}getTokens(e,t,i){let n=null;if(t1&&(t=Ct.x.getLanguageId(n[1])!==e),!t)return vt}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=St(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=bt.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=bt.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=bt.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=bt.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=bt.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,s=e.length;n>>0}class kt{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),s=t[t.length-1].getRange();if(!n||!s)return e;i=e.plusRange(n).plusRange(s)}let s=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){s=s||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){s=s||{index:e};continue}const[o,r]=n.split(i);o.isEmpty()?s=s||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,o,r),e++,t++,s=s||{index:e})}return s=s||{index:this._pieces.length},t.length>0&&(this._pieces=n.nK(this._pieces,s.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=i[kt._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const s=t.getCount(),o=n.getCount();let r=0;const a=[];let l=0,c=0;const d=(e,t)=>{e!==c&&(c=e,a[l++]=e,a[l++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;rt)){for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}n=s-1}}return i}acceptEdit(e,t,i,n,s){for(const o of this._pieces)o.acceptEdit(e,t,i,n,s)}}var xt,Lt=function(e,t){return function(i,n){t(i,n,e)}};let Dt=xt=class extends Qe._{constructor(e,t,i,n,s,o,l){super(),this._textModel=e,this._bracketPairsTextModelPart=t,this._languageId=i,this._attachedViews=n,this._languageService=s,this._languageConfigurationService=o,this._treeSitterService=l,this._semanticTokens=new kt(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new r.vl),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new r.vl),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new r.vl),this.onDidChangeTokens=this._onDidChangeTokens.event,this._tokensDisposables=this._register(new a.Cm),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(r.Jh.filter(Ge.OB.onDidChange,(e=>e.changedLanguages.includes(this._languageId)))((()=>{this.createPreferredTokenProvider()}))),this.createPreferredTokenProvider()}createGrammarTokens(){return this._register(new Et(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews))}createTreeSitterTokens(){return this._register(new mt(this._treeSitterService,this._languageService.languageIdCodec,this._textModel,(()=>this._languageId)))}createTokens(e){const t=void 0!==this._tokens;this._tokens?.dispose(),this._tokens=e?this.createTreeSitterTokens():this.createGrammarTokens(),this._tokensDisposables.clear(),this._tokensDisposables.add(this._tokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._tokensDisposables.add(this._tokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))),t&&this._tokens.resetTokenization()}createPreferredTokenProvider(){Ge.OB.get(this._languageId)?this._tokens instanceof mt||this.createTokens(!0):this._tokens instanceof Et||this.createTokens(!1)}handleLanguageConfigurationServiceChange(e){e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=(0,d.W)(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this._tokens.handleDidChangeContent(e)}handleDidChangeAttached(){this._tokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this._tokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new o.D7("Illegal value for lineNumber")}get hasTokens(){return this._tokens.hasTokens}resetTokenization(){this._tokens.resetTokenization()}get backgroundTokenizationState(){return this._tokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this._tokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this._tokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this._tokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this._tokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this._tokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this._tokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[o,r]=xt._findLanguageBoundaries(n,s),a=(0,$e.Th)(t.column,this.getLanguageConfiguration(n.getLanguageId(s)).getWordDefinition(),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(s>0&&o===t.column-1){const[o,r]=xt._findLanguageBoundaries(n,s-1),a=(0,$e.Th)(t.column,this.getLanguageConfiguration(n.getLanguageId(s-1)).getWordDefinition(),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let s=t;s>=0&&e.getLanguageId(s)===i;s--)n=e.getStartOffset(s);let s=e.getLineContent().length;for(let n=t,o=e.getCount();n=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Lt(4,m.L),Lt(5,_.JZ),Lt(6,_t.ITreeSitterParserService)],Dt);class Et extends ft{constructor(e,t,i,n){super(e,t,i),this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new a.HE),this._tokens=new yt(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new a.HE),this._attachedViewStates=this._register(new a.$w),this._register(Ge.dG.onDidChange((e=>{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new pt((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){this._tokens.flush(),this._debugBackgroundTokens?.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new at(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[t,i]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=Ge.dG.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return(0,o.dz)(e),[null,null]}return[e,t]})();if(this._tokenizer=t&&i?new rt(this._textModel.getLineCount(),t,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{2!==this._backgroundTokenizationState&&(this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire())},setEndState:(e,t)=>{if(!this._tokenizer)return;const i=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==i&&e>=i&&this._tokenizer?.store.setEndState(e,t)}};t&&t.createBackgroundTokenizer&&!t.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=t.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new ht(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),t?.backgroundTokenizerShouldOnlyVerifyTokens&&t.createBackgroundTokenizer?(this._debugBackgroundTokens=new yt(this._languageIdCodec),this._debugBackgroundStates=new at(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=t.createBackgroundTokenizer(this._textModel,{setTokens:e=>{this._debugBackgroundTokens?.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{this._debugBackgroundStates?.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){this._defaultBackgroundTokenizer?.handleChanges()}handleDidChangeContent(e){if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const t of e.changes){const[e,i]=(0,d.W)(t.text);this._tokens.acceptEdit(t.range,e,i),this._debugBackgroundTokens?.acceptEdit(t.range,e,i)}this._debugBackgroundStates?.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),this._defaultBackgroundTokenizer?.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Ke.M.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const i=new nt,{heuristicTokens:n}=this._tokenizer.tokenizeHeuristically(i,e,t),s=this.setTokens(i.finalize());if(n)for(const e of s.changes)this._backgroundTokenizer.value?.requestTokens(e.fromLineNumber,e.toLineNumber+1);this._defaultBackgroundTokenizer?.checkFinished()}forceTokenization(e){const t=new nt;this._tokenizer?.updateTokensUntilLine(t,e),this.setTokens(t.finalize()),this._defaultBackgroundTokenizer?.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}getLineTokens(e){const t=this._textModel.getLineContent(e),i=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,t);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const n=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,t);!i.equals(n)&&this._debugBackgroundTokenizer.value?.reportMismatchingTokens&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return i}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new u.y(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}var Nt,It=i(40699),Mt=i(63619),Tt=i(79911),Rt=function(e,t){return function(i,n){t(i,n,e)}};function Pt(e,t){let i;return i="string"==typeof e?function(e){const t=new qe;return t.acceptChunk(e),t.finish()}(e):v.nk(e)?function(e){const t=new qe;let i;for(;"string"==typeof(i=e.read());)t.acceptChunk(i);return t.finish()}(e):e,i.create(t)}let At=0;class Ot{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Ft=()=>{throw new Error("Invalid change accessor")};let Bt=class extends a.jG{static{Nt=this}static{this._MODEL_SYNC_LIMIT=52428800}static{this.LARGE_FILE_SIZE_THRESHOLD=20971520}static{this.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5}static{this.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456}static{this.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:f.R.tabSize,indentSize:f.R.indentSize,insertSpaces:f.R.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:f.R.trimAutoWhitespace,largeFileOptimizations:f.R.largeFileOptimizations,bracketPairColorizationOptions:f.R.bracketPairColorizationOptions}}static resolveOptions(e,t){if(t.detectIndentation){const i=Q(e,t.tabSize,t.insertSpaces);return new v.X2({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new v.X2(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,a.qE)(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,s,o,d,h){super(),this._undoRedoService=s,this._languageService=o,this._languageConfigurationService=d,this.instantiationService=h,this._onWillDispose=this._register(new r.vl),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Zt((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new r.vl),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new r.vl),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new r.vl),this._eventEmitter=this._register(new Xt),this._languageSelectionListener=this._register(new a.HE),this._deltaDecorationCallCnt=0,this._attachedViews=new ut,At++,this.id="$model"+At,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource=null==n?c.r.parse("inmemory://model/"+At):n,this._attachedEditorCount=0;const{textBuffer:u,disposable:p}=Pt(e,i.defaultEOL);this._buffer=u,this._bufferDisposable=p,this._options=Nt.resolveOptions(this._buffer,i);const f="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new F(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new K.P(this,this._languageConfigurationService)),this._decorationProvider=this._register(new U(this)),this._tokenizationTextModelPart=this.instantiationService.createInstance(Dt,this,this._bracketPairs,f,this._attachedViews);const m=this._buffer.getLineCount(),_=this._buffer.getValueLengthInRange(new g.Q(1,1,m,this._buffer.getLineLength(m)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=_>Nt.LARGE_FILE_SIZE_THRESHOLD||m>Nt.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=_>Nt.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=_>Nt._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=l.tk(At),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Vt,this._commandManager=new q.z8(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(f),this._register(this._languageConfigurationService.onDidChange((e=>{this._bracketPairs.handleLanguageConfigurationServiceChange(e),this._tokenizationTextModelPart.handleLanguageConfigurationServiceChange(e)})))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new Ue([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.jG.None}_assertNotDisposed(){if(this._isDisposed)throw new o.D7("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new It.Ic(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw(0,o.Qg)();const{textBuffer:t,disposable:i}=Pt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,o,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Vt,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new It.HP([new It.Wn],this._versionId,!1,!1),this._createContentChanged2(new g.Q(1,1,s,o),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new It.HP([new It.mS],this._versionId,!1,!1),this._createContentChanged2(new g.Q(1,1,s,o),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,s=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new v.X2({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:o});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=Q(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,h.P)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l._J.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new o.D7("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Ot(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new o.D7("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new o.D7("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s=Math.floor("number"!=typeof i||isNaN(i)?1:i),o=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(s<1)s=1,o=1;else if(s>t)s=t,o=this.getLineMaxColumn(s);else if(o<=1)o=1;else{const e=this.getLineMaxColumn(s);o>=e&&(o=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===s&&n===o&&r===l&&a===c&&e instanceof g.Q&&!(e instanceof p.L)?e:new g.Q(s,o,l,c)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(l.pc(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),s=Math.floor("number"!=typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(n<1)return new u.y(1,1);if(n>o)return new u.y(o,this.getLineMaxColumn(o));if(s<=1)return new u.y(n,1);const r=this.getLineMaxColumn(n);if(s>=r)return new u.y(n,r);if(1===i){const e=this._buffer.getLineCharCode(n,s-2);if(l.pc(e))return new u.y(n,s-1)}return new u.y(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof u.y&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(s,o,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,r=l.pc(e),a=l.pc(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof g.Q&&!(e instanceof p.L)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,s=t.column,o=i.lineNumber,r=i.column;{const e=s>1?this._buffer.getLineCharCode(n,s-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,i=l.pc(e),a=l.pc(t);return i||a?n===o&&s===r?new g.Q(n,s-1,o,r-1):i&&a?new g.Q(n,s-1,o,r+1):i?new g.Q(n,s-1,o,r):new g.Q(n,s,o,r+1):new g.Q(n,s,o,r)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new g.Q(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,o,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>g.Q.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>g.Q.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new Te.lt(e,i,n,s).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,o,r)}else c=t=>Te.hB.findMatches(this,new Te.lt(e,i,n,s),t,o,r);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new Te.lt(e,i,n,s).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new g.Q(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,o,1);return Te.hB.findNextMatch(this,new Te.lt(e,i,n,s),r,o),c.length>0?c[0]:(l=new g.Q(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),c=this.findMatchesLineByLine(l,t,o,1),c.length>0?c[0]:null)}return Te.hB.findNextMatch(this,new Te.lt(e,i,n,s),r,o)}findPreviousMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);return Te.hB.findPreviousMatch(this,new Te.lt(e,i,n,s),r,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof v.Wo?e:new v.Wo(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,s=e.length;ts.endLineNumber,r=s.startLineNumber>t.endLineNumber;if(!n&&!r){o=!0;break}}if(!o){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===s&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){o=!1;break}}if(o){const e=new g.Q(n,1,n,s);t.push(new v.Wo(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const s=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new g.Q(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new g.Q(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),s=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),r=s.changes;if(this._trimAutoWhitespaceLines=s.trimAutoWhitespaceLineNumbers,0!==r.length){for(let e=0,t=r.length;e=0;t--){const i=l+t,n=m+t;C.takeFromEndWhile((e=>e.lineNumber>n));const s=C.takeFromEndWhile((e=>e.lineNumber===n));e.push(new It.U0(i,this.getLineContent(n),s))}if(pe.lineNumbere.lineNumber===t))}e.push(new It.bg(s+1,l+g,d,c))}t+=f}this._emitContentChangedEvent(new It.HP(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:r,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===s.reverseEdits?void 0:s.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new It.U0(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new It.vn(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Yt(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){(0,o.dz)(e)}return i.addDecoration=Ft,i.changeDecoration=Ft,i.changeDecorationOptions=Ft,i.removeDecoration=Ft,i.deltaDecorations=Ft,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,o.dz)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Qt[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),r=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,r,s),n.setOptions(Qt[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,s=!1,o=!1){const r=this.getLineCount(),a=Math.min(r,Math.max(1,e)),l=Math.min(r,Math.max(1,t)),c=this.getLineMaxColumn(l),d=new g.Q(a,1,l,c),h=this._getDecorationsInRange(d,i,s,o);return(0,n.E4)(h,this._decorationProvider.getDecorationsInRange(d,i,s)),h}getDecorationsInRange(e,t=0,i=!1,s=!1,o=!1){const r=this.validateRange(e),a=this._getDecorationsInRange(r,t,i,o);return(0,n.E4)(a,this._decorationProvider.getDecorationsInRange(r,t,i,s)),a}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return It.uK.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const s=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,s,o,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),o=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),s=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const o=n!==s,r=function(e){return!!e.after||!!e.before}(t)!==Ht(i);o||r?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const s=this.getVersionId(),o=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const c=new Array(a);for(;rthis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function Wt(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Ht(e){return!!e.options.after||!!e.options.before}Bt=Nt=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Rt(4,Tt.$D),Rt(5,m.L),Rt(6,_.JZ),Rt(7,Mt._Y)],Bt);class Vt{constructor(){this._decorationsTree0=new le,this._decorationsTree1=new le,this._injectedTextDecorationsTree=new le}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s,o){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,s,r,o);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,s,o){const r=this._decorationsTree0.intervalSearch(e,t,i,n,s,o),a=this._decorationsTree1.intervalSearch(e,t,i,n,s,o),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s,o);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),o=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,s,!1);return this._ensureNodesHaveRanges(e,o).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,s){const o=e.getVersionId(),r=this._search(t,i,n,o,s);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,s){if(i)return this._decorationsTree1.search(e,t,n,s);{const i=this._decorationsTree0.search(e,t,n,s),o=this._decorationsTree1.search(e,t,n,s),r=this._injectedTextDecorationsTree.search(e,t,n,s);return i.concat(o).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){Ht(e)?this._injectedTextDecorationsTree.insert(e):Wt(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Ht(e)?this._injectedTextDecorationsTree.delete(e):Wt(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Ht(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Wt(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function zt(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Ut{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class jt extends Ut{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:v.A5.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class qt{constructor(e){this.position=e?.position??v.ZS.Center,this.persistLane=e?.persistLane}}class Kt extends Ut{constructor(e){super(e),this.position=e.position,this.sectionHeaderStyle=e.sectionHeaderStyle??null,this.sectionHeaderText=e.sectionHeaderText??null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?s.Q1.fromHex(e):t.getColor(e.id)}}class $t{static from(e){return e instanceof $t?e:new $t(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class Gt{static register(e){return new Gt(e)}static createDynamic(e){return new Gt(e)}constructor(e){this.description=e.description,this.blockClassName=e.blockClassName?zt(e.blockClassName):null,this.blockDoesNotCollapse=e.blockDoesNotCollapse??null,this.blockIsAfterEnd=e.blockIsAfterEnd??null,this.blockPadding=e.blockPadding??null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?zt(e.className):null,this.shouldFillLineOnLineBreak=e.shouldFillLineOnLineBreak??null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new jt(e.overviewRuler):null,this.minimap=e.minimap?new Kt(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new qt(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?zt(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?zt(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?zt(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?l.jy(e.linesDecorationsTooltip):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?zt(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?zt(e.marginClassName):null,this.inlineClassName=e.inlineClassName?zt(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?zt(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?zt(e.afterContentClassName):null,this.after=e.after?$t.from(e.after):null,this.before=e.before?$t.from(e.before):null,this.hideInCommentTokens=e.hideInCommentTokens??!1,this.hideInStringTokens=e.hideInStringTokens??!1}}Gt.EMPTY=Gt.register({description:"empty"});const Qt=[Gt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Gt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Gt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Gt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Yt(e){return e instanceof Gt?e:Gt.createDynamic(e)}class Zt extends a.jG{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new r.vl),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||=!!e.minimap?.position,this._affectsOverviewRuler||=!!e.overviewRuler?.color,this._affectsGlyphMargin||=!!e.glyphMarginClassName,this._affectsLineNumber||=!!e.lineNumberClassName,this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class Xt extends a.jG{constructor(){super(),this._fastEmitter=this._register(new r.vl),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new r.vl),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},97997:function(e,t,i){"use strict";i.d(t,{_:function(){return s}});var n=i(35114);class s extends n.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}},58980:function(e,t,i){"use strict";i.d(t,{W5:function(){return g},dr:function(){return c},hB:function(){return h},lt:function(){return l},wC:function(){return u}});var n=i(43920),s=i(59810),o=i(62993),r=i(40393),a=i(62067);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.L5(t,this.wordSeparators?(0,s.i)(this.wordSeparators,[]):null,i?this.searchString:null)}}function c(e,t,i){if(!i)return new a.Dg(e,null);const n=[];for(let e=0,i=t.length;e=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class h{static findMatches(e,t,i,n,s){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new g(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let a,l,c=0;if(n?(c=n.findLineFeedCountBeforeOffset(s),a=t+s+c):a=t+s,n){const e=n.findLineFeedCountBeforeOffset(s+o.length)-c;l=a+o.length+e}else l=a+o.length;const d=e.getPositionAt(a),h=e.getPositionAt(l);return new r.Q(d.lineNumber,d.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,s){const o=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new d(r):null,l=[];let h,u=0;for(i.reset(0);h=i.next(r);)if(l[u++]=c(this._getMultilineMatchRange(e,o,r,a,h.index,h[0]),h,n),u>=s)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,s){const o=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s),o}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s);for(let a=t.startLineNumber+1;a=d))return s;return s}const p=new g(e.wordSeparators,e.regex);let f;p.reset(0);do{if(f=p.next(t),f&&(o[s++]=c(new r.Q(i,f.index+1+n,i,f.index+1+f[0].length+n),f,l),s>=d))return s}while(f);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new g(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){const s=new o.y(t.lineNumber,1),a=e.getOffsetAt(s),l=e.getLineCount(),h=e.getValueInRange(new r.Q(s.lineNumber,s.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new d(h):null;i.reset(t.column-1);const g=i.next(h);return g?c(this._getMultilineMatchRange(e,a,h,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.y(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o),a=this._findFirstMatchInLine(i,r,o,t.column,n);if(a)return a;for(let t=1;t<=s;t++){const r=(o+t-1)%s,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const o=e.next(t);return o?c(new r.Q(i,o.index+1,i,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new g(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),i,n,9990);if(s.length>0)return s[s.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.y(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,o,n);if(a)return a;for(let t=1;t<=s;t++){const r=(s+o-t-1)%s,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let s,o=null;for(e.reset(0);s=e.next(t);)o=c(new r.Q(i,s.index+1,i,s.index+1+s[0].length),s,n);return o}}function u(e,t,i,n,s){return function(e,t,i,n,s){if(0===n)return!0;const o=t.charCodeAt(n-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,s)&&function(e,t,i,n,s){if(n+s===i)return!0;const o=t.charCodeAt(n+s);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n+s-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,s)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const s=i.index,o=i[0].length;if(s===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){n.Z5(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=o,!this._wordSeparators||u(this._wordSeparators,e,t,s,o))return i}while(i);return null}}},43573:function(e,t,i){"use strict";function n(e,t){let i=0,n=0;const s=e.length;for(;nt&&(t=o),s>i&&(i=s),r>i&&(i=r)}t++,i++;const n=new r(i,t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let l=null,c=null;class d{static _createLink(e,t,i,n,s){let o=s-1;do{const i=t.charCodeAt(o);if(2!==e.get(i))break;o--}while(o>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(o);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&o--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:o+2},url:t.substring(n,o+1)}}static computeLinks(e,t=function(){return null===l&&(l=new a([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),l}()){const i=function(){if(null===c){c=new o.V(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}var u=i(32919),g=i(8482),p=i(43857),f=i(18827),m=i(52049),_=i(17191),v=i(43920),b=i(93066),w=i(80487);class C{computeDiff(e,t,i){const n=new D(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[];let r=null;for(const e of n.changes){let t,i;t=0===e.originalEndLineNumber?new w.M(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new w.M(e.originalStartLineNumber,e.originalEndLineNumber+1),i=0===e.modifiedEndLineNumber?new w.M(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new w.M(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let n=new _.wm(t,i,e.charChanges?.map((e=>new _.q6(new s.Q(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new s.Q(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));r&&(r.modified.endLineNumberExclusive!==n.modified.startLineNumber&&r.original.endLineNumberExclusive!==n.original.startLineNumber||(n=new _.wm(r.original.join(n.original),r.modified.join(n.modified),r.innerChanges&&n.innerChanges?r.innerChanges.concat(n.innerChanges):void 0),o.pop())),o.push(n),r=n}return(0,b.Ft)((()=>(0,b.Xo)(o,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class x{constructor(e,t,i,n,s,o,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),o=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),c=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new x(n,s,o,r,a,l,c,d)}}class L{constructor(e,t,i,n,s){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=s}static createFromDiffResult(e,t,i,n,s,o,r){let a,l,c,d,h;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(c=n.getStartLineNumber(t.modifiedStart)-1,d=0):(c=n.getStartLineNumber(t.modifiedStart),d=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),o&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const o=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(o.getElements().length>0&&a.getElements().length>0){let e=y(o,a,s,!0).changes;r&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,s=e.length;n1&&r>1&&e.charCodeAt(i-2)===t.charCodeAt(r-2);)i--,r--;(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,i,o+1,1,r)}{let i=N(e,1),r=N(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-t[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,e.innerChanges?.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,t,i){const o=this._getModel(e);if(!o)return t;const r=[];let a;t=t.slice(0).sort(((e,t)=>e.range&&t.range?s.Q.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));let l=0;for(let e=1;eq._diffLimit){r.push({range:e,text:l});continue}const d=(0,n.F1)(t,l,i),h=o.offsetAt(s.Q.lift(e).getStartPosition());for(const e of d){const t=o.positionAt(h+e.originalStart),i=o.positionAt(h+e.originalStart+e.originalLength),n={text:l.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};o.getValueInRange(n.range)!==n.text&&r.push(n)}}return"number"==typeof a&&r.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r}async $computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?d.computeLinks(e):[]}(t):null}async $computeDefaultDocumentColors(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],i=V(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),s=i[1],o=i[2];if(!o)continue;let r;if("rgb"===s){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=W(F(e,n),V(o,t),!1)}else if("rgba"===s){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=W(F(e,n),V(o,t),!0)}else if("hsl"===s){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=H(F(e,n),V(o,t),!1)}else if("hsla"===s){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=H(F(e,n),V(o,t),!0)}else"#"===s&&(r=B(F(e,n),s+o));r&&t.push(r)}return t}(e):[]}(t):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,t,i,n){const s=new p.W,o=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(o))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>q._suggestionsLimit))break e}return{words:Array.from(r),duration:s.elapsed()}}async $computeWordRanges(e,t,i,n){const s=this._getModel(e);if(!s)return Object.create(null);const o=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;ethis._host.$fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(s,t),Promise.resolve((0,T.V0)(this._foreignModule))):new Promise(((n,o)=>{const r=e=>{this._foreignModule=e.create(s,t),n((0,T.V0)(this._foreignModule))};{const t=R.zl.asBrowserUri(`${e}.js`).toString(!0);i(52048)(`${t}`).then(r).catch(o)}}))}$fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}function K(e){return new q(g.EditorWorkerHost.getChannel(e),null)}"function"==typeof importScripts&&(globalThis.monaco=(0,u.createMonacoBaseAPI)())},56812:function(e,t,i){"use strict";i.r(t),i.d(t,{IEditorWorkerService:function(){return n}});const n=(0,i(63619).u1)("editorWorkerService")},8482:function(e,t,i){"use strict";i.r(t),i.d(t,{EditorWorkerHost:function(){return n}});class n{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(e){return e.getChannel(n.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(n.CHANNEL_NAME,t)}}},43359:function(e,t,i){"use strict";i.r(t),i.d(t,{findSectionHeaders:function(){return o}});const n=new RegExp("\\bMARK:\\s*(.*)$","d"),s=/^-+|-+$/g;function o(e,t){let i=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){const n=function(e,t){const i=[],n=e.getLineCount();for(let s=1;s<=n;s++){const n=e.getLineContent(s),o=n.match(t.foldingRules.markers.start);if(o){const e={startLineNumber:s,startColumn:o[0].length+1,endLineNumber:s,endColumn:n.length+1};if(e.endColumn>e.startColumn){const t={range:e,...a(n.substring(o[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&i.push(t)}}}return i}(e,t);i=i.concat(n)}if(t.findMarkSectionHeaders){const t=function(e){const t=[],i=e.getLineCount();for(let n=1;n<=i;n++)r(e.getLineContent(n),n,t);return t}(e);i=i.concat(t)}return i}function r(e,t,i){n.lastIndex=0;const s=n.exec(e);if(s){const e={startLineNumber:t,startColumn:s.indices[1][0]+1,endLineNumber:t,endColumn:s.indices[1][1]+1};if(e.endColumn>e.startColumn){const t={range:e,...a(s[1]),shouldBeInComments:!0};(t.text||t.hasSeparatorLine)&&i.push(t)}}}function a(e){const t=(e=e.trim()).startsWith("-");return{text:e=e.replace(s,""),hasSeparatorLine:t}}},32352:function(e,t,i){"use strict";i.r(t),i.d(t,{getIconClasses:function(){return d}});var n=i(84756),s=i(59951),o=i(54244),r=i(11521),a=i(65127),l=i(56613);const c=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function d(e,t,i,d,u){if(l.L.isThemeIcon(u))return[`codicon-${u.id}`,"predefined-file-icon"];if(o.r.isUri(u))return[];const g=d===a.p.ROOT_FOLDER?["rootfolder-icon"]:d===a.p.FOLDER?["folder-icon"]:["file-icon"];if(i){let o;if(i.scheme===n.ny.data)o=s.B6.parseMetaData(i).get(s.B6.META_DATA_LABEL);else{const e=i.path.match(c);e?(o=h(e[2].toLowerCase()),e[1]&&g.push(`${h(e[1].toLowerCase())}-name-dir-icon`)):o=h(i.authority.toLowerCase())}if(d===a.p.ROOT_FOLDER)g.push(`${o}-root-name-folder-icon`);else if(d===a.p.FOLDER)g.push(`${o}-name-folder-icon`);else{if(o){if(g.push(`${o}-name-file-icon`),g.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t(0,n.sN)(g.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?(0,o.qE)(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new o.mu(6),this._cache.set(i,n));const s=(0,o.qE)(n.update(t),this._min,this._max);return(0,d.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){const e=new o.Uq;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return(0,o.qE)(e,this._min,this._max)}}let m=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){const n=i?.min??50,s=i?.max??n**2,o=i?.key??void 0,r=`${g.of(e)},${n}${o?","+o:""}`;let a=this._data.get(r);return a||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),a=new p(1.5*n)):a=new f(this._logService,t,e,0|this._overallAverage()||1.5*n,n,s),this._data.set(r,a)),a}_overallAverage(){const e=new o.Uq;for(const t of this._data.values())e.update(t.default());return e.value}};m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([h(0,c.rr),h(1,r.k)],m),(0,a.v)(u,m,1)},69122:function(e,t,i){"use strict";i.r(t),i.d(t,{ILanguageFeaturesService:function(){return n}});const n=(0,i(63619).u1)("ILanguageFeaturesService")},18289:function(e,t,i){"use strict";i.r(t),i.d(t,{LanguageFeaturesService:function(){return g}});var n=i(80670),s=i(35114),o=i(62067),r=i(71543);function a(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(a):!!e.exclusive)}class l{constructor(e,t,i,n,s){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n,this.recursive=s}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class c{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new n.vl,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,s.s)((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e,t=!1){const i=[];return this._orderedForEach(e,t,(e=>i.push(e.provider))),i}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,!1,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t,i){this._updateScores(e,t);for(const e of this._entries)e._score>0&&i(e)}_updateScores(e,t){const i=this._notebookInfoResolver?.(e.uri),n=i?new l(e.uri,e.getLanguageId(),i.uri,i.type,t):new l(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(n)){this._lastCandidate=n;for(const i of this._entries)if(i._score=(0,r.f)(i.selector,n.uri,n.languageId,(0,o.vd)(e),n.notebookUri,n.notebookType),a(i.selector)&&i._score>0){if(!t){for(const e of this._entries)e._score=0;i._score=1e3;break}i._score=0}this._entries.sort(c._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:d(e.selector)&&!d(t.selector)?1:!d(e.selector)&&d(t.selector)?-1:e._timet._time?-1:0}}function d(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(d):Boolean(e.isBuiltin))}var h=i(69122),u=i(48682);class g{constructor(){this.referenceProvider=new c(this._score.bind(this)),this.renameProvider=new c(this._score.bind(this)),this.newSymbolNamesProvider=new c(this._score.bind(this)),this.codeActionProvider=new c(this._score.bind(this)),this.definitionProvider=new c(this._score.bind(this)),this.typeDefinitionProvider=new c(this._score.bind(this)),this.declarationProvider=new c(this._score.bind(this)),this.implementationProvider=new c(this._score.bind(this)),this.documentSymbolProvider=new c(this._score.bind(this)),this.inlayHintsProvider=new c(this._score.bind(this)),this.colorProvider=new c(this._score.bind(this)),this.codeLensProvider=new c(this._score.bind(this)),this.documentFormattingEditProvider=new c(this._score.bind(this)),this.documentRangeFormattingEditProvider=new c(this._score.bind(this)),this.onTypeFormattingEditProvider=new c(this._score.bind(this)),this.signatureHelpProvider=new c(this._score.bind(this)),this.hoverProvider=new c(this._score.bind(this)),this.documentHighlightProvider=new c(this._score.bind(this)),this.multiDocumentHighlightProvider=new c(this._score.bind(this)),this.selectionRangeProvider=new c(this._score.bind(this)),this.foldingRangeProvider=new c(this._score.bind(this)),this.linkProvider=new c(this._score.bind(this)),this.inlineCompletionsProvider=new c(this._score.bind(this)),this.inlineEditProvider=new c(this._score.bind(this)),this.completionProvider=new c(this._score.bind(this)),this.linkedEditingRangeProvider=new c(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new c(this._score.bind(this)),this.documentSemanticTokensProvider=new c(this._score.bind(this)),this.documentDropEditProvider=new c(this._score.bind(this)),this.documentPasteEditProvider=new c(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,u.v)(h.ILanguageFeaturesService,g,1)},31806:function(e,t,i){"use strict";i.r(t),i.d(t,{LanguageService:function(){return d}});var n=i(80670),s=i(35114),o=i(839),r=i(97358),a=i(35720),l=i(11521),c=i(73755);class d extends s.jG{static{this.instanceCount=0}constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new n.vl),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new n.vl),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new n.vl({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,d.instanceCount++,this._registry=this._register(new o.LanguagesRegistry(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){d.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){const i=this._registry.guessLanguageIdByFilepathOrFirstLine(e,t);return(0,r.Fy)(i,null)}createById(e){return new h(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new h(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=l.vH),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),a.dG.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}class h{constructor(e,t){this._value=(0,c.y0)(this,e,(()=>t())),this.onDidChange=n.Jh.fromObservable(this._value)}get languageId(){return this._value.get()}}},13640:function(e,t,i){"use strict";i.r(t),i.d(t,{clearPlatformLanguageAssociations:function(){return p},getLanguageIds:function(){return f},registerPlatformLanguageAssociation:function(){return g}});var n=i(90562),s=i(5940),o=i(84756),r=i(68847),a=i(59951),l=i(43920),c=i(11521);let d=[],h=[],u=[];function g(e,t=!1){!function(e,t,i){const s=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?(0,n.qg)(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(r.SA.sep)>=0}}(e);d.push(s),s.userConfigured?u.push(s):h.push(s),i&&!s.userConfigured&&d.forEach((e=>{e.mime===s.mime||e.userConfigured||(s.extension&&e.extension===s.extension&&console.warn(`Overwriting extension <<${s.extension}>> to now point to mime <<${s.mime}>>`),s.filename&&e.filename===s.filename&&console.warn(`Overwriting filename <<${s.filename}>> to now point to mime <<${s.mime}>>`),s.filepattern&&e.filepattern===s.filepattern&&console.warn(`Overwriting filepattern <<${s.filepattern}>> to now point to mime <<${s.mime}>>`),s.firstline&&e.firstline===s.firstline&&console.warn(`Overwriting firstline <<${s.firstline}>> to now point to mime <<${s.mime}>>`))}))}(e,0,t)}function p(){d=d.filter((e=>e.userConfigured)),h=[]}function f(e,t){return function(e,t){let i;if(e)switch(e.scheme){case o.ny.file:i=e.fsPath;break;case o.ny.data:i=a.B6.parseMetaData(e).get(a.B6.META_DATA_LABEL);break;case o.ny.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:s.K.unknown}];i=i.toLowerCase();const n=(0,r.P8)(i),g=m(i,n,u);if(g)return[g,{id:c.vH,mime:s.K.text}];const p=m(i,n,h);if(p)return[p,{id:c.vH,mime:s.K.text}];if(t){const e=function(e){if((0,l.LU)(e)&&(e=e.substr(1)),e.length>0)for(let t=d.length-1;t>=0;t--){const i=d[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}}(t);if(e)return[e,{id:c.vH,mime:s.K.text}]}return[{id:"unknown",mime:s.K.unknown}]}(e,t).map((e=>e.id))}function m(e,t,i){let n,s,o;for(let r=i.length-1;r>=0;r--){const a=i[r];if(t===a.filenameLowercase){n=a;break}if(a.filepattern&&(!s||a.filepattern.length>s.filepattern.length)){const i=a.filepatternOnPath?e:t;a.filepatternLowercase?.(i)&&(s=a)}a.extension&&(!o||a.extension.length>o.extension.length)&&t.endsWith(a.extensionLowercase)&&(o=a)}return n||s||o||void 0}},839:function(e,t,i){"use strict";i.r(t),i.d(t,{LanguageIdCodec:function(){return u},LanguagesRegistry:function(){return g}});var n=i(80670),s=i(35114),o=i(43920),r=i(13640),a=i(11521),l=i(16434),c=i(56419);const d=Object.prototype.hasOwnProperty,h="vs.editor.nullLanguage";class u{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(h,0),this._register(a.vH,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||h}}class g extends s.jG{static{this.instanceCount=0}constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,g.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new u,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(a.W6.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){g.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,r.clearPlatformLanguageAssociations)();const e=[].concat(a.W6.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),c.O.as(l.Fd.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;d.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const s of t.filenames)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,filename:s},this._warnOnOverwrite),e.filenames.push(s);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);(0,o.eY)(t)||(0,r.registerPlatformLanguageAssociation)({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(i){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,i)}}e.aliases.push(i);let s=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(s=0===t.aliases.length?[null]:t.aliases),null!==s)for(const t of s)t&&0!==t.length&&e.aliases.push(t);const a=null!==s&&s.length>0;if(a&&null===s[0]);else{const t=(a?s[0]:null)||i;!a&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&d.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return d.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&d.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?(0,r.getLanguageIds)(e,t):[]}}},12098:function(e,t,i){"use strict";i.r(t),i.d(t,{IMarkerDecorationsService:function(){return n}});const n=(0,i(63619).u1)("markerDecorationsService")},92903:function(e,t,i){"use strict";i.r(t),i.d(t,{MarkerDecorationsService:function(){return m}});var n=i(84119),s=i(35114),o=i(62067),r=i(40616),a=i(99851),l=i(59266),c=i(40393),d=i(84756),h=i(80670),u=i(4195),g=i(52732),p=i(34027),f=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.jG{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new h.vl),this._markerDecorations=new g.fT,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new _(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==d.ny.inMemory&&e.uri.scheme!==d.ny.internal&&e.uri.scheme!==d.ny.vscode||this._markerService?.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([f(0,l.IModelService),f(1,n.DR)],m);class _ extends s.jG{constructor(e){super(),this.model=e,this._map=new g.cO,this._register((0,s.s)((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:i}=(0,p.Z)(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===i.length)return!1;const n=i.map((e=>this._map.get(e))),s=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),o=this.model.deltaDecorations(n,s);for(const e of i)this._map.delete(e);for(let e=0;e=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new c.Q(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}}},59266:function(e,t,i){"use strict";i.r(t),i.d(t,{IModelService:function(){return n}});const n=(0,i(63619).u1)("modelService")},76583:function(e,t,i){"use strict";i.r(t),i.d(t,{DefaultModelSHA1Computer:function(){return k},ModelService:function(){return S}});var n,s=i(80670),o=i(35114),r=i(79783),a=i(49079),l=i(31634),c=i(11521),d=i(17492),h=i(47901),u=i(79911),g=i(65260),p=i(38428),f=i(84756),m=i(49134),_=i(63619),v=function(e,t){return function(i,n){t(i,n,e)}};function b(e){return e.toString()}class w{constructor(e,t,i){this.model=e,this._modelEventListeners=new o.Cm,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const C=r.j9||r.zx?1:2;class y{constructor(e,t,i,n,s,o,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=o,this.versionId=r,this.alternativeVersionId=a}}let S=class extends o.jG{static{n=this}static{this.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520}constructor(e,t,i,n){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._instantiationService=n,this._onModelAdded=this._register(new s.vl),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new s.vl),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new s.vl),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){let i=l.R.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=Math.max(t,1))}let s=l.R.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let o=C;const r=e.eol;"\r\n"===r?o=2:"\n"===r&&(o=1);let a=l.R.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=l.R.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=l.R.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=l.R.bracketPairColorizationOptions;return e.editor?.bracketPairColorization&&"object"==typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:s,detectIndentation:c,defaultEOL:o,trimAutoWhitespace:a,largeFileOptimizations:d,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,i){const s="string"==typeof e?e:e.languageId;let o=this._modelCreationOptionsByLanguageAndResource[s+t];if(!o){const e=this._configurationService.getValue("editor",{overrideIdentifier:s,resource:t}),r=this._getEOL(t,s);o=n._readModelOptions({editor:e,eol:r},i),this._modelCreationOptionsByLanguageAndResource[s+t]=o}return o}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let s=0,o=i.length;se){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t,i,n),o=this._instantiationService.createInstance(a.Bz,e,t,s,i);if(i&&this._disposedModels.has(b(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=this._getSHA1Computer(),s=!!n.canComputeSHA1(o)&&n.computeSHA1(o)===e.sha1;if(s||e.sharesUndoRedoStack){for(const e of t.past)(0,p.Th)(e)&&e.matchesResource(i)&&e.setModel(o);for(const e of t.future)(0,p.Th)(e)&&e.matchesResource(i)&&e.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,p.Th)(e)&&e.matchesResource(i))),s&&(o._overwriteVersionId(e.versionId),o._overwriteAlternativeVersionId(e.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=b(o.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const l=new w(o,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=l,l}createModel(e,t,i,n=!1){let s;return s=t?this._createModelData(e,t,i,n):this._createModelData(e,c.vH,i,n),this._onModelAdded.fire(s.model),s.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||t.future.length>0){for(const i of t.past)(0,p.Th)(i)&&i.matchesResource(e.uri)&&(o=!0,r+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)(0,p.Th)(i)&&i.matchesResource(e.uri)&&(o=!0,r+=i.heapSize(e.uri),i.setModel(e.uri))}}const a=n.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,l=this._getSHA1Computer();if(o)if(s||!(r>a)&&l.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>(0,p.Th)(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new y(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),s,r,l.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!s){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,s=e.getLanguageId(),o=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),r=this.getCreationOptions(s,e.uri,e.isForSimpleWidget);n._setModelOptionsForModel(e,r,o),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new k}};S=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([v(0,h.pG),v(1,d.ITextResourcePropertiesService),v(2,u.$D),v(3,_._Y)],S);class k{static{this.MAX_MODEL_SIZE=10485760}canComputeSHA1(e){return e.getValueLength()<=k.MAX_MODEL_SIZE}computeSHA1(e){const t=new g.v7,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}}},20878:function(e,t,i){"use strict";i.r(t),i.d(t,{ITextModelService:function(){return n}});const n=(0,i(63619).u1)("textModelService")},85124:function(e,t,i){"use strict";i.r(t),i.d(t,{encodeSemanticTokensDto:function(){return o}});var n=i(28198),s=i(79783);function o(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return s.cm()||function(e){for(let t=0,i=e.length;t0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new o.y(e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(0===t&&0===i)return;const o=e.lineNumber-this._startLineNumber;o<0?this._startLineNumber+=t:o>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(o,e.column-1,t,i,n,s)}}class c{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let s=n;for(;s>t&&this._getDeltaLine(s-1)===e;)s--;let o=n;for(;oe||d===e&&u>=t)&&(de||c===e&&g>=t){if(cs?p-=s-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>s)){c=!0;continue}p-=s-i}else if(us)){c=!0;continue}u=t,g=i,p=g+(p-s)}else if(u>n){if(0===a&&!c){l=r;break}u-=a}else{if(!(u===n&&g>=s))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=s-i,p-=s-i}const m=4*l;o[m]=u,o[m+1]=g,o[m+2]=p,o[m+3]=f,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,s,o){const r=0===i&&1===n&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),a=this._tokens,l=this._tokenCount;for(let o=0;o0&&t>=1;const n=this._themeService.getColorTheme().getTokenStyleMetadata(s,r,i);void 0===n?o=2147483647:(o=0,void 0!==n.italic&&(o|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(o|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(o|=4|(n.underline?4:0)<<11),void 0!==n.strikethrough&&(o|=8|(n.strikethrough?8:0)<<11),n.foreground&&(o|=16|n.foreground<<15),0===o&&(o=2147483647))}else o=2147483647,s="not-in-legend";this._hashTable.add(e,t,n,o)}return o}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${s}).`))}};function p(e,t,i){const n=e.data,s=e.data.length/5|0,o=Math.max(Math.ceil(s/1024),400),r=[];let a=0,c=1,d=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=h;for(;e+1l)t.warnOverlappingSemanticTokens(r,l+1);else{const e=t.getMetadata(_,v,i);2147483647!==e&&(0===p&&(p=r),u[g]=r-p,u[g+1]=l,u[g+2]=h,u[g+3]=e,g+=4,f=r,m=h)}c=r,d=l,a++}g!==u.length&&(u=u.subarray(0,g));const _=l.create(p,u);r.push(_)}return r}g=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([u(1,n.Gy),u(2,h.L),u(3,s.rr)],g);class f{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class m{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=m._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=m._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new a.SemanticTokensProviderStyling(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};h=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([d(0,o.Gy),d(1,r.rr),d(2,s.L)],h),(0,c.v)(l.ISemanticTokensStylingService,h,1)},45148:function(e,t,i){"use strict";i.r(t),i.d(t,{MirrorModel:function(){return f},STOP_SYNC_MODEL_DELTA_TIME_MS:function(){return u},WorkerTextModelSyncClient:function(){return g},WorkerTextModelSyncServer:function(){return p}});var n=i(90890),s=i(35114),o=i(54244),r=i(62993),a=i(40393),l=i(86506),c=i(43920),d=i(45354);class h{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new r.y(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;nthis._checkStopModelSync()),Math.round(u/2)),this._register(e)}}dispose(){for(const e in this._syncedModels)(0,s.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>u&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.$acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const o=new s.Cm;o.add(i.onDidChangeContent((e=>{this._proxy.$acceptModelChanged(n.toString(),e)}))),o.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),o.add((0,s.s)((()=>{this._proxy.$acceptRemovedModel(n)}))),this._syncedModels[n]=o}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,s.AS)(t)}}class p{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}$acceptNewModel(e){this._models[e.url]=new f(o.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class f extends h{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}},17492:function(e,t,i){"use strict";i.r(t),i.d(t,{ITextResourceConfigurationService:function(){return s},ITextResourcePropertiesService:function(){return o}});var n=i(63619);const s=(0,n.u1)("textResourceConfigurationService"),o=(0,n.u1)("textResourcePropertiesService")},10948:function(e,t,i){"use strict";i.r(t),i.d(t,{ITreeSitterParserService:function(){return n}});const n=(0,i(63619).u1)("treeSitterParserService")},73559:function(e,t,i){"use strict";i.r(t),i.d(t,{DraggedTreeItemsIdentifier:function(){return s},TreeViewsDnDService:function(){return n}});class n{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class s{constructor(e){this.identifier=e}}},61152:function(e,t,i){"use strict";i.r(t),i.d(t,{ITreeViewsDnDService:function(){return r}});var n=i(48682),s=i(63619),o=i(73559);const r=(0,s.u1)("treeViewsDndService");(0,n.v)(r,o.TreeViewsDnDService,1)},18827:function(e,t,i){"use strict";i.r(t),i.d(t,{UnicodeTextModelHighlighter:function(){return l}});var n=i(40393),s=i(58980),o=i(43920),r=i(93066),a=i(86506);class l{static computeUnicodeHighlights(e,t,i){const l=i?i.startLineNumber:1,d=i?i.endLineNumber:e.getLineCount(),h=new c(t),u=h.getCandidateCodePoints();let g;var p;g="allNonBasicAscii"===u?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp((p=Array.from(u),`[${o.bm(p.map((e=>String.fromCodePoint(e))).join(""))}]`),"g");const f=new s.W5(null,g),m=[];let _,v=!1,b=0,w=0,C=0;e:for(let t=l,i=d;t<=i;t++){const i=e.getLineContent(t),s=i.length;f.reset(0);do{if(_=f.next(i),_){let e=_.index,l=_.index+_[0].length;if(e>0){const t=i.charCodeAt(e-1);o.pc(t)&&e--}if(l+1=i){v=!0;break e}m.push(new n.Q(t,e+1,t,l+1))}}}while(_)}return{ranges:m,hasMore:v,ambiguousCharacterCount:b,invisibleCharacterCount:w,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(e,t){const i=new c(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),s=i.ambiguousCharacters.getPrimaryConfusable(n),r=o.tl.getLocales().filter((e=>!o.tl.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(s),notAmbiguousInLocales:r}}case 1:return{kind:2}}}}class c{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=o.tl.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of o.y_.codePoints)d(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,s=!1;if(t)for(const e of t){const t=e.codePointAt(0),i=o.aC(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||o.y_.isInvisibleCharacter(t)||(s=!0)}return!n&&s?0:this.options.invisibleCharacters&&!d(e)&&o.y_.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function d(e){return" "===e||"\n"===e||"\t"===e}},52048:function(e,t,i){var n={"./editorBaseApi":[32919],"./editorBaseApi.js":[32919],"./editorSimpleWorker":[79075],"./editorSimpleWorker.js":[79075],"./editorWorker":[56812],"./editorWorker.js":[56812],"./editorWorkerHost":[8482],"./editorWorkerHost.js":[8482],"./findSectionHeaders":[43359],"./findSectionHeaders.js":[43359],"./getIconClasses":[32352],"./getIconClasses.js":[32352],"./languageFeatureDebounce":[82688],"./languageFeatureDebounce.js":[82688],"./languageFeatures":[69122],"./languageFeatures.js":[69122],"./languageFeaturesService":[18289],"./languageFeaturesService.js":[18289],"./languageService":[31806],"./languageService.js":[31806],"./languagesAssociations":[13640],"./languagesAssociations.js":[13640],"./languagesRegistry":[839],"./languagesRegistry.js":[839],"./markerDecorations":[12098],"./markerDecorations.js":[12098],"./markerDecorationsService":[92903],"./markerDecorationsService.js":[92903],"./model":[59266],"./model.js":[59266],"./modelService":[76583],"./modelService.js":[76583],"./resolverService":[20878],"./resolverService.js":[20878],"./semanticTokensDto":[85124],"./semanticTokensDto.js":[85124],"./semanticTokensProviderStyling":[38620],"./semanticTokensProviderStyling.js":[38620],"./semanticTokensStyling":[17239],"./semanticTokensStyling.js":[17239],"./semanticTokensStylingService":[54560],"./semanticTokensStylingService.js":[54560],"./textModelSync/textModelSync.impl":[45148],"./textModelSync/textModelSync.impl.js":[45148],"./textModelSync/textModelSync.protocol":[19400,9400],"./textModelSync/textModelSync.protocol.js":[19400,9400],"./textResourceConfiguration":[17492],"./textResourceConfiguration.js":[17492],"./treeSitterParserService":[10948],"./treeSitterParserService.js":[10948],"./treeViewsDnd":[73559],"./treeViewsDnd.js":[73559],"./treeViewsDndService":[61152],"./treeViewsDndService.js":[61152],"./unicodeTextModelHighlighter":[18827],"./unicodeTextModelHighlighter.js":[18827]};function s(e){if(!i.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],s=t[0];return Promise.all(t.slice(1).map(i.e)).then((function(){return i(s)}))}s.keys=function(){return Object.keys(n)},s.id=52048,e.exports=s},36035:function(e,t,i){"use strict";var n,s,o,r,a,l,c,d,h,u,g,p,f,m,_,v,b,w,C,y,S,k,x,L,D,E,N,I,M,T,R,P,A,O,F,B,W,H,V,z,U,j,q,K,$,G;i.d(t,{A5:function(){return R},Ah:function(){return P},DD:function(){return k},DO:function(){return O},Gn:function(){return n},H_:function(){return j},Ic:function(){return A},Io:function(){return r},Kb:function(){return u},M$:function(){return v},OV:function(){return I},QP:function(){return a},Qj:function(){return c},R3:function(){return D},SB:function(){return H},U7:function(){return q},VW:function(){return w},VX:function(){return E},WA:function(){return z},WU:function(){return m},XR:function(){return W},YT:function(){return M},ZS:function(){return _},_E:function(){return o},cj:function(){return x},dE:function(){return T},d_:function(){return L},e0:function(){return g},h5:function(){return d},hS:function(){return N},hW:function(){return F},jT:function(){return V},kK:function(){return $},kf:function(){return f},l:function(){return b},m9:function(){return K},of:function(){return h},ok:function(){return s},ov:function(){return B},p2:function(){return p},qw:function(){return y},r4:function(){return C},sm:function(){return S},t7:function(){return l},tJ:function(){return G},v0:function(){return U}}),function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(n||(n={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(s||(s={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(o||(o={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(r||(r={})),function(e){e[e.Deprecated=1]="Deprecated"}(a||(a={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(l||(l={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(c||(c={})),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"}(d||(d={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(h||(h={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(u||(u={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(g||(g={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"}(p||(p={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(f||(f={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(m||(m={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(_||(_={})),function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(v||(v={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(b||(b={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(w||(w={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(C||(C={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(y||(y={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(S||(S={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(k||(k={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(x||(x={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(L||(L={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(D||(D={})),function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"}(E||(E={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(N||(N={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(I||(I={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(M||(M={})),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"}(T||(T={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(R||(R={})),function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"}(P||(P={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}(A||(A={})),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"}(O||(O={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(F||(F={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(B||(B={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(W||(W={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(H||(H={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(V||(V={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(z||(z={})),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"}(U||(U={})),function(e){e[e.Deprecated=1]="Deprecated"}(j||(j={})),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"}(q||(q={})),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={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}($||($={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(G||(G={}))},47025:function(e,t,i){"use strict";i.d(t,{E6:function(){return c},Hw:function(){return s},YN:function(){return n},gf:function(){return r},n9:function(){return a},oq:function(){return o},tu:function(){return d},vp:function(){return l}});var n,s,o,r,a,l,c,d,h=i(14374);!function(e){e.inspectTokensAction=h.kg("inspectTokens","Developer: Inspect Tokens")}(n||(n={})),function(e){e.gotoLineActionLabel=h.kg("gotoLineActionLabel","Go to Line/Column...")}(s||(s={})),function(e){e.helpQuickAccessActionLabel=h.kg("helpQuickAccess","Show all Quick Access Providers")}(o||(o={})),function(e){e.quickCommandActionLabel=h.kg("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=h.kg("quickCommandActionHelp","Show And Run Commands")}(r||(r={})),function(e){e.quickOutlineActionLabel=h.kg("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=h.kg("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(a||(a={})),function(e){e.editorViewAccessibleLabel=h.kg("editorViewAccessibleLabel","Editor content")}(l||(l={})),function(e){e.toggleHighContrast=h.kg("toggleHighContrast","Toggle High Contrast Theme")}(c||(c={})),function(e){e.bulkEditServiceSummary=h.kg("bulkEditServiceSummary","Made {0} edits in {1} files")}(d||(d={}))},40699:function(e,t,i){"use strict";i.d(t,{E$:function(){return r},HP:function(){return c},Ic:function(){return h},U0:function(){return o},Wn:function(){return n},bg:function(){return a},mS:function(){return l},uK:function(){return s},vn:function(){return d}});class n{constructor(){this.changeType=1}}class s{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const s of t)i+=e.substring(n,s.column-1),n=s.column-1,i+=s.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new s(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new s(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}}class o{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class r{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class c{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t>>1,this._text=t,this.languageIdCodec=i}equals(e){return e instanceof s&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.x.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.x.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.x.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return n.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return s.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new o(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=s)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const o=new Array;let r=0;for(;;){const s=tr){n+=this._text.substring(r,a.offset);const e=this._tokens[1+(t<<1)];o.push(n.length,e),r=a.offset}n+=a.text,o.push(n.length,a.tokenMetadata),i++}}return new s(new Uint32Array(o),n,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),i=this.getEndOffset(e);return this._text.substring(t,i)}forEach(e){const t=this.getCount();for(let i=0;i=i);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof o&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,i=this._source.getStartOffset(t),n=this._source.getEndOffset(t);let s=this._source.getTokenText(t);return ithis._endOffset&&(s=s.substring(0,s.length-(n-this._endOffset))),s}forEach(e){for(let t=0;t=o||(a[l++]=new s(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];const o=[];let r=0;for(let a=0,l=e.length;at)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const d=c.startLineNumber===t?c.startColumn:i,h=c.endLineNumber===t?c.endColumn:n;o[r++]=new s(d,h,l.inlineClassName,l.type)}return o}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=s._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];const i=[],s=new r;let o=0;for(let r=0,a=t.length;r1){const t=e.charCodeAt(l-2);n.pc(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);n.pc(t)&&c--}const u=l-1,g=c-2;o=s.consumeLowerThan(u,o,i),0===s.count&&(o=u),s.insert(g,d,h)}return s.consumeLowerThan(1073741824,o,i),i}}},73055:function(e,t,i){"use strict";i.d(t,{wZ:function(){return d},MT:function(){return l},zL:function(){return c},UW:function(){return g},Md:function(){return f}});var n=i(14374),s=i(43920),o=i(52192),r=i(10621);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class l{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class c{constructor(e,t,i,n,s,o,a,l,c,d,h,u,g,p,f,m,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(r.d.compare),this.tabSize=d,this.startVisibleColumn=h,this.spaceWidth=u,this.stopRenderingLineAfter=f,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const s=(t<<16|i)>>>0;this._data[e-1]=s,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=h.getPartIndex(t),n=h.getCharIndex(t);return new d(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i)>>>0;let s=0,o=this.length-1;for(;s+1>>1,t=this._data[e];if(t===n)return e;t>n?o=e:s=e}if(s===o)return s;const r=this._data[s],a=this._data[o];if(r===n)return s;if(a===n)return o;const l=h.getPartIndex(r),c=h.getCharIndex(r);let d;return d=l!==h.getPartIndex(a)?t:h.getCharIndex(a),i-c<=d-i?s:o}}class u{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("");let i=0,n=0,s=0;for(const o of e.lineDecorations)1!==o.type&&2!==o.type||(t.appendString(''),1===o.type&&(s|=1,i++),2===o.type&&(s|=2,n++));t.appendString("");const o=new h(1,i+n);return o.setColumnInfo(1,i,0,0),new u(o,!1,s)}return t.appendString(""),new u(new h(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,a=e.lineContent,l=e.len,c=e.isOverflowing,d=e.overflowingCharCount,g=e.parts,p=e.fauxIndentLength,f=e.tabSize,m=e.startVisibleColumn,v=e.containsRTL,b=e.spaceWidth,w=e.renderSpaceCharCode,C=e.renderWhitespace,y=e.renderControlCharacters,S=new h(l+1,g.length);let k=!1,x=0,L=m,D=0,E=0,N=0;v?t.appendString(''):t.appendString("");for(let e=0,n=g.length;e=p&&(t+=n)}}for(m&&(t.appendString(' style="width:'),t.appendString(String(b*i)),t.appendString('px"')),t.appendASCIICharCode(62);x1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=n;e++)t.appendCharCode(160)}else i=2,n=1,t.appendCharCode(w),t.appendCharCode(8204);D+=i,E+=n,x>=p&&(L+=n)}}else for(t.appendASCIICharCode(62);x=p&&(L+=o)}v?N++:N=0,x>=l&&!k&&n.isPseudoAfter()&&(k=!0,S.setColumnInfo(x+1,e,D,E)),t.appendString("")}return k||S.setColumnInfo(l+1,g.length-1,D,E),c&&(t.appendString(''),t.appendString(n.kg("showMore","Show more ({0})",function(e){return e<1024?n.kg("overflow.chars","{0} chars",e):e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}(d))),t.appendString("")),t.appendString(""),new u(S,v,r)}(function(e){const t=e.lineContent;let i,n,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(r[l++]=new a(n,"",0,!1));let c=n;for(let d=0,h=i.getCount();d=o){const i=!!t&&s.E_(e.substring(c,o));r[l++]=new a(o,u,0,i);break}const g=!!t&&s.E_(e.substring(c,h));r[l++]=new a(h,u,0,g),c=h}return r}(t,e.containsRTL,e.lineTokens,e.fauxIndentLength,o);e.renderControlCharacters&&!e.isBasicASCII&&(l=function(e,t){const i=[];let n=new a(0,"",0,!1),s=0;for(const o of t){const t=o.endIndex;for(;sn.endIndex&&(n=new a(s,o.type,o.metadata,o.containsRTL),i.push(n)),n=new a(s+1,"mtkcontrol",o.metadata,!1),i.push(n));s>n.endIndex&&(n=new a(t,o.type,o.metadata,o.containsRTL),i.push(n))}return i}(t,l)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(l=function(e,t,i,n){const o=e.continuesWithWrappedLine,r=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,d=e.useMonospaceOptimizations,h=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth,f=[];let m=0,_=0,v=n[_].type,b=n[_].containsRTL,w=n[_].endIndex;const C=n.length;let y,S=!1,k=s.HG(t);-1===k?(S=!0,k=i,y=i):y=s.lT(t);let x=!1,L=0,D=h&&h[L],E=c%l;for(let e=r;e=D.endOffset&&(L++,D=h&&h[L]),ey)c=!0;else if(9===o)c=!0;else if(32===o)if(u)if(x)c=!0;else{const n=e+1e),c&&g&&(c=S||e>y),c&&b&&e>=k&&e<=y&&(c=!1),x){if(!c||!d&&E>=l){if(p)for(let t=(m>0?f[m-1].endIndex:r)+1;t<=e;t++)f[m++]=new a(t,"mtkw",1,!1);else f[m++]=new a(e,"mtkw",1,!1);E%=l}}else(e===w||c&&e>r)&&(f[m++]=new a(e,v,0,b),E%=l);for(9===o?E=l:s.ne(o)?E+=2:E++,x=c;e===w&&(_++,_0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(N=!0)}else N=!0;if(N)if(p)for(let e=(m>0?f[m-1].endIndex:r)+1;e<=i;e++)f[m++]=new a(e,"mtkw",1,!1);else f[m++]=new a(i,"mtkw",1,!1);else f[m++]=new a(i,v,0,b);return f}(e,t,o,l));let c=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;th&&(h=e.startOffset,c[d++]=new a(h,r,u,g)),!(e.endOffset+1<=n)){h=n,c[d++]=new a(h,r+" "+e.className,u|e.metadata,g);break}h=e.endOffset+1,c[d++]=new a(h,r+" "+e.className,u|e.metadata,g),l++}n>h&&(h=n,c[d++]=new a(h,r,u,g))}const u=i[i.length-1].endIndex;if(l=50&&(s[o++]=new a(d+1,t,i,c),h=d+1,d=-1);h!==l&&(s[o++]=new a(l,t,i,c))}else s[o++]=r;n=l}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,c=i.containsRTL,d=Math.ceil(l/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},68316:function(e,t,i){"use strict";i.d(t,{GP:function(){return l},LM:function(){return r},Uv:function(){return g},kI:function(){return d},nt:function(){return a},or:function(){return h},qL:function(){return c},vo:function(){return u}});var n=i(97358),s=i(43920),o=i(40393);class r{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class a{constructor(e,t){this.tabSize=e,this.data=t}}class l{constructor(e,t,i,n,s,o,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=r}}class c{constructor(e,t,i,n,s,o,r,a,l,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=c.isBasicASCII(i,o),this.containsRTL=c.containsRTL(i,this.isBasicASCII,s),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||s.aC(e)}static containsRTL(e,t,i){return!(t||!i)&&s.E_(e)}}class d{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class h{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new d(new o.Q(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class u{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class g{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&n.aI(e.data,t.data)}static equalsArr(e,t){return n.aI(e,t,g.equals)}}},81655:function(e,t,i){"use strict";i.d(t,{iE:function(){return s},rW:function(){return o}});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class s{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(g=i-p);const f=l.color;let m=this._color2Id[f];m||(m=++this._lastAssignedId,this._color2Id[f]=m,this._id2Color[m]=f);const _=new n(g-p,g+p,m);l.setColorZone(_),r.push(_)}return this._colorZonesInvalid=!1,r.sort(n.compare),r}}},77002:function(e,t,i){"use strict";i.d(t,{GN:function(){return l},UB:function(){return a},a6:function(){return c},wc:function(){return d}});var n=i(62993),s=i(40393),o=i(68316),r=i(3520);class a{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const r=e.range,a=e.options;let l;if(a.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.y(r.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.y(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);l=new s.Q(e.lineNumber,e.column,t.lineNumber,t.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(r,1);i=new o.vo(l,a),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new s.Q(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,r.$C)(this.configuration.options),t,i),a=e.startLineNumber,c=e.endLineNumber,d=[];let h=0;const u=[];for(let e=a;e<=c;e++)u[e-a]=[];for(let e=0,t=n.length;e1===e))}function d(e,t){return h(e,t.range,(e=>2===e))}function h(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const s=e.tokenization.getLineTokens(n),o=n===t.startLineNumber,r=n===t.endLineNumber;let a=o?s.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1);){if(!i(s.getStandardTokenType(a)))return!1;a++}}return!0}},97078:function(e,t,i){"use strict";var n,s=i(15075),o=i(85584),r=i(62167),a=i(52694),l=i(56218),c=i(49678),d=i(14374),h=i(97848);const u=new h.N1("selectionAnchorSet",!1);let g=class{static{n=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(n.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=u.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations((t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(l.L.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new o.Bc).appendText((0,d.kg)("selectionAnchor","Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,s.xE)((0,d.kg)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(l.L.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations((t=>{t.removeDecoration(e),this.decorationId=void 0})),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var p,f;g=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(p=1,f=h.fN,function(e,t){f(e,t,p)})],g);class m extends a.ks{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,d.kg)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:(0,r.m5)(2089,2080),weight:100}})}async run(e,t){g.get(t)?.setSelectionAnchor()}}class _ extends a.ks{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,d.kg)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:u})}async run(e,t){g.get(t)?.goToSelectionAnchor()}}class v extends a.ks{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,d.kg)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:u,kbOpts:{kbExpr:c.R.editorTextFocus,primary:(0,r.m5)(2089,2089),weight:100}})}async run(e,t){g.get(t)?.selectFromAnchorToCursor()}}class b extends a.ks{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,d.kg)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:u,kbOpts:{kbExpr:c.R.editorTextFocus,primary:9,weight:100}})}async run(e,t){g.get(t)?.cancelSelectionAnchor()}}(0,a.HW)(g.ID,g,4),(0,a.Fl)(m),(0,a.Fl)(_),(0,a.Fl)(v),(0,a.Fl)(b)},53732:function(e,t,i){"use strict";var n=i(90890),s=i(35114),o=i(52694),r=i(62993),a=i(40393),l=i(56218),c=i(49678),d=i(62067),h=i(49079),u=i(14374),g=i(93223),p=i(4195),f=i(40616);const m=(0,p.x1A)("editorOverviewRuler.bracketMatchForeground","#A0A0A0",u.kg("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class _ extends o.ks{constructor(){super({id:"editor.action.jumpToBracket",label:u.kg("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3165,weight:100}})}run(e,t){C.get(t)?.jumpToBracket()}}class v extends o.ks{constructor(){super({id:"editor.action.selectToBracket",label:u.kg("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:u.aS("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let n=!0;i&&!1===i.selectBrackets&&(n=!1),C.get(t)?.selectToBracket(n)}}class b extends o.ks{constructor(){super({id:"editor.action.removeBrackets",label:u.kg("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:c.R.editorTextFocus,primary:2561,weight:100}})}run(e,t){C.get(t)?.removeBrackets(this.id)}}class w{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class C extends s.jG{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(C.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new n.uC((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let s=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?s=n[1].getStartPosition():n[1].containsPosition(i)&&(s=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)s=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(s=t.range.getStartPosition())}}return s?new l.L(s.lineNumber,s.column,s.lineNumber,s.column):new l.L(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const s=n.getStartPosition();let o=t.bracketPairs.matchBracket(s);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(s),!o)){const e=t.bracketPairs.findNextBracket(s);e&&e.range&&(o=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,c=null;if(o){o.sort(a.Q.compareRangesUsingStarts);const[t,i]=o;if(r=e?t.getStartPosition():t.getEndPosition(),c=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(s)){const e=r;r=c,c=e}}r&&c&&i.push(new l.L(r.lineNumber,r.column,c.lineNumber,c.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach((i=>{const n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())}))}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=h.kI.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,f.Yf)(m),position:d.A5.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=h.kI.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"})}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let o=0;for(let t=0,i=e.length;t1&&s.sort(r.y.compare);const a=[];let l=0,c=0;const d=n.length;for(let e=0,i=s.length;e0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Fl)(c)},50568:function(e,t,i){"use strict";var n=i(75969),s=i(84201),o=i(79783),r=i(55036),a=i(52694),l=i(72777),c=i(49678),d=i(22117),h=i(14374),u=i(93223),g=i(42558),p=i(97848);const f="9_cutcopypaste",m=o.ib||document.queryCommandSupported("cut"),_=o.ib||document.queryCommandSupported("copy"),v=void 0!==navigator.clipboard&&!n.gm||document.queryCommandSupported("paste");function b(e){return e.register(),e}const w=m?b(new a.fE({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:o.ib?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:u.D8.MenubarEditMenu,group:"2_ccp",title:h.kg({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:u.D8.EditorContext,group:f,title:h.kg("actions.clipboard.cutLabel","Cut"),when:c.R.writable,order:1},{menuId:u.D8.CommandPalette,group:"",title:h.kg("actions.clipboard.cutLabel","Cut"),order:1},{menuId:u.D8.SimpleEditorContext,group:f,title:h.kg("actions.clipboard.cutLabel","Cut"),when:c.R.writable,order:1}]})):void 0,C=_?b(new a.fE({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:o.ib?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:u.D8.MenubarEditMenu,group:"2_ccp",title:h.kg({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:u.D8.EditorContext,group:f,title:h.kg("actions.clipboard.copyLabel","Copy"),order:2},{menuId:u.D8.CommandPalette,group:"",title:h.kg("actions.clipboard.copyLabel","Copy"),order:1},{menuId:u.D8.SimpleEditorContext,group:f,title:h.kg("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;u.ZG.appendMenuItem(u.D8.MenubarEditMenu,{submenu:u.D8.MenubarCopy,title:h.aS("copy as","Copy As"),group:"2_ccp",order:3}),u.ZG.appendMenuItem(u.D8.EditorContext,{submenu:u.D8.EditorContextCopy,title:h.aS("copy as","Copy As"),group:f,order:3}),u.ZG.appendMenuItem(u.D8.EditorContext,{submenu:u.D8.EditorContextShare,title:h.aS("share","Share"),group:"11_share",order:-1,when:p.M$.and(p.M$.notEquals("resourceScheme","output"),c.R.editorTextFocus)}),u.ZG.appendMenuItem(u.D8.ExplorerContext,{submenu:u.D8.ExplorerContextShare,title:h.aS("share","Share"),group:"11_share",order:-1});const y=v?b(new a.fE({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:o.ib?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:u.D8.MenubarEditMenu,group:"2_ccp",title:h.kg({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:u.D8.EditorContext,group:f,title:h.kg("actions.clipboard.pasteLabel","Paste"),when:c.R.writable,order:4},{menuId:u.D8.CommandPalette,group:"",title:h.kg("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:u.D8.SimpleEditorContext,group:f,title:h.kg("actions.clipboard.pasteLabel","Paste"),when:c.R.writable,order:4}]})):void 0;class S extends a.ks{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:h.kg("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:c.R.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(37)&&t.getSelection().isEmpty()||(r.Eq.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),r.Eq.forceCopyWithSyntaxHighlighting=!1))}}function k(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(l.T).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(37),i=n.getSelection();return i&&i.isEmpty()&&!e||n.getContainerDomNode().ownerDocument.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>((0,s.a)().execCommand(t),!0))))}k(w,"cut"),k(C,"copy"),y&&(y.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.T),n=e.get(g.h),s=i.getFocusedCodeEditor();return!(!s||!s.hasTextFocus())&&(s.getContainerDomNode().ownerDocument.execCommand("paste")?d.Rj.get(s)?.finishedPaste()??Promise.resolve():!o.HZ||(async()=>{const e=await n.readText();if(""!==e){const t=r.bs.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=s.getOption(37)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),s.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}})())})),y.addImplementation(0,"generic-dom",((e,t)=>((0,s.a)().execCommand("paste"),!0)))),_&&(0,a.Fl)(S)},7126:function(e,t,i){"use strict";i.d(t,{C9:function(){return x},Qp:function(){return T},Rw:function(){return D},Uy:function(){return L},W4:function(){return R},Xj:function(){return k},dU:function(){return I},k_:function(){return C},pQ:function(){return y},pR:function(){return S}});var n=i(97358),s=i(76611),o=i(20187),r=i(35114),a=i(54244),l=i(98325),c=i(40393),d=i(56218),h=i(69122),u=i(59266),g=i(765),p=i(14374),f=i(21335),m=i(31835),_=i(86171),v=i(2727),b=i(78875),w=i(74159);const C="editor.action.codeAction",y="editor.action.quickFix",S="editor.action.autoFix",k="editor.action.refactor",x="editor.action.sourceAction",L="editor.action.organizeImports",D="editor.action.fixAll";class E extends r.jG{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:(0,n.EI)(e.diagnostics)?(0,n.EI)(t.diagnostics)?E.codeActionsPreferredComparator(e,t):-1:(0,n.EI)(t.diagnostics)?1:E.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(E.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&b.gB.QuickFix.contains(new w.k(e.kind))&&!!e.isPreferred))}get hasAIFix(){return this.validActions.some((({action:e})=>!!e.isAI))}get allAIFixes(){return this.validActions.every((({action:e})=>!!e.isAI))}}const N={actions:[],documentation:void 0};async function I(e,t,i,s,a,l){const c=s.filter||{},d={...c,excludes:[...c.excludes||[],b.gB.Notebook]},h={only:c.include?.value,trigger:s.type},u=new g.ER(t,l),p=2===s.type,f=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,b.uJ)(i,new w.k(e))))))}(e,t,p?d:c),m=new r.Cm,_=f.map((async e=>{try{a.report(e);const n=await e.provideCodeActions(t,i,h,u.token);if(n&&m.add(n),u.token.isCancellationRequested)return N;const s=(n?.actions||[]).filter((e=>e&&(0,b.aF)(c,e))),o=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new w.k(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return e?.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new w.k(e.kind)))return t.command}(e,s,c.include);return{actions:s.map((t=>new b.Vi(t,e))),documentation:o}}catch(e){if((0,o.MB)(e))throw e;return(0,o.M_)(e),N}})),v=e.onDidChange((()=>{const i=e.all(t);(0,n.aI)(i,f)||u.cancel()}));try{const i=await Promise.all(_),o=i.map((e=>e.actions)).flat(),r=[...(0,n.Yc)(i.map((e=>e.documentation))),...M(e,t,s,o)];return new E(o,r,m)}finally{v.dispose(),u.dispose()}}function*M(e,t,i,n){if(t&&n.length)for(const s of e.all(t))s._getAdditionalMenuItems&&(yield*s._getAdditionalMenuItems?.({trigger:i.type,only:i.filter?.include?.value},n.map((e=>e.action))))}var T;async function R(e,t,i,n,o=s.XO.None){const r=e.get(l.nu),a=e.get(f.d),c=e.get(v.k),d=e.get(m.Ot);if(c.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),await t.resolve(o),!o.isCancellationRequested){if(t.action.edit?.edits.length&&!(await r.apply(t.action.edit,{editor:n?.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==T.OnSave,showPreview:n?.preview})).isApplied)return;if(t.action.command)try{await a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);d.error("string"==typeof t?t:p.kg("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}}!function(e){e.OnSave="onSave",e.FromProblemsView="fromProblemsView",e.FromCodeActions="fromCodeActions",e.FromAILightbulb="fromAILightbulb"}(T||(T={})),f.w.registerCommand("_executeCodeActionProvider",(async function(e,t,i,n,r){if(!(t instanceof a.r))throw(0,o.Qg)();const{codeActionProvider:l}=e.get(h.ILanguageFeaturesService),g=e.get(u.IModelService).getModel(t);if(!g)throw(0,o.Qg)();const p=d.L.isISelection(i)?d.L.liftSelection(i):c.Q.isIRange(i)?g.validateRange(i):void 0;if(!p)throw(0,o.Qg)();const f="string"==typeof n?new w.k(n):void 0,m=await I(l,g,p,{type:1,triggerAction:b.fo.Default,filter:{includeSourceActions:!0,include:f}},_.ke.None,s.XO.None),v=[],C=Math.min(m.validActions.length,"number"==typeof r?r:0);for(let e=0;ee.action))}finally{setTimeout((()=>m.dispose()),100)}}))},62082:function(e,t,i){"use strict";var n=i(52694),s=i(38047),o=i(74159),r=i(43920),a=i(49678),l=i(7126),c=i(14374),d=i(97848),h=i(78875),u=i(97810),g=i(95133);function p(e){return d.M$.regex(g.D_.keys()[0],new RegExp("(\\s|^)"+(0,r.bm)(e.value)+"\\b"))}const f={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:c.kg("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:c.kg("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[c.kg("args.schema.apply.first","Always apply the first returned code action."),c.kg("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),c.kg("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:c.kg("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function m(e,t,i,n,s=h.fo.Default){if(e.hasModel()){const o=u.C.get(e);o?.manualTriggerAtCurrentPosition(t,s,i,n)}}class _ extends n.ks{constructor(){super({id:l.pQ,label:c.kg("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),kbOpts:{kbExpr:a.R.textInputFocus,primary:2137,weight:100}})}run(e,t){return m(t,c.kg("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,h.fo.QuickFix)}}class v extends n.DX{constructor(){super({id:l.k_,precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:f}]}})}runEditorCommand(e,t,i){const n=h.QA.fromUser(i,{kind:o.k.Empty,apply:"ifSingle"});return m(t,"string"==typeof i?.kind?n.preferred?c.kg("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):c.kg("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?c.kg("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):c.kg("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class b extends n.ks{constructor(){super({id:l.Xj,label:c.kg("refactor.label","Refactor..."),alias:"Refactor...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),kbOpts:{kbExpr:a.R.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:d.M$.and(a.R.writable,p(h.gB.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:f}]}})}run(e,t,i){const n=h.QA.fromUser(i,{kind:h.gB.Refactor,apply:"never"});return m(t,"string"==typeof i?.kind?n.preferred?c.kg("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):c.kg("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?c.kg("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):c.kg("editor.action.refactor.noneMessage","No refactorings available"),{include:h.gB.Refactor.contains(n.kind)?n.kind:o.k.None,onlyIncludePreferredActions:n.preferred},n.apply,h.fo.Refactor)}}class w extends n.ks{constructor(){super({id:l.C9,label:c.kg("source.label","Source Action..."),alias:"Source Action...",precondition:d.M$.and(a.R.writable,a.R.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:d.M$.and(a.R.writable,p(h.gB.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:f}]}})}run(e,t,i){const n=h.QA.fromUser(i,{kind:h.gB.Source,apply:"never"});return m(t,"string"==typeof i?.kind?n.preferred?c.kg("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):c.kg("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?c.kg("editor.action.source.noneMessage.preferred","No preferred source actions available"):c.kg("editor.action.source.noneMessage","No source actions available"),{include:h.gB.Source.contains(n.kind)?n.kind:o.k.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,h.fo.SourceAction)}}class C extends n.ks{constructor(){super({id:l.Uy,label:c.kg("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:d.M$.and(a.R.writable,p(h.gB.SourceOrganizeImports)),kbOpts:{kbExpr:a.R.textInputFocus,primary:1581,weight:100}})}run(e,t){return m(t,c.kg("editor.action.organize.noneMessage","No organize imports action available"),{include:h.gB.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",h.fo.OrganizeImports)}}class y extends n.ks{constructor(){super({id:l.Rw,label:c.kg("fixAll.label","Fix All"),alias:"Fix All",precondition:d.M$.and(a.R.writable,p(h.gB.SourceFixAll))})}run(e,t){return m(t,c.kg("fixAll.noneMessage","No fix all action available"),{include:h.gB.SourceFixAll,includeSourceActions:!0},"ifSingle",h.fo.FixAll)}}class S extends n.ks{constructor(){super({id:l.pR,label:c.kg("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:d.M$.and(a.R.writable,p(h.gB.QuickFix)),kbOpts:{kbExpr:a.R.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return m(t,c.kg("editor.action.autoFix.noneMessage","No auto fixes available"),{include:h.gB.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",h.fo.AutoFix)}}var k=i(81422),x=i(16434),L=i(56419);(0,n.HW)(u.C.ID,u.C,3),(0,n.HW)(k.E.ID,k.E,4),(0,n.Fl)(_),(0,n.Fl)(b),(0,n.Fl)(w),(0,n.Fl)(C),(0,n.Fl)(S),(0,n.Fl)(y),(0,n.E_)(new v),L.O.as(x.Fd.Configuration).registerConfiguration({...s.JJ,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:c.kg("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}),L.O.as(x.Fd.Configuration).registerConfiguration({...s.JJ,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:c.kg("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}}),L.O.as(x.Fd.Configuration).registerConfiguration({...s.JJ,properties:{"editor.codeActions.triggerOnFocusChange":{type:"boolean",scope:5,markdownDescription:c.kg("triggerOnFocusChange","Enable triggering {0} when {1} is set to {2}. Code Actions must be set to {3} to be triggered for window and focus changes.","`#editor.codeActionsOnSave#`","`#files.autoSave#`","`afterDelay`","`always`"),default:!1}}})},97810:function(e,t,i){"use strict";i.d(t,{C:function(){return de}});var n,s=i(84201),o=i(15075),r=i(20187),a=i(72582),l=i(35114),c=i(62993),d=i(49079),h=i(69122),u=i(7126),g=i(74159),p=i(78875),f=i(87163);let m=class{static{n=this}static{this.codeActionCommands=[u.Xj,u.k_,u.C9,u.Uy,u.Rw]}constructor(e){this.keybindingService=e}getResolver(){const e=new a.d((()=>this.keybindingService.getKeybindings().filter((e=>n.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===u.Uy?t={kind:p.gB.SourceOrganizeImports.value}:e.command===u.Rw&&(t={kind:p.gB.SourceFixAll.value}),{resolvedKeybinding:e.resolvedKeybinding,...p.QA.fromUser(t,{kind:g.k.None,apply:"never"})}}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i?.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new g.k(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};var _,v;m=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(_=0,v=f.b,function(e,t){v(e,t,_)})],m);var b=i(93231),w=(i(83172),i(14374));const C=Object.freeze({kind:g.k.Empty,title:(0,w.kg)("codeAction.widget.id.more","More Actions...")}),y=Object.freeze([{kind:p.gB.QuickFix,title:(0,w.kg)("codeAction.widget.id.quickfix","Quick Fix")},{kind:p.gB.RefactorExtract,title:(0,w.kg)("codeAction.widget.id.extract","Extract"),icon:b.W.wrench},{kind:p.gB.RefactorInline,title:(0,w.kg)("codeAction.widget.id.inline","Inline"),icon:b.W.wrench},{kind:p.gB.RefactorRewrite,title:(0,w.kg)("codeAction.widget.id.convert","Rewrite"),icon:b.W.wrench},{kind:p.gB.RefactorMove,title:(0,w.kg)("codeAction.widget.id.move","Move"),icon:b.W.wrench},{kind:p.gB.SurroundWith,title:(0,w.kg)("codeAction.widget.id.surround","Surround With"),icon:b.W.surroundWith},{kind:p.gB.Source,title:(0,w.kg)("codeAction.widget.id.source","Source Action"),icon:b.W.symbolFile},C]);var S=i(81422),k=i(7588),x=i(98099),L=i(15339),D=i(67334),E=i(76611),N=i(79783),I=i(56613),M=i(14280),T=i(52010),R=i(4195),P=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};const O="acceptSelectedCodeAction",F="previewSelectedCodeAction";class B{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??""}disposeTemplate(e){}}let W=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");return i.className="title",e.append(i),{container:e,icon:t,text:i,keybinding:new L.x(e,N.OS)}}renderElement(e,t,i){if(e.group?.icon?(i.icon.className=I.L.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=(0,R.GuP)(e.group.icon.color.id))):(i.icon.className=I.L.asClassName(b.W.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=j(e.label),i.keybinding.set(e.keybinding),s.bo(!!e.keybinding,i.keybinding.element);const n=this._keybindingService.lookupKeybinding(O)?.getLabel(),o=this._keybindingService.lookupKeybinding(F)?.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:n&&o?this._supportsPreview&&e.canPreview?i.container.title=(0,w.kg)({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to Apply, Shift+F2 to Preview"']},"{0} to Apply, {1} to Preview",n,o):i.container.title=(0,w.kg)({key:"label",comment:['placeholder is a keybinding, e.g "F2 to Apply"']},"{0} to Apply",n):i.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};W=P([A(1,f.b)],W);class H extends UIEvent{constructor(){super("acceptSelectedAction")}}class V extends UIEvent{constructor(){super("previewSelectedAction")}}function z(e){if("action"===e.kind)return e.label}let U=class extends l.jG{constructor(e,t,i,n,s,o){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=o,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new E.Qi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new D.B8(e,this.domNode,r,[new W(t,this._keybindingService),new B],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:z},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?j(e?.label):"";return e.disabled&&(t=(0,w.kg)({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>(0,w.kg)({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(T.IN),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this.onFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);let n=e;if(this._allMenuItems.length>=50)n=380;else{const t=this._allMenuItems.map(((e,t)=>{const i=this.domNode.ownerDocument.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0}));n=Math.max(...t,e)}const s=Math.min(i,.7*this.domNode.ownerDocument.body.clientHeight);return this._list.layout(s,n),this.domNode.style.height=`${s}px`,this._list.domFocus(),n}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new V:new H;this._list.setSelection([i],s)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof V):this._list.setSelection([])}onFocus(){const e=this._list.getFocus();if(0===e.length)return;const t=e[0],i=this._list.element(t);this._delegate.onFocus?.(i.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&"action"===t.kind){const e=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=e?e.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus("number"==typeof e.index?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function j(e){return e.replace(/\r\n|\r|\n/g," ")}U=P([A(4,M.l),A(5,f.b)],U);var q=i(93223),K=i(97848),$=i(48682),G=i(63619),Q=function(e,t){return function(i,n){t(i,n,e)}};(0,R.x1A)("actionBar.toggledBackground",R.c1f,(0,w.kg)("actionBar.toggledBackground","Background color for toggled action items in action bar."));const Y={Visible:new K.N1("codeActionMenuVisible",!1,(0,w.kg)("codeActionMenuVisible","Whether the action widget list is visible"))},Z=(0,G.u1)("actionWidgetService");let X=class extends l.jG{get isVisible(){return Y.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new l.HE)}show(e,t,i,n,s,o,r){const a=Y.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(U,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:e=>(a.set(!0),this._renderWidget(e,l,r??[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},o,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}hide(e){this._list.value?.hide(e),this._list.clear()}_renderWidget(e,t,i){const n=document.createElement("div");if(n.classList.add("action-widget"),e.appendChild(n),this._list.value=t,!this._list.value)throw new Error("List has no value");n.appendChild(this._list.value.domNode);const o=new l.Cm,r=document.createElement("div"),a=e.appendChild(r);a.classList.add("context-view-block"),o.add(s.ko(a,s.Bx.MOUSE_DOWN,(e=>e.stopPropagation())));const c=document.createElement("div"),d=e.appendChild(c);d.classList.add("context-view-pointerBlock"),o.add(s.ko(d,s.Bx.POINTER_MOVE,(()=>d.remove()))),o.add(s.ko(d,s.Bx.MOUSE_DOWN,(()=>d.remove())));let h=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(n.appendChild(e.getContainer().parentElement),o.add(e),h=e.getContainer().offsetWidth)}const u=this._list.value?.layout(h);n.style.width=`${u}px`;const g=o.add(s.w5(e));return o.add(g.onDidBlur((()=>this.hide(!0)))),o}_createActionBar(e,t){if(!t.length)return;const i=s.$(e),n=new x.E(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){this._list.value?.hide(e)}};X=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Q(0,M.l),Q(1,K.fN),Q(2,G._Y)],X),(0,$.v)(Z,X,1);const J=1100;(0,q.ug)(class extends q.L{constructor(){super({id:"hideCodeActionWidget",title:(0,w.aS)("hideCodeActionWidget.title","Hide action widget"),precondition:Y.Visible,keybinding:{weight:J,primary:9,secondary:[1033]}})}run(e){e.get(Z).hide(!0)}}),(0,q.ug)(class extends q.L{constructor(){super({id:"selectPrevCodeAction",title:(0,w.aS)("selectPrevCodeAction.title","Select previous action"),precondition:Y.Visible,keybinding:{weight:J,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(Z);t instanceof X&&t.focusPrevious()}}),(0,q.ug)(class extends q.L{constructor(){super({id:"selectNextCodeAction",title:(0,w.aS)("selectNextCodeAction.title","Select next action"),precondition:Y.Visible,keybinding:{weight:J,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(Z);t instanceof X&&t.focusNext()}}),(0,q.ug)(class extends q.L{constructor(){super({id:O,title:(0,w.aS)("acceptSelected.title","Accept selected action"),precondition:Y.Visible,keybinding:{weight:J,primary:3,secondary:[2137]}})}run(e){const t=e.get(Z);t instanceof X&&t.acceptSelected()}}),(0,q.ug)(class extends q.L{constructor(){super({id:F,title:(0,w.aS)("previewSelected.title","Preview selected action"),precondition:Y.Visible,keybinding:{weight:J,primary:2051}})}run(e){const t=e.get(Z);t instanceof X&&t.acceptSelected(!0)}});var ee,te=i(21335),ie=i(47901),ne=i(84119),se=i(86171),oe=i(39679),re=i(40616),ae=i(95133),le=i(2727),ce=function(e,t){return function(i,n){t(i,n,e)}};let de=class extends l.jG{static{ee=this}static{this.ID="editor.contrib.codeActionController"}static get(e){return e.getContribution(ee.ID)}constructor(e,t,i,n,s,o,r,c,d,h,u){super(),this._commandService=r,this._configurationService=c,this._actionWidgetService=d,this._instantiationService=h,this._telemetryService=u,this._activeCodeActions=this._register(new l.HE),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new ae.Dc(this._editor,s.codeActionProvider,t,i,o,c,this._telemetryService)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new a.d((()=>{const e=this._editor.getContribution(S.E.ID);return e&&this._register(e.onClick((e=>this.showCodeActionsFromLightbulb(e.actions,e)))),e})),this._resolver=n.createInstance(m),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(e.allAIFixes&&1===e.validActions.length){const t=e.validActions[0],i=t.action.command;return i&&"inlineChat.start"===i.id&&i.arguments&&i.arguments.length>=1&&(i.arguments[0]={...i.arguments[0],autoSend:!1}),void await this._applyCodeAction(t,!1,!1,u.Qp.FromAILightbulb)}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){if(!this._editor.hasModel())return;k.k.get(this._editor)?.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,i,n){try{await this._instantiationService.invokeFunction(u.W4,e,n,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:p.fo.QuickFix,filter:{}})}}hideLightBulbWidget(){this._lightBulbWidget.rawValue?.hide(),this._lightBulbWidget.rawValue?.gutterHide()}async update(e){if(1!==e.type)return void this.hideLightBulbWidget();let t;try{t=await e.actions}catch(e){return void(0,r.dz)(e)}if(this._disposed)return;const i=this._editor.getSelection();if(i?.startLineNumber===e.position.lineNumber)if(this._lightBulbWidget.value?.update(t,e.trigger,e.position),1===e.trigger.type){if(e.trigger.filter?.include){const i=this.tryGetValidActionToApply(e.trigger,t);if(i){try{this.hideLightBulbWidget(),await this._applyCodeAction(i,!1,!1,u.Qp.FromCodeActions)}finally{t.dispose()}return}if(e.trigger.context){const i=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,t);if(i&&i.action.disabled)return k.k.get(this._editor)?.showMessage(i.action.disabled,e.trigger.context.position),void t.dispose()}}const i=!!e.trigger.filter?.include;if(e.trigger.context&&(!t.allActions.length||!i&&!t.validActions.length))return k.k.get(this._editor)?.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=t,void t.dispose();this._activeCodeActions.value=t,this.showCodeActionList(t,this.toCoords(e.position),{includeDisabledActions:i,fromLightbulb:!1})}else this._actionWidgetService.isVisible?t.dispose():this._activeCodeActions.value=t}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}static{this.DECORATION=d.kI.register({description:"quickfix-highlight",className:"quickfix-edit-highlight"})}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const r=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!r.length)return;const a=c.y.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(e,t)=>{this._applyCodeAction(e,!0,!!t,i.fromLightbulb?u.Qp.FromAILightbulb:u.Qp.FromCodeActions),this._actionWidgetService.hide(!1),n.clear()},onHide:e=>{this._editor?.focus(),n.clear()},onHover:async(e,t)=>{if(t.isCancellationRequested)return;let i=!1;const n=e.action.kind;if(n){const e=new g.k(n);i=[p.gB.RefactorExtract,p.gB.RefactorInline,p.gB.RefactorRewrite,p.gB.RefactorMove,p.gB.Source].some((t=>t.contains(e)))}return{canPreview:i||!!e.action.edit?.edits.length}},onFocus:e=>{if(e&&e.action){const t=e.action.ranges,i=e.action.diagnostics;if(n.clear(),t&&t.length>0){const e=i&&i?.length>1?i.map((e=>({range:e,options:ee.DECORATION}))):t.map((e=>({range:e,options:ee.DECORATION})));n.set(e)}else if(i&&i.length>0){const e=i.map((e=>({range:e,options:ee.DECORATION})));n.set(e);const t=i[0];if(t.startLineNumber&&t.startColumn){const e=this._editor.getModel()?.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn})?.word;o.h5((0,w.kg)("editingNewSelection","Context: {0} at line {1} and column {2}.",e,t.startLineNumber,t.startColumn))}}}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,function(e,t,i){if(!t)return e.map((e=>({kind:"action",item:e,group:C,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!e.action.edit?.edits.length})));const n=y.map((e=>({group:e,actions:[]})));for(const t of e){const e=t.action.kind?new g.k(t.action.kind):g.k.None;for(const i of n)if(i.group.kind.contains(e)){i.actions.push(t);break}}const s=[];for(const e of n)if(e.actions.length){s.push({kind:"header",group:e.group});for(const t of e.actions){const n=e.group;s.push({kind:"action",item:t,group:t.action.isAI?{title:n.title,kind:n.kind,icon:b.W.sparkle}:n,label:t.action.title,disabled:!!t.action.disabled,keybinding:i(t.action)})}}return s}(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,s,this._getActionBarActions(e,t,i))}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,s.BK)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){const e=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:e?.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>({id:e.id,label:e.title,tooltip:e.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(e.id,...e.arguments??[])})));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:(0,w.kg)("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:(0,w.kg)("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};de=ee=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ce(1,ne.DR),ce(2,K.fN),ce(3,G._Y),ce(4,h.ILanguageFeaturesService),ce(5,se.N8),ce(6,te.d),ce(7,ie.pG),ce(8,Z),ce(9,G._Y),ce(10,le.k)],de),(0,re.zy)(((e,t)=>{var i;(i=e.getColor(R.Ubg))&&t.addRule(`.monaco-editor .quickfix-edit-highlight { background-color: ${i}; }`);const n=e.getColor(R.ECk);n&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,oe.Bb)(e.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)}))},95133:function(e,t,i){"use strict";i.d(t,{D_:function(){return _},Dc:function(){return y}});var n=i(90890),s=i(20187),o=i(80670),r=i(35114),a=i(59951),l=i(3520),c=i(62993),d=i(56218),h=i(97848),u=i(86171),g=i(78875),p=i(7126),f=i(74159),m=i(43857);const _=new h.N1("supportedCodeAction",""),v="_typescript.applyFixAllCodeAction";class b extends r.jG{constructor(e,t,i,s=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=s,this._autoTriggerTimer=this._register(new n.pc),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._tryAutoTrigger())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,a.n4)(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:g.fo.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(1===e.type)return t;const i=this._editor.getOption(65).enabled;if(i!==l.jT.Off){if(i===l.jT.On)return t;if(i===l.jT.OnCode){if(!t.isEmpty())return t;const e=this._editor.getModel(),{lineNumber:i,column:n}=t.getPosition(),s=e.getLineContent(i);if(0===s.length)return;if(1===n){if(/\s/.test(s[0]))return}else if(n===e.getLineMaxColumn(i)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[n-2])&&/\s/.test(s[n-1]))return}return t}}}var w;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if((0,s.MB)(e))return C;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(w||(w={}));const C=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class y extends r.jG{constructor(e,t,i,n,s,a,l){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=a,this._telemetryService=l,this._codeActionOracle=this._register(new r.HE),this._state=w.Empty,this._onDidChangeState=this._register(new o.vl),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=_.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(65)&&this._update()}))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(w.Empty,!0))}_settingEnabledNearbyQuickfixes(){const e=this._editor?.getModel();return!!this._configurationService&&this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:e?.uri})}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(w.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(92)){const t=this._registry.all(e).flatMap((e=>e.providedCodeActionKinds??[]));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new b(this._editor,this._markerService,(t=>{if(!t)return void this.setState(w.Empty);const i=t.selection.getStartPosition(),s=(0,n.SS)((async i=>{if(this._settingEnabledNearbyQuickfixes()&&1===t.trigger.type&&(t.trigger.triggerAction===g.fo.QuickFix||t.trigger.filter?.include?.contains(g.gB.QuickFix))){const n=await(0,p.dU)(this._registry,e,t.selection,t.trigger,u.ke.None,i),s=[...n.allActions];if(i.isCancellationRequested)return C;const o=n.validActions?.some((e=>!!e.action.kind&&g.gB.QuickFix.contains(new f.k(e.action.kind)))),r=this._markerService.read({resource:e.uri});if(o){for(const e of n.validActions)e.action.command?.arguments?.some((e=>"string"==typeof e&&e.includes(v)))&&(e.action.diagnostics=[...r.filter((e=>e.relatedInformation))]);return{validActions:n.validActions,allActions:s,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}if(!o&&r.length>0){const o=t.selection.getPosition();let a=o,l=Number.MAX_VALUE;const h=[...n.validActions];for(const f of r){const m=f.endColumn,_=f.endLineNumber,b=f.startLineNumber;if(_===o.lineNumber||b===o.lineNumber){a=new c.y(_,m);const f={type:t.trigger.type,triggerAction:t.trigger.triggerAction,filter:{include:t.trigger.filter?.include?t.trigger.filter?.include:g.gB.QuickFix},autoApply:t.trigger.autoApply,context:{notAvailableMessage:t.trigger.context?.notAvailableMessage||"",position:a}},b=new d.L(a.lineNumber,a.column,a.lineNumber,a.column),w=await(0,p.dU)(this._registry,e,b,f,u.ke.None,i);if(0!==w.validActions.length){for(const e of w.validActions)e.action.command?.arguments?.some((e=>"string"==typeof e&&e.includes(v)))&&(e.action.diagnostics=[...r.filter((e=>e.relatedInformation))]);0===n.allActions.length&&s.push(...w.allActions),Math.abs(o.column-m)i.findIndex((t=>t.action.title===e.action.title))===t));return f.sort(((e,t)=>e.action.isPreferred&&!t.action.isPreferred?-1:!e.action.isPreferred&&t.action.isPreferred||e.action.isAI&&!t.action.isAI?1:!e.action.isAI&&t.action.isAI?-1:0)),{validActions:f,allActions:s,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}}if(1===t.trigger.type){const n=new m.W,s=await(0,p.dU)(this._registry,e,t.selection,t.trigger,u.ke.None,i);return this._telemetryService&&this._telemetryService.publicLog2("codeAction.invokedDurations",{codeActions:s.validActions.length,duration:n.elapsed()}),s}return(0,p.dU)(this._registry,e,t.selection,t.trigger,u.ke.None,i)}));1===t.trigger.type&&this._progressService?.showWhile(s,250);const o=new w.Triggered(t.trigger,i,s);let r=!1;1===this._state.type&&(r=1===this._state.trigger.type&&1===o.type&&2===o.trigger.type&&this._state.position!==o.position),r?setTimeout((()=>{this.setState(o)}),500):this.setState(o)}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:g.fo.Default})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value?.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}},81422:function(e,t,i){"use strict";i.d(t,{E:function(){return k}});var n,s=i(84201),o=i(53510),r=i(93231),a=i(80670),l=i(35114),c=i(56613),d=i(62067),h=i(49079),u=i(43573),g=i(7126),p=i(14374),f=i(87163),m=i(51310),_=i(40393);const v=(0,m.pU)("gutter-lightbulb",r.W.lightBulb,p.kg("gutterLightbulbWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor.")),b=(0,m.pU)("gutter-lightbulb-auto-fix",r.W.lightbulbAutofix,p.kg("gutterLightbulbAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and a quick fix is available.")),w=(0,m.pU)("gutter-lightbulb-sparkle",r.W.lightbulbSparkle,p.kg("gutterLightbulbAIFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix is available.")),C=(0,m.pU)("gutter-lightbulb-aifix-auto-fix",r.W.lightbulbSparkleAutofix,p.kg("gutterLightbulbAIFixAutoFixWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available.")),y=(0,m.pU)("gutter-lightbulb-sparkle-filled",r.W.sparkleFilled,p.kg("gutterLightbulbSparkleFilledWidget","Icon which spawns code actions menu from the gutter when there is no space in the editor and an AI fix and a quick fix is available."));var S;!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(S||(S={}));let k=class extends l.jG{static{n=this}static{this.GUTTER_DECORATION=h.kI.register({description:"codicon-gutter-lightbulb-decoration",glyphMarginClassName:c.L.asClassName(r.W.lightBulb),glyphMargin:{position:d.ZS.Left},stickiness:1})}static{this.ID="editor.contrib.lightbulbWidget"}static{this._posPref=[0]}constructor(e,t){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new a.vl),this.onClick=this._onClick.event,this._state=S.Hidden,this._gutterState=S.Hidden,this._iconClasses=[],this.lightbulbClasses=["codicon-"+v.id,"codicon-"+C.id,"codicon-"+b.id,"codicon-"+w.id,"codicon-"+y.id],this.gutterDecoration=n.GUTTER_DECORATION,this._domNode=s.$("div.lightBulbWidget"),this._domNode.role="listbox",this._register(o.q.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide(),(1!==this.gutterState.type||!t||this.gutterState.editorPosition.lineNumber>=t.getLineCount())&&this.gutterHide()}))),this._register(s.Xc(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=s.BK(this._domNode),n=this._editor.getOption(67);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{1&~e.buttons||this.hide()}))),this._register(a.Jh.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,(()=>{this._preferredKbLabel=this._keybindingService.lookupKeybinding(g.pR)?.getLabel()??void 0,this._quickFixKbLabel=this._keybindingService.lookupKeybinding(g.pQ)?.getLabel()??void 0,this._updateLightBulbTitleAndIcon()}))),this._register(this._editor.onMouseDown((async e=>{if(!e.target.element||!this.lightbulbClasses.some((t=>e.target.element&&e.target.element.classList.contains(t))))return;if(1!==this.gutterState.type)return;this._editor.focus();const{top:t,height:i}=s.BK(e.target.element),n=this._editor.getOption(67);let o=Math.floor(n/3);null!==this.gutterState.widgetPosition.position&&this.gutterState.widgetPosition.position.lineNumber22,g=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1),p=this._editor.getLineDecorations(o);let f=!1;if(p)for(const e of p){const t=e.options.glyphMarginClassName;if(t&&!this.lightbulbClasses.some((e=>t.includes(e)))){f=!0;break}}let m=o,_=1;if(!h){const a=e=>{const t=s.getLineContent(e);return/^\s*$|^\s+/.test(t)||t.length<=_};if(o>1&&!g(o-1)){const r=o===s.getLineCount(),l=o>1&&a(o-1),c=!r&&a(o+1),d=a(o),h=!c&&!l;if(!(c||l||f))return this.gutterState=new S.Showing(e,t,i,{position:{lineNumber:m,column:_},preference:n._posPref}),this.renderGutterLightbub(),this.hide();l||r||l&&!d?m-=1:(c||h&&d)&&(m+=1)}else if(1!==o||o!==s.getLineCount()&&(a(o+1)||a(o))){if(o{this._gutterDecorationID=t.addDecoration(new _.Q(e,0,e,0),this.gutterDecoration)}))}_removeGutterDecoration(e){this._editor.changeDecorations((t=>{t.removeDecoration(e),this._gutterDecorationID=void 0}))}_updateGutterDecoration(e,t){this._editor.changeDecorations((i=>{i.changeDecoration(e,new _.Q(t,0,t,0)),i.changeDecorationOptions(e,this.gutterDecoration)}))}_updateLightbulbTitle(e,t){1===this.state.type&&(t?this.title=p.kg("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=p.kg("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=p.kg("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=p.kg("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}};var x,L;k=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(x=1,L=f.b,function(e,t){L(e,t,x)})],k)},78875:function(e,t,i){"use strict";i.d(t,{QA:function(){return d},Vi:function(){return h},aF:function(){return l},fo:function(){return r},gB:function(){return o},uJ:function(){return a}});var n=i(20187),s=i(74159);const o=new class{constructor(){this.QuickFix=new s.k("quickfix"),this.Refactor=new s.k("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new s.k("notebook"),this.Source=new s.k("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var r;function a(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>c(t,i,e.include)))||!e.includeSourceActions&&o.Source.contains(t))}function l(e,t){const i=t.kind?new s.k(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>c(i,t,e.include)))||!e.includeSourceActions&&i&&o.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}function c(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}!function(e){e.Refactor="refactor",e.RefactorPreview="refactor preview",e.Lightbulb="lightbulb",e.Default="other (default)",e.SourceAction="source action",e.QuickFix="quick fix action",e.FixAll="fix all",e.OrganizeImports="organize imports",e.AutoFix="auto fix",e.QuickFixHover="quick fix hover window",e.OnSave="save participants",e.ProblemsView="problems view"}(r||(r={}));class d{static fromUser(e,t){return e&&"object"==typeof e?new d(d.getKindFromUser(e,t.kind),d.getApplyFromUser(e,t.apply),d.getPreferredUser(e)):new d(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new s.k(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class h{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){if(this.provider?.resolveCodeAction&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(e){(0,n.M_)(e)}t&&(this.action.edit=t.edit)}return this}}},21991:function(e,t,i){"use strict";var n=i(90890),s=i(20187),o=i(35114),r=i(61554),a=i(52694),l=i(3520),c=i(49678),d=i(76611),h=i(24219),u=i(54244),g=i(59266),p=i(21335),f=i(69122);class m{constructor(){this.lenses=[],this._disposables=new o.Cm}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function _(e,t,i){const n=e.ordered(t),o=new Map,r=new m,a=n.map((async(e,n)=>{o.set(e,n);try{const n=await Promise.resolve(e.provideCodeLenses(t,i));n&&r.add(n,e)}catch(e){(0,s.M_)(e)}}));return await Promise.all(a),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:o.get(e.provider)o.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),r}p.w.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,h.j)(u.r.isUri(i)),(0,h.j)("number"==typeof n||!n);const{codeLensProvider:r}=e.get(f.ILanguageFeaturesService),a=e.get(g.IModelService).getModel(i);if(!a)throw(0,s.Qg)();const l=[],c=new o.Cm;return _(r,a,d.XO.None).then((e=>{c.add(e);const t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?l.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(a,i.symbol,d.XO.None)).then((e=>l.push(e||i.symbol))));return Promise.all(t)})).then((()=>l)).finally((()=>{setTimeout((()=>c.dispose()),100)}))}));var v=i(80670),b=i(52732),w=i(40393),C=i(48682),y=i(63619),S=i(87332),k=i(95601),x=i(84201);const L=(0,y.u1)("ICodeLensCache");class D{constructor(e,t){this.lineCount=e,this.data=t}}let E=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new b.qK(20,.75),(0,x.U3)(k.G,(()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i);const n=v.Jh.filter(e.onWillSaveState,(e=>e.reason===S.LP.SHUTDOWN));v.Jh.once(n)((i=>{e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>({range:e.symbol.range,command:e.symbol.command&&{id:"",title:e.symbol.command?.title}}))),n=new m;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new D(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new w.Q(e,1,e,11)});const s=new m;s.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new D(i.lineCount,s))}}catch{}}};var N,I;E=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(N=0,I=S.CS,function(e,t){I(e,t,N)})],E),(0,C.v)(L,E,1);var M=i(43014),T=i(49079);class R{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class P{static{this._idPool=0}constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+P._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let t=0;t{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:O},(e=>this._decorationIds[t]=e)),r=r?w.Q.plusRange(r,e.symbol.range):w.Q.lift(e.symbol.range)})),this._viewZone=new R(r.startLineNumber-1,s,o),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new P(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||w.Q.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:O},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;tthis._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(50)||e.hasChanged(19)||e.hasChanged(18))&&this._updateLensStyle(),e.hasChanged(17)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),this._currentCodeLensModel?.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=.9*this._editor.getOption(52)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",l.jU.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=void 0,this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),this._currentCodeLensModel?.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&(0,n.EQ)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4,this._localToDispose));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof t.onDidChange){const e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.uC((()=>{const t=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,n.SS)((t=>_(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((n=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=n,this._codeLensCache.put(e,n);const s=this._provideCodeLensDebounce.update(e,Date.now()-t);i.delay=s,this._renderCodeLensSymbols(n),this._resolveCodeLensesInViewportSoon()}),s.dz)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,o.s)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const s=new A;i.forEach((e=>{e.dispose(s,t),this._lenses.splice(this._lenses.indexOf(e),1)})),s.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorText((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidBlurEditorText((()=>{i.cancel()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,o.s)((()=>{if(this._editor.getModel()){const e=r.D.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===t?.tagName&&(t=t.parentElement),"A"===t?.tagName)for(const e of this._lenses){const i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new A;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let n;for(const s of e.lenses){const e=s.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(s):(n=[s],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=r.D.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new A;let s=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),s++,r++)}for(;sthis._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const e=this._editor.getModel();if(!e)return;const t=[],i=[];if(this._lenses.forEach((n=>{const s=n.computeIfNecessary(e);s&&(t.push(s),i.push(n))})),0===t.length)return;const o=Date.now(),r=(0,n.SS)((n=>{const o=t.map(((t,o)=>{const r=new Array(t.length),a=t.map(((t,i)=>t.symbol.command||"function"!=typeof t.provider.resolveCodeLens?(r[i]=t.symbol,Promise.resolve(void 0)):Promise.resolve(t.provider.resolveCodeLens(e,t.symbol,n)).then((e=>{r[i]=e}),s.M_)));return Promise.all(a).then((()=>{n.isCancellationRequested||i[o].isDisposed()||i[o].updateCommands(r)}))}));return Promise.all(o)}));this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then((()=>{const t=this._resolveCodeLensesDebounce.update(e,Date.now()-o);this._resolveCodeLensesScheduler.delay=t,this._currentCodeLensModel&&this._codeLensCache.put(e,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,s.dz)(e),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}async getModel(){return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,this._currentCodeLensModel?.isDisposed?void 0:this._currentCodeLensModel}};U=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([z(1,f.ILanguageFeaturesService),z(2,V.ILanguageFeatureDebounceService),z(3,p.d),z(4,W.Ot),z(5,L)],U),(0,a.HW)(U.ID,U,1),(0,a.Fl)(class extends a.ks{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:c.R.hasCodeLensProvider,label:(0,B.kg)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(H.GK),n=e.get(p.d),s=e.get(W.Ot),o=t.getSelection().positionLineNumber,r=t.getContribution(U.ID);if(!r)return;const a=await r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===o&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const c=await i.pick(l,{canPickMany:!1,placeHolder:(0,B.kg)("placeHolder","Select a command")});if(!c)return;let d=c.command;if(a.isDisposed){const e=await r.getModel(),t=e?.lenses.find((e=>e.symbol.range.startLineNumber===o&&e.symbol.command?.title===d.title));if(!t||!t.symbol.command)return;d=t.symbol.command}try{await n.executeCommand(d.id,...d.arguments||[])}catch(e){s.error(e)}}})},21274:function(e,t,i){"use strict";i.d(t,{R:function(){return g},j:function(){return u}});var n=i(76611),s=i(20187),o=i(54244),r=i(40393),a=i(59266),l=i(21335),c=i(69122),d=i(2431),h=i(47901);async function u(e,t,i,n=!0){return _(new p,e,t,i,n)}function g(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}class p{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const t of s)n.push({colorInfo:t,provider:e});return Array.isArray(s)}}class f{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const e of s)n.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(s)}}class m{constructor(e){this.colorInfo=e}async compute(e,t,i,s){const o=await e.provideColorPresentations(t,this.colorInfo,n.XO.None);return Array.isArray(o)&&s.push(...o),Array.isArray(o)}}async function _(e,t,i,n,o){let r,a=!1;const l=[],c=t.ordered(i);for(let t=c.length-1;t>=0;t--){const o=c[t];if(o instanceof d.L)r=o;else try{await e.compute(o,i,n,l)&&(a=!0)}catch(e){(0,s.M_)(e)}}return a?l:r&&o?(await e.compute(r,i,n,l),l):[]}function v(e,t){const{colorProvider:i}=e.get(c.ILanguageFeaturesService),n=e.get(a.IModelService).getModel(t);if(!n)throw(0,s.Qg)();return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:e.get(h.pG).getValue("editor.defaultColorDecorators",{resource:t})}}l.w.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof o.r))throw(0,s.Qg)();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=v(e,i);return _(new f,a,r,n.XO.None,l)})),l.w.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,a]=t,{uri:l,range:c}=a;if(!(l instanceof o.r&&Array.isArray(i)&&4===i.length&&r.Q.isIRange(c)))throw(0,s.Qg)();const{model:d,colorProviderRegistry:h,isDefaultColorDecoratorsEnabled:u}=v(e,l),[g,p,f,b]=i;return _(new m({range:c,color:{red:g,green:p,blue:f,alpha:b}}),h,d,n.XO.None,u)}))},55999:function(e,t,i){"use strict";var n=i(35114),s=i(52694),o=i(40393),r=i(76784),a=i(39978),l=i(52209),c=i(51059);class d extends n.jG{static{this.ID="editor.contrib.colorContribution"}constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(149);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==r.nM)return;if(!i.range)return;const n=this._editor.getContribution(l.A.ID);if(n&&!n.isColorPickerVisible){const e=new o.Q(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}(0,s.HW)(d.ID,d,2),c.B2.register(a.BJ)},76784:function(e,t,i){"use strict";i.d(t,{mn:function(){return C},nM:function(){return w}});var n,s=i(90890),o=i(59321),r=i(20187),a=i(80670),l=i(35114),c=i(43857),d=i(43920),h=i(55266),u=i(52694),g=i(40393),p=i(49079),f=i(82688),m=i(69122),_=i(21274),v=i(47901),b=function(e,t){return function(i,n){t(i,n,e)}};const w=Object.create({});let C=class extends l.jG{static{n=this}static{this.ID="editor.contrib.colorDetector"}static{this.RECOMPUTE_TIME=1e3}constructor(e,t,i,s){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new l.Cm),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new h.Qn(this._editor),this._decoratorLimitReporter=new y,this._colorDecorationClassRefs=this._register(new l.Cm),this._debounceInformation=s.for(i.colorProvider,"Document Colors",{min:n.RECOMPUTE_TIME}),this._register(e.onDidChangeModel((()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()}))),this._register(e.onDidChangeModelLanguage((()=>this.updateColors()))),this._register(i.colorProvider.onDidChange((()=>this.updateColors()))),this._register(e.onDidChangeConfiguration((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(21),n=e.hasChanged(148);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(148),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new s.pc,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}async beginCompute(){this._computePromise=(0,s.SS)((async e=>{const t=this._editor.getModel();if(!t)return[];const i=new c.W(!1),n=await(0,_.j)(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n}));try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){(0,r.dz)(e)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.kI.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let n=0;nthis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};C=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([b(1,v.pG),b(2,m.ILanguageFeaturesService),b(3,f.ILanguageFeatureDebounceService)],C);class y{constructor(){this._onDidChange=new a.vl,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}(0,u.HW)(C.ID,C,1)},39978:function(e,t,i){"use strict";i.d(t,{BJ:function(){return O},WE:function(){return B}});var n=i(90890),s=i(76611),o=i(59321),r=i(35114),a=i(40393),l=i(21274),c=i(76784),d=i(80670);class h{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new d.vl,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new d.vl,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let e=0;e{this.backgroundColor=e.getColor(b.WfR)||o.Q1.white}))),this._register(g.ko(this._pickedColorNode,g.Bx.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(g.ko(this._originalColorNode,g.Bx.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=o.Q1.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new S(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=o.Q1.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class S extends r.jG{constructor(e){super(),this._onClicked=this._register(new d.vl),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),g.BC(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),g.BC(this._button,t),g.BC(t,C(".button"+_.L.asCSSSelector((0,w.pU)("color-picker-close",m.W.close,(0,v.kg)("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register(g.ko(this._button,g.Bx.CLICK,(()=>{this._onClicked.fire()})))}}class k extends r.jG{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=C(".colorpicker-body"),g.BC(e,this._domNode),this._saturationBox=new x(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new D(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new E(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new N(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new o.Q1(new o.$J(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new o.Q1(new o.$J(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new o.Q1(new o.$J(360===i?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class x extends r.jG{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,this._domNode=C(".saturation-wrap"),g.BC(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",g.BC(this._domNode,this._canvas),this.selection=C(".saturation-selection"),g.BC(this._domNode,this.selection),this.layout(),this._register(g.ko(this._domNode,g.Bx.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;this.monitor=this._register(new p._);const t=g.BK(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=g.ko(e.target.ownerDocument,g.Bx.POINTER_UP,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new o.Q1(new o.$J(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=o.Q1.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class L extends r.jG{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new d.vl,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=g.BC(e,C(".standalone-strip")),this.overlay=g.BC(this.domNode,C(".standalone-overlay"))):(this.domNode=g.BC(e,C(".strip")),this.overlay=g.BC(this.domNode,C(".overlay"))),this.slider=g.BC(this.domNode,C(".slider")),this.slider.style.top="0px",this._register(g.ko(this.domNode,g.Bx.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._register(new p._),i=g.BK(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=g.ko(e.target.ownerDocument,g.Bx.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class D extends L{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,s=new o.Q1(new o.bU(t,i,n,1)),r=new o.Q1(new o.bU(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class E extends L{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class N extends r.jG{constructor(e){super(),this._onClicked=this._register(new d.vl),this.onClicked=this._onClicked.event,this._button=g.BC(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(g.ko(this._button,g.Bx.CLICK,(()=>{this._onClicked.fire()})))}get button(){return this._button}}class I extends f.x{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(u.c.getInstance(g.zk(e)).onDidChange((()=>this.layout()))),this._domNode=C(".colorpicker-widget"),e.appendChild(this._domNode),this.header=this._register(new y(this._domNode,this.model,n,s)),this.body=this._register(new k(this._domNode,this.model,this.pixelRatio,s))}layout(){this.body.layout()}get domNode(){return this._domNode}}var M=i(51059),T=i(40616),R=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},P=function(e,t){return function(i,n){t(i,n,e)}};class A{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let O=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return n.AE.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=c.mn.get(this._editor);if(!n)return[];for(const e of t){if(!n.isColorDecoration(e))continue;const t=n.getColorData(e.range.getStartPosition());if(t)return[await W(this,this._editor.getModel(),t.colorInfo,t.provider)]}return[]}renderHoverParts(e,t){const i=H(this,this._editor,this._themeService,t,e);if(!i)return new M.Ke([]);this._colorPicker=i.colorPicker;const n={hoverPart:i.hoverPart,hoverElement:this._colorPicker.domNode,dispose(){i.disposables.dispose()}};return new M.Ke([n])}handleResize(){this._colorPicker?.layout()}isColorPickerVisible(){return!!this._colorPicker}};O=R([P(1,T.Gy)],O);class F{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let B=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel())return null;if(!c.mn.get(this._editor))return null;const n=await(0,l.j)(i,this._editor.getModel(),s.XO.None);let o=null,r=null;for(const t of n){const i=t.colorInfo;a.Q.containsRange(i.range,e.range)&&(o=i,r=t.provider)}const d=o??e,h=r??t,u=!!o;return{colorHover:await W(this,this._editor.getModel(),d,h),foundInEditor:u}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new a.Q(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await z(this._editor.getModel(),t,this._color,i,e),i=V(this._editor,i,t))}renderHoverParts(e,t){return H(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};async function W(e,t,i,n){const r=t.getValueInRange(i.range),{red:c,green:d,blue:u,alpha:g}=i.color,p=new o.bU(Math.round(255*c),Math.round(255*d),Math.round(255*u),g),f=new o.Q1(p),m=await(0,l.R)(t,i,n,s.XO.None),_=new h(f,[],0);return _.colorPresentations=m||[],_.guessColorPresentation(f,r),e instanceof O?new A(e,a.Q.lift(i.range),_,n):new F(e,a.Q.lift(i.range),_,n)}function H(e,t,i,n,s){if(0===n.length||!t.hasModel())return;if(s.setMinimumDimensions){const e=t.getOption(67)+8;s.setMinimumDimensions(new g.fg(302,e))}const o=new r.Cm,l=n[0],c=t.getModel(),d=l.model,h=o.add(new I(s.fragment,d,t.getOption(144),i,e instanceof B));let u=!1,p=new a.Q(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn);if(e instanceof B){const t=l.model.color;e.color=t,z(c,d,t,p,l),o.add(d.onColorFlushed((t=>{e.color=t})))}else o.add(d.onColorFlushed((async e=>{await z(c,d,e,p,l),u=!0,p=V(t,p,d)})));return o.add(d.onDidChangeColor((e=>{z(c,d,e,p,l)}))),o.add(t.onDidChangeModelContent((e=>{u?u=!1:(s.hide(),t.focus())}))),{hoverPart:l,colorPicker:h,disposables:o}}function V(e,t,i){const n=[],s=i.presentation.textEdit??{range:t,text:i.presentation.label,forceMoveMarkers:!1};n.push(s),i.presentation.additionalTextEdits&&n.push(...i.presentation.additionalTextEdits);const o=a.Q.lift(s.range),r=e.getModel()._setTrackedRange(null,o,3);return e.executeEdits("colorpicker",n),e.pushUndoStop(),e.getModel()._getTrackedRange(r)??o}async function z(e,t,i,n,o){const r=await(0,l.R)(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},o.provider,s.XO.None);t.colorPresentations=r||[]}B=R([P(1,T.Gy)],B)},2431:function(e,t,i){"use strict";i.d(t,{L:function(){return d}});var n=i(59321),s=i(35114),o=i(69122),r=i(23534),a=i(56812),l=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},c=function(e,t){return function(i,n){t(i,n,e)}};let d=class{constructor(e){this._editorWorkerService=e}async provideDocumentColors(e,t){return this._editorWorkerService.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const s=t.range,o=t.color,r=o.alpha,a=new n.Q1(new n.bU(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),r)),l=r?n.Q1.Format.CSS.formatRGB(a):n.Q1.Format.CSS.formatRGBA(a),c=r?n.Q1.Format.CSS.formatHSL(a):n.Q1.Format.CSS.formatHSLA(a),d=r?n.Q1.Format.CSS.formatHex(a):n.Q1.Format.CSS.formatHexA(a),h=[];return h.push({label:l,textEdit:{range:s,text:l}}),h.push({label:c,textEdit:{range:s,text:c}}),h.push({label:d,textEdit:{range:s,text:d}}),h}};d=l([c(0,a.IEditorWorkerService)],d);let h=class extends s.jG{constructor(e,t){super(),this._register(e.colorProvider.register("*",new d(t)))}};h=l([c(0,o.ILanguageFeaturesService),c(1,a.IEditorWorkerService)],h),(0,r.x)(h)},90581:function(e,t,i){"use strict";var n,s,o=i(52694),r=i(14374),a=i(35114),l=i(39978),c=i(63619),d=i(21914),h=i(87163),u=i(80670),g=i(69122),p=i(49678),f=i(97848),m=i(2431),_=i(84201),v=i(56812),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};let C=class extends a.jG{static{n=this}static{this.ID="editor.contrib.standaloneColorPickerController"}constructor(e,t,i){super(),this._editor=e,this._instantiationService=i,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=p.R.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=p.R.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||this._standaloneColorPickerWidget?.focus():this._standaloneColorPickerWidget=this._instantiationService.createInstance(y,this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused))}hide(){this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerWidget?.hide(),this._editor.focus()}insertColor(){this._standaloneColorPickerWidget?.updateEditor(),this.hide()}static get(e){return e.getContribution(n.ID)}};C=n=b([w(1,f.fN),w(2,c._Y)],C),(0,o.HW)(C.ID,C,1);let y=class extends a.jG{static{s=this}static{this.ID="editor.contrib.standaloneColorPickerWidget"}constructor(e,t,i,n,s,o,r){super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._keybindingService=s,this._languageFeaturesService=o,this._editorWorkerService=r,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new u.vl),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(l.WE,this._editor),this._position=this._editor._getViewModel()?.getPrimaryCursorState().modelState.position;const a=this._editor.getSelection(),c=a?{startLineNumber:a.startLineNumber,startColumn:a.startColumn,endLineNumber:a.endLineNumber,endColumn:a.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},d=this._register(_.w5(this._body));this._register(d.onDidBlur((e=>{this.hide()}))),this._register(d.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{const t=e.target.element?.classList;t&&t.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(c),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return s.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new S(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new m.L(this._editorWorkerService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment(),n={fragment:i,statusBar:this._register(new d.L(this._keybindingService)),onContentsChanged:()=>{},hide:()=>this.hide()};this._colorHover=e;const s=this._standaloneColorPickerParticipant.renderHoverParts(n,[e]);if(!s)return;this._register(s.disposables);const o=s.colorPicker;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),o.layout();const r=o.body,a=r.saturationBox.domNode.clientWidth,l=r.domNode.clientWidth-a-22-8,c=o.body.enterButton;c?.onClicked((()=>{this.updateEditor(),this.hide()}));const h=o.header;h.pickedColorNode.style.width=a+8+"px",h.originalColorNode.style.width=l+"px";const u=o.header.closeButton;u?.onClicked((()=>{this.hide()})),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};y=s=b([w(3,c._Y),w(4,h.b),w(5,g.ILanguageFeaturesService),w(6,v.IEditorWorkerService)],y);class S{constructor(e,t){this.value=e,this.foundInEditor=t}}var k=i(93223);class x extends o.qO{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...(0,r.aS)("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:(0,r.kg)({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:k.D8.CommandPalette}],metadata:{description:(0,r.aS)("showOrFocusStandaloneColorPickerDescription","Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){C.get(t)?.showOrFocus()}}class L extends o.ks{constructor(){super({id:"editor.action.hideColorPicker",label:(0,r.kg)({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:p.R.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:(0,r.aS)("hideColorPickerDescription","Hide the standalone color picker.")}})}run(e,t){C.get(t)?.hide()}}class D extends o.ks{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,r.kg)({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:p.R.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:(0,r.aS)("insertColorWithStandaloneColorPickerDescription","Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){C.get(t)?.insertColor()}}(0,o.Fl)(L),(0,o.Fl)(D),(0,k.ug)(x)},77334:function(e,t,i){"use strict";var n=i(62167),s=i(52694),o=i(40393),r=i(49678),a=i(8494),l=i(48905),c=i(62993),d=i(56218);class h{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let s=0;s=65&&n<=90&&n+32===o||o>=65&&o<=90&&o+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=s.getLineContent(a),g=s.getLineContent(c);let p,f=u.lastIndexOf(t,l-1+t.length),m=g.indexOf(i,d-1-i.length);if(-1!==f&&-1!==m)if(a===c)u.substring(f+t.length,m).indexOf(i)>=0&&(f=-1,m=-1);else{const e=u.substring(f+t.length),n=g.substring(0,m);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(f=-1,m=-1)}-1!==f&&-1!==m?(n&&f+t.length0&&32===g.charCodeAt(m-1)&&(i=" "+i,m-=1),p=h._createRemoveBlockCommentOperations(new o.Q(a,f+t.length+1,c,m+1),t,i)):(p=h._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===p.length?i:null);for(const e of p)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return o.Q.isEmpty(e)?n.push(l.k.delete(new o.Q(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.k.delete(new o.Q(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.k.delete(new o.Q(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return o.Q.isEmpty(e)?s.push(l.k.replace(new o.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(l.k.insert(new c.y(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(l.k.insert(new c.y(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),o=this.languageConfigurationService.getLanguageConfiguration(s).comments;o&&o.blockCommentStartToken&&o.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,o.blockCommentStartToken,o.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new d.L(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new d.L(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var u=i(43920);class g{constructor(e,t,i,n,s,o,r){this.languageConfigurationService=e,this._selection=t,this._indentSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),o=n.getLanguageConfiguration(s).comments,r=o?o.lineCommentToken:null;if(!r)return null;const a=[];for(let e=0,n=i-t+1;er?s-1:s}}}var p=i(14374),f=i(93223);class m extends s.ks{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(a.JZ);if(!t.hasModel())return;const n=[],s=t.getModel().getOptions(),r=t.getOption(23),l=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));l.sort(((e,t)=>o.Q.compareRangesUsingStarts(e.selection,t.selection)));let c=l[0];for(let e=1;ethis._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&s.jG(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(24)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.getMenuActions(t,this._contextKeyService,{arg:e.uri});for(const t of n){const[,n]=t;let s=0;for(const t of n)if(t instanceof u.nI){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new r.YH(t.id,t.label,n)),s++)}else i.push(t),s++;s&&i.push(new r.wv)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=s.BK(this._editor.getDomNode()),i=t.left+e.left,o=t.top+e.top+e.height;n={x:i,y:o}}const r=this._editor.getOption(128)&&!l.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getOverflowWidgetsDomNode()??this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new o.Z4(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new o.Z4(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if((0,_.ct)(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(73);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:void 0===e.enabled||e.enabled,checked:e.checked,run:e.run}),s=(e,t,s,o,a)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const l=e=>()=>{this._configurationService.updateValue(s,e)},c=[];for(const e of a)c.push(n({label:e.label,checked:o===e.value,run:l(e.value)}));return((e,t)=>new r.YH("menu-action-"+ ++i,e,t,void 0))(e,c)},o=[];o.push(n({label:h.kg("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),o.push(new r.wv),o.push(n({label:h.kg("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),o.push(s(h.kg("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:h.kg("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:h.kg("context.minimap.size.fill","Fill"),value:"fill"},{label:h.kg("context.minimap.size.fit","Fit"),value:"fit"}])),o.push(s(h.kg("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:h.kg("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:h.kg("context.minimap.slider.always","Always"),value:"always"}]));const a=this._editor.getOption(128)&&!l.un;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:a?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>o,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};b=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([v(1,p.Z),v(2,p.l),v(3,g.fN),v(4,f.b),v(5,u.ez),v(6,m.pG),v(7,_.VR)],b);class w extends c.ks{constructor(){super({id:"editor.action.showContextMenu",label:h.kg("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:d.R.textInputFocus,primary:1092,weight:100}})}run(e,t){b.get(t)?.showContextMenu()}}(0,c.HW)(b.ID,b,2),(0,c.Fl)(w)},61856:function(e,t,i){"use strict";var n=i(35114),s=i(52694),o=i(49678),r=i(14374);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}class d extends s.ks{constructor(){super({id:"cursorUndo",label:r.kg("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:o.R.textInputFocus,primary:2099,weight:100}})}run(e,t,i){c.get(t)?.cursorUndo()}}class h extends s.ks{constructor(){super({id:"cursorRedo",label:r.kg("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){c.get(t)?.cursorRedo()}}(0,s.HW)(c.ID,c,0),(0,s.Fl)(d),(0,s.Fl)(h)},98068:function(e,t,i){"use strict";var n=i(97358),s=i(73755),o=i(78537),r=i(72540),a=i(69122),l=i(51099),c=i(35114),d=i(80670),h=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends c.jG{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=(0,s.FY)(this,void 0);const n=(0,s.yQ)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),o=(0,s.yQ)("_textModel.onDidChangeContent",d.Jh.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register((0,s.yC)((async(e,t)=>{n.read(e),o.read(e);const i=t.add(new r.MZ),s=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(s,void 0)})))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const s=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return s.sort((0,n.Hw)((0,n.VE)((e=>e.range.endLineNumber-e.range.startLineNumber),n.U9))),s.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};u=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([h(1,a.ILanguageFeaturesService),h(2,l.gW)],u),o.N.setBreadcrumbsSourceFactory(((e,t)=>t.createInstance(u,e)))},52783:function(e,t,i){"use strict";var n=i(35114),s=i(79783),o=i(52694),r=i(62993),a=i(40393),l=i(56218),c=i(49079);class d{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.Q(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.L(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.L(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(h(e)&&(this._modifierPressed=!0),this._mouseDown&&h(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(h(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===u.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(null===this._dragSelection){const e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}h(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new r.y(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:s}=e;i=[new l.L(n,s,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new l.L(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(h(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(u.ID,new d(this._dragSelection,t,h(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}static{this._DECORATION_OPTIONS=c.kI.register({description:"dnd-target",className:"dnd-target"})}showAt(e){this._dndDecorationIds.set([{range:new a.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:u._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}(0,o.HW)(u.ID,u,2)},40756:function(e,t,i){"use strict";var n=i(76611),s=i(24219),o=i(54244),r=i(20878),a=i(51099);i(21335).w.registerCommand("_executeDocumentSymbolProvider",(async function(e,...t){const[i]=t;(0,s.j)(o.r.isUri(i));const l=e.get(a.gW),c=e.get(r.ITextModelService),d=await c.createModelReference(i);try{return(await l.getOrCreate(d.object.textEditorModel,n.XO.None)).getTopLevelSymbols()}finally{d.dispose()}}))},51099:function(e,t,i){"use strict";i.d(t,{LC:function(){return v},e0:function(){return b},gW:function(){return C},i9:function(){return w}});var n=i(97358),s=i(76611),o=i(20187),r=i(26182),a=i(52732),l=i(62993),c=i(40393),d=i(82688),h=i(63619),u=i(48682),g=i(59266),p=i(35114),f=i(69122),m=function(e,t){return function(i,n){t(i,n,e)}};class _{remove(){this.parent?.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class v extends _{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class b extends _{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class w extends _{static create(e,t,i){const r=new s.Qi(i),a=new w(t.uri),l=e.ordered(t),c=l.map(((e,i)=>{const n=_.findId(`provider_${i}`,a),s=new b(n,a,e.displayName??"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,r.token)).then((e=>{for(const t of e||[])w._makeOutlineElement(t,s);return s}),(e=>((0,o.M_)(e),s))).then((e=>{_.empty(e)?e.remove():a._groups.set(n,e)}))})),d=e.onDidChange((()=>{const i=e.ordered(t);(0,n.aI)(i,l)||r.cancel()}));return Promise.all(c).then((()=>r.token.isCancellationRequested&&!i.isCancellationRequested?w.create(e,t,i):a._compact())).finally((()=>{r.dispose(),d.dispose(),r.dispose()}))}static _makeOutlineElement(e,t){const i=_.findId(e,t),n=new v(i,t,e);if(e.children)for(const t of e.children)w._makeOutlineElement(t,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=r.f.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof v?e.push(t.symbol):e.push(...r.f.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>c.Q.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return w._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>l.y.compare(c.Q.getStartPosition(e.range),c.Q.getStartPosition(t.range))||l.y.compare(c.Q.getEndPosition(t.range),c.Q.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&w._flattenDocumentSymbols(e,n.children,n.name)}}const C=(0,h.u1)("IOutlineModelService");let y=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new p.Cm,this._cache=new a.qK(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,o=i.ordered(e);let r=this._cache.get(e.id);if(!r||r.versionId!==e.getVersionId()||!(0,n.aI)(r.provider,o)){const t=new s.Qi;r={versionId:e.getVersionId(),provider:o,promiseCnt:0,source:t,promise:w.create(i,e,t.token),model:void 0},this._cache.set(e.id,r);const n=Date.now();r.promise.then((t=>{r.model=t,this._debounceInformation.update(e,Date.now()-n)})).catch((t=>{this._cache.delete(e.id)}))}if(r.model)return r.model;r.promiseCnt+=1;const a=t.onCancellationRequested((()=>{0==--r.promiseCnt&&(r.source.cancel(),this._cache.delete(e.id))}));try{return await r.promise}finally{a.dispose()}}};y=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([m(0,f.ILanguageFeaturesService),m(1,d.ILanguageFeatureDebounceService),m(2,g.IModelService)],y),(0,u.v)(C,y,1)},3191:function(e,t,i){"use strict";var n=i(74159),s=i(52694),o=i(49678),r=i(23534),a=i(22117),l=i(8100),c=i(14374);(0,s.HW)(a.Rj.ID,a.Rj,0),(0,r.x)(l.L9),(0,s.E_)(new class extends s.DX{constructor(){super({id:a.qs,precondition:a.lr,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t){return a.Rj.get(t)?.changePasteType()}}),(0,s.E_)(new class extends s.DX{constructor(){super({id:"editor.hidePasteWidget",precondition:a.lr,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t){a.Rj.get(t)?.clearWidgets()}}),(0,s.Fl)(class e extends s.ks{static{this.argsSchema={type:"object",properties:{kind:{type:"string",description:c.kg("pasteAs.kind","The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}}}constructor(){super({id:"editor.action.pasteAs",label:c.kg("pasteAs","Paste As..."),alias:"Paste As...",precondition:o.R.writable,metadata:{description:"Paste as",args:[{name:"args",schema:e.argsSchema}]}})}run(e,t,i){let s="string"==typeof i?.kind?i.kind:void 0;return!s&&i&&(s="string"==typeof i.id?i.id:void 0),a.Rj.get(t)?.pasteAs(s?new n.k(s):void 0)}}),(0,s.Fl)(class extends s.ks{constructor(){super({id:"editor.action.pasteAsText",label:c.kg("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:o.R.writable})}run(e,t){return a.Rj.get(t)?.pasteAs({providerId:l.LR.id})}})},22117:function(e,t,i){"use strict";i.d(t,{Rj:function(){return F},lr:function(){return A},qs:function(){return P}});var n,s=i(84201),o=i(97358),r=i(90890),a=i(76611),l=i(71859),c=i(74159),d=i(35114),h=i(5940),u=i(79783),g=i(20419),p=i(55036),f=i(92559),m=i(98325),_=i(40393),v=i(35720),b=i(69122),w=i(8100),C=i(43009),y=i(765),S=i(57972),k=i(7588),x=i(14374),L=i(42558),D=i(97848),E=i(63619),N=i(86171),I=i(43575),M=i(80307),T=i(20187),R=function(e,t){return function(i,n){t(i,n,e)}};const P="editor.changePasteType",A=new D.N1("pasteWidgetVisible",!1,(0,x.kg)("pasteWidgetVisible","Whether the paste widget is showing")),O="application/vnd.code.copyMetadata";let F=class extends d.jG{static{n=this}static{this.ID="editor.contrib.copyPasteActionController"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,o,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=o,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register((0,s.ko)(l,"copy",(e=>this.handleCopy(e)))),this._register((0,s.ko)(l,"cut",(e=>this.handleCopy(e)))),this._register((0,s.ko)(l,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new S.I("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(M.G,"pasteIntoEditor",e,A,{id:P,label:(0,x.kg)("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},(0,s.a)().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){if(!this._editor.hasTextFocus())return;if(this._clipboardService.clearInternalState?.(),!e.clipboardData||!this.isPasteAsEnabled())return;const t=this._editor.getModel(),i=this._editor.getSelections();if(!t||!i?.length)return;const s=this._editor.getOption(37);let a=i;const l=1===i.length&&i[0].isEmpty();if(l){if(!s)return;a=[new _.Q(a[0].startLineNumber,1,a[0].startLineNumber,1+t.getLineLength(a[0].startLineNumber))]}const c=this._editor._getViewModel()?.getPlainTextToCopy(i,s,u.uF),d={multicursorText:Array.isArray(c)?c:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e=>!!e.prepareDocumentPaste));if(!h.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});const p=(0,f.q)(e.clipboardData),m=h.flatMap((e=>e.copyMimeTypes??[])),v=(0,g.b)();this.setCopyMetadata(e.clipboardData,{id:v,providerCopyMimeTypes:m,defaultPastePayload:d});const b=(0,r.SS)((async e=>{const i=(0,o.Yc)(await Promise.all(h.map((async i=>{try{return await i.prepareDocumentPaste(t,a,p,e)}catch(e){return void console.error(e)}}))));i.reverse();for(const e of i)for(const[t,i]of e)p.replace(t,i);return p}));n._currentCopyOperation?.dataTransferPromise.cancel(),n._currentCopyOperation={handle:v,dataTransferPromise:b}}async handlePaste(e){if(!e.clipboardData||!this._editor.hasTextFocus())return;k.k.get(this._editor)?.closeMessage(),this._currentPasteOperation?.cancel(),this._currentPasteOperation=void 0;const t=this._editor.getModel(),i=this._editor.getSelections();if(!i?.length||!t)return;if(this._editor.getOption(92)||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const n=this.fetchCopyMetadata(e),s=(0,f.l)(e.clipboardData);s.delete(O);const o=[...e.clipboardData.types,...n?.providerCopyMimeTypes??[],h.K.uriList],r=this._languageFeaturesService.documentPasteEditProvider.ordered(t).filter((e=>{const t=this._pasteAsActionContext?.preferred;return!(t&&e.providedPasteEditKinds&&!this.providerMatchesPreference(e,t))&&e.pasteMimeTypes?.some((e=>(0,l.Y)(e,o)))}));r.length?(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,r,i,s,n):this.doPasteInline(r,i,s,n,e)):this._pasteAsActionContext?.preferred&&this.showPasteAsNoEditMessage(i,this._pasteAsActionContext.preferred)}showPasteAsNoEditMessage(e,t){k.k.get(this._editor)?.showMessage((0,x.kg)("pasteAsError","No paste edits for '{0}' found",t instanceof c.k?t.value:t.providerId),e[0].getStartPosition())}doPasteInline(e,t,i,n,s){const o=this._editor;if(!o.hasModel())return;const l=new y.gI(o,3,void 0),c=(0,r.SS)((async o=>{const h=this._editor;if(!h.hasModel())return;const u=h.getModel(),g=new d.Cm,p=g.add(new a.Qi(o));g.add(l.token.onCancellationRequested((()=>p.cancel())));const f=p.token;try{if(await this.mergeInDataFromCopy(i,n,f),f.isCancellationRequested)return;const o=e.filter((e=>this.isSupportedPasteProvider(e,i)));if(!o.length||1===o.length&&o[0]instanceof w.LR)return this.applyDefaultPasteHandler(i,n,f,s);const a={triggerKind:v.FX.Automatic},l=await this.getPasteEdits(o,i,u,t,a,f);if(g.add(l),f.isCancellationRequested)return;if(1===l.edits.length&&l.edits[0].provider instanceof w.LR)return this.applyDefaultPasteHandler(i,n,f,s);if(l.edits.length){const e="afterPaste"===h.getOption(85).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:l.edits},e,((e,i)=>new Promise(((n,s)=>{(async()=>{try{const o=e.provider.resolveDocumentPasteEdit?.(e,i),a=new r.Zv,l=o&&await this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,x.kg)("resolveProcess","Resolving paste edit. Click to cancel"),Promise.race([a.p,o]),{cancel:()=>(a.cancel(),s(new T.AL))},0);return l&&(e.additionalEdit=l.additionalEdit),n(e)}catch(e){return s(e)}})()}))),f)}await this.applyDefaultPasteHandler(i,n,f,s)}finally{g.dispose(),this._currentPasteOperation===c&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),(0,x.kg)("pasteIntoEditorProgress","Running paste handlers. Click to cancel and do basic paste"),c,{cancel:async()=>{try{if(c.cancel(),l.token.isCancellationRequested)return;await this.applyDefaultPasteHandler(i,n,l.token,s)}finally{l.dispose()}}}).then((()=>{l.dispose()})),this._currentPasteOperation=c}showPasteAsPick(e,t,i,n,s){const o=(0,r.SS)((async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),h=new d.Cm,u=h.add(new y.gI(a,3,void 0,r));try{if(await this.mergeInDataFromCopy(n,s,u.token),u.token.isCancellationRequested)return;let o=t.filter((t=>this.isSupportedPasteProvider(t,n,e)));e&&(o=o.filter((t=>this.providerMatchesPreference(t,e))));const r={triggerKind:v.FX.PasteAs,only:e&&e instanceof c.k?e:void 0};let a,d=h.add(await this.getPasteEdits(o,n,l,i,r,u.token));if(u.token.isCancellationRequested)return;if(e&&(d={edits:d.edits.filter((t=>e instanceof c.k?e.contains(t.kind):e.providerId===t.provider.id)),dispose:d.dispose}),!d.edits.length)return void(r.only&&this.showPasteAsNoEditMessage(i,r.only));if(e)a=d.edits.at(0);else{const e=await this._quickInputService.pick(d.edits.map((e=>({label:e.title,description:e.kind?.value,edit:e}))),{placeHolder:(0,x.kg)("pasteAsPickerPlaceholder","Select Paste Action")});a=e?.edit}if(!a)return;const g=(0,C.v)(l.uri,i,a);await this._bulkEditService.apply(g,{editor:this._editor})}finally{h.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:(0,x.kg)("pasteAsProgress","Running paste handlers")},(()=>o))}setCopyMetadata(e,t){e.setData(O,JSON.stringify(t))}fetchCopyMetadata(e){if(!e.clipboardData)return;const t=e.clipboardData.getData(O);if(t)try{return JSON.parse(t)}catch{return}const[i,n]=p.Mz.getTextData(e.clipboardData);return n?{defaultPastePayload:{mode:n.mode,multicursorText:n.multicursorText??null,pasteOnNewLine:!!n.isFromEmptySelection}}:void 0}async mergeInDataFromCopy(e,t,i){if(t?.id&&n._currentCopyOperation?.handle===t.id){const t=await n._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(h.K.uriList)){const t=await this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(h.K.uriList,(0,l.gf)(l.jt.create(t)))}}async getPasteEdits(e,t,i,n,s,a){const l=new d.Cm,c=await(0,r.PK)(Promise.all(e.map((async e=>{try{const o=await(e.provideDocumentPasteEdits?.(i,n,t,s,a));return o&&l.add(o),o?.edits?.map((t=>({...t,provider:e})))}catch(e){return void((0,T.MB)(e)||console.error(e))}}))),a),h=(0,o.Yc)(c??[]).flat().filter((e=>!s.only||s.only.contains(e.kind)));return{edits:(0,C.H)(h),dispose:()=>l.dispose()}}async applyDefaultPasteHandler(e,t,i,n){const s=e.get(h.K.text)??e.get("text"),o=await(s?.asString())??"";if(i.isCancellationRequested)return;const r={clipboardEvent:n,text:o,pasteOnNewLine:t?.defaultPastePayload.pasteOnNewLine??!1,multicursorText:t?.defaultPastePayload.multicursorText??null,mode:null};this._editor.trigger("keyboard","paste",r)}isSupportedPasteProvider(e,t,i){return!!e.pasteMimeTypes?.some((e=>t.matches(e)))&&(!i||this.providerMatchesPreference(e,i))}providerMatchesPreference(e,t){return t instanceof c.k?!e.providedPasteEditKinds||e.providedPasteEditKinds.some((e=>t.contains(e))):e.id===t.providerId}};F=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([R(1,E._Y),R(2,m.nu),R(3,L.h),R(4,b.ILanguageFeaturesService),R(5,I.GK),R(6,N.G5)],F)},8100:function(e,t,i){"use strict";i.d(t,{L9:function(){return k},LR:function(){return v},ZR:function(){return S}});var n=i(97358),s=i(71859),o=i(74159),r=i(35114),a=i(5940),l=i(84756),c=i(59951),d=i(54244),h=i(35720),u=i(69122),g=i(14374),p=i(1255),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m=function(e,t){return function(i,n){t(i,n,e)}};class _{async provideDocumentPasteEdits(e,t,i,n,s){const o=await this.getEdit(i,s);if(o)return{edits:[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,n){const s=await this.getEdit(i,n);if(s)return{edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}],dispose(){}}}}class v extends _{constructor(){super(...arguments),this.kind=v.kind,this.dropMimeTypes=[a.K.text],this.pasteMimeTypes=[a.K.text]}static{this.id="text"}static{this.kind=new o.k("text.plain")}async getEdit(e,t){const i=e.get(a.K.text);if(!i)return;if(e.has(a.K.uriList))return;const n=await i.asString();return{handledMimeType:a.K.text,title:(0,g.kg)("text.label","Insert Plain Text"),insertText:n,kind:this.kind}}}class b extends _{constructor(){super(...arguments),this.kind=new o.k("uri.absolute"),this.dropMimeTypes=[a.K.uriList],this.pasteMimeTypes=[a.K.uriList]}async getEdit(e,t){const i=await y(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map((({uri:e,originalText:t})=>e.scheme===l.ny.file?e.fsPath:(n++,t))).join(" ");let o;return o=n>0?i.length>1?(0,g.kg)("defaultDropProvider.uriList.uris","Insert Uris"):(0,g.kg)("defaultDropProvider.uriList.uri","Insert Uri"):i.length>1?(0,g.kg)("defaultDropProvider.uriList.paths","Insert Paths"):(0,g.kg)("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:a.K.uriList,insertText:s,title:o,kind:this.kind}}}let w=class extends _{constructor(e){super(),this._workspaceContextService=e,this.kind=new o.k("uri.relative"),this.dropMimeTypes=[a.K.uriList],this.pasteMimeTypes=[a.K.uriList]}async getEdit(e,t){const i=await y(e);if(!i.length||t.isCancellationRequested)return;const s=(0,n.Yc)(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?(0,c.iZ)(t.uri,e):void 0})));return s.length?{handledMimeType:a.K.uriList,insertText:s.join(" "),title:i.length>1?(0,g.kg)("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):(0,g.kg)("defaultDropProvider.uriList.relativePath","Insert Relative Path"),kind:this.kind}:void 0}};w=f([m(0,p.VR)],w);class C{constructor(){this.kind=new o.k("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:a.K.text}]}async provideDocumentPasteEdits(e,t,i,n,s){if(n.triggerKind!==h.FX.PasteAs&&!n.only?.contains(this.kind))return;const o=i.get("text/html"),r=await(o?.asString());return r&&!s.isCancellationRequested?{dispose(){},edits:[{insertText:r,yieldTo:this._yieldTo,title:(0,g.kg)("pasteHtmlLabel","Insert HTML"),kind:this.kind}]}:void 0}}async function y(e){const t=e.get(a.K.uriList);if(!t)return[];const i=await t.asString(),n=[];for(const e of s.jt.parse(i))try{n.push({uri:d.r.parse(e),originalText:e})}catch{}return n}let S=class extends r.jG{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new v)),this._register(e.documentDropEditProvider.register("*",new b)),this._register(e.documentDropEditProvider.register("*",new w(t)))}};S=f([m(0,u.ILanguageFeaturesService),m(1,p.VR)],S);let k=class extends r.jG{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new v)),this._register(e.documentPasteEditProvider.register("*",new b)),this._register(e.documentPasteEditProvider.register("*",new w(t))),this._register(e.documentPasteEditProvider.register("*",new C))}};k=f([m(0,u.ILanguageFeaturesService),m(1,p.VR)],k)},23623:function(e,t,i){"use strict";var n,s=i(52694),o=i(38047),r=i(23534),a=i(8100),l=i(14374),c=i(16434),d=i(56419),h=i(97358),u=i(90890),g=i(71859),p=i(74159),f=i(35114),m=i(92559),_=i(40393),v=i(69122),b=i(73559),w=i(61152),C=i(765),y=i(57972),S=i(47901),k=i(97848),x=i(19312),L=i(63619),D=i(43009),E=i(80307),N=function(e,t){return function(i,n){t(i,n,e)}};const I="editor.experimental.dropIntoEditor.defaultProvider",M="editor.changeDropType",T=new k.N1("dropWidgetVisible",!1,(0,l.kg)("dropWidgetVisible","Whether the drop widget is showing"));let R=class extends f.jG{static{n=this}static{this.ID="editor.contrib.dropIntoEditorController"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=x.PD.getInstance(),this._dropProgressManager=this._register(t.createInstance(y.I,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(E.G,"dropIntoEditor",e,T,{id:M,label:(0,l.kg)("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){if(!i.dataTransfer||!e.hasModel())return;this._currentOperation?.cancel(),e.focus(),e.setPosition(t);const n=(0,u.SS)((async s=>{const o=new f.Cm,r=o.add(new C.gI(e,1,void 0,s));try{const n=await this.extractDataTransferData(i);if(0===n.size||r.token.isCancellationRequested)return;const a=e.getModel();if(!a)return;const l=this._languageFeaturesService.documentDropEditProvider.ordered(a).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>n.matches(e))))),c=o.add(await this.getDropEdits(l,a,t,n,r));if(r.token.isCancellationRequested)return;if(c.edits.length){const i=this.getInitialActiveEditIndex(a,c.edits),n="afterDrop"===e.getOption(36).showDropSelector;await this._postDropWidgetManager.applyEditAndShowIfNeeded([_.Q.fromPositions(t)],{activeEditIndex:i,allEdits:c.edits},n,(async e=>e),s)}}finally{o.dispose(),this._currentOperation===n&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,(0,l.kg)("dropIntoEditorProgress","Running drop handlers. Click to cancel"),n,{cancel:()=>n.cancel()}),this._currentOperation=n}async getDropEdits(e,t,i,n,s){const o=new f.Cm,r=await(0,u.PK)(Promise.all(e.map((async e=>{try{const r=await e.provideDocumentDropEdits(t,i,n,s.token);return r&&o.add(r),r?.edits.map((t=>({...t,providerId:e.id})))}catch(e){console.error(e)}}))),s.token),a=(0,h.Yc)(r??[]).flat();return{edits:(0,D.H)(a),dispose:()=>o.dispose()}}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(I,{resource:e.uri});for(const[e,n]of Object.entries(i)){const i=new p.k(n),s=t.findIndex((t=>i.value===t.providerId&&t.handledMimeType&&(0,g.Y)(e,[t.handledMimeType])));if(s>=0)return s}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new g.Vq;const t=(0,m.l)(e.dataTransfer);if(this.treeItemsTransfer.hasData(b.DraggedTreeItemsIdentifier.prototype)){const e=this.treeItemsTransfer.getData(b.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(e))for(const i of e){const e=await this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}};R=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([N(1,L._Y),N(2,S.pG),N(3,v.ILanguageFeaturesService),N(4,w.ITreeViewsDnDService)],R),(0,s.HW)(R.ID,R,2),(0,r.x)(a.ZR),(0,s.E_)(new class extends s.DX{constructor(){super({id:M,precondition:T,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){R.get(t)?.changeDropType()}}),(0,s.E_)(new class extends s.DX{constructor(){super({id:"editor.hideDropWidget",precondition:T,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t,i){R.get(t)?.clearWidgets()}}),d.O.as(c.Fd.Configuration).registerConfiguration({...o.JJ,properties:{[I]:{type:"object",scope:5,description:l.kg("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}})},43009:function(e,t,i){"use strict";i.d(t,{H:function(){return r},v:function(){return o}});var n=i(98325),s=i(62347);function o(e,t,i){return("string"==typeof i.insertText?""===i.insertText:""===i.insertText.snippet)?{edits:i.additionalEdit?.edits??[]}:{edits:[...t.map((t=>new n.cw(e,{range:t,text:"string"==typeof i.insertText?s.fr.escape(i.insertText)+"$0":i.insertText.snippet,insertAsSnippet:!0}))),...i.additionalEdit?.edits??[]]}}function r(e){function t(e,t){return"mimeType"in e?e.mimeType===t.handledMimeType:!!t.kind&&e.kind.contains(t.kind)}const i=new Map;for(const n of e)for(const s of n.yieldTo??[])for(const o of e)if(o!==n&&t(s,o)){let e=i.get(n);e||(e=[],i.set(n,e)),e.push(o)}if(!i.size)return Array.from(e);const n=new Set,s=[];return function e(t){if(!t.length)return[];const o=t[0];if(s.includes(o))return console.warn("Yield to cycle detected",o),t;if(n.has(o))return e(t.slice(1));let r=[];const a=i.get(o);return a&&(s.push(o),r=e(a),s.pop()),n.add(o),[...r,o,...e(t.slice(1))]}(Array.from(e))}},80307:function(e,t,i){"use strict";i.d(t,{G:function(){return y}});var n,s=i(84201),o=i(96337),r=i(30981),a=i(14697),l=i(20187),c=i(80670),d=i(35114),h=i(98325),u=i(43009),g=i(14374),p=i(97848),f=i(14280),m=i(63619),_=i(87163),v=i(31835),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};let C=class extends d.jG{static{n=this}static{this.baseId="editor.widget.postEditWidget"}constructor(e,t,i,n,s,o,r,a,l,h){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=o,this.onSelectNewEdit=r,this._contextMenuService=a,this._keybindingService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(l),this.visibleContext.set(!0),this._register((0,d.s)((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,d.s)((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{s.containsPosition(e.position)||this.dispose()}))),this._register(c.Jh.runAndSubscribe(h.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){const e=this._keybindingService.lookupKeybinding(this.showCommand.id)?.getLabel();this.button.element.title=this.showCommand.label+(e?` (${e})`:"")}create(){this.domNode=s.$(".post-edit-widget"),this.button=this._register(new o.$(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(s.ko(this.domNode,s.Bx.CLICK,(()=>this.showSelector())))}getId(){return n.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=s.BK(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>(0,r.ih)({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};C=n=b([w(7,f.Z),w(8,p.fN),w(9,_.b)],C);let y=class extends d.jG{constructor(e,t,i,n,s,o,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=o,this._notificationService=r,this._currentWidget=this._register(new d.HE),this._register(c.Jh.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}async applyEditAndShowIfNeeded(e,t,i,n,s){const o=this._editor.getModel();if(!o||!e.length)return;const r=t.allEdits.at(t.activeEditIndex);if(!r)return;const c=async o=>{const r=this._editor.getModel();r&&(await r.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:o,allEdits:t.allEdits},i,n,s))},d=(n,s)=>{(0,l.MB)(n)||(this._notificationService.error(s),i&&this.show(e[0],t,c))};let h;try{h=await n(r,s)}catch(e){return d(e,(0,g.kg)("resolveError","Error resolving edit '{0}':\n{1}",r.title,(0,a.r)(e)))}if(s.isCancellationRequested)return;const p=(0,u.v)(o.uri,e,h),f=e[0],m=o.deltaDecorations([],[{range:f,options:{description:"paste-line-suffix",stickiness:0}}]);let _,v;this._editor.focus();try{_=await this._bulkEditService.apply(p,{editor:this._editor,token:s}),v=o.getDecorationRange(m[0])}catch(e){return d(e,(0,g.kg)("applyError","Error applying edit '{0}':\n{1}",r.title,(0,a.r)(e)))}finally{o.deltaDecorations(m,[])}s.isCancellationRequested||i&&_.isApplied&&t.allEdits.length>1&&this.show(v??f,t,c)}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(C,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){this._currentWidget.value?.showSelector()}};y=b([w(4,m._Y),w(5,h.nu),w(6,v.Ot)],y)},765:function(e,t,i){"use strict";i.d(t,{$t:function(){return m},gI:function(){return _},ER:function(){return v}});var n=i(43920),s=i(40393),o=i(76611),r=i(35114),a=i(52694),l=i(97848),c=i(54409),d=i(63619),h=i(48682),u=i(14374);const g=(0,d.u1)("IEditorCancelService"),p=new l.N1("cancellableOperation",!1,(0,u.kg)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,h.v)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:p.bindTo(e.get(l.fN)),tokens:new c.w}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class f extends o.Qi{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.E_)(new class extends a.DX{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:p})}runEditorCommand(e,t){e.get(g).cancel(t)}});class m{constructor(e,t){if(this.flags=t,1&this.flags){const t=e.getModel();this.modelVersionId=t?n.GP("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;4&this.flags?this.position=e.getPosition():this.position=null,2&this.flags?this.selection=e.getSelection():this.selection=null,8&this.flags?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof m))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new m(e,this.flags))}}class _ extends f{constructor(e,t,i,n){super(e,n),this._listener=new r.Cm,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&s.Q.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&s.Q.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends o.Qi{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}},23793:function(e,t,i){"use strict";i.d(t,{z0:function(){return at}});var n=i(90890),s=i(35114),o=i(43920),r=i(52694),a=i(99851),l=i(49678),c=i(62067),d=i(64429),h=i(24608),u=i(62993),g=i(40393),p=i(56218),f=i(58980),m=i(49079),_=i(4195),v=i(40616);class b{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new g.Q(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=b._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,o=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(s.push({range:new g.Q(r,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=i.startLineNumber,a=i.endLineNumber)}s.push({range:new g.Q(r,1,a,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const o=new Array(e.length);for(let t=0,i=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,b._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){const e=[];for(let t=0;tg.Q.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function y(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function S(e,t,i){const n=t.split(i),s=e[0].split(i);let o="";return n.forEach(((e,t)=>{o+=C([s[t]],e)+i})),o.slice(0,-1)}class k{constructor(e){this.staticValue=e,this.kind=0}}class x{constructor(e){this.pieces=e,this.kind=1}}class L{static fromStaticValue(e){return new L([D.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new k(e[0].staticValue):this._state=new x(e):this._state=new k("")}buildReplaceString(e,t){if(0===this._state.kind)return t?C(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t0){const e=[],t=n.caseOps.length;let i=0;for(let o=0,r=s.length;o=t){e.push(s.slice(o));break}switch(n.caseOps[i]){case"U":e.push(s[o].toUpperCase());break;case"u":e.push(s[o].toUpperCase()),i++;break;case"L":e.push(s[o].toLowerCase());break;case"l":e.push(s[o].toLowerCase()),i++;break;default:e.push(s[o])}}s=e.join("")}i+=s}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(e{if(this._editor.hasModel())return this.research(!1)}),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,s.AS)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new g.Q(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,G);this._decorations.set(n,i);const s=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(s);if(0===o&&n.length>0){const e=(0,d.hw)(n.map((e=>e.range)),(e=>g.Q.compareRangesUsingStarts(e,s)>=0));o=e>0?e-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||1===n?(1===i?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new u.y(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new u.y(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=s)break;const o=e.charCodeAt(n);if(36===o){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===o||38===o){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=o&&o<=57){let r=o-48;if(n+1=s)break;const o=e.charCodeAt(n);switch(o){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(o))}}}return i.finalize()}(this._state.replaceString):L.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const n=e.buildReplaceString(i.matches,this._state.preserveCase),s=new h.iu(t,n);this._executeEditorCommand("replace",s),this._decorations.setStartPosition(new u.y(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>Q._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=G?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new f.lt(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(132):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),s=i.getFullModelRange(),o=this._getReplacePattern();let r;const a=this._state.preserveCase;r=o.hasReplacementPatterns||a?n.replace(t,(function(){return o.buildReplaceString(arguments,a)})):n.replace(t,o.buildReplaceString(null,a));const l=new h.ui(s,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,s=i.length;ee.range)),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let t=this._findMatches(e,!1,1073741824).map((e=>new p.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const i=this._editor.getSelection();for(let e=0,n=t.length;ethis._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s={inputActiveOptionBorder:(0,_.GuP)(_.uNK),inputActiveOptionForeground:(0,_.GuP)(_.$$0),inputActiveOptionBackground:(0,_.GuP)(_.c1f)},o=this._register((0,J.bW)());this.caseSensitive=this._register(new Z.bc({appendTitle:this._keybindingLabelFor(V),isChecked:this._state.matchCase,hoverDelegate:o,...s})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new Z.nV({appendTitle:this._keybindingLabelFor(z),isChecked:this._state.wholeWord,hoverDelegate:o,...s})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new Z.Ix({appendTitle:this._keybindingLabelFor(U),isChecked:this._state.isRegex,hoverDelegate:o,...s})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Y.ko(this._domNode,Y.Bx.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(Y.ko(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ee.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}var te=i(80670);function ie(e,t){return 1===e||2!==e&&t}class ne extends s.jG{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ie(this._isRegexOverride,this._isRegex)}get wholeWord(){return ie(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ie(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ie(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new te.vl),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),void 0!==i&&(g.Q.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){const n={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;const o=this.isRegex,r=this.wholeWord,a=this.matchCase,l=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,n.searchString=!0,s=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,n.replaceString=!0,s=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,n.isRevealed=!0,s=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,n.isReplaceRevealed=!0,s=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&(e.searchScope?.every((e=>this._searchScope?.some((t=>!g.Q.equalsRange(t,e)))))||(this._searchScope=e.searchScope,n.searchScope=!0,s=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,n.loop=!0,s=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,n.isSearching=!0,s=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,n.filters=!0,s=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,o!==this.isRegex&&(s=!0,n.isRegex=!0),r!==this.wholeWord&&(s=!0,n.wholeWord=!0),a!==this.matchCase&&(s=!0,n.matchCase=!0),l!==this.preserveCase&&(s=!0,n.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(n)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=G}}var se=i(15075),oe=i(44925),re=i(38175),ae=i(93231),le=i(20187),ce=i(79783),de=i(14374),he=i(87438);function ue(e){return"Up"===e.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()&&"Down"===e.lookupKeybinding("history.showNext")?.getElectronAccelerator()}var ge=i(51310),pe=i(56613),fe=i(39679),me=i(24219),_e=i(52010);const ve=(0,ge.pU)("find-collapsed",ae.W.chevronRight,de.kg("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),be=(0,ge.pU)("find-expanded",ae.W.chevronDown,de.kg("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),we=(0,ge.pU)("find-selection",ae.W.selection,de.kg("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Ce=(0,ge.pU)("find-replace",ae.W.replace,de.kg("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),ye=(0,ge.pU)("find-replace-all",ae.W.replaceAll,de.kg("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Se=(0,ge.pU)("find-previous-match",ae.W.arrowUp,de.kg("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),ke=(0,ge.pU)("find-next-match",ae.W.arrowDown,de.kg("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),xe=de.kg("label.findDialog","Find / Replace"),Le=de.kg("label.find","Find"),De=de.kg("placeholder.find","Find"),Ee=de.kg("label.previousMatchButton","Previous Match"),Ne=de.kg("label.nextMatchButton","Next Match"),Ie=de.kg("label.toggleSelectionFind","Find in Selection"),Me=de.kg("label.closeButton","Close"),Te=de.kg("label.replace","Replace"),Re=de.kg("placeholder.replace","Replace"),Pe=de.kg("label.replaceButton","Replace"),Ae=de.kg("label.replaceAllButton","Replace All"),Oe=de.kg("label.toggleReplaceButton","Toggle Replace"),Fe=de.kg("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",G),Be=de.kg("label.matchesLocation","{0} of {1}"),We=de.kg("label.noResults","No results"),He=419;let Ve=69;const ze="ctrlEnterReplaceAll.windows.donotask",Ue=ce.zx?256:2048;class je{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function qe(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function Ke(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(92)&&(this._codeEditor.getOption(92)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(146)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(41)){const e=this._codeEditor.getOption(41).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new je(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((async()=>{if(this._isVisible){const e=await this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}}))),this._findInputFocused=M.bindTo(a),this._findFocusTracker=this._register(Y.w5(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=T.bindTo(a),this._replaceFocusTracker=this._register(Y.w5(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new je(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return $e.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(92)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Y.Tr(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,le.dz)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Ve+"px",this._state.matchesCount>=G?this._matchesCount.title=Fe:this._matchesCount.title="",this._matchesCount.firstChild?.remove(),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=G&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=o.GP(Be,i,t)}else e=We;this._matchesCount.appendChild(document.createTextNode(e)),(0,se.xE)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Ve=Math.max(Ve,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===We)return""===i?de.kg("ariaSearchNoResultEmpty","{0} found",e):de.kg("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=de.kg("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();return s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1?`${s.getLineContent(t.startLineNumber)}, ${n}`:n}return de.kg("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(92);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Y.BK(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=n.left+(s?s.left:0),r=s?s.top:0;if(this._viewZone&&re.startLineNumber&&(t=!1);const i=Y.cL(this._domNode).left;o>i&&(t=!1);const s=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(s?s.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new je(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;const s=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(84).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,s=!1,o=!1;if(this._resized&&Y.Tr(this._domNode)>He)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Y.Tr(this._findInput.domNode));if(447+i>=t&&(s=!0),447+i-Ve>=t&&(o=!0),447+i-Ve>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",o),this._domNode.classList.toggle("reduced-find-widget",s),o||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._findInput.layout({collapsedFindWidget:n,narrowFindWidget:o,reducedFindWidget:s}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Y.Tr(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||g.Q.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|Ue)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?qe(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?Ke(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|Ue)?(this._keybindingService.dispatchEvent(e,e.target)||(ce.uF&&ce.ib&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(de.kg("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ze,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?qe(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?Ke(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const e=!0,t=!0;this._findInput=this._register(new he.pG(null,this._contextViewProvider,{width:221,label:Le,placeholder:De,appendCaseSensitiveLabel:this._keybindingLabelFor(V),appendWholeWordsLabel:this._keybindingLabelFor(z),appendRegexLabel:this._keybindingLabelFor(U),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>ue(this._keybindingService),inputBoxStyles:_e.ho,toggleStyles:_e.mk},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),ce.j9&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const i=this._register((0,J.bW)());this._prevBtn=this._register(new Ge({label:Ee+this._keybindingLabelFor(W),icon:Se,hoverDelegate:i,onTrigger:()=>{(0,me.eU)(this._codeEditor.getAction(W)).run().then(void 0,le.dz)}},this._hoverService)),this._nextBtn=this._register(new Ge({label:Ne+this._keybindingLabelFor(B),icon:ke,hoverDelegate:i,onTrigger:()=>{(0,me.eU)(this._codeEditor.getAction(B)).run().then(void 0,le.dz)}},this._hoverService));const n=document.createElement("div");n.className="find-part",n.appendChild(this._findInput.domNode);const s=document.createElement("div");s.className="find-actions",n.appendChild(s),s.appendChild(this._matchesCount),s.appendChild(this._prevBtn.domNode),s.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new oe.l({icon:we,title:Ie+this._keybindingLabelFor(j),isChecked:!1,hoverDelegate:i,inputActiveOptionBackground:(0,_.GuP)(_.c1f),inputActiveOptionBorder:(0,_.GuP)(_.uNK),inputActiveOptionForeground:(0,_.GuP)(_.$$0)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),s.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Ge({label:Me+this._keybindingLabelFor(H),icon:ge.$_,hoverDelegate:i,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new he._Q(null,void 0,{label:Te,placeholder:Re,appendPreserveCaseLabel:this._keybindingLabelFor(q),history:[],flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showHistoryHint:()=>ue(this._keybindingService),inputBoxStyles:_e.ho,toggleStyles:_e.mk},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())})));const o=this._register((0,J.bW)());this._replaceBtn=this._register(new Ge({label:Pe+this._keybindingLabelFor(K),icon:Ce,hoverDelegate:o,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new Ge({label:Ae+this._keybindingLabelFor($),icon:ye,hoverDelegate:o,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const r=document.createElement("div");r.className="replace-part",r.appendChild(this._replaceInput.domNode);const a=document.createElement("div");a.className="replace-actions",r.appendChild(a),a.appendChild(this._replaceBtn.domNode),a.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Ge({label:Oe,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Y.Tr(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=xe,this._domNode.role="dialog",this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(n),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(r),this._resizeSash=this._register(new re.m(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let l=He;this._register(this._resizeSash.onDidStart((()=>{l=Y.Tr(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=l+e.startX-e.currentX;t(parseFloat(Y.L9(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Y.Tr(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Y.Tr(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown?.(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...pe.L.asClassNameArray(ve)),this._domNode.classList.add(...pe.L.asClassNameArray(be))):(this._domNode.classList.remove(...pe.L.asClassNameArray(be)),this._domNode.classList.add(...pe.L.asClassNameArray(ve)))}}(0,v.zy)(((e,t)=>{const i=e.getColor(_.ECk);i&&t.addRule(`.monaco-editor .findMatch { border: 1px ${(0,fe.Bb)(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`);const n=e.getColor(_.S5J);n&&t.addRule(`.monaco-editor .findScope { border: 1px ${(0,fe.Bb)(e.type)?"dashed":"solid"} ${n}; }`);const s=e.getColor(_.b1q);s&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${s}; }`);const o=e.getColor(_.f3U);o&&t.addRule(`.monaco-editor .findMatchInline { color: ${o}; }`);const r=e.getColor(_.p8Y);r&&t.addRule(`.monaco-editor .currentFindMatchInline { color: ${r}; }`)}));var Qe,Ye=i(93223),Ze=i(42558),Xe=i(14280),Je=i(87163),et=i(31835),tt=i(43575),it=i(87332),nt=i(74856),st=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ot=function(e,t){return function(i,n){t(i,n,e)}};function rt(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let at=class extends s.jG{static{Qe=this}static{this.ID="editor.contrib.findController"}get editor(){return this._editor}static get(e){return e.getContribution(Qe.ID)}constructor(e,t,i,s,o,r){super(),this._editor=e,this._findWidgetVisible=I.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=s,this._notificationService=o,this._hoverService=r,this._updateHistoryDelayer=new n.ve(500),this._state=this._register(new ne),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!M.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=o.bm(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const i={...t,isRevealed:!0};if("single"===e.seedSearchStringFromSelection){const t=rt(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=o.bm(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=rt(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new Q(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._editor.getModel()?.isTooLargeForHeapOperation()?(this._notificationService.warn(de.kg("too.large.for.replaceall","The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0))}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};at=Qe=st([ot(1,N.fN),ot(2,it.CS),ot(3,Ze.h),ot(4,et.Ot),ot(5,nt.TN)],at);let lt=class extends at{constructor(e,t,i,n,s,o,r,a,l){super(e,i,r,a,o,l),this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new $e(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new ee(this._editor,this._state,this._keybindingService))}};lt=st([ot(1,Xe.l),ot(2,N.fN),ot(3,Je.b),ot(4,v.Gy),ot(5,et.Ot),ot(6,it.CS),ot(7,Ze.h),ot(8,nt.TN)],lt),(0,r.gW)(new r.PF({id:"actions.find",label:de.kg("startFindAction","Find"),alias:"Find",precondition:N.M$.or(l.R.focus,N.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Ye.D8.MenubarEditMenu,group:"3_find",title:de.kg({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})).addImplementation(0,((e,t,i)=>{const n=at.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})}));const ct={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class dt extends r.ks{constructor(){super({id:"editor.actions.findWithArgs",label:de.kg("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:ct})}async run(e,t,i){const n=at.get(t);if(n){const e=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:i?.findInSelection||!1,loop:t.getOption(41).loop},e),n.setGlobalBufferTerm(n.getState().searchString)}}}class ht extends r.ks{constructor(){super({id:"actions.findWithSelection",label:de.kg("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=at.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}class ut extends r.ks{async run(e,t){const i=at.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===i.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class gt extends r.ks{constructor(){super({id:"editor.action.goToMatchFindAction",label:de.kg("findMatchAction.goToMatch","Go to Match..."),alias:"Go to Match...",precondition:I}),this._highlightDecorations=[]}run(e,t,i){const n=at.get(t);if(!n)return;const o=n.getState().matchesCount;if(o<1)return void e.get(et.Ot).notify({severity:et.AI.Warning,message:de.kg("findMatchAction.noResults","No matches. Try searching for something else.")});const r=e.get(tt.GK),a=new s.Cm,l=a.add(r.createInputBox());l.placeholder=de.kg("findMatchAction.inputPlaceHolder","Type a number to go to a specific match (between 1 and {0})",o);const c=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},d=e=>{const i=c(e);if("number"==typeof i){l.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else l.validationMessage=de.kg("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};a.add(l.onDidChangeValue((e=>{d(e)}))),a.add(l.onDidAccept((()=>{const e=c(l.value);"number"==typeof e?(n.goToMatch(e),l.hide()):l.validationMessage=de.kg("findMatchAction.inputValidationMessage","Please type a number between 1 and {0}",n.getState().matchesCount)}))),a.add(l.onDidHide((()=>{this.clearDecorations(t),a.dispose()}))),l.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,v.Yf)(a.vp),position:c.A5.Full}}}])}))}}class pt extends r.ks{async run(e,t){const i=at.get(t);if(!i)return;const n=rt(t,"single",!1);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}(0,r.gW)(new r.PF({id:"editor.action.startFindReplaceAction",label:de.kg("startReplace","Replace"),alias:"Replace",precondition:N.M$.or(l.R.focus,N.M$.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Ye.D8.MenubarEditMenu,group:"3_find",title:de.kg({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})).addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(92))return!1;const n=at.get(t);if(!n)return!1;const s=t.getSelection(),o=n.isFindInputFocused(),r=!s.isEmpty()&&s.startLineNumber===s.endLineNumber&&"never"!==t.getOption(41).seedSearchStringFromSelection&&!o,a=o||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(41).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})})),(0,r.HW)(at.ID,lt,0),(0,r.Fl)(dt),(0,r.Fl)(ht),(0,r.Fl)(class extends ut{constructor(){super({id:B,label:de.kg("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.R.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:N.M$.and(l.R.focus,M),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}),(0,r.Fl)(class extends ut{constructor(){super({id:W,label:de.kg("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.R.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:N.M$.and(l.R.focus,M),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}),(0,r.Fl)(gt),(0,r.Fl)(class extends pt{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:de.kg("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.R.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}),(0,r.Fl)(class extends pt{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:de.kg("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.R.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}});const ft=r.DX.bindToContribution(at.get);(0,r.E_)(new ft({id:H,precondition:I,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:N.M$.and(l.R.focus,N.M$.not("isComposing")),primary:9,secondary:[1033]}})),(0,r.E_)(new ft({id:V,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,r.E_)(new ft({id:z,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,r.E_)(new ft({id:U,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),(0,r.E_)(new ft({id:j,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,r.E_)(new ft({id:q,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),(0,r.E_)(new ft({id:K,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:3094}})),(0,r.E_)(new ft({id:K,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:N.M$.and(l.R.focus,T),primary:3}})),(0,r.E_)(new ft({id:$,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:2563}})),(0,r.E_)(new ft({id:$,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:N.M$.and(l.R.focus,T),primary:void 0,mac:{primary:2051}}})),(0,r.E_)(new ft({id:"editor.action.selectAllMatches",precondition:I,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.R.focus,primary:515}}))},69904:function(e,t,i){"use strict";i.d(t,{WR:function(){return W},BP:function(){return H}});var n=i(90890),s=i(76611),o=i(20187),r=i(62167),a=i(35114),l=i(43920),c=i(24219),d=i(61554),h=i(52694),u=i(49678),g=i(35720),p=i(8494),f=i(93795),m=i(64429),_=i(80670),v=i(40393),b=i(64266);class w{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new _.vl,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==(0,b.W)(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,s=Number.MAX_VALUE,o=-1;const r=this._foldingModel.regions;for(;i0}isHidden(e){return null!==C(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const s=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=C(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,o=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function C(e,t){const i=(0,m.hw)(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}var y,S=i(59691),k=i(14374),x=i(97848),L=i(54961),D=i(4046),E=i(45692),N=i(31835),I=i(82688),M=i(43857),T=i(69122),R=i(21335),P=i(54244),A=i(59266),O=i(47901),F=function(e,t){return function(i,n){t(i,n,e)}};const B=new x.N1("foldingEnabled",!1);let W=class extends a.jG{static{y=this}static{this.ID="editor.contrib.folding"}static get(e){return e.getContribution(y.ID)}static getFoldingRangeProviders(e,t){const i=e.foldingRangeProvider.ordered(t);return y._foldingRangeSelector?.(i,t)??i}constructor(e,t,i,n,s,o){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=o,this.localToDispose=this._register(new a.Cm),this.editor=e,this._foldingLimitReporter=new H(e);const r=this.editor.getOptions();this._isEnabled=r.get(43),this._useFoldingProviders="indentation"!==r.get(44),this._unfoldOnClickAfterEndOfLine=r.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=r.get(46),this.updateDebounceInfo=s.for(o.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new L.rv(e),this.foldingDecorationProvider.showFoldingControls=r.get(111),this.foldingDecorationProvider.showFoldingHighlights=r.get(45),this.foldingEnabled=B.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(47)&&this.onModelChanged(),e.hasChanged(111)||e.hasChanged(45)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(111),this.foldingDecorationProvider.showFoldingHighlights=e.get(45),this.triggerFoldingModelChanged()}e.hasChanged(44)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(44),this.onFoldingStrategyChanged()),e.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),e.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new f.pN(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new w(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new n.ve(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new n.uC((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new S.hW(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=y.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new E.M(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){this.hiddenRangeModel?.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new M.W,i=this.getRangeProvider(e.textModel),s=this.foldingRegionPromise=(0,n.SS)((e=>i.compute(e)));return s.then((i=>{if(i&&s===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(g.lO.Imports.value,!0);e&&(n=d.D.capture(this.editor),this._currentModelHasFoldedImports=e)}const s=this.editor.getSelections();e.update(i,function(e){return e&&0!==e.length?{startsInside(t,i){for(const n of e){const e=n.startLineNumber;if(e>=t&&e<=i)return!0}return!1}}:{startsInside:()=>!1}}(s)),n?.restore(this.editor);const o=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=o)}return e}))})).then(void 0,(e=>((0,o.dz)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,o.dz)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<4)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!s||s.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||s.startColumn!==e.getLineMaxColumn(i))return}const o=t.getRegionAtLine(i);if(o&&o.startLineNumber===i){const s=o.isCollapsed;if(n||s){let n=[];if(e.event.altKey){const e=e=>!e.containedBy(o)&&!o.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(o))e.isCollapsed===s&&n.push(e);!s&&i&&0!==n.length||n.push(o)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};W=y=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([F(1,x.fN),F(2,p.JZ),F(3,N.Ot),F(4,I.ILanguageFeatureDebounceService),F(5,T.ILanguageFeaturesService)],W);class H{constructor(e){this.editor=e,this._onDidChange=new _.vl,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class V extends h.ks{runEditorCommand(e,t,i){const n=e.get(p.JZ),s=W.get(t);if(!s)return;const o=s.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(s,e,t,i,n);const o=t.getSelection();o&&s.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function z(e){if(!c.b0(e)){if(!c.Gv(e))return!1;const t=e;if(!c.b0(t.levels)&&!c.Et(t.levels))return!1;if(!c.b0(t.direction)&&!c.Kg(t.direction))return!1;if(!(c.b0(t.selectionLines)||Array.isArray(t.selectionLines)&&t.selectionLines.every(c.Et)))return!1}return!0}class U extends V{static{this.ID_PREFIX="editor.foldLevel"}static{this.ID=e=>U.ID_PREFIX+e}getFoldingLevel(){return parseInt(this.id.substr(U.ID_PREFIX.length))}invoke(e,t,i){(0,f.sO)(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}(0,h.HW)(W.ID,W,0),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfold",label:k.kg("unfoldAction.label","Unfold"),alias:"Unfold",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:z,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=n&&n.levels||1,o=this.getLineNumbers(n,i);n&&"up"===n.direction?(0,f.dN)(t,!1,s,o):(0,f.uV)(t,!1,s,o)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfoldRecursively",label:k.kg("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2142),weight:100}})}invoke(e,t,i,n){(0,f.uV)(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.fold",label:k.kg("foldAction.label","Fold"),alias:"Fold",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:z,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const s=this.getLineNumbers(n,i),o=n&&n.levels,r=n&&n.direction;"number"!=typeof o&&"string"!=typeof r?(0,f.W8)(t,!0,s):"up"===r?(0,f.dN)(t,!0,o||1,s):(0,f.uV)(t,!0,o||1,s)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldRecursively",label:k.kg("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.uV)(t,!0,Number.MAX_VALUE,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.toggleFoldRecursively",label:k.kg("toggleFoldRecursivelyAction.label","Toggle Fold Recursively"),alias:"Toggle Fold Recursively",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,3114),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.bC)(t,Number.MAX_VALUE,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldAll",label:k.kg("foldAllAction.label","Fold All"),alias:"Fold All",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2069),weight:100}})}invoke(e,t,i){(0,f.uV)(t,!0)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfoldAll",label:k.kg("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2088),weight:100}})}invoke(e,t,i){(0,f.uV)(t,!1)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldAllBlockComments",label:k.kg("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2138),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).comments;if(n&&n.blockCommentStartToken){const e=new RegExp("^\\s*"+(0,l.bm)(n.blockCommentStartToken));(0,f.AI)(t,e,!0)}}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldAllMarkerRegions",label:k.kg("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2077),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,f.AI)(t,e,!0)}}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:k.kg("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2078),weight:100}})}invoke(e,t,i,n,s){if(t.regions.hasTypes())(0,f.cL)(t,g.lO.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=s.getLanguageConfiguration(e.getLanguageId()).foldingRules;if(n&&n.markers&&n.markers.start){const e=new RegExp(n.markers.start);(0,f.AI)(t,e,!1)}}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.foldAllExcept",label:k.kg("foldAllExcept.label","Fold All Except Selected"),alias:"Fold All Except Selected",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2136),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.GR)(t,!0,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.unfoldAllExcept",label:k.kg("unfoldAllExcept.label","Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2134),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.GR)(t,!1,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.toggleFold",label:k.kg("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2090),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);(0,f.bC)(t,1,n)}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.gotoParentFold",label:k.kg("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.kK)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.gotoPreviousFold",label:k.kg("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.JX)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.gotoNextFold",label:k.kg("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=(0,f.pr)(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:k.kg("createManualFoldRange.label","Create Folding Range from Selection"),alias:"Create Folding Range from Selection",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2135),weight:100}})}invoke(e,t,i){const n=[],s=i.getSelections();if(s){for(const e of s){let t=e.endLineNumber;1===e.endColumn&&--t,t>e.startLineNumber&&(n.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(n.length>0){n.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=D.tz.sanitizeAndMerge(t.regions,n,i.getModel()?.getLineCount());t.updatePost(D.tz.fromFoldRanges(e))}}}}),(0,h.Fl)(class extends V{constructor(){super({id:"editor.removeManualFoldingRanges",label:k.kg("removeManualFoldingRanges.label","Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}});for(let e=1;e<=7;e++)(0,h.xX)(new U({id:U.ID(e),label:k.kg("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:B,kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2048|21+e),weight:100}}));R.w.registerCommand("_executeFoldingRangeProvider",(async function(e,...t){const[i]=t;if(!(i instanceof P.r))throw(0,o.Qg)();const n=e.get(T.ILanguageFeaturesService),r=e.get(A.IModelService).getModel(i);if(!r)throw(0,o.Qg)();const a=e.get(O.pG);if(!a.getValue("editor.folding",{resource:i}))return[];const l=e.get(p.JZ),c=a.getValue("editor.foldingStrategy",{resource:i}),d={get limit(){return a.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},h=new S.hW(r,l,d);let u=h;if("indentation"!==c){const e=W.getFoldingRangeProviders(n,r);e.length&&(u=new E.M(r,e,(()=>{}),d,h))}const f=await u.compute(s.XO.None),m=[];try{if(f)for(let e=0;ee.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,s=-1,o=-1;const r=e=>{for(;no&&(o=e),n++}};for(const i of e){const e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);const i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),s=Math.max(s,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let e=0;ei&&(i=o)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e){const t=[];for(let i=0,n=this._regions.length;i=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>i)continue;const o=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);t.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,isCollapsed:s.isCollapsed,source:s.source,checksum:o})}return t.length>0?t:void 0}applyMemento(e){if(!Array.isArray(e))return;const t=[],i=this._textModel.getLineCount();for(const n of e){if(n.startLineNumber>=n.endLineNumber||n.startLineNumber<1||n.endLineNumber>i)continue;const e=this._getLinesChecksum(n.startLineNumber+1,n.endLineNumber);n.checksum&&e!==n.checksum||t.push({startLineNumber:n.startLineNumber,endLineNumber:n.endLineNumber,type:void 0,isCollapsed:n.isCollapsed??!0,source:n.source??0})}const n=s.tz.sanitizeAndMerge(this._regions,t,i);this.updatePost(s.tz.fromFoldRanges(n))}_getLinesChecksum(e,t){return(0,o.tW)(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){const e=this._regions.toRegion(n);t&&!t(e,s)||i.push(e),s++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let o=n,r=this._regions.length;o0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,o=this._regions.length;e1){const o=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==s&&i0)for(const o of n){const n=e.getRegionAtLine(o);if(n&&(n.isCollapsed!==t&&s.push(n),i>1)){const o=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));s.push(...n)}e.toggleCollapseState(s)}function d(e,t,i){const n=[];for(const s of i){const i=e.getAllRegionsAtLine(s,(e=>e.isCollapsed!==t));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}function h(e,t,i,n){const s=e.getRegionsInside(null,((e,s)=>s===t&&e.isCollapsed!==i&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(s)}function u(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,void 0);i.length>0&&n.push(i[0])}const s=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(s)}function g(e,t,i){const n=e.textModel,s=e.regions,o=[];for(let e=s.length-1;e>=0;e--)if(i!==s.isCollapsed(e)){const i=s.getStartLineNumber(e);t.test(n.getLineContent(i))&&o.push(s.toRegion(e))}e.toggleCollapseState(o)}function p(e,t,i){const n=e.regions,s=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&s.push(n.toRegion(e));e.toggleCollapseState(s)}function f(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}function m(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}return null}function _(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new r(e.length),this._userDefinedStates=new r(e.length),this._recoveredStates=new r(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;is||o>s)throw new Error("startLineNumber or endLineNumber must not exceed "+s);for(;e.length>0&&!t(n,o);)e.pop();const r=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&r)<<24),this._endIndexes[i]=o+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&s}getEndLineNumber(e){return this._endIndexes[e]&s}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&o)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(e)?i=>ii=d.startLineNumber))c&&c.startLineNumber===d.startLineNumber?(1===d.source?e=d:(e=c,e.isCollapsed=d.isCollapsed&&(c.endLineNumber===d.endLineNumber||!n?.startsInside(c.startLineNumber+1,c.endLineNumber+1)),e.source=0),c=o(++a)):(e=d,d.isCollapsed&&0===d.source&&(e.source=2)),d=r(++l);else{let t=l,i=d;for(;;){if(!i||i.startLineNumber>c.endLineNumber){e=c;break}if(1===i.source&&i.endLineNumber>c.endLineNumber)break;i=r(++t)}c=o(++a)}if(e){for(;u&&u.endLineNumbere.startLineNumber&&e.startLineNumber>g&&e.endLineNumber<=i&&(!u||u.endLineNumber>=e.endLineNumber)&&(p.push(e),g=e.startLineNumber,u&&h.push(u),u=e)}}return p}}class l{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}},59691:function(e,t,i){"use strict";i.d(t,{hW:function(){return o}});var n=i(43573),s=i(4046);class o{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id="indent"}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,s=t&&t.markers;return Promise.resolve(function(e,t,i,s=a){const o=e.getOptions().tabSize,l=new r(s);let c;i&&(c=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const d=[],h=e.getLineCount()+1;d.push({indent:-1,endAbove:h,line:h});for(let i=e.getLineCount();i>0;i--){const s=e.getLineContent(i),r=(0,n.G)(s,o);let a,h=d[d.length-1];if(-1!==r){if(c&&(a=s.match(c))){if(!a[1]){d.push({indent:-2,endAbove:i,line:i});continue}{let e=d.length-1;for(;e>0&&-2!==d[e].indent;)e--;if(e>0){d.length=e+1,h=d[e],l.insertFirst(i,h.line,r),h.line=i,h.indent=r,h.endAbove=i;continue}}}if(h.indent>r){do{d.pop(),h=d[d.length-1]}while(h.indent>r);const e=h.endAbove-1;e-i>=1&&l.insertFirst(i,e,r)}h.indent===r?h.endAbove=i:d.push({indent:r,endAbove:i,line:i})}else t&&(h.endAbove=i)}return l.toIndentRanges(e)}(this.editorModel,i,s,this.foldingRangesLimit))}}class r{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>s.yy||t>s.yy)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new s.tz(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,o=this._indentOccurrences.length;for(let e=0;et){o=e;break}i+=n}}const r=e.getOptions().tabSize,a=new Uint32Array(t),l=new Uint32Array(t);for(let s=this._length-1,c=0;s>=0;s--){const d=this._startIndexes[s],h=e.getLineContent(d),u=(0,n.G)(h,r);(u{}}},45692:function(e,t,i){"use strict";i.d(t,{M:function(){return a}});var n=i(20187),s=i(35114),o=i(4046);const r={};class a{constructor(e,t,i,n,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=o,this.id="syntax",this.disposables=new s.Cm,o&&this.disposables.add(o);for(const e of t)"function"==typeof e.onDidChange&&this.disposables.add(e.onDidChange(i))}compute(e){return function(e,t,i){let s=null;const o=e.map(((e,o)=>Promise.resolve(e.provideFoldingRanges(t,r,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(s)||(s=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&s.push({start:t.start,end:t.end,rank:o,kind:t.kind})}}),n.M_)));return Promise.all(o).then((e=>s))}(this.providers,this.editorModel,e).then((t=>t?function(e,t){const i=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new l(t);let s;const o=[];for(const e of i)if(s){if(e.start>s.start)if(e.end<=s.end)o.push(s),s=e,n.add(e.start,e.end,e.kind&&e.kind.value,o.length);else{if(e.start>s.end){do{s=o.pop()}while(s&&e.start>s.end);s&&o.push(s),s=e}n.add(e.start,e.end,e.kind&&e.kind.value,o.length)}}else s=e,n.add(e.start,e.end,e.kind&&e.kind.value,o.length);return n.toIndentRanges()}(t,this.foldingRangesLimit):this.fallbackRangeProvider?.compute(e)??null))}dispose(){this.disposables.dispose()}}class l{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>o.yy||t>o.yy)return;const s=this._length;this._startIndexes[s]=e,this._endIndexes[s]=t,this._nestingLevels[s]=n,this._types[s]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ie){i=n;break}t+=s}}const n=new Uint32Array(e),s=new Uint32Array(e),r=[];for(let o=0,a=0;o0&&g.Q.areIntersectingOrTouching(v[b-1],e)?v[b-1]=g.Q.fromPositions(v[b-1].getStartPosition(),e.getEndPosition()):b=v.push(e);const w=async e=>{l.trace("[format][provideDocumentRangeFormattingEdits] (request)",t.extensionId?.value,e);const i=await t.provideDocumentRangeFormattingEdits(u,e,u.getFormattingOptions(),m.token)||[];return l.trace("[format][provideDocumentRangeFormattingEdits] (response)",t.extensionId?.value,i),i},C=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>g.Q.plusRange(e,t.range)),e[0].range);if(!t.some((e=>g.Q.intersectRanges(i,e.range))))return!1;for(const i of e)for(const e of t)if(g.Q.intersectRanges(i.range,e.range))return!0;return!1},y=[],x=[];try{if("function"==typeof t.provideDocumentRangesFormattingEdits){l.trace("[format][provideDocumentRangeFormattingEdits] (request)",t.extensionId?.value,v);const e=await t.provideDocumentRangesFormattingEdits(u,v,u.getFormattingOptions(),m.token)||[];l.trace("[format][provideDocumentRangeFormattingEdits] (response)",t.extensionId?.value,e),x.push(e)}else{for(const e of v){if(m.token.isCancellationRequested)return!0;x.push(await w(e))}for(let e=0;e({text:e.text,range:g.Q.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.Q.areIntersectingOrTouching(i,t))return[new p.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return c.playSignal(k.Rh.format,{userGesture:r}),!0}async function N(e,t,i,n,s,o){const r=e.get(C._Y),a=e.get(y.ILanguageFeaturesService),l=(0,h.z9)(t)?t.getModel():t,c=x(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),d=await L.select(c,l,i,1);d&&(n.report(d),await r.invokeFunction(I,d,t,i,s,o))}async function I(e,t,i,n,s,o){const r=e.get(f.IEditorWorkerService),a=e.get(k.Nt);let l,c,u;(0,h.z9)(i)?(l=i.getModel(),c=new d.gI(i,5,void 0,s)):(l=i,c=new d.ER(i,s));try{const e=await t.provideDocumentFormattingEdits(l,l.getFormattingOptions(),c.token);if(u=await r.computeMoreMinimalEdits(l.uri,e),c.token.isCancellationRequested)return!0}finally{c.dispose()}if(!u||0===u.length)return!1;if((0,h.z9)(i))_.c.execute(i,u,2!==n),2!==n&&i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=u,t=new p.L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);l.pushEditOperations([t],u.map((e=>({text:e.text,range:g.Q.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(g.Q.areIntersectingOrTouching(i,t))return[new p.L(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return a.playSignal(k.Rh.format,{userGesture:o}),!0}function M(e,t,i,n,s,r,a){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(s)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,s,r,a)).catch(o.M_).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}v.w.registerCommand("_executeFormatRangeProvider",(async function(e,...t){const[i,r,a]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(g.Q.isIRange(r));const d=e.get(m.ITextModelService),h=e.get(f.IEditorWorkerService),u=e.get(y.ILanguageFeaturesService),p=await d.createModelReference(i);try{return async function(e,t,i,s,r,a){const l=t.documentRangeFormattingEditProvider.ordered(i);for(const t of l){const l=await Promise.resolve(t.provideDocumentRangeFormattingEdits(i,s,r,a)).catch(o.M_);if((0,n.EI)(l))return await e.computeMoreMinimalEdits(i.uri,l)}}(h,u,p.object.textEditorModel,g.Q.lift(r),a,s.XO.None)}finally{p.dispose()}})),v.w.registerCommand("_executeFormatDocumentProvider",(async function(e,...t){const[i,r]=t;(0,l.j)(c.r.isUri(i));const a=e.get(m.ITextModelService),d=e.get(f.IEditorWorkerService),h=e.get(y.ILanguageFeaturesService),u=await a.createModelReference(i);try{return async function(e,t,i,s,r){const a=x(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of a){const a=await Promise.resolve(t.provideDocumentFormattingEdits(i,s,r)).catch(o.M_);if((0,n.EI)(a))return await e.computeMoreMinimalEdits(i.uri,a)}}(d,h,u.object.textEditorModel,r,s.XO.None)}finally{u.dispose()}})),v.w.registerCommand("_executeFormatOnTypeProvider",(async function(e,...t){const[i,n,o,r]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(u.y.isIPosition(n)),(0,l.j)("string"==typeof o);const a=e.get(m.ITextModelService),d=e.get(f.IEditorWorkerService),h=e.get(y.ILanguageFeaturesService),g=await a.createModelReference(i);try{return M(d,h,g.object.textEditorModel,u.y.lift(n),o,r,s.XO.None)}finally{g.dispose()}}))},59587:function(e,t,i){"use strict";var n=i(97358),s=i(76611),o=i(20187),r=i(62167),a=i(35114),l=i(52694),c=i(72777),d=i(82282),h=i(40393),u=i(49678),g=i(56812),p=i(69122),f=i(5973),m=i(94130),_=i(14374),v=i(54673),b=i(21335),w=i(97848),C=i(63619),y=i(86171),S=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},k=function(e,t){return function(i,n){t(i,n,e)}};let x=class{static{this.ID="editor.contrib.autoFormat"}constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibilitySignalService=n,this._disposables=new a.Cm,this._sessionDisposables=new a.Cm,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(56)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new d.y;for(const e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),o=new s.Qi,r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return o.cancel(),void r.dispose();for(let t=0,n=e.changes.length;t{o.token.isCancellationRequested||(0,n.EI)(e)&&(this._accessibilitySignalService.playSignal(v.Rh.format,{userGesture:!1}),m.c.execute(this._editor,e,!0))})).finally((()=>{r.dispose()}))}};x=S([k(1,p.ILanguageFeaturesService),k(2,g.IEditorWorkerService),k(3,v.Nt)],x);let L=class{static{this.ID="editor.contrib.formatOnPaste"}constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.Cm,this._callOnModel=new a.Cm,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(f.jX,this.editor,e,2,y.ke.None,s.XO.None,!1).catch(o.dz))}};L=S([k(1,p.ILanguageFeaturesService),k(2,C._Y)],L);class D extends l.ks{constructor(){super({id:"editor.action.formatDocument",label:_.kg("formatDocument.label","Format Document"),alias:"Format Document",precondition:w.M$.and(u.R.notInCompositeEditor,u.R.writable,u.R.hasDocumentFormattingProvider),kbOpts:{kbExpr:u.R.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(C._Y),n=e.get(y.N8);await n.showWhile(i.invokeFunction(f.vg,t,1,y.ke.None,s.XO.None,!0),250)}}}class E extends l.ks{constructor(){super({id:"editor.action.formatSelection",label:_.kg("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:w.M$.and(u.R.writable,u.R.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:u.R.editorTextFocus,primary:(0,r.m5)(2089,2084),weight:100},contextMenuOpts:{when:u.R.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(C._Y),n=t.getModel(),o=t.getSelections().map((e=>e.isEmpty()?new h.Q(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),r=e.get(y.N8);await r.showWhile(i.invokeFunction(f.jX,t,o,1,y.ke.None,s.XO.None,!0),250)}}(0,l.HW)(x.ID,x,2),(0,l.HW)(L.ID,L,2),(0,l.Fl)(D),(0,l.Fl)(E),b.w.registerCommand("editor.action.format",(async e=>{const t=e.get(c.T).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(b.d);t.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")}))},94130:function(e,t,i){"use strict";i.d(t,{c:function(){return r}});var n=i(48905),s=i(40393),o=i(61554);class r{static _handleEolEdits(e,t){let i;const n=[];for(const e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const a=o.D.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map((e=>n.k.replace(s.Q.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",l.map((e=>n.k.replaceMove(s.Q.lift(e.range),e.text)))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},28557:function(e,t,i){"use strict";i.d(t,{j:function(){return se},i:function(){return re}});var n=i(93231),s=i(35114),o=i(52694),r=i(72777),a=i(62993),l=i(40393),c=i(49678),d=i(97358),h=i(80670),u=i(54409),g=i(43920),p=i(54244),f=i(48682),m=i(63619),_=i(84119),v=i(47901),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};class C{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let y=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new h.vl,this.onDidChange=this._onDidChange.event,this._dispoables=new s.Cm,this._markers=[],this._nextIdx=-1,p.r.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),o=(e,t)=>{let i=(0,g.UD)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?l.Q.compareRangesUsingStarts(e,t)||_.cj.compare(e.severity,t.severity):_.cj.compare(e.severity,t.severity)||l.Q.compareRangesUsingStarts(e,t)),i},r=()=>{this._markers=this._markerService.read({resource:p.r.isUri(e)?e:void 0,severities:_.cj.Error|_.cj.Warning|_.cj.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(o)};r(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(r(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new C(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));s<0&&(s=(0,d.El)(this._markers,{resource:e.uri},((e,t)=>(0,g.UD)(e.resource.toString(),t.resource.toString()))),s<0&&(s=~s));for(let i=s;it.resource.toString()===e.toString()));if(!(i<0))for(;i{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new M.Se(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{r.style.left=`-${e.scrollLeft}px`,r.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,s.AS)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let o=(t?.length||0)+2;s&&(o+="string"==typeof s?s.length:s.value.length);const r=(0,g.uz)(i);this._lines=r.length,this._longestLineLength=0;for(const e of r)this._longestLineLength=Math.max(e.length+o,this._longestLineLength);I.w_(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of r)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||s){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(s)if("string"==typeof s){const t=document.createElement("span");t.innerText=`(${s})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=I.$("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},I.BC(this._codeLink,I.$("span")).innerText=s.value,e.appendChild(this._codeLink)}if(I.w_(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,d.EI)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(67))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const s=document.createElement("span");s.innerText=t.message,i.appendChild(n),i.appendChild(s),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(50),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case _.cj.Error:t=L.kg("Error","Error");break;case _.cj.Warning:t=L.kg("Warning","Warning");break;case _.cj.Info:t=L.kg("Info","Info");break;case _.cj.Hint:t=L.kg("Hint","Hint")}let i=L.kg("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let q=class extends P.j6{static{H=this}static{this.TitleMenu=new D.D8("gotoErrorTitleMenu")}constructor(e,t,i,n,o,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new s.Cm,this._onDidSelectRelatedInformation=new h.vl,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=_.cj.Warning,this._backgroundColor=T.Q1.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(te);let t=Q,i=Y;this._severity===_.cj.Warning?(t=Z,i=X):this._severity===_.cj.Info&&(t=J,i=ee);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(P._X),secondaryHeadingColor:e.getColor(P.e3)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun((e=>this.editor.focus())));const t=[],i=this._menuService.getMenuActions(H.TitleMenu,this._contextKeyService);(0,A.Ot)(i,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0})}_fillTitleIcon(e){this._icon=I.BC(e,I.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new j(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=l.Q.lift(e),s=this.editor.getPosition(),o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=i>1?L.kg("problems","{0} of {1} problems",t,i):L.kg("change","{0} of {1} problem",t,i);this.setTitle((0,R.P8)(r.uri),e)}this._icon.className=`codicon ${x.className(_.cj.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};q=H=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([U(1,z.Gy),U(2,F.C),U(3,D.ez),U(4,m._Y),U(5,E.fN),U(6,O.L)],q);const K=(0,V.yLr)(V.Rbi,V.AN$),$=(0,V.yLr)(V.Hng,V.Stt),G=(0,V.yLr)(V.pOz,V.IIb),Q=(0,V.x1A)("editorMarkerNavigationError.background",{dark:K,light:K,hcDark:V.b1q,hcLight:V.b1q},L.kg("editorMarkerNavigationError","Editor marker navigation widget error color.")),Y=(0,V.x1A)("editorMarkerNavigationError.headerBackground",{dark:(0,V.JO0)(Q,.1),light:(0,V.JO0)(Q,.1),hcDark:null,hcLight:null},L.kg("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),Z=(0,V.x1A)("editorMarkerNavigationWarning.background",{dark:$,light:$,hcDark:V.b1q,hcLight:V.b1q},L.kg("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),X=(0,V.x1A)("editorMarkerNavigationWarning.headerBackground",{dark:(0,V.JO0)(Z,.1),light:(0,V.JO0)(Z,.1),hcDark:"#0C141F",hcLight:(0,V.JO0)(Z,.2)},L.kg("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),J=(0,V.x1A)("editorMarkerNavigationInfo.background",{dark:G,light:G,hcDark:V.b1q,hcLight:V.b1q},L.kg("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),ee=(0,V.x1A)("editorMarkerNavigationInfo.headerBackground",{dark:(0,V.JO0)(J,.1),light:(0,V.JO0)(J,.1),hcDark:null,hcLight:null},L.kg("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),te=(0,V.x1A)("editorMarkerNavigation.background",V.YtV,L.kg("editorMarkerNavigationBackground","Editor marker navigation widget background."));var ie,ne=function(e,t){return function(i,n){t(i,n,e)}};let se=class{static{ie=this}static{this.ID="editor.contrib.markerController"}static get(e){return e.getContribution(ie.ID)}constructor(e,t,i,n,o){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=o,this._sessionDispoables=new s.Cm,this._editor=e,this._widgetVisible=le.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(q,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{this._model?.selected&&l.Q.containsPosition(this._model?.selected.marker,e.position)||this._model?.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.Q.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.y(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){if(this._editor.hasModel()){const i=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(i.move(e,this._editor.getModel(),this._editor.getPosition()),!i.selected)return;if(i.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const n=await this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);n&&(ie.get(n)?.close(),ie.get(n)?.nagivate(e,t))}else this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}};se=ie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ne(1,S),ne(2,E.fN),ne(3,r.T),ne(4,m._Y)],se);class oe extends o.ks{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){t.hasModel()&&se.get(t)?.nagivate(this._next,this._multiFile)}}class re extends oe{static{this.ID="editor.action.marker.next"}static{this.LABEL=L.kg("markerAction.next.label","Go to Next Problem (Error, Warning, Info)")}constructor(){super(!0,!1,{id:re.ID,label:re.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:578,weight:100},menuOpts:{menuId:q.TitleMenu,title:re.LABEL,icon:(0,N.pU)("marker-navigation-next",n.W.arrowDown,L.kg("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}class ae extends oe{static{this.ID="editor.action.marker.prev"}static{this.LABEL=L.kg("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)")}constructor(){super(!1,!1,{id:ae.ID,label:ae.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:1602,weight:100},menuOpts:{menuId:q.TitleMenu,title:ae.LABEL,icon:(0,N.pU)("marker-navigation-previous",n.W.arrowUp,L.kg("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}(0,o.HW)(se.ID,se,4),(0,o.Fl)(re),(0,o.Fl)(ae),(0,o.Fl)(class extends oe{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:L.kg("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:66,weight:100},menuOpts:{menuId:D.D8.MenubarGoMenu,title:L.kg({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,o.Fl)(class extends oe{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:L.kg("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.R.focus,primary:1090,weight:100},menuOpts:{menuId:D.D8.MenubarGoMenu,title:L.kg({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const le=new E.N1("markersNavigationVisible",!1),ce=o.DX.bindToContribution(se.get);(0,o.E_)(new ce({id:"closeMarkersNavigation",precondition:le,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:c.R.focus,primary:9,secondary:[1033]}}))},35620:function(e,t,i){"use strict";i.d(t,{mR:function(){return K},bn:function(){return q},QS:function(){return j}});var n=i(15075),s=i(90890),o=i(62167),r=i(24219),a=i(54244),l=i(765),c=i(47010),d=i(52694),h=i(72777),u=i(11797),g=i(62993),p=i(40393),f=i(49678),m=i(35720),_=i(68625),v=i(58130),b=i(80670),w=i(35114),C=i(59951),y=i(14374),S=i(97848),k=i(48682),x=i(63619),L=i(87163),D=i(19561),E=i(31835),N=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},I=function(e,t){return function(i,n){t(i,n,e)}};const M=new S.N1("hasSymbols",!1,(0,y.kg)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),T=(0,x.u1)("ISymbolNavigationService");let R=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=M.bindTo(e)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new P(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),s=i.getPosition();if(!n||!s)return;let o=!1,r=!1;for(const e of t.references)if((0,C.n4)(e.uri,n.uri))o=!0,r=r||p.Q.containsPosition(e.range,s);else if(o)break;o&&r||this.reset()}));this._currentState=(0,w.qE)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:p.Q.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){this._currentMessage?.dispose();const e=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),t=e?(0,y.kg)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,e.getLabel()):(0,y.kg)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(t)}};R=N([I(0,S.fN),I(1,h.T),I(2,E.Ot),I(3,L.b)],R),(0,k.v)(T,R,1),(0,d.E_)(new class extends d.DX{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:M,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(T).revealNext(t)}}),D.f.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:M,primary:9,handler(e){e.get(T).reset()}});let P=class{constructor(e){this._listener=new Map,this._disposables=new w.Cm,this._onDidChange=new b.vl,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,w.AS)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,w.qE)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){this._listener.get(e)?.dispose(),this._listener.delete(e)}};P=N([I(0,h.T)],P);var A=i(7588),O=i(70776),F=i(93223),B=i(21335),W=i(86171),H=i(3638),V=i(69122),z=i(26182),U=i(56614);F.ZG.appendMenuItem(F.D8.EditorContext,{submenu:F.D8.EditorContextPeek,title:y.kg("peek.submenu","Peek"),group:"navigation",order:100});class j{static is(e){return!(!e||"object"!=typeof e)&&(e instanceof j||!(!g.y.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class q extends d.qO{static{this._allSymbolNavigationCommands=new Map}static{this._activeAlternativeCommands=new Set}static all(){return q._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of z.f.wrap(t.menu))i.id!==F.D8.EditorContext&&i.id!==F.D8.EditorContextPeek||(i.when=S.M$.and(e.precondition,i.when));return t}constructor(e,t){super(q._patchConfig(t)),this.configuration=e,q._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,o){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(E.Ot),a=e.get(h.T),c=e.get(W.N8),d=e.get(T),u=e.get(V.ILanguageFeaturesService),g=e.get(x._Y),p=t.getModel(),f=t.getPosition(),m=j.is(i)?i:new j(p,f),_=new l.gI(t,5),v=(0,s.PK)(this._getLocationModel(u,m.model,m.position,_.token),_.token).then((async e=>{if(!e||_.token.isCancellationRequested)return;let s;if((0,n.xE)(e.ariaMessage),e.referenceAt(p.uri,f)){const e=this._getAlternativeCommand(t);!q._activeAlternativeCommands.has(e)&&q._allSymbolNavigationCommands.has(e)&&(s=q._allSymbolNavigationCommands.get(e))}const r=e.references.length;if(0===r){if(!this.configuration.muteMessage){const e=p.getWordAtPosition(f);A.k.get(t)?.showMessage(this._getNoResultFoundMessage(e),f)}}else{if(1!==r||!s)return this._onResult(a,d,t,e,o);q._activeAlternativeCommands.add(this.desc.id),g.invokeFunction((e=>s.runEditorCommand(e,t,i,o).finally((()=>{q._activeAlternativeCommands.delete(this.desc.id)}))))}}),(e=>{r.error(e)})).finally((()=>{_.dispose()}));return c.showWhile(v,250),v}async _onResult(e,t,i,n,s){const o=this._getGoToPreference(i);if(i instanceof u.t||!(this.configuration.openInPeek||"peek"===o&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===o,l=await this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,s):n.dispose(),"goto"===o&&t.put(r)}else this._openInPeek(i,n,s)}async _openReference(e,t,i,n,s){let o;if((0,m.Iu)(i)&&(o=i.targetSelectionRange),o||(o=i.range),!o)return;const r=await t.openCodeEditor({resource:i.uri,options:{selection:p.Q.collapseToStart(o),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(r){if(s){const e=r.getModel(),t=r.createDecorationsCollection([{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{r.getModel()===e&&t.clear()}),350)}return r}}_openInPeek(e,t,i){const n=_.X.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),(0,s.SS)((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}class K extends q{async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.hE)(e.definitionProvider,t,i,!1,n),y.kg("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?y.kg("noResultWord","No definition found for '{0}'",e.word):y.kg("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}(0,F.ug)(class e extends K{static{this.id="editor.action.revealDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{...y.aS("actions.goToDecl.label","Go to Definition"),mnemonicTitle:y.kg({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:f.R.hasDefinitionProvider,keybinding:[{when:f.R.editorTextFocus,primary:70,weight:100},{when:S.M$.and(f.R.editorTextFocus,U.W0),primary:2118,weight:100}],menu:[{id:F.D8.EditorContext,group:"navigation",order:1.1},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),B.w.registerCommandAlias("editor.action.goToDeclaration",e.id)}}),(0,F.ug)(class e extends K{static{this.id="editor.action.revealDefinitionAside"}constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,title:y.aS("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:S.M$.and(f.R.hasDefinitionProvider,f.R.isInEmbeddedEditor.toNegated()),keybinding:[{when:f.R.editorTextFocus,primary:(0,o.m5)(2089,70),weight:100},{when:S.M$.and(f.R.editorTextFocus,U.W0),primary:(0,o.m5)(2089,2118),weight:100}]}),B.w.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}),(0,F.ug)(class e extends K{static{this.id="editor.action.peekDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,title:y.aS("actions.previewDecl.label","Peek Definition"),precondition:S.M$.and(f.R.hasDefinitionProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:F.D8.EditorContextPeek,group:"peek",order:2}}),B.w.registerCommandAlias("editor.action.previewDeclaration",e.id)}});class $ extends q{async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.sv)(e.declarationProvider,t,i,!1,n),y.kg("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?y.kg("decl.noResultWord","No declaration found for '{0}'",e.word):y.kg("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}(0,F.ug)(class e extends ${static{this.id="editor.action.revealDeclaration"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,title:{...y.aS("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:y.kg({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:S.M$.and(f.R.hasDeclarationProvider,f.R.isInEmbeddedEditor.toNegated()),menu:[{id:F.D8.EditorContext,group:"navigation",order:1.3},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?y.kg("decl.noResultWord","No declaration found for '{0}'",e.word):y.kg("decl.generic.noResults","No declaration found")}}),(0,F.ug)(class extends ${constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:y.aS("actions.peekDecl.label","Peek Declaration"),precondition:S.M$.and(f.R.hasDeclarationProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:3}})}});class G extends q{async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.f9)(e.typeDefinitionProvider,t,i,!1,n),y.kg("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?y.kg("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):y.kg("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}(0,F.ug)(class e extends G{static{this.ID="editor.action.goToTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{...y.aS("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:y.kg({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:f.R.hasTypeDefinitionProvider,keybinding:{when:f.R.editorTextFocus,primary:0,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.4},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}),(0,F.ug)(class e extends G{static{this.ID="editor.action.peekTypeDefinition"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:y.aS("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:S.M$.and(f.R.hasTypeDefinitionProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:4}})}});class Q extends q{async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.eS)(e.implementationProvider,t,i,!1,n),y.kg("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?y.kg("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):y.kg("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}(0,F.ug)(class e extends Q{static{this.ID="editor.action.goToImplementation"}constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,title:{...y.aS("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:y.kg({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:f.R.hasImplementationProvider,keybinding:{when:f.R.editorTextFocus,primary:2118,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.45},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}),(0,F.ug)(class e extends Q{static{this.ID="editor.action.peekImplementation"}constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,title:y.aS("actions.peekImplementation.label","Peek Implementations"),precondition:S.M$.and(f.R.hasImplementationProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:3142,weight:100},menu:{id:F.D8.EditorContextPeek,group:"peek",order:5}})}});class Y extends q{_getNoResultFoundMessage(e){return e?y.kg("references.no","No references found for '{0}'",e.word):y.kg("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}(0,F.ug)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...y.aS("goToReferences.label","Go to References"),mnemonicTitle:y.kg({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:S.M$.and(f.R.hasReferenceProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),keybinding:{when:f.R.editorTextFocus,primary:1094,weight:100},menu:[{id:F.D8.EditorContext,group:"navigation",order:1.45},{id:F.D8.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.NN)(e.referenceProvider,t,i,!0,!1,n),y.kg("ref.title","References"))}}),(0,F.ug)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:y.aS("references.action.label","Peek References"),precondition:S.M$.and(f.R.hasReferenceProvider,O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated()),menu:{id:F.D8.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new v.y4(await(0,H.NN)(e.referenceProvider,t,i,!1,!1,n),y.kg("ref.title","References"))}});class Z extends q{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:y.aS("label.generic","Go to Any Symbol"),precondition:S.M$.and(O.x2.notInPeekEditor,f.R.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new v.y4(this._references,y.kg("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&y.kg("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){return this._gotoMultipleBehaviour??e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}B.w.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.r},{name:"position",description:"The position at which to start",constraint:g.y.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(e,t,i,n,s,o,l)=>{(0,r.j)(a.r.isUri(t)),(0,r.j)(g.y.isIPosition(i)),(0,r.j)(Array.isArray(n)),(0,r.j)(void 0===s||"string"==typeof s),(0,r.j)(void 0===l||"boolean"==typeof l);const d=e.get(h.T),u=await d.openCodeEditor({resource:t},d.getFocusedCodeEditor());if((0,c.z9)(u))return u.setPosition(i),u.revealPositionInCenterIfOutsideViewport(i,0),u.invokeWithinContext((e=>{const t=new class extends Z{_getNoResultFoundMessage(e){return o||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(o),openInPeek:Boolean(l),openToSide:!1},n,s);e.get(x._Y).invokeFunction(t.run.bind(t),u)}))}}),B.w.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:a.r},{name:"position",description:"The position at which to start",constraint:g.y.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(e,t,i,n,s)=>{e.get(B.d).executeCommand("editor.action.goToLocations",t,i,n,s,void 0,!0)}}),B.w.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,r.j)(a.r.isUri(t)),(0,r.j)(g.y.isIPosition(i));const n=e.get(V.ILanguageFeaturesService),o=e.get(h.T);return o.openCodeEditor({resource:t},o.getFocusedCodeEditor()).then((e=>{if(!(0,c.z9)(e)||!e.hasModel())return;const t=_.X.get(e);if(!t)return;const o=(0,s.SS)((t=>(0,H.NN)(n.referenceProvider,e.getModel(),g.y.lift(i),!1,!1,t).then((e=>new v.y4(e,y.kg("ref.title","References")))))),r=new p.Q(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,o,!1))}))}}),B.w.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},3638:function(e,t,i){"use strict";i.d(t,{NN:function(){return m},eS:function(){return p},f9:function(){return f},hE:function(){return u},sv:function(){return g}});var n=i(97358),s=i(76611),o=i(20187),r=i(84756),a=i(52694),l=i(69122),c=i(58130);function d(e,t){return t.uri.scheme===e.uri.scheme||!(0,r.fV)(t.uri,r.ny.walkThroughSnippet,r.ny.vscodeChatCodeBlock,r.ny.vscodeChatCodeCompareBlock)}async function h(e,t,i,s,r){const a=i.ordered(e,s).map((i=>Promise.resolve(r(i,e,t)).then(void 0,(e=>{(0,o.M_)(e)})))),l=await Promise.all(a);return(0,n.Yc)(l.flat()).filter((t=>d(e,t)))}function u(e,t,i,n,s){return h(t,i,e,n,((e,t,i)=>e.provideDefinition(t,i,s)))}function g(e,t,i,n,s){return h(t,i,e,n,((e,t,i)=>e.provideDeclaration(t,i,s)))}function p(e,t,i,n,s){return h(t,i,e,n,((e,t,i)=>e.provideImplementation(t,i,s)))}function f(e,t,i,n,s){return h(t,i,e,n,((e,t,i)=>e.provideTypeDefinition(t,i,s)))}function m(e,t,i,n,s,o){return h(t,i,e,s,(async(e,t,i)=>{const s=(await e.provideReferences(t,i,{includeDeclaration:!0},o))?.filter((e=>d(t,e)));if(!n||!s||2!==s.length)return s;const r=(await e.provideReferences(t,i,{includeDeclaration:!1},o))?.filter((e=>d(t,e)));return r&&1===r.length?r:s}))}async function _(e){const t=await e(),i=new c.y4(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}(0,a.ke)("_executeDefinitionProvider",((e,t,i)=>{const n=u(e.get(l.ILanguageFeaturesService).definitionProvider,t,i,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeDefinitionProvider_recursive",((e,t,i)=>{const n=u(e.get(l.ILanguageFeaturesService).definitionProvider,t,i,!0,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeTypeDefinitionProvider",((e,t,i)=>{const n=f(e.get(l.ILanguageFeaturesService).typeDefinitionProvider,t,i,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeTypeDefinitionProvider_recursive",((e,t,i)=>{const n=f(e.get(l.ILanguageFeaturesService).typeDefinitionProvider,t,i,!0,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeDeclarationProvider",((e,t,i)=>{const n=g(e.get(l.ILanguageFeaturesService).declarationProvider,t,i,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeDeclarationProvider_recursive",((e,t,i)=>{const n=g(e.get(l.ILanguageFeaturesService).declarationProvider,t,i,!0,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeReferenceProvider",((e,t,i)=>{const n=m(e.get(l.ILanguageFeaturesService).referenceProvider,t,i,!1,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeReferenceProvider_recursive",((e,t,i)=>{const n=m(e.get(l.ILanguageFeaturesService).referenceProvider,t,i,!1,!0,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeImplementationProvider",((e,t,i)=>{const n=p(e.get(l.ILanguageFeaturesService).implementationProvider,t,i,!1,s.XO.None);return _((()=>n))})),(0,a.ke)("_executeImplementationProvider_recursive",((e,t,i)=>{const n=p(e.get(l.ILanguageFeaturesService).implementationProvider,t,i,!0,s.XO.None);return _((()=>n))}))},48843:function(e,t,i){"use strict";i.d(t,{gi:function(){return h}});var n=i(80670),s=i(35114),o=i(79783);function r(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=r(e.event,t.triggerModifier),this.hasSideBySideModifier=r(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=r(e,t.triggerModifier)}}class c{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function d(e){return"altKey"===e?o.zx?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):o.zx?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class h extends s.jG{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.vl),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.vl),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.vl),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=t?.extractLineNumberFromMouseEvent??(e=>e.target.position?e.target.position.lineNumber:0),this._opts=d(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(78)){const e=d(this._editor.getOption(78));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},53720:function(e,t,i){"use strict";i.d(t,{k:function(){return y}});var n,s=i(90890),o=i(20187),r=i(85584),a=i(35114),l=i(765),c=i(52694),d=i(40393),h=i(41750),u=i(20878),g=i(48843),p=i(70776),f=i(14374),m=i(97848),_=i(35620),v=i(3638),b=i(69122),w=i(49079),C=function(e,t){return function(i,n){t(i,n,e)}};let y=class{static{n=this}static{this.ID="editor.contrib.gotodefinitionatposition"}static{this.MAX_SOURCE_PREVIEW_LINES=8}constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new a.Cm,this.toUnhookForKeyboard=new a.Cm,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new g.gi(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,t??void 0)}))),this.toUnhook.add(s.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{(0,o.dz)(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(s.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(n.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){this.toUnhookForKeyboard.clear();const t=e?this.editor.getModel()?.getWordAtPosition(e):null;if(!t)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===t.startColumn&&this.currentWordAtPosition.endColumn===t.endColumn&&this.currentWordAtPosition.word===t.word)return;this.currentWordAtPosition=t;const i=new l.$t(this.editor,15);let n;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,s.SS)((t=>this.findDefinition(e,t)));try{n=await this.previousPromise}catch(e){return void(0,o.dz)(e)}if(!n||!n.length||!i.validate(this.editor))return void this.removeLinkDecorations();const a=n[0].originSelectionRange?d.Q.lift(n[0].originSelectionRange):new d.Q(e.lineNumber,t.startColumn,e.lineNumber,t.endColumn);if(n.length>1){let e=a;for(const{originSelectionRange:t}of n)t&&(e=d.Q.plusRange(e,t));this.addDecoration(e,(new r.Bc).appendText(f.kg("multipleResults","Click to show {0} definitions.",n.length)))}else{const e=n[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const s=this.getPreviewValue(i,n,e),o=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(a,s?(new r.Bc).appendCodeblock(o||"",s):void 0),t.dispose()}))}}getPreviewValue(e,t,i){let s=i.range;return s.endLineNumber-s.startLineNumber>=n.MAX_SOURCE_PREVIEW_LINES&&(s=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,s)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let s=t+1;s{const i=!t&&this.editor.getOption(89)&&!this.isInPeekEditor(e);return new _.mR({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)}))}isInPeekEditor(e){const t=e.get(m.fN);return p.x2.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};y=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([C(1,u.ITextModelService),C(2,h.L),C(3,b.ILanguageFeaturesService)],y),(0,c.HW)(y.ID,y,2)},68625:function(e,t,i){"use strict";i.d(t,{X:function(){return ae}});var n,s=i(90890),o=i(20187),r=i(62167),a=i(35114),l=i(72777),c=i(62993),d=i(40393),h=i(70776),u=i(14374),g=i(21335),p=i(47901),f=i(97848),m=i(63619),_=i(19561),v=i(76432),b=i(31835),w=i(87332),C=i(58130),y=i(84201),S=i(50815),k=i(59321),x=i(80670),L=i(84756),D=i(59951),E=i(11797),N=i(49079),I=i(11521),M=i(20878),T=i(229),R=i(2627),P=i(38403),A=i(17793),O=i(87163),F=i(41517),B=i(52010),W=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},H=function(e,t){return function(i,n){t(i,n,e)}};let V=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof C.y4||e instanceof C.$L}getChildren(e){if(e instanceof C.y4)return e.groups;if(e instanceof C.$L)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};V=W([H(0,M.ITextModelService)],V);class z{getHeight(){return 23}getTemplateId(e){return e instanceof C.$L?K.id:G.id}}let U=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){if(e instanceof C.yc){const t=e.parent.getPreview(e)?.preview(e.range);if(t)return t.value}return(0,D.P8)(e.uri)}};U=W([H(0,O.b)],U);class j{getId(e){return e instanceof C.yc?e.id:e.uri}}let q=class extends a.jG{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new P.s(i,{supportHighlights:!0})),this.badge=new T.x(y.BC(i,y.$(".count")),{},B.m$),e.appendChild(i)}set(e,t){const i=(0,D.pD)(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat((0,u.kg)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,u.kg)("referenceCount","{0} reference",n))}};q=W([H(1,F.L)],q);let K=class{static{n=this}static{this.id="FileReferencesRenderer"}constructor(e){this._instantiationService=e,this.templateId=n.id}renderTemplate(e){return this._instantiationService.createInstance(q,e)}renderElement(e,t,i){i.set(e.element,(0,A.WJ)(e.filterData))}disposeTemplate(e){e.dispose()}};K=n=W([H(0,m._Y)],K);class $ extends a.jG{constructor(e){super(),this.label=this._register(new R._(e))}set(e,t){const i=e.parent.getPreview(e)?.preview(e.range);if(i&&i.value){const{value:e,highlight:n}=i;t&&!A.ne.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,A.WJ)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[n]))}else this.label.set(`${(0,D.P8)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class G{constructor(){this.templateId=G.id}static{this.id="OneReferenceRenderer"}renderTemplate(e){return new $(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}}class Q{getWidgetAriaLabel(){return(0,u.kg)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Y=i(40616),Z=function(e,t){return function(i,n){t(i,n,e)}};class X{static{this.DecorationOptions=N.kI.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"})}constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new a.Cm,this._callOnModelChange=new a.Cm,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(const t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,s=e.children.length;n{const s=n.deltaDecorations([],t);for(let t=0;t{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(ee,"ReferencesWidget",this._treeContainer,new z,[this._instantiationService.createInstance(K),this._instantiationService.createInstance(G)],this._instantiationService.createInstance(V),t),this._splitView.addView({onDidChange:x.Jh.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},S.X.Distribute),this._splitView.addView({onDidChange:x.Jh.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},S.X.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const i=(e,t)=>{e instanceof C.yc&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._disposables.add(this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")}))),y.jD(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new y.fg(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=u.kg("noResults","No results"),y.WU(this._messageContainer),Promise.resolve(void 0)):(y.jD(this._messageContainer),this._decorationsManager=new X(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),y.WU(this._treeContainer),y.WU(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof C.yc?e:e instanceof C.$L&&e.children.length>0?e.children[0]:void 0}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==L.ny.inMemory?this.setTitle((0,D.Pi)(e.uri),this._uriLabel.getUriLabel((0,D.pD)(e.uri))):this.setTitle(u.kg("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent)),this._tree.reveal(e);const n=await i;if(!this._model)return void n.dispose();(0,a.AS)(this._previewModelReference);const s=n.object;if(s){const t=this._preview.getModel()===s.textEditorModel?0:1,i=d.Q.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};te=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Z(3,Y.Gy),Z(4,M.ITextModelService),Z(5,m._Y),Z(6,h.zn),Z(7,F.L),Z(8,O.b)],te);var ie,ne=i(49678),se=i(56614),oe=function(e,t){return function(i,n){t(i,n,e)}};const re=new f.N1("referenceSearchVisible",!1,u.kg("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let ae=class{static{ie=this}static{this.ID="editor.contrib.referencesController"}static get(e){return e.getContribution(ie.ID)}constructor(e,t,i,n,s,o,r,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=o,this._storageService=r,this._configurationService=l,this._disposables=new a.Cm,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=re.bindTo(i)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const s="peekViewLayout",o=J.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(te,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(u.kg("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget?(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget.isClosing||this.closeWidget(),this._widget=void 0):this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{if(r===this._requestIdPool&&this._widget)return this._model?.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(u.kg("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new c.y(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(87)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),s?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()}async revealReference(e){this._editor.hasModel()&&this._model&&this._widget&&await this._widget.revealReference(e)}closeWidget(e=!0){this._widget?.dispose(),this._model?.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){this._widget?.hide(),this._ignoreModelChangeEvent=!0;const i=d.Q.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(i),this._widget.focusOnReferenceTree();else{const t=ie.get(e),n=this._model.clone();this.closeWidget(),e.focus(),t?.toggleWidget(i,(0,s.SS)((e=>Promise.resolve(n))),this._peekMode??!1)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,o.dz)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function le(e,t){const i=(0,h.RL)(e);if(!i)return;const n=ae.get(i);n&&t(n)}ae=ie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([oe(2,f.fN),oe(3,l.T),oe(4,b.Ot),oe(5,m._Y),oe(6,w.CS),oe(7,p.pG)],ae),_.f.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,r.m5)(2089,60),when:f.M$.or(re,h.x2.inPeekEditor),handler(e){le(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),_.f.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:f.M$.or(re,h.x2.inPeekEditor),handler(e){le(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),_.f.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:f.M$.or(re,h.x2.inPeekEditor),handler(e){le(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),g.w.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),g.w.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),g.w.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),g.w.registerCommand("closeReferenceSearch",(e=>le(e,(e=>e.closeWidget())))),_.f.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:f.M$.and(h.x2.inPeekEditor,f.M$.not("config.editor.stablePeek"))}),_.f.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:f.M$.and(re,f.M$.not("config.editor.stablePeek"),f.M$.or(ne.R.editorTextFocus,se.J7.negate()))}),_.f.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:f.M$.and(re,v.YD,v.Nf.negate(),v.cH.negate()),handler(e){const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof C.yc&&le(e,(e=>e.revealReference(i[0])))}}),_.f.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:f.M$.and(re,v.YD,v.Nf.negate(),v.cH.negate()),handler(e){const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof C.yc&&le(e,(e=>e.openReference(i[0],!0,!0)))}}),g.w.registerCommand("openReference",(e=>{const t=e.get(v.PE),i=t.lastFocusedList?.getFocus();Array.isArray(i)&&i[0]instanceof C.yc&&le(e,(e=>e.openReference(i[0],!1,!0)))}))},58130:function(e,t,i){"use strict";i.d(t,{$L:function(){return p},y4:function(){return f},yc:function(){return u}});var n=i(20187),s=i(80670),o=i(68860),r=i(35114),a=i(52732),l=i(59951),c=i(43920),d=i(40393),h=i(14374);class u{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=o.r.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){const e=this.parent.getPreview(this)?.preview(this.range);return e?(0,h.kg)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",e.value,(0,l.P8)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,h.kg)("aria.oneReference","in {0} on line {1} at column {2}",(0,l.P8)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:o,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:s-t}),l=new d.Q(n,a.startColumn,n,s),c=new d.Q(o,r,o,1073741824),h=i.getValueInRange(l).replace(/^\s+/,""),u=i.getValueInRange(e);return{value:h+u+i.getValueInRange(c).replace(/\s+$/,""),highlight:{start:h.length,end:h.length+u.length}}}}class p{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.fT}dispose(){(0,r.AS)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,h.kg)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,l.P8)(this.uri),this.uri.fsPath):(0,h.kg)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,l.P8)(this.uri),this.uri.fsPath)}async resolve(e){if(0!==this._previews.size)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new g(i))}catch(e){(0,n.dz)(e)}return this}}class f{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new s.vl,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(f._compareReferences);for(const t of e)if(n&&l.er.isEqual(n.uri,t.uri,!0)||(n=new p(this,t.uri),this.groups.push(n)),0===n.children.length||0!==f._compareReferences(t,n.children[n.children.length-1])){const e=new u(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,r.AS)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new f(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,h.kg)("aria.result.0","No results found"):1===this.references.length?(0,h.kg)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,h.kg)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,h.kg)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,o=i.parent.groups.length;return 1===o||t&&n+10?(n=t?(n+1)%s:(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%o,i.parent.groups[n].children[0]):(n=(n+o-1)%o,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:c.Qp(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&d.Q.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return l.er.compare(e.uri,t.uri)||d.Q.compareRangesUsingStarts(e.range,t.range)}}},52209:function(e,t,i){"use strict";i.d(t,{A:function(){return q}});var n=i(27106),s=i(35114),o=i(63619),r=i(27567),a=i(87163),l=i(90890),c=i(50639),d=i(84201),h=i(35720),u=i(70235),g=i(51059),p=i(98435),f=i(62993);class m extends s.jG{constructor(e,t=new d.fg(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new p.v),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=d.fg.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new d.fg(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)}))),this._register(this._resizableNode.onDidWillResize((()=>{this._isResizing=!0})))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){return this._contentPosition?.position?f.y.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(t&&i)return d.BK(t).top+i.top-30}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=d.BK(t),s=d.tG(t.ownerDocument.body),o=n.top+i.top+i.height;return s.height-o-24}_findPositionPreference(e,t){const i=Math.min(this._availableVerticalSpaceBelow(t)??1/0,e),n=Math.min(this._availableVerticalSpaceAbove(t)??1/0,e),s=Math.min(Math.max(n,i),e),o=Math.min(e,s);let r;return r=this._editor.getOption(60).above?o<=n?1:2:o<=i?2:1,1===r?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),r}_resize(e){this._resizableNode.layout(e.height,e.width)}}var _,v=i(97848),b=i(47901),w=i(68745),C=i(49678),y=i(49943),S=i(80670),k=function(e,t){return function(i,n){t(i,n,e)}};let x=class extends m{static{_=this}static{this.ID="editor.contrib.resizableContentHoverWidget"}static{this._lastDimensions=new d.fg(0,0)}get isVisibleFromKeyboard(){return 1===this._renderedHover?.source}get isVisible(){return this._hoverVisibleKey.get()??!1}get isFocused(){return this._hoverFocusedKey.get()??!1}constructor(e,t,i,n,s){const o=e.getOption(67)+8,r=new d.fg(150,o);super(e,r),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new y.N4),this._onDidResize=this._register(new S.vl),this.onDidResize=this._onDidResize.event,this._minimumSize=r,this._hoverVisibleKey=C.R.hoverVisible.bindTo(t),this._hoverFocusedKey=C.R.hoverFocused.bindTo(t),d.BC(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>{this.isVisible&&this._updateMaxDimensions()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()})));const a=this._register(d.w5(this._resizableNode.domNode));this._register(a.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(a.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setRenderedHover(void 0),this._editor.addContentWidget(this)}dispose(){super.dispose(),this._renderedHover?.dispose(),this._editor.removeContentWidget(this)}getId(){return _.ID}static _applyDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,s="number"==typeof i?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return _._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return _._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,s="number"==typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){_._applyMaxDimensions(this._hover.contentsDomNode,e,t),_._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"==typeof e?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i)}_updateResizableNodeMaxDimensions(){const e=this._findMaximumRenderingWidth()??1/0,t=this._findMaximumRenderingHeight()??1/0;this._resizableNode.maxSize=new d.fg(e,t),this._setHoverWidgetMaxDimensions(e,t)}_resize(e){_._lastDimensions=new d.fg(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),this._onDidResize.fire()}_findAvailableSpaceVertically(){const e=this._renderedHover?.showAtPosition;if(e)return 1===this._positionPreference?this._availableVerticalSpaceAbove(e):this._availableVerticalSpaceBelow(e)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=6;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some((e=>e.scrollWidth>e.clientWidth));return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=void 0===this._contentWidth?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidththis._renderedHover.closestMouseDistance+4||(this._renderedHover.closestMouseDistance=Math.min(this._renderedHover.closestMouseDistance,n),0))}_setRenderedHover(e){this._renderedHover?.dispose(),this._renderedHover=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,_._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,_._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e){this._setRenderedHover(e),this._updateFont(),this._updateContent(e.domNode),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){return this._renderedHover?{position:this._renderedHover.showAtPosition,secondaryPosition:this._renderedHover.showAtSecondaryPosition,positionAffinity:this._renderedHover.shouldAppearBeforeContent?3:void 0,preference:[this._positionPreference??1]}:null}show(e){if(!this._editor||!this._editor.hasModel())return;this._render(e);const t=d.OK(this._hover.containerDomNode),i=e.showAtPosition;this._positionPreference=this._findPositionPreference(t,i)??1,this.onContentsChanged(),e.shouldFocus&&this._hover.containerDomNode.focus(),this._onDidResize.fire();const n=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&(0,y.vr)(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel()??"");n&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+n)}hide(){if(!this._renderedHover)return;const e=this._renderedHover.shouldFocus||this._hoverFocusedKey.get();this._setRenderedHover(void 0),this._resizableNode.maxSize=new d.fg(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new d.fg(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=void 0===this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new d.fg(e,this._minimumSize.height)}onContentsChanged(){this._removeConstraintsRenderNormally();const e=this._hover.containerDomNode;let t=d.OK(e),i=d.Tr(e);if(this._resizableNode.layout(t,i),this._setHoverWidgetDimensions(i,t),t=d.OK(e),i=d.Tr(e),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(t,i),this._renderedHover?.showAtPosition){const e=d.OK(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._renderedHover.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-30})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+30})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};function L(e,t,i,n,s,o){const r=i+s/2,a=n+o/2,l=Math.max(Math.abs(e-r)-s/2,0),c=Math.max(Math.abs(t-a)-o/2,0);return Math.sqrt(l*l+c*c)}x=_=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([k(1,v.fN),k(2,b.pG),k(3,w.j),k(4,a.b)],x);var D=i(97358);class E{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,o=e.range.endLineNumber===n?e.range.endColumn:s;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>o)return!1}else if(i>t.range.startColumn||t.range.endColumn>o)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return l.AE.EMPTY;const i=E._getLineDecorations(this._editor,t);return l.AE.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):l.AE.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=E._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,D.Yc)(t)}}class N{constructor(e,t,i){this.anchor=e,this.hoverParts=t,this.isComplete=i}filter(e){const t=this.hoverParts.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.hoverParts.length?this:new I(this,this.anchor,t,this.isComplete)}}class I extends N{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}var M=i(21914),T=i(49079),R=i(40393),P=i(8106),A=i(39978),O=i(7206),F=i(20187);class B extends s.jG{constructor(e,t,i,n,s,o){super();const r=t.anchor,a=t.hoverParts;this._renderedHoverParts=this._register(new H(e,i,a,o,s));const{showAtPosition:l,showAtSecondaryPosition:c}=B.computeHoverPositions(e,r.range,a);this.shouldAppearBeforeContent=a.some((e=>e.isBeforeContent)),this.showAtPosition=l,this.showAtSecondaryPosition=c,this.initialMousePosX=r.initialMousePosX,this.initialMousePosY=r.initialMousePosY,this.shouldFocus=n.shouldFocus,this.source=n.source}get domNode(){return this._renderedHoverParts.domNode}get domNodeHasChildren(){return this._renderedHoverParts.domNodeHasChildren}get focusedHoverPartIndex(){return this._renderedHoverParts.focusedHoverPartIndex}async updateHoverVerbosityLevel(e,t,i){this._renderedHoverParts.updateHoverVerbosityLevel(e,t,i)}isColorPickerVisible(){return this._renderedHoverParts.isColorPickerVisible()}static computeHoverPositions(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),s=i.coordinatesConverter,o=s.convertModelRangeToViewRange(t),r=i.getLineMinColumn(o.startLineNumber),a=new f.y(o.startLineNumber,r);n=s.convertViewPositionToModelPosition(a).column}const s=t.startLineNumber;let o,r,a,l=t.startColumn;for(const e of i){const t=e.range,i=t.startLineNumber===s,r=t.endLineNumber===s;if(i&&r){const e=t.startColumn,i=Math.min(l,e);l=Math.max(i,n)}e.forceShowAtRange&&(o=t)}if(o){const e=o.getStartPosition();r=e,a=e}else r=t.getStartPosition(),a=new f.y(s,l);return{showAtPosition:r,showAtSecondaryPosition:a}}}class W{constructor(e,t){this._statusBar=t,e.appendChild(this._statusBar.hoverElement)}get hoverElement(){return this._statusBar.hoverElement}get actions(){return this._statusBar.actions}dispose(){this._statusBar.dispose()}}class H extends s.jG{static{this._DECORATION_OPTIONS=T.kI.register({description:"content-hover-highlight",className:"hoverHighlight"})}constructor(e,t,i,n,s){super(),this._renderedParts=[],this._focusedHoverPartIndex=-1,this._context=s,this._fragment=document.createDocumentFragment(),this._register(this._renderParts(t,i,s,n)),this._register(this._registerListenersOnRenderedParts()),this._register(this._createEditorDecorations(e,i)),this._updateMarkdownAndColorParticipantInfo(t)}_createEditorDecorations(e,t){if(0===t.length)return s.jG.None;let i=t[0].range;for(const e of t){const t=e.range;i=R.Q.plusRange(i,t)}const n=e.createDecorationsCollection();return n.set([{range:i,options:H._DECORATION_OPTIONS}]),(0,s.s)((()=>{n.clear()}))}_renderParts(e,t,i,n){const o=new M.L(n),r={fragment:this._fragment,statusBar:o,...i},a=new s.Cm;for(const i of e){const e=this._renderHoverPartsForParticipant(t,i,r);a.add(e);for(const t of e.renderedHoverParts)this._renderedParts.push({type:"hoverPart",participant:i,hoverPart:t.hoverPart,hoverElement:t.hoverElement})}const l=this._renderStatusBar(this._fragment,o);return l&&(a.add(l),this._renderedParts.push({type:"statusBar",hoverElement:l.hoverElement,actions:l.actions})),(0,s.s)((()=>{a.dispose()}))}_renderHoverPartsForParticipant(e,t,i){const n=e.filter((e=>e.owner===t));return n.length>0?t.renderHoverParts(i,n):new g.Ke([])}_renderStatusBar(e,t){if(t.hasContent)return new W(e,t)}_registerListenersOnRenderedParts(){const e=new s.Cm;return this._renderedParts.forEach(((t,i)=>{const n=t.hoverElement;n.tabIndex=0,e.add(d.ko(n,d.Bx.FOCUS_IN,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=i}))),e.add(d.ko(n,d.Bx.FOCUS_OUT,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=-1})))})),e}_updateMarkdownAndColorParticipantInfo(e){const t=e.find((e=>e instanceof P.xJ&&!(e instanceof O.u)));t&&(this._markdownHoverParticipant=t),this._colorHoverParticipant=e.find((e=>e instanceof A.BJ))}async updateHoverVerbosityLevel(e,t,i){if(!this._markdownHoverParticipant)return;const n=this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant,t);if(void 0===n)return;const s=await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(e,n,i);s&&(this._renderedParts[t]={type:"hoverPart",participant:this._markdownHoverParticipant,hoverPart:s.hoverPart,hoverElement:s.hoverElement},this._context.onContentsChanged())}isColorPickerVisible(){return this._colorHoverParticipant?.isColorPickerVisible()??!1}_normalizedIndexToMarkdownHoverIndexRange(e,t){const i=this._renderedParts[t];if(!i||"hoverPart"!==i.type)return;if(i.participant!==e)return;const n=this._renderedParts.findIndex((t=>"hoverPart"===t.type&&t.participant===e));if(-1===n)throw new F.D7;return t-n}get domNode(){return this._fragment}get domNodeHasChildren(){return this._fragment.hasChildNodes()}get focusedHoverPartIndex(){return this._focusedHoverPartIndex}}var V=function(e,t){return function(i,n){t(i,n,e)}};let z=class extends s.jG{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._onContentsChanged=this._register(new S.vl),this.onContentsChanged=this._onContentsChanged.event,this._contentHoverWidget=this._register(this._instantiationService.createInstance(x,this._editor)),this._participants=this._initializeHoverParticipants(),this._computer=new E(this._editor,this._participants),this._hoverOperation=this._register(new u.w(this._editor,this._computer)),this._registerListeners()}_initializeHoverParticipants(){const e=[];for(const t of g.B2.getAll()){const i=this._instantiationService.createInstance(t,this._editor);e.push(i)}return e.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._register(this._contentHoverWidget.onDidResize((()=>{this._participants.forEach((e=>e.handleResize?.()))}))),e}_registerListeners(){this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new N(this._computer.anchor,t,e.isComplete))})));const e=this._contentHoverWidget.getDomNode();this._register(d.b2(e,"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(d.b2(e,"mouseleave",(e=>{this._onMouseLeave(e)}))),this._register(h.dG.onDidChange((()=>{this._contentHoverWidget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}_startShowingOrUpdateHover(e,t,i,n,s){if(!this._contentHoverWidget.position||!this._currentResult)return!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0);const o=this._editor.getOption(60).sticky,r=s&&this._contentHoverWidget.isMouseGettingCloser(s.event.posx,s.event.posy);return o&&r?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?!!this._currentResult.anchor.equals(e)||(e.canAdoptVisibleHover(this._currentResult.anchor,this._contentHoverWidget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,n,s){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=s,this._hoverOperation.start(t))}_setCurrentResult(e){let t=e;this._currentResult!==t&&(t&&0===t.hoverParts.length&&(t=null),this._currentResult=t,this._currentResult?this._showHover(this._currentResult):this._hideHover())}_addLoadingMessage(e){if(!this._computer.anchor)return e;for(const t of this._participants){if(!t.createLoadingMessage)continue;const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e){if(this._contentHoverWidget.position&&this._currentResult&&this._currentResult.isComplete||this._setCurrentResult(e),!e.isComplete)return;const t=0===e.hoverParts.length,i=this._computer.insistOnKeepingHoverVisible;t&&i||this._setCurrentResult(e)}_showHover(e){const t=this._getHoverContext();this._renderedContentHover=new B(this._editor,e,this._participants,this._computer,t,this._keybindingService),this._renderedContentHover.domNodeHasChildren?this._contentHoverWidget.show(this._renderedContentHover):this._renderedContentHover.dispose()}_hideHover(){this._contentHoverWidget.hide()}_getHoverContext(){return{hide:()=>{this.hide()},onContentsChanged:()=>{this._onContentsChanged.fire(),this._contentHoverWidget.onContentsChanged()},setMinimumDimensions:e=>{this._contentHoverWidget.setMinimumDimensions(e)}}}showsOrWillShow(e){if(this._contentHoverWidget.isResizing)return!0;const t=this._findHoverAnchorCandidates(e);if(!(t.length>0))return this._startShowingOrUpdateHover(null,0,0,!1,e);const i=t[0];return this._startShowingOrUpdateHover(i,0,0,!1,e)}_findHoverAnchorCandidates(e){const t=[];for(const i of this._participants){if(!i.suggestHoverAnchor)continue;const n=i.suggestHoverAnchor(e);n&&t.push(n)}const i=e.target;switch(i.type){case 6:t.push(new g.hx(0,i.range,e.event.posx,e.event.posy));break;case 7:{const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;if(i.detail.isAfterLines||"number"!=typeof i.detail.horizontalDistanceToText||!(i.detail.horizontalDistanceToTextt.priority-e.priority)),t}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!(0,c.U)(t,e.x,e.y))&&this.hide()}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new g.hx(0,e,void 0,void 0),t,i,n,null)}async updateHoverVerbosityLevel(e,t,i){this._renderedContentHover?.updateHoverVerbosityLevel(e,t,i)}focusedHoverPartIndex(){return this._renderedContentHover?.focusedHoverPartIndex??-1}containsNode(e){return!!e&&this._contentHoverWidget.getDomNode().contains(e)}focus(){this._contentHoverWidget.focus()}scrollUp(){this._contentHoverWidget.scrollUp()}scrollDown(){this._contentHoverWidget.scrollDown()}scrollLeft(){this._contentHoverWidget.scrollLeft()}scrollRight(){this._contentHoverWidget.scrollRight()}pageUp(){this._contentHoverWidget.pageUp()}pageDown(){this._contentHoverWidget.pageDown()}goToTop(){this._contentHoverWidget.goToTop()}goToBottom(){this._contentHoverWidget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}getDomNode(){return this._contentHoverWidget.getDomNode()}get isColorPickerVisible(){return this._renderedContentHover?.isColorPickerVisible()??!1}get isVisibleFromKeyboard(){return this._contentHoverWidget.isVisibleFromKeyboard}get isVisible(){return this._contentHoverWidget.isVisible}get isFocused(){return this._contentHoverWidget.isFocused}get isResizing(){return this._contentHoverWidget.isResizing}get widget(){return this._contentHoverWidget}};z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([V(1,o._Y),V(2,a.b)],z);var U,j=function(e,t){return function(i,n){t(i,n,e)}};let q=class extends s.jG{static{U=this}static{this.ID="editor.contrib.contentHover"}constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._onHoverContentsChanged=this._register(new S.vl),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new s.Cm,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new l.uC((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}static get(e){return e.getContribution(U.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,this._shouldNotHideCurrentHoverWidget(e)||this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return this._isMouseOnContentHoverWidget(e)||this._isContentWidgetResizing()}_isMouseOnContentHoverWidget(e){const t=this._contentWidget?.getDomNode();return!!t&&(0,c.U)(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldNotHideCurrentHoverWidget(e)||this._hideWidgets())}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky;return((e,t)=>{const i=this._isMouseOnContentHoverWidget(e);return t&&i})(e,t)||(e=>{const t=this._isMouseOnContentHoverWidget(e),i=this._contentWidget?.isColorPickerVisible??!1;return t&&i})(e)||((e,t)=>(t&&this._contentWidget?.containsNode(e.event.browserEvent.view?.document.activeElement)&&!e.event.browserEvent.view?.getSelection()?.isCollapsed)??!1)(e,t)}_onEditorMouseMove(e){if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,this._contentWidget?.isFocused||this._contentWidget?.isResizing)return;const t=this._hoverSettings.sticky;if(t&&this._contentWidget?.isVisibleFromKeyboard)return;if(this._shouldNotRecomputeCurrentHoverWidget(e))return void this._reactToEditorMouseMoveRunner.cancel();const i=this._hoverSettings.hidingDelay,n=this._contentWidget?.isVisible;n&&t&&i>0?this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(i):this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){if(!e)return;const t=e.target,i=t.element?.classList.contains("colorpicker-color-decoration"),n=this._editor.getOption(149),s=this._hoverSettings.enabled,o=this._hoverState.activatedByDecoratorClick;i&&("click"===n&&!o||"hover"===n&&!s||"clickAndHover"===n&&!s&&!o)||!(i||s||o)?this._hideWidgets():this._tryShowHoverWidget(e)||this._hideWidgets()}_tryShowHoverWidget(e){return this._getOrCreateContentWidget().showsOrWillShow(e)}_onKeyDown(e){if(!this._editor.hasModel())return;const t=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=1===t.kind||2===t.kind&&(t.commandId===n.jA||t.commandId===n.jq||t.commandId===n.Zp)&&this._contentWidget?.isVisible;5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||i||this._hideWidgets()}_hideWidgets(){this._hoverState.mouseDown&&this._contentWidget?.isColorPickerVisible||r.bo.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._contentWidget?.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(z,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged((()=>this._onHoverContentsChanged.fire())))),this._contentWidget}showContentHover(e,t,i,n,s=!1){this._hoverState.activatedByDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}_isContentWidgetResizing(){return this._contentWidget?.widget.isResizing||!1}focusedHoverPartIndex(){return this._getOrCreateContentWidget().focusedHoverPartIndex()}updateHoverVerbosityLevel(e,t,i){this._getOrCreateContentWidget().updateHoverVerbosityLevel(e,t,i)}focus(){this._contentWidget?.focus()}scrollUp(){this._contentWidget?.scrollUp()}scrollDown(){this._contentWidget?.scrollDown()}scrollLeft(){this._contentWidget?.scrollLeft()}scrollRight(){this._contentWidget?.scrollRight()}pageUp(){this._contentWidget?.pageUp()}pageDown(){this._contentWidget?.pageDown()}goToTop(){this._contentWidget?.goToTop()}goToBottom(){this._contentWidget?.goToBottom()}get isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible}get isHoverVisible(){return this._contentWidget?.isVisible}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._contentWidget?.dispose()}};q=U=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([j(1,o._Y),j(2,a.b)],q)},21914:function(e,t,i){"use strict";i.d(t,{L:function(){return l}});var n=i(84201),s=i(49943),o=i(35114),r=i(87163);const a=n.$;let l=class extends o.jG{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this.actions=[],this._hasContent=!1,this.hoverElement=a("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=n.BC(this.hoverElement,a("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;this._hasContent=!0;const n=this._register(s.jQ.render(this.actionsElement,e,i));return this.actions.push(n),n}append(e){const t=n.BC(this.actionsElement,e);return this._hasContent=!0,t}};var c,d;l=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(c=0,d=r.b,function(e,t){d(e,t,c)})],l)},69538:function(e,t,i){"use strict";i.d(t,{U:function(){return c}});var n=i(90890),s=i(76611),o=i(20187),r=i(52694),a=i(69122);class l{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function c(e,t,i,s,r=!1){const a=e.ordered(t,r).map(((e,n)=>async function(e,t,i,n,s){const r=await Promise.resolve(e.provideHover(i,n,s)).catch(o.M_);if(r&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(r))return new l(e,r,t)}(e,n,t,i,s)));return n.AE.fromPromises(a).coalesce()}function d(e,t,i,n,s=!1){return c(e,t,i,n,s).map((e=>e.hover)).toPromise()}(0,r.ke)("_executeHoverProvider",((e,t,i)=>d(e.get(a.ILanguageFeaturesService).hoverProvider,t,i,s.XO.None))),(0,r.ke)("_executeHoverProvider_recursive",((e,t,i)=>d(e.get(a.ILanguageFeaturesService).hoverProvider,t,i,s.XO.None,!0)))},27106:function(e,t,i){"use strict";i.d(t,{G8:function(){return _},Hm:function(){return h},Hp:function(){return a},K6:function(){return r},MB:function(){return l},Xp:function(){return u},Zp:function(){return m},dV:function(){return o},iM:function(){return f},ih:function(){return d},jA:function(){return s},jq:function(){return p},vf:function(){return c},vx:function(){return g}});var n=i(14374);const s="editor.action.showHover",o="editor.action.showDefinitionPreviewHover",r="editor.action.scrollUpHover",a="editor.action.scrollDownHover",l="editor.action.scrollLeftHover",c="editor.action.scrollRightHover",d="editor.action.pageUpHover",h="editor.action.pageDownHover",u="editor.action.goToTopHover",g="editor.action.goToBottomHover",p="editor.action.increaseHoverVerbosityLevel",f=n.kg({key:"increaseHoverVerbosityLevel",comment:["Label for action that will increase the hover verbosity level."]},"Increase Hover Verbosity Level"),m="editor.action.decreaseHoverVerbosityLevel",_=n.kg({key:"decreaseHoverVerbosityLevel",comment:["Label for action that will decrease the hover verbosity level."]},"Decrease Hover Verbosity Level")},31986:function(e,t,i){"use strict";var n,s=i(27106),o=i(62167),r=i(52694),a=i(40393),l=i(49678),c=i(53720),d=i(52209),h=i(35720),u=i(14374);!function(e){e.NoAutoFocus="noAutoFocus",e.FocusIfVisible="focusIfVisible",e.AutoFocusImmediately="autoFocusImmediately"}(n||(n={}));class g extends r.ks{constructor(){super({id:s.jA,label:u.kg({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:u.aS("showOrFocusHoverDescription","Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[n.NoAutoFocus,n.FocusIfVisible,n.AutoFocusImmediately],enumDescriptions:[u.kg("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),u.kg("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),u.kg("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:n.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:l.R.editorTextFocus,primary:(0,o.m5)(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const s=d.A.get(t);if(!s)return;const o=i?.focus;let r=n.FocusIfVisible;Object.values(n).includes(o)?r=o:"boolean"==typeof o&&o&&(r=n.AutoFocusImmediately);const l=e=>{const i=t.getPosition(),n=new a.Q(i.lineNumber,i.column,i.lineNumber,i.column);s.showContentHover(n,1,1,e)},c=2===t.getOption(2);s.isHoverVisible?r!==n.NoAutoFocus?s.focus():l(c):l(c||r===n.AutoFocusImmediately)}}class p extends r.ks{constructor(){super({id:s.dV,label:u.kg({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:u.aS("showDefinitionPreviewHoverDescription","Show the definition preview hover in the editor.")}})}run(e,t){const i=d.A.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new a.Q(n.lineNumber,n.column,n.lineNumber,n.column),o=c.k.get(t);o&&o.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(s,1,1,!0)}))}}class f extends r.ks{constructor(){super({id:s.K6,label:u.kg({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:16,weight:100},metadata:{description:u.aS("scrollUpHoverDescription","Scroll up the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollUp()}}class m extends r.ks{constructor(){super({id:s.Hp,label:u.kg({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:18,weight:100},metadata:{description:u.aS("scrollDownHoverDescription","Scroll down the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollDown()}}class _ extends r.ks{constructor(){super({id:s.MB,label:u.kg({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:15,weight:100},metadata:{description:u.aS("scrollLeftHoverDescription","Scroll left the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollLeft()}}class v extends r.ks{constructor(){super({id:s.vf,label:u.kg({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:17,weight:100},metadata:{description:u.aS("scrollRightHoverDescription","Scroll right the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.scrollRight()}}class b extends r.ks{constructor(){super({id:s.ih,label:u.kg({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:u.aS("pageUpHoverDescription","Page up the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.pageUp()}}class w extends r.ks{constructor(){super({id:s.Hm,label:u.kg({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:u.aS("pageDownHoverDescription","Page down the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.pageDown()}}class C extends r.ks{constructor(){super({id:s.Xp,label:u.kg({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:u.aS("goToTopHoverDescription","Go to the top of the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.goToTop()}}class y extends r.ks{constructor(){super({id:s.vx,label:u.kg({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:l.R.hoverFocused,kbOpts:{kbExpr:l.R.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:u.aS("goToBottomHoverDescription","Go to the bottom of the editor hover.")}})}run(e,t){const i=d.A.get(t);i&&i.goToBottom()}}class S extends r.ks{constructor(){super({id:s.jq,label:s.iM,alias:"Increase Hover Verbosity Level",precondition:l.R.hoverVisible})}run(e,t,i){const n=d.A.get(t);if(!n)return;const s=void 0!==i?.index?i.index:n.focusedHoverPartIndex();n.updateHoverVerbosityLevel(h.M$.Increase,s,i?.focus)}}class k extends r.ks{constructor(){super({id:s.Zp,label:s.G8,alias:"Decrease Hover Verbosity Level",precondition:l.R.hoverVisible})}run(e,t,i){const n=d.A.get(t);if(!n)return;const s=void 0!==i?.index?i.index:n.focusedHoverPartIndex();d.A.get(t)?.updateHoverVerbosityLevel(h.M$.Decrease,s,i?.focus)}}var x=i(4195),L=i(40616),D=i(51059),E=i(8106),N=i(84201),I=i(97358),M=i(90890),T=i(20187),R=i(35114),P=i(59951),A=i(69122),O=i(12098),F=i(7126),B=i(97810),W=i(78875),H=i(28557),V=i(84119),z=i(95607),U=i(86171),j=function(e,t){return function(i,n){t(i,n,e)}};const q=N.$;class K{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const $={type:1,filter:{include:W.gB.QuickFix},triggerAction:W.fo.QuickFixHover};let G=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];for(const r of t){const t=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s,c=this._markerDecorationsService.getMarker(i.uri,r);if(!c)continue;const d=new a.Q(e.range.startLineNumber,t,e.range.startLineNumber,l);o.push(new K(this,d,c))}return o}renderHoverParts(e,t){if(!t.length)return new D.Ke([]);const i=new R.Cm,n=[];t.forEach((t=>{const i=this._renderMarkerHover(t);e.fragment.appendChild(i.hoverElement),n.push(i)}));const s=1===t.length?t[0]:t.sort(((e,t)=>V.cj.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,s,i),new D.Ke(n)}_renderMarkerHover(e){const t=new R.Cm,i=q("div.hover-row"),n=N.BC(i,q("div.marker.hover-contents")),{source:s,message:o,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=N.BC(n,q("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=o,s||r)if(r&&"string"!=typeof r){const e=q("span");s&&(N.BC(e,q("span")).innerText=s);const i=N.BC(e,q("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(N.ko(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),N.BC(i,q("span")).innerText=r.value;const o=N.BC(n,e);o.style.opacity="0.6",o.style.paddingLeft="6px"}else{const e=N.BC(n,q("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=s&&r?`${s}(${r})`:s||`(${r})`}if((0,I.EI)(a))for(const{message:e,resource:i,startLineNumber:s,startColumn:o}of a){const r=N.BC(n,q("div"));r.style.marginTop="8px";const a=N.BC(r,q("a"));a.innerText=`${(0,P.P8)(i)}(${s}, ${o}): `,a.style.cursor="pointer",t.add(N.ko(a,"click",(e=>{if(e.stopPropagation(),e.preventDefault(),this._openerService){const e={selection:{startLineNumber:s,startColumn:o}};this._openerService.open(i,{fromUserGesture:!0,editorOptions:e}).catch(T.dz)}})));const l=N.BC(r,q("span"));l.innerText=e,this._editor.applyFontInfo(l)}return{hoverPart:e,hoverElement:i,dispose:()=>t.dispose()}}renderMarkerStatusbar(e,t,i){if(t.marker.severity===V.cj.Error||t.marker.severity===V.cj.Warning||t.marker.severity===V.cj.Info){const i=H.j.get(this._editor);i&&e.statusBar.addAction({label:u.kg("view problem","View Problem"),commandId:H.i.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(92)){const n=e.statusBar.append(q("div"));this.recentMarkerCodeActionsInfo&&(V.oc.makeKey(this.recentMarkerCodeActionsInfo.marker)===V.oc.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=u.kg("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?R.jG.None:(0,M.EQ)((()=>n.textContent=u.kg("checkingForQuickFixes","Checking for quick fixes...")),200,i);n.textContent||(n.textContent=String.fromCharCode(160));const o=this.getCodeActions(t.marker);i.add((0,R.s)((()=>o.cancel()))),o.then((o=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return o.dispose(),void(n.textContent=u.kg("noQuickFixes","No quick fixes available"));n.style.display="none";let r=!1;i.add((0,R.s)((()=>{r||o.dispose()}))),e.statusBar.addAction({label:u.kg("quick fixes","Quick Fix..."),commandId:F.pQ,run:t=>{r=!0;const i=B.C.get(this._editor),n=N.BK(t);e.hide(),i?.showCodeActions($,o,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),T.dz)}}getCodeActions(e){return(0,M.SS)((t=>(0,F.dU)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new a.Q(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),$,U.ke.None,t)))}};G=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([j(1,O.IMarkerDecorationsService),j(2,z.C),j(3,A.ILanguageFeaturesService)],G);var Q=i(63619),Y=i(50639),Z=i(69498),X=i(41750),J=i(70235),ee=i(49943),te=i(85584),ie=i(62067);class ne{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=ie.ZS.Center}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[],n="lineNo"===this._laneOrLine;if(!t)return i;for(const s of t){const t=s.options.glyphMargin?.position??ie.ZS.Center;if(!n&&t!==this._laneOrLine)continue;const o=n?s.options.lineNumberHoverMessage:s.options.glyphMarginHoverMessage;o&&!(0,te.it)(o)&&i.push(...(0,I._j)(o).map(e))}return i}}var se,oe=function(e,t){return function(i,n){t(i,n,e)}};const re=N.$;let ae=class extends R.jG{static{se=this}static{this.ID="editor.contrib.modesGlyphHoverWidget"}constructor(e,t,i){super(),this._renderDisposeables=this._register(new R.Cm),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new ee.N4),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Z.T({editor:this._editor},t,i)),this._computer=new ne(this._editor),this._hoverOperation=this._register(new J.w(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._register(N.b2(this._hover.containerDomNode,"mouseleave",(e=>{this._onMouseLeave(e)}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return se.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}showsOrWillShow(e){const t=e.target;return 2===t.type&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):3===t.type&&(this._startShowingAt(t.position.lineNumber,"lineNo"),!0)}_startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=re("div.hover-row.markdown-hover"),n=N.BC(t,re("div.hover-contents")),s=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(s.element),i.appendChild(t)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(67),o=i-n-(this._hover.containerDomNode.clientHeight-s)/2,r=t.glyphMarginLeft+t.glyphMarginWidth+("lineNo"===this._computer.lane?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${r}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}_onMouseLeave(e){const t=this._editor.getDomNode();(!t||!(0,Y.U)(t,e.x,e.y))&&this.hide()}};ae=se=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([oe(1,X.L),oe(2,z.C)],ae);let le=class extends R.jG{static{this.ID="editor.contrib.marginHover"}constructor(e,t){super(),this._editor=e,this._instantiationService=t,this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new R.Cm,this._hoverState={mouseDown:!1},this._reactToEditorMouseMoveRunner=this._register(new M.uC((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.hidingDelay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,this._isMouseOnMarginHoverWidget(e)||this._hideWidgets()}_isMouseOnMarginHoverWidget(e){const t=this._glyphWidget?.getDomNode();return!!t&&(0,Y.U)(t,e.event.posx,e.event.posy)}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._isMouseOnMarginHoverWidget(e)||this._hideWidgets())}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky,i=this._isMouseOnMarginHoverWidget(e);return t&&i}_onEditorMouseMove(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._mouseMoveEvent=e,this._shouldNotRecomputeCurrentHoverWidget(e)?this._reactToEditorMouseMoveRunner.cancel():this._reactToEditorMouseMove(e))}_reactToEditorMouseMove(e){e&&(this._tryShowHoverWidget(e)||this._hideWidgets())}_tryShowHoverWidget(e){return this._getOrCreateGlyphWidget().showsOrWillShow(e)}_onKeyDown(e){this._editor.hasModel()&&5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){this._glyphWidget?.hide()}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(ae,this._editor)),this._glyphWidget}dispose(){super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),this._glyphWidget?.dispose()}};var ce,de;le=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(ce=1,de=Q._Y,function(e,t){de(e,t,ce)})],le);var he=i(92998);(0,r.HW)(d.A.ID,d.A,2),(0,r.HW)(le.ID,le,2),(0,r.Fl)(g),(0,r.Fl)(p),(0,r.Fl)(f),(0,r.Fl)(m),(0,r.Fl)(_),(0,r.Fl)(v),(0,r.Fl)(b),(0,r.Fl)(w),(0,r.Fl)(C),(0,r.Fl)(y),(0,r.Fl)(S),(0,r.Fl)(k),D.B2.register(E.xJ),D.B2.register(G),(0,L.zy)(((e,t)=>{const i=e.getColor(x.oZ8);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))})),he.Z.register(new class{}),he.Z.register(new class{}),he.Z.register(new class{})},70235:function(e,t,i){"use strict";i.d(t,{w:function(){return l}});var n=i(90890),s=i(20187),o=i(80670),r=i(35114);class a{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class l extends r.jG{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new o.vl),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new n.uC((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new n.uC((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new n.uC((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,n.bI)((e=>this._computer.computeAsync(e))),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){(0,s.dz)(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new a(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}},51059:function(e,t,i){"use strict";i.d(t,{B2:function(){return r},Ke:function(){return o},hx:function(){return n},mm:function(){return s}});class n{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class s{constructor(e,t,i,n,s,o){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=o,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}class o{constructor(e){this.renderedHoverParts=e}dispose(){for(const e of this.renderedHoverParts)e.dispose()}}const r=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},50639:function(e,t,i){"use strict";i.d(t,{U:function(){return s}});var n=i(84201);function s(e,t,i){const s=n.BK(e);return!(ts.left+s.width||is.top+s.height)}},8106:function(e,t,i){"use strict";i.d(t,{eH:function(){return T},fm:function(){return F},xJ:function(){return P}});var n=i(84201),s=i(97358),o=i(76611),r=i(85584),a=i(35114),l=i(69498),c=i(27106),d=i(40393),h=i(41750),u=i(51059),g=i(14374),p=i(47901),f=i(95607),m=i(69122),_=i(35720),v=i(51310),b=i(93231),w=i(56613),C=i(20187),y=i(87163),S=i(49943),k=i(74856),x=i(90890),L=i(69538),D=i(21335),E=function(e,t){return function(i,n){t(i,n,e)}};const N=n.$,I=(0,v.pU)("hover-increase-verbosity",b.W.add,g.kg("increaseHoverVerbosity","Icon for increaseing hover verbosity.")),M=(0,v.pU)("hover-decrease-verbosity",b.W.remove,g.kg("decreaseHoverVerbosity","Icon for decreasing hover verbosity."));class T{constructor(e,t,i,n,s,o=void 0){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s,this.source=o}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class R{constructor(e,t,i){this.hover=e,this.hoverProvider=t,this.hoverPosition=i}supportsVerbosityAction(e){switch(e){case _.M$.Increase:return this.hover.canIncreaseVerbosity??!1;case _.M$.Decrease:return this.hover.canDecreaseVerbosity??!1}}}let P=class{constructor(e,t,i,n,s,o,r,a){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this._keybindingService=o,this._hoverService=r,this._commandService=a,this.hoverOrdinal=3}createLoadingMessage(e){return new T(this,e.range,[(new r.Bc).appendText(g.kg("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),a=[];let l=1e3;const c=i.getLineLength(n),h=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._editor.getOption(118),p=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:h});let f=!1;u>=0&&c>u&&e.range.startColumn>=u&&(f=!0,a.push(new T(this,e.range,[{value:g.kg("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,l++))),!f&&"number"==typeof p&&c>=p&&a.push(new T(this,e.range,[{value:g.kg("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,l++));let m=!1;for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,c=i.range.endLineNumber===n?i.range.endColumn:o,h=i.options.hoverMessage;if(!h||(0,r.it)(h))continue;i.options.beforeContentClassName&&(m=!0);const u=new d.Q(e.range.startLineNumber,t,e.range.startLineNumber,c);a.push(new T(this,u,(0,s._j)(h),m,l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return x.AE.EMPTY;const n=this._editor.getModel(),s=this._languageFeaturesService.hoverProvider;return s.has(n)?this._getMarkdownHovers(s,n,e,i):x.AE.EMPTY}_getMarkdownHovers(e,t,i,n){const s=i.range.getStartPosition();return(0,L.U)(e,t,s,n).filter((e=>!(0,r.it)(e.hover.contents))).map((e=>{const t=e.hover.range?d.Q.lift(e.hover.range):i.range,n=new R(e.hover,e.provider,s);return new T(this,t,e.hover.contents,!1,e.ordinal,n)}))}renderHoverParts(e,t){return this._renderedHoverParts=new O(t,e.fragment,this,this._editor,this._languageService,this._openerService,this._commandService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}updateMarkdownHoverVerbosityLevel(e,t,i){return Promise.resolve(this._renderedHoverParts?.updateMarkdownHoverPartVerbosityLevel(e,t,i))}};P=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([E(1,h.L),E(2,f.C),E(3,p.pG),E(4,m.ILanguageFeaturesService),E(5,y.b),E(6,k.TN),E(7,D.d)],P);class A{constructor(e,t,i){this.hoverPart=e,this.hoverElement=t,this.disposables=i}dispose(){this.disposables.dispose()}}class O{constructor(e,t,i,n,s,o,r,l,c,d,h){this._hoverParticipant=i,this._editor=n,this._languageService=s,this._openerService=o,this._commandService=r,this._keybindingService=l,this._hoverService=c,this._configurationService=d,this._onFinishedRendering=h,this._ongoingHoverOperations=new Map,this._disposables=new a.Cm,this.renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._disposables.add((0,a.s)((()=>{this.renderedHoverParts.forEach((e=>{e.dispose()})),this._ongoingHoverOperations.forEach((e=>{e.tokenSource.dispose(!0)}))})))}_renderHoverParts(e,t,i){return e.sort((0,s.VE)((e=>e.ordinal),s.U9)),e.map((e=>{const n=this._renderHoverPart(e,i);return t.appendChild(n.hoverElement),n}))}_renderHoverPart(e,t){const i=this._renderMarkdownHover(e,t),n=i.hoverElement,s=e.source,o=new a.Cm;if(o.add(i),!s)return new A(e,n,o);const r=s.supportsVerbosityAction(_.M$.Increase),l=s.supportsVerbosityAction(_.M$.Decrease);if(!r&&!l)return new A(e,n,o);const c=N("div.verbosity-actions");return n.prepend(c),o.add(this._renderHoverExpansionAction(c,_.M$.Increase,r)),o.add(this._renderHoverExpansionAction(c,_.M$.Decrease,l)),new A(e,n,o)}_renderMarkdownHover(e,t){return B(this._editor,e,this._languageService,this._openerService,t)}_renderHoverExpansionAction(e,t,i){const s=new a.Cm,o=t===_.M$.Increase,r=n.BC(e,N(w.L.asCSSSelector(o?I:M)));r.tabIndex=0;const l=new k.fO("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(s.add(this._hoverService.setupManagedHover(l,r,function(e,t){switch(t){case _.M$.Increase:{const t=e.lookupKeybinding(c.jq);return t?g.kg("increaseVerbosityWithKb","Increase Hover Verbosity ({0})",t.getLabel()):g.kg("increaseVerbosity","Increase Hover Verbosity")}case _.M$.Decrease:{const t=e.lookupKeybinding(c.Zp);return t?g.kg("decreaseVerbosityWithKb","Decrease Hover Verbosity ({0})",t.getLabel()):g.kg("decreaseVerbosity","Decrease Hover Verbosity")}}}(this._keybindingService,t))),!i)return r.classList.add("disabled"),s;r.classList.add("enabled");const d=()=>this._commandService.executeCommand(t===_.M$.Increase?c.jq:c.Zp);return s.add(new S.vV(r,d)),s.add(new S.M4(r,d,[3,10])),s}async updateMarkdownHoverPartVerbosityLevel(e,t,i=!0){const n=this._editor.getModel();if(!n)return;const s=this._getRenderedHoverPartAtIndex(t),o=s?.hoverPart.source;if(!s||!o?.supportsVerbosityAction(e))return;const r=await this._fetchHover(o,n,e);if(!r)return;const a=new R(r,o.hoverProvider,o.hoverPosition),l=s.hoverPart,c=new T(this._hoverParticipant,l.range,r.contents,l.isBeforeContent,l.ordinal,a),d=this._renderHoverPart(c,this._onFinishedRendering);return this._replaceRenderedHoverPartAtIndex(t,d,c),i&&this._focusOnHoverPartWithIndex(t),{hoverPart:c,hoverElement:d.hoverElement}}async _fetchHover(e,t,i){let n=i===_.M$.Increase?1:-1;const s=e.hoverProvider,r=this._ongoingHoverOperations.get(s);r&&(r.tokenSource.cancel(),n+=r.verbosityDelta);const a=new o.Qi;this._ongoingHoverOperations.set(s,{verbosityDelta:n,tokenSource:a});const l={verbosityRequest:{verbosityDelta:n,previousHover:e.hover}};let c;try{c=await Promise.resolve(s.provideHover(t,e.hoverPosition,a.token,l))}catch(e){(0,C.M_)(e)}return a.dispose(),this._ongoingHoverOperations.delete(s),c}_replaceRenderedHoverPartAtIndex(e,t,i){if(e>=this.renderedHoverParts.length||e<0)return;const n=this.renderedHoverParts[e],s=n.hoverElement,o=t.hoverElement,r=Array.from(o.children);s.replaceChildren(...r);const a=new A(i,s,t.disposables);s.focus(),n.dispose(),this.renderedHoverParts[e]=a}_focusOnHoverPartWithIndex(e){this.renderedHoverParts[e].hoverElement.focus()}_getRenderedHoverPartAtIndex(e){return this.renderedHoverParts[e]}dispose(){this._disposables.dispose()}}function F(e,t,i,n,o){t.sort((0,s.VE)((e=>e.ordinal),s.U9));const r=[];for(const s of t)r.push(B(i,s,n,o,e.onContentsChanged));return new u.Ke(r)}function B(e,t,i,s,o){const c=new a.Cm,d=N("div.hover-row"),h=N("div.hover-row-contents");d.appendChild(h);const u=t.contents;for(const t of u){if((0,r.it)(t))continue;const a=N("div.markdown-hover"),d=n.BC(a,N("div.hover-contents")),u=c.add(new l.T({editor:e},i,s));c.add(u.onDidRenderAsync((()=>{d.className="hover-contents code-hover-contents",o()})));const g=c.add(u.render(t));d.appendChild(g.element),h.appendChild(a)}return{hoverPart:t,hoverElement:d,dispose(){c.dispose()}}}},10965:function(e,t,i){"use strict";var n=i(90890),s=i(20187),o=i(765),r=i(52694),a=i(40393),l=i(56218),c=i(49678),d=i(49079),h=i(56812),u=i(14374);class g{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new l.L(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new l.L(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var p;let f=class{static{p=this}static{this.ID="editor.contrib.inPlaceReplaceController"}static get(e){return e.getContribution(p.ID)}static{this.DECORATION=d.kI.register({description:"in-place-replace",className:"valueSetReplacement"})}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){this.currentRequest?.cancel();const i=this.editor.getSelection(),r=this.editor.getModel();if(!r||!i)return;let c=i;if(c.startLineNumber!==c.endLineNumber)return;const d=new o.$t(this.editor,5),h=r.uri;return this.editorWorkerService.canNavigateValueSet(h)?(this.currentRequest=(0,n.SS)((e=>this.editorWorkerService.navigateValueSet(h,c,t))),this.currentRequest.then((t=>{if(!t||!t.range||!t.value)return;if(!d.validate(this.editor))return;const i=a.Q.lift(t.range);let o=t.range;const r=t.value.length-(c.endColumn-c.startColumn);o={startLineNumber:o.startLineNumber,startColumn:o.startColumn,endLineNumber:o.endLineNumber,endColumn:o.startColumn+t.value.length},r>1&&(c=new l.L(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn+r-1));const h=new g(i,c,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,h),this.editor.pushUndoStop(),this.decorations.set([{range:o,options:p.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,n.wR)(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(s.dz)})).catch(s.dz)):Promise.resolve(void 0)}};var m,_;f=p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(m=1,_=h.IEditorWorkerService,function(e,t){_(e,t,m)})],f);class v extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.up",label:u.kg("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:c.R.writable,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=f.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}class b extends r.ks{constructor(){super({id:"editor.action.inPlaceReplace.down",label:u.kg("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:c.R.writable,kbOpts:{kbExpr:c.R.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=f.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}(0,r.HW)(f.ID,f,4),(0,r.Fl)(v),(0,r.Fl)(b)},64043:function(e,t,i){"use strict";var n=i(35114),s=i(43920),o=i(52694),r=i(97988),a=i(40393),l=i(49678),c=i(8494),d=i(59266),h=i(2335),u=i(14374),g=i(43575),p=i(78265),f=i(48905),m=i(6947),_=i(56218),v=i(38884);function b(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const o=t.getLanguageConfiguration(e.getLanguageId()).indentRulesSupport;if(!o)return[];const a=new v.no(e,o,t);for(n=Math.min(n,e.getLineCount());i<=n&&a.shouldIgnore(i);)i++;if(i>n-1)return[];const{tabSize:l,indentSize:c,insertSpaces:d}=e.getOptions(),h=(e,t)=>(t=t||1,r.Y.shiftIndent(e,e.length+t,l,c,d)),u=(e,t)=>(t=t||1,r.Y.unshiftIndent(e,e.length+t,l,c,d)),g=[],p=e.getLineContent(i);let b=s.UU(p),C=b;a.shouldIncrease(i)?(C=h(C),b=h(b)):a.shouldIndentNextLine(i)&&(C=h(C));for(let t=++i;t<=n;t++){if(w(e,t))continue;const i=e.getLineContent(t),n=s.UU(i),o=C;a.shouldDecrease(t,o)&&(C=u(C),b=u(b)),n!==C&&g.push(f.k.replaceMove(new _.L(t,1,t,n.length+1),(0,m.P)(C,c,d))),a.shouldIgnore(t)||(a.shouldIncrease(t,o)?(b=h(b),C=b):C=a.shouldIndentNextLine(t,o)?h(C):b)}return g}function w(e,t){return!!e.tokenization.isCheapToTokenize(t)&&2===e.tokenization.getLineTokens(t).getStandardTokenType(0)}var C=i(44425);class y extends o.ks{static{this.ID="editor.action.indentationToSpaces"}constructor(){super({id:y.ID,label:u.kg("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:l.R.writable,metadata:{description:u.aS("indentationToSpacesDescription","Convert the tab indentation to spaces.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new O(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}class S extends o.ks{static{this.ID="editor.action.indentationToTabs"}constructor(){super({id:S.ID,label:u.kg("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:l.R.writable,metadata:{description:u.aS("indentationToTabsDescription","Convert the spaces indentation to tabs.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new F(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}class k extends o.ks{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(g.GK),n=e.get(d.IModelService),s=t.getModel();if(!s)return;const o=n.getCreationOptions(s.getLanguageId(),s.uri,s.isForSimpleWidget),r=s.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===o.tabSize&&e===r.tabSize?u.kg("configuredTabSize","Configured Tab Size"):e===o.tabSize?u.kg("defaultTabSize","Default Tab Size"):e===r.tabSize?u.kg("currentTabSize","Current Tab Size"):void 0}))),l=Math.min(s.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:u.kg({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&s&&!s.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?s.updateOptions({tabSize:t}):s.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class x extends k{static{this.ID="editor.action.indentUsingTabs"}constructor(){super(!1,!1,{id:x.ID,label:u.kg("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:u.aS("indentUsingTabsDescription","Use indentation with tabs.")}})}}class L extends k{static{this.ID="editor.action.indentUsingSpaces"}constructor(){super(!0,!1,{id:L.ID,label:u.kg("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:u.aS("indentUsingSpacesDescription","Use indentation with spaces.")}})}}class D extends k{static{this.ID="editor.action.changeTabDisplaySize"}constructor(){super(!0,!0,{id:D.ID,label:u.kg("changeTabDisplaySize","Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:u.aS("changeTabDisplaySizeDescription","Change the space size equivalent of the tab.")}})}}class E extends o.ks{static{this.ID="editor.action.detectIndentation"}constructor(){super({id:E.ID,label:u.kg("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:u.aS("detectIndentationDescription","Detect the indentation from content.")}})}run(e,t){const i=e.get(d.IModelService),n=t.getModel();if(!n)return;const s=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}class N extends o.ks{constructor(){super({id:"editor.action.reindentlines",label:u.kg("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:l.R.writable,metadata:{description:u.aS("editor.reindentlinesDescription","Reindent the lines of the editor.")}})}run(e,t){const i=e.get(c.JZ),n=t.getModel();if(!n)return;const s=b(n,i,1,n.getLineCount());s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class I extends o.ks{constructor(){super({id:"editor.action.reindentselectedlines",label:u.kg("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:l.R.writable,metadata:{description:u.aS("editor.reindentselectedlinesDescription","Reindent the selected lines of the editor.")}})}run(e,t){const i=e.get(c.JZ),n=t.getModel();if(!n)return;const s=t.getSelections();if(null===s)return;const o=[];for(const e of s){let t=e.startLineNumber,s=e.endLineNumber;if(t!==s&&1===e.endColumn&&s--,1===t){if(t===s)continue}else t--;const r=b(n,i,t,s);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class M{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(const e of this._edits)t.addEditOperation(a.Q.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let T=class{static{this.ID="editor.contrib.autoIndentOnPaste"}constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new n.Cm,this.callOnModel=new n.Cm,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(12)<4||this.editor.getOption(55)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(this.rangeContainsOnlyWhitespaceCharacters(i,e))return;if(function(e,t){const i=t=>2===(0,C.T)(e,t);return i(t.getStartPosition())||i(t.getEndPosition())}(i,e))return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(12),{tabSize:o,indentSize:l,insertSpaces:c}=i.getOptions(),d=[],u={shiftIndent:e=>r.Y.shiftIndent(e,e.length+1,o,l,c),unshiftIndent:e=>r.Y.unshiftIndent(e,e.length+1,o,l,c)};let g=e.startLineNumber;for(;g<=e.endLineNumber&&this.shouldIgnoreLine(i,g);)g++;if(g>e.endLineNumber)return;let f=i.getLineContent(g);if(!/\S/.test(f.substring(0,e.startColumn-1))){const e=(0,p.$f)(n,i,i.getLanguageId(),g,u,this._languageConfigurationService);if(null!==e){const t=s.UU(f),n=h.c(e,o);if(n!==h.c(t,o)){const e=h.k(n,o,c);d.push({range:new a.Q(g,1,g,t.length+1),text:e}),f=e+f.substring(t.length)}else{const e=(0,p.Yb)(i,g,this._languageConfigurationService);if(0===e||8===e)return}}}const m=g;for(;gi.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===m?f:i.getLineContent(e)},r=(0,p.$f)(n,t,i.getLanguageId(),g+1,u,this._languageConfigurationService);if(null!==r){const t=h.c(r,o),n=h.c(s.UU(i.getLineContent(g+1)),o);if(t!==n){const r=t-n;for(let t=g+1;t<=e.endLineNumber;t++){const e=i.getLineContent(t),n=s.UU(e),l=h.c(n,o)+r,u=h.k(l,o,c);u!==n&&d.push({range:new a.Q(t,1,t,n.length+1),text:u})}}}}if(d.length>0){this.editor.pushUndoStop();const e=new M(d,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}rangeContainsOnlyWhitespaceCharacters(e,t){const i=e=>0===e.trim().length;let n=!0;if(t.startLineNumber===t.endLineNumber)n=i(e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1));else for(let s=t.startLineNumber;s<=t.endLineNumber;s++){const o=e.getLineContent(s);if(n=s===t.startLineNumber?i(o.substring(t.startColumn-1)):s===t.endLineNumber?i(o.substring(0,t.endColumn-1)):0===e.getLineFirstNonWhitespaceColumn(s),!n)break}return n}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function R(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let s="";for(let e=0;e=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(P=1,A=c.JZ,function(e,t){A(e,t,P)})],T);class O{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),R(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class F{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),R(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,o.HW)(T.ID,T,2),(0,o.Fl)(y),(0,o.Fl)(S),(0,o.Fl)(x),(0,o.Fl)(L),(0,o.Fl)(D),(0,o.Fl)(E),(0,o.Fl)(N),(0,o.Fl)(I)},2335:function(e,t,i){"use strict";function n(e,t){let i=0;for(let n=0;nthis._currentResolve=void 0))),await this._currentResolve}}async _doResolve(e){try{const t=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=t?.tooltip??this.hint.tooltip,this.hint.label=t?.label??this.hint.label,this.hint.textEdits=t?.textEdits??this.hint.textEdits,this._isResolved=!0}catch(e){(0,n.M_)(e),this._isResolved=!1}}}class h{static{this._emptyInlayHintList=Object.freeze({dispose(){},hints:[]})}static async create(e,t,i,s){const o=[],r=e.ordered(t).reverse().map((e=>i.map((async i=>{try{const n=await e.provideInlayHints(t,i,s);(n?.hints.length||e.onDidChangeInlayHints)&&o.push([n??h._emptyInlayHintList,e])}catch(e){(0,n.M_)(e)}}))));if(await Promise.all(r.flat()),s.isCancellationRequested||t.isDisposed())throw new n.AL;return new h(i,o,t)}constructor(e,t,i){this._disposables=new s.Cm,this.ranges=e,this.provider=new Set;const n=[];for(const[e,s]of t){this._disposables.add(e),this.provider.add(s);for(const t of e.hints){const e=i.validatePosition(t.position);let o="before";const a=h._getRangeAtPosition(i,e);let l;a.getStartPosition().isBefore(e)?(l=r.Q.fromPositions(a.getStartPosition(),e),o="after"):(l=r.Q.fromPositions(e,a.getEndPosition()),o="before"),n.push(new d(t,new c(l,o),s))}}this.items=n.sort(((e,t)=>o.y.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new r.Q(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const s=e.tokenization.getLineTokens(i),o=t.column-1,a=s.findTokenIndexAtOffset(o);let l=s.getStartOffset(a),c=s.getEndOffset(a);return c-l==1&&(l===o&&a>1?(l=s.getStartOffset(a-1),c=s.getEndOffset(a-1)):c===o&&athis._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(142)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(142);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if("on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(s.Di.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),d.schedule(0)}})))}const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add((0,c.s)((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const o=new Set,d=new r.uC((async()=>{const e=Date.now();n?.dispose(!0),n=new a.Qi;const i=t.onWillDispose((()=>n?.cancel()));try{const i=n.token,s=await x.P8.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(d.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void s.dispose();for(const e of s.provider)"function"!=typeof e.onDidChangeInlayHints||o.has(e)||(o.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{d.isScheduled()||d.schedule()}))));this._sessionDisposables.add(s),this._updateHintsDecorators(s.ranges,s.items),this._cacheHintsForFastRestore(t)}catch(e){(0,l.dz)(e)}finally{n.dispose(),i.dispose()}}),this._debounceInfo.get(t));this._sessionDisposables.add(d),this._sessionDisposables.add((0,c.s)((()=>n?.dispose(!0)))),d.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&d.isScheduled()||d.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{n?.cancel();const t=Math.max(d.delay,1250);d.schedule(t)}))),this._sessionDisposables.add(this._installDblClickGesture((()=>d.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new c.Cm,t=e.add(new k.gi(this._editor)),i=new c.Cm;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),s=this._editor.getModel();if(!n||!s)return void i.clear();const o=new a.Qi;i.add((0,c.s)((()=>o.dispose(!0)))),n.item.resolve(o.token),this._activeInlayHintPart=n.part.command||n.part.location?new F(n,t.hasTriggerModifier):void 0;const r=s.validatePosition(n.item.hint.position).lineNumber,l=new _.Q(r,1,r,s.getLineMaxColumn(r)),d=this._getInlineHintsForRange(l);this._updateHintsDecorators([l],d),i.add((0,c.s)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([l],d)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((async e=>{const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(L.U,e,this._editor,i.location):v.uB.is(i.command)&&await this._invokeCommand(i.command,t.item)}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((async t=>{if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(a.XO.None),(0,o.EI)(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>m.k.replace(_.Q.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))}_installContextMenu(){return this._editor.onContextMenu((async e=>{if(!(0,s.sb)(e.event.target))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(L.h,this._editor,e.event.target,t)}))}_getInlayHintLabelPart(e){if(6!==e.target.type)return;const t=e.target.detail.injectedText?.options;return t instanceof w.Ho&&t?.attachedData instanceof O?t.attachedData:void 0}async _invokeCommand(e,t){try{await this._commandService.executeCommand(e.id,...e.arguments??[])}catch(e){this._notificationService.notify({severity:I.AI.Error,source:t.provider.displayName,message:e})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const s=e.getDecorationRange(i);if(s){const e=new x.EP(s,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(_.Q.compareRangesUsingStarts)){const t=e.validateRange(new _.Q(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&_.Q.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=_.Q.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(e,t){const i=[],s=(e,t,n,s,o)=>{const r={content:n,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:s,attachedData:o};i.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},r=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(a/3|0)+"px",display:"inline-block"});s(e,i," ",t?b.VW.Right:b.VW.None)},{fontSize:a,fontFamily:l,padding:c,isUniform:d}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,l);let u={line:0,totalLen:0};for(const e of t){if(u.line!==e.anchor.range.startLineNumber&&(u={line:e.anchor.range.startLineNumber,totalLen:0}),u.totalLen>n._MAX_LABEL_LEN)continue;e.hint.paddingLeft&&r(e,!1);const t="string"==typeof e.hint.label?[{label:e.hint.label}]:e.hint.label;for(let i=0;i0&&(m=m.slice(0,-v)+"…",_=!0),s(e,this._ruleFactory.createClassNameRef(p),m.replace(/[ \t]/g," "),g&&!e.hint.paddingRight?b.VW.Right:b.VW.None,new O(e,i)),_)break}if(e.hint.paddingRight&&r(e,!0),i.length>n._MAX_DECORATORS)break}const g=[];for(const[t,i]of this._decorationsMetadata){const n=this._editor.getModel()?.getDecorationRange(t);n&&e.some((e=>e.containsRange(n)))&&(g.push(t),i.classNameRef.dispose(),this._decorationsMetadata.delete(t))}const m=p.D.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(g,i.map((e=>e.decoration)));for(let e=0;ei)&&(s=i);const o=e.fontFamily||n;return{fontSize:s,fontFamily:o,padding:t,isUniform:!t&&o===n&&s===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};B=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([R(1,y.ILanguageFeaturesService),R(2,C.ILanguageFeatureDebounceService),R(3,A),R(4,D.d),R(5,I.Ot),R(6,N._Y)],B),D.w.registerCommand("_executeInlayHintProvider",(async(e,...t)=>{const[i,n]=t;(0,h.j)(u.r.isUri(i)),(0,h.j)(_.Q.isIRange(n));const{inlayHintsProvider:s}=e.get(y.ILanguageFeaturesService),o=await e.get(S.ITextModelService).createModelReference(i);try{const e=await x.P8.create(s,o.object.textEditorModel,[_.Q.lift(n)],a.XO.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{o.dispose()}}))},7206:function(e,t,i){"use strict";i.d(t,{u:function(){return x}});var n=i(90890),s=i(85584),o=i(62993),r=i(49079),a=i(51059),l=i(41750),c=i(20878),d=i(69538),h=i(8106),u=i(47610),g=i(47901),p=i(95607),f=i(69122),m=i(14374),_=i(79783),v=i(44830),b=i(97358),w=i(87163),C=i(74856),y=i(21335),S=function(e,t){return function(i,n){t(i,n,e)}};class k extends a.mm{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let x=class extends h.xJ{constructor(e,t,i,n,s,o,r,a,l){super(e,t,i,o,a,n,s,l),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){if(!u.M.get(this._editor))return null;if(6!==e.target.type)return null;const t=e.target.detail.injectedText?.options;return t instanceof r.Ho&&t.attachedData instanceof u.z?new k(t.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof k?new n.AE((async t=>{const{part:n}=e;if(await n.item.resolve(i),i.isCancellationRequested)return;let o,r;if("string"==typeof n.item.hint.tooltip?o=(new s.Bc).appendText(n.item.hint.tooltip):n.item.hint.tooltip&&(o=n.item.hint.tooltip),o&&t.emitOne(new h.eH(this,e.range,[o],!1,0)),(0,b.EI)(n.item.hint.textEdits)&&t.emitOne(new h.eH(this,e.range,[(new s.Bc).appendText((0,m.kg)("hint.dbl","Double-click to insert"))],!1,10001)),"string"==typeof n.part.tooltip?r=(new s.Bc).appendText(n.part.tooltip):n.part.tooltip&&(r=n.part.tooltip),r&&t.emitOne(new h.eH(this,e.range,[r],!1,1)),n.part.location||n.part.command){let i;const o="altKey"===this._editor.getOption(78)?_.zx?(0,m.kg)("links.navigate.kb.meta.mac","cmd + click"):(0,m.kg)("links.navigate.kb.meta","ctrl + click"):_.zx?(0,m.kg)("links.navigate.kb.alt.mac","option + click"):(0,m.kg)("links.navigate.kb.alt","alt + click");n.part.location&&n.part.command?i=(new s.Bc).appendText((0,m.kg)("hint.defAndCommand","Go to Definition ({0}), right click for more",o)):n.part.location?i=(new s.Bc).appendText((0,m.kg)("hint.def","Go to Definition ({0})",o)):n.part.command&&(i=new s.Bc(`[${(0,m.kg)("hint.cmd","Execute Command")}](${(0,v.CN)(n.part.command)} "${n.part.command.title}") (${o})`,{isTrusted:!0})),i&&t.emitOne(new h.eH(this,e.range,[i],!1,1e4))}const a=await this._resolveInlayHintLabelPartHover(n,i);for await(const e of a)t.emitOne(e)})):n.AE.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return n.AE.EMPTY;const{uri:i,range:r}=e.part.location,a=await this._resolverService.createModelReference(i);try{const i=a.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,d.U)(this._languageFeaturesService.hoverProvider,i,new o.y(r.startLineNumber,r.startColumn),t).filter((e=>!(0,s.it)(e.hover.contents))).map((t=>new h.eH(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):n.AE.EMPTY}finally{a.dispose()}}};x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([S(1,l.L),S(2,p.C),S(3,w.b),S(4,C.TN),S(5,g.pG),S(6,c.ITextModelService),S(7,f.ILanguageFeaturesService),S(8,y.d)],x)},59460:function(e,t,i){"use strict";i.d(t,{U:function(){return v},h:function(){return _}});var n=i(84201),s=i(30981),o=i(76611),r=i(20419),a=i(40393),l=i(20878),c=i(35620),d=i(70776),h=i(93223),u=i(21335),g=i(97848),p=i(14280),f=i(63619),m=i(31835);async function _(e,t,i,d){const g=e.get(l.ITextModelService),_=e.get(p.Z),v=e.get(u.d),b=e.get(f._Y),w=e.get(m.Ot);if(await d.item.resolve(o.XO.None),!d.part.location)return;const C=d.part.location,y=[],S=new Set(h.ZG.getMenuItems(h.D8.EditorContext).map((e=>(0,h.is)(e)?e.command.id:(0,r.b)())));for(const e of c.bn.all())S.has(e.desc.id)&&y.push(new s.rc(e.desc.id,h.Xe.label(e.desc,{renderShortTitle:!0}),void 0,!0,(async()=>{const i=await g.createModelReference(C.uri);try{const n=new c.QS(i.object.textEditorModel,a.Q.getStartPosition(C.range)),s=d.item.anchor.range;await b.invokeFunction(e.runEditorCommand.bind(e),t,n,s)}finally{i.dispose()}})));if(d.part.command){const{command:e}=d.part;y.push(new s.wv),y.push(new s.rc(e.id,e.title,void 0,!0,(async()=>{try{await v.executeCommand(e.id,...e.arguments??[])}catch(e){w.notify({severity:m.AI.Error,source:d.item.provider.displayName,message:e})}})))}const k=t.getOption(128);_.showContextMenu({domForShadowRoot:k?t.getDomNode()??void 0:void 0,getAnchor:()=>{const e=n.BK(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>y,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}async function v(e,t,i,n){const s=e.get(l.ITextModelService),o=await s.createModelReference(n.uri);await i.invokeWithinContext((async e=>{const s=t.hasSideBySideModifier,r=e.get(g.fN),l=d.x2.inPeekEditor.getValue(r),h=!s&&i.getOption(89)&&!l;return new c.mR({openToSide:s,openInPeek:h,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e,new c.QS(o.object.textEditorModel,a.Q.getStartPosition(n.range)),a.Q.lift(n.range))})),o.dispose()}},76392:function(e,t,i){"use strict";i.d(t,{PA:function(){return o},Vl:function(){return s},Wt:function(){return n}});const n="editor.action.inlineSuggest.commit",s="editor.action.inlineSuggest.showPrevious",o="editor.action.inlineSuggest.showNext"},99575:function(e,t,i){"use strict";i.d(t,{p:function(){return c}});var n=i(73755),s=i(43920),o=i(39841),r=i(97848),a=i(35114),l=i(14374);class c extends a.jG{static{this.inlineSuggestionVisible=new r.N1("inlineSuggestionVisible",!1,(0,l.kg)("inlineSuggestionVisible","Whether an inline suggestion is visible"))}static{this.inlineSuggestionHasIndentation=new r.N1("inlineSuggestionHasIndentation",!1,(0,l.kg)("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"))}static{this.inlineSuggestionHasIndentationLessThanTabSize=new r.N1("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,l.kg)("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"))}static{this.suppressSuggestions=new r.N1("inlineSuggestionSuppressSuggestions",void 0,(0,l.kg)("suppressSuggestions","Whether suggestions should be suppressed for the current suggestion"))}constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=c.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=c.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=c.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=c.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,n.fm)((e=>{const t=this.model.read(e),i=t?.state.read(e),n=!!i?.inlineCompletion&&void 0!==i?.primaryGhostText&&!i?.primaryGhostText.isEmpty();this.inlineCompletionVisible.set(n),i?.primaryGhostText&&i?.inlineCompletion&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register((0,n.fm)((e=>{const t=this.model.read(e);let i=!1,n=!0;const r=t?.primaryGhostText.read(e);if(t?.selectedSuggestItem&&r&&r.parts.length>0){const{column:e,lines:a}=r.parts[0],l=a[0];if(e<=t.textModel.getLineIndentColumn(r.lineNumber)){let e=(0,s.HG)(l);-1===e&&(e=l.length-1),i=e>0;const r=t.textModel.getOptions().tabSize;n=o.A.visibleColumnFromColumn(l,e+1,r)=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},M=function(e,t){return function(i,n){t(i,n,e)}};let T=class extends h.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,u.y0)(this,this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(62).showToolbar)),this.sessionPosition=void 0,this.position=(0,u.un)(this,(e=>{const t=this.model.read(e)?.primaryGhostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||0===t.parts.length)return this.sessionPosition=void 0,null;const i=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);const n=new m.y(t.lineNumber,Math.min(i,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=n,n})),this._register((0,u.yC)(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const s=(0,g.rm)(((t,i)=>{const s=i.add(this.instantiationService.createInstance(A,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.activeCommands));return e.addContentWidget(s),i.add((0,h.s)((()=>e.removeContentWidget(s)))),i.add((0,u.fm)((e=>{this.position.read(e)&&n.lastTriggerKind.read(e)!==_.qw.Explicit&&n.triggerExplicitly()}))),s})),o=(0,u.ZX)(this,((e,t)=>!!this.position.read(e)||!!t));i.add((0,u.fm)((e=>{o.read(e)&&s.read(e)})))})))}};T=I([M(2,L._Y)],T);const R=(0,N.pU)("inline-suggestion-hints-next",d.W.chevronRight,(0,b.kg)("parameterHintsNextIcon","Icon for show next parameter hint.")),P=(0,N.pU)("inline-suggestion-hints-previous",d.W.chevronLeft,(0,b.kg)("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let A=class extends h.jG{static{n=this}static{this._dropDownVisible=!1}static get dropDownVisible(){return this._dropDownVisible}static{this.id=0}createCommandAction(e,t,i){const n=new a.rc(e,t,i,!0,(()=>this._commandService.executeCommand(e))),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let o=t;return s&&(o=(0,b.kg)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,s.getLabel())),n.tooltip=o,n}constructor(e,t,i,o,r,l,d,h,g,p,m){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=o,this._suggestionCount=r,this._extraCommands=l,this._commandService=d,this.keybindingService=g,this._contextKeyService=p,this._menuService=m,this.id="InlineSuggestionHintsContentWidget"+n.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,s.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,s.h)("div@toolBar")]),this.previousAction=this.createCommandAction(v.Vl,(0,b.kg)("previous","Previous"),f.L.asClassName(P)),this.availableSuggestionCountAction=new a.rc("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(v.PA,(0,b.kg)("next","Next"),f.L.asClassName(R)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(y.D8.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new c.uC((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new c.uC((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.toolBar=this._register(h.createInstance(B,this.nodes.toolBar,y.D8.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof y.Xe)return h.createInstance(F,e,void 0);if(e===this.availableSuggestionCountAction){const t=new O(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{n._dropDownVisible=e}))),this._register((0,u.fm)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,u.fm)((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register((0,u.fm)((e=>{const t=this._extraCommands.read(e).map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[e,i]of this.inlineCompletionsActionsMenus.getActions())for(const e of i)e instanceof y.Xe&&t.push(e);t.length>0&&t.unshift(new a.wv),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};A=n=I([M(6,S.d),M(7,L._Y),M(8,D.b),M(9,k.fN),M(10,y.ez)],A);class O extends o.Z4{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}class F extends w.oq{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,s.h)("div.keybinding").root;this._register(new r.x(t,p.OS,{disableTitle:!0,...r.l})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let B=class extends C.p{constructor(e,t,i,n,s,o,r,a,l){super(e,{resetMenu:t,...i},n,s,o,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){const e=[],t=[];(0,w.Ot)(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setPrependedPrimaryActions(e){(0,l.aI)(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){(0,l.aI)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};B=I([M(3,y.ez),M(4,k.fN),M(5,x.Z),M(6,D.b),M(7,S.d),M(8,E.k)],B)},60224:function(e,t,i){"use strict";var n=i(52694),s=i(51059),o=i(73755),r=i(1878),a=i(49678),l=i(76392),c=i(99575),d=i(84201),h=i(35114),u=i(15075),g=i(90890),p=i(76611),f=i(98018),m=i(84230),_=i(24219),v=i(34157),b=i(90072),w=i(62993),C=i(82688),y=i(69122),S=i(38945),k=i(80670),x=i(43920),L=i(43193),D=i(3520),E=i(40393),N=i(52192),I=i(41750),M=i(62067),T=i(44425),R=i(10621),P=i(73055),A=i(59046),O=i(35173);const F="ghost-text";let B=class extends h.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,o.FY)(this,!1),this.currentTextModel=(0,o.y0)(this,this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,o.un)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof A.Vs?i.columnRange:void 0,s=[],o=[];function r(e,t){if(o.length>0){const i=o[o.length-1];t&&i.decorations.push(new R.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)o.push({content:i,decorations:t?[new R.d(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,c=0;for(const e of i.parts){let t=e.lines;void 0===l?(s.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):r([a.substring(c,e.column-1)],void 0),t.length>0&&(r(t,F),void 0===l&&e.column<=a.length&&(l=e.column)),c=e.column-1}void 0!==l&&r([a.substring(c)],void 0);const d=void 0!==l?new O.GM(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:s,additionalLines:o,hiddenRange:d,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=(0,o.un)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const e of t.inlineTexts)i.push({range:E.Q.fromPositions(new w.y(t.lineNumber,e.column)),options:{description:F,after:{content:e.text,inlineClassName:e.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:M.VW.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new V(this.editor,this.languageService.languageIdCodec,(0,o.un)((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register((0,h.s)((()=>{this.isDisposed.set(!0,void 0)}))),this._register((0,O.pY)(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};var W,H;B=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(W=2,H=I.L,function(e,t){H(e,t,W)})],B);class V extends h.jG{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=(0,o.yQ)("editorOptionChanged",k.Jh.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(33)||e.hasChanged(118)||e.hasChanged(100)||e.hasChanged(95)||e.hasChanged(51)||e.hasChanged(50)||e.hasChanged(67)))),this._register((0,o.fm)((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:s}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const o=Math.max(t.length,i);if(o>0){const i=document.createElement("div");!function(e,t,i,n,s){const o=n.get(33),r=n.get(118),a=n.get(95),l=n.get(51),c=n.get(50),d=n.get(67),h=new N.fe(1e4);h.appendString('
    ');for(let e=0,n=i.length;e');const g=x.aC(u),p=x.E_(u),f=T.f.createEmpty(u,s);(0,P.UW)(new P.zL(c.isMonospace&&!o,c.canUseHalfwidthRightwardsArrow,u,!1,g,p,0,f,n.decorations,t,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,r,"none",a,l!==D.Bc.OFF,null),h),h.appendString("
    ")}h.appendString(""),(0,L.M)(e,c);const u=h.build(),g=z?z.createHTML(u):u;e.innerHTML=g}(i,s,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:o,domNode:i,afterColumnAffinity:1})}}))}}const z=(0,S.H)("editorGhostText",{createHTML:e=>e});var U=i(27567),j=i(97358),q=i(64429),K=i(57981),$=i(20187),G=i(48905),Q=i(56218),Y=i(30479),Z=i(13233),X=i(35720),J=i(8494),ee=i(17793),te=i(33597),ie=i(72491);function ne(e,t,i){const n=i?e.range.intersectRanges(i):e.range;if(!n)return e;const s=t.getValueInRange(n,1),o=(0,x.Qp)(s,e.text),r=Z.W.ofText(s.substring(0,o)).addToPosition(e.range.getStartPosition()),a=e.text.substring(o),l=E.Q.fromPositions(r,e.range.getEndPosition());return new Y.WR(l,a)}function se(e,t){return e.text.startsWith(t.text)&&(i=e.range,(n=t.range).getStartPosition().equals(i.getStartPosition())&&n.getEndPosition().isBeforeOrEqual(i.getEndPosition()));var i,n}function oe(e,t,i,n,s=0){let o=ne(e,t);if(o.range.endLineNumber!==o.range.startLineNumber)return;const r=t.getLineContent(o.range.startLineNumber),a=(0,x.UU)(r).length;if(o.range.startColumn-1<=a){const e=(0,x.UU)(o.text).length,t=r.substring(o.range.startColumn-1,a),[i,n]=[o.range.getStartPosition(),o.range.getEndPosition()],s=i.column+t.length<=n.column?i.delta(0,t.length):n,l=E.Q.fromPositions(s,n),c=o.text.startsWith(t)?o.text.substring(t.length):o.text.substring(e);o=new Y.WR(l,c)}const l=t.getValueInRange(o.range),c=function(e,t){if(re?.originalValue===e&&re?.newValue===t)return re?.changes;{let i=le(e,t,!0);if(i){const n=ae(i);if(n>0){const s=le(e,t,!1);s&&ae(s)0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==l.length)return}const u=o.text.length-s;for(const e of c){const t=o.range.startColumn+e.originalStart+e.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===o.range.startLineNumber&&t0)return;if(0===e.modifiedLength)continue;const s=e.modifiedStart+e.modifiedLength,r=Math.max(e.modifiedStart,Math.min(s,u)),a=o.text.substring(e.modifiedStart,r),l=o.text.substring(r,Math.max(e.modifiedStart,s));a.length>0&&h.push(new A.yP(t,a,!1)),l.length>0&&h.push(new A.yP(t,l,!0))}return new A.xD(d,h)}let re;function ae(e){let t=0;for(const i of e)t+=i.originalLength;return t}function le(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const s=Math.max(n(e),n(t));function o(e){if(e<0)throw new Error("unexpected");return s+e+1}function r(e){let t=0,n=0;const s=new Int32Array(e.length);for(let r=0,a=e.length;ra},{getElements:()=>l}).ComputeDiff(!1).changes}var ce=function(e,t){return function(i,n){t(i,n,e)}};let de=class extends h.jG{constructor(e,t,i,n,s){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=s,this._updateOperation=this._register(new h.HE),this.inlineCompletions=(0,o.X2)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,o.X2)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){const n=new he(e,t,this.textModel.getVersionId()),s=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(this._updateOperation.value?.request.satisfies(n))return this._updateOperation.value.promise;if(s.get()?.request.satisfies(n))return Promise.resolve(!0);const r=!!this._updateOperation.value;this._updateOperation.clear();const a=new p.Qi,l=(async()=>{var l,c;if((r||t.triggerKind===X.qw.Automatic)&&await(l=this._debounceValue.get(this.textModel),c=a.token,new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),l);c&&(t=c.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))}))),a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==n.versionId)return!1;const d=new Date,h=await(0,te.Yk)(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,a.token,this.languageConfigurationService);if(a.token.isCancellationRequested||this._store.isDisposed||this.textModel.getVersionId()!==n.versionId)return!1;const u=new Date;this._debounceValue.update(this.textModel,u.getTime()-d.getTime());const g=new ge(h,n,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!h.has(t)&&g.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),(0,o.Rn)((e=>{s.set(g,e)})),!0})(),c=new ue(n,a,l);return this._updateOperation.value=c,l}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){this._updateOperation.value?.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};de=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ce(3,y.ILanguageFeaturesService),ce(4,J.JZ)],de);class he{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&(0,K.KC)(this.context.selectedSuggestionInfo,e.context.selectedSuggestionInfo,(0,K.r)())&&(e.context.triggerKind===X.qw.Automatic||this.context.triggerKind===X.qw.Explicit)&&this.versionId===e.versionId}}class ue{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class ge{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this._textModel=i,this._versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[];const s=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new pe(e,s[t],this._textModel,this._versionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this._textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new pe(e,n,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}}class pe{get forwardStable(){return this.inlineCompletion.source.inlineCompletions.enableForwardStability??!1}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this._textModel=i,this._modelVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=(0,o.C)({owner:this,equalsFn:E.Q.equalsRange},(e=>(this._modelVersion.read(e),this._textModel.getDecorationRange(this.decorationId))))}toInlineCompletion(e){return this.inlineCompletion.withRange(this._updatedRange.read(e)??fe)}toSingleTextEdit(e){return new Y.WR(this._updatedRange.read(e)??fe,this.inlineCompletion.insertText)}isVisible(e,t,i){const n=ne(this._toFilterTextReplacement(i),e),s=this._updatedRange.read(i);if(!s||!this.inlineCompletion.range.getStartPosition().equals(s.getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const o=e.getValueInRange(n.range,1),r=n.text,a=Math.max(0,t.column-n.range.startColumn);let l=r.substring(0,a),c=r.substring(a),d=o.substring(0,a),h=o.substring(a);const u=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=u&&(d=d.trimStart(),0===d.length&&(h=h.trimStart()),l=l.trimStart(),0===l.length&&(c=c.trimStart())),l.startsWith(d)&&!!(0,ee.dE)(h,c)}canBeReused(e,t){const i=this._updatedRange.read(void 0);return!!i&&i.containsPosition(t)&&this.isVisible(e,t,void 0)&&Z.W.ofRange(i).isGreaterThanOrEqualTo(Z.W.ofRange(this.inlineCompletion.range))}_toFilterTextReplacement(e){return new Y.WR(this._updatedRange.read(e)??fe,this.inlineCompletion.filterText)}}const fe=new E.Q(1,1,1,1);var me=i(83012),_e=i(21335),ve=i(63619),be=function(e,t){return function(i,n){t(i,n,e)}};let we=class extends h.jG{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,s,r,a,l,c,d,h,u){let g;super(),this.textModel=e,this.selectedSuggestItem=t,this._textModelVersionId=i,this._positions=n,this._debounceValue=s,this._suggestPreviewEnabled=r,this._suggestPreviewMode=a,this._inlineSuggestMode=l,this._enabled=c,this._instantiationService=d,this._commandService=h,this._languageConfigurationService=u,this._source=this._register(this._instantiationService.createInstance(de,this.textModel,this._textModelVersionId,this._debounceValue)),this._isActive=(0,o.FY)(this,!1),this._forceUpdateExplicitlySignal=(0,o.Yd)(this),this._selectedInlineCompletionId=(0,o.FY)(this,void 0),this._primaryPosition=(0,o.un)(this,(e=>this._positions.read(e)[0]??new w.y(1,1))),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([Ce.Redo,Ce.Undo,Ce.AcceptWord]),this._fetchInlineCompletionsPromise=(0,o.nb)({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:X.qw.Automatic}),handleChange:(e,t)=>(e.didChange(this._textModelVersionId)&&this._preserveCurrentCompletionReasons.has(this._getReason(e.change))?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=X.qw.Explicit),!0)},((e,t)=>{if(this._forceUpdateExplicitlySignal.read(e),!(this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e)))return void this._source.cancelUpdate();this._textModelVersionId.read(e);const i=this._source.suggestWidgetInlineCompletions.get(),n=this.selectedSuggestItem.read(e);if(i&&!n){const e=this._source.inlineCompletions.get();(0,o.Rn)((t=>{(!e||i.request.versionId>e.request.versionId)&&this._source.inlineCompletions.set(i.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const s=this._primaryPosition.read(e),r={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:n?.toSelectedSuggestionInfo()},a=this.selectedInlineCompletion.get(),l=t.preserveCurrentCompletion||a?.forwardStable?a:void 0;return this._source.fetch(s,r,l)})),this._filteredInlineCompletionItems=(0,o.C)({owner:this,equalsFn:(0,K.S3)()},(e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this._primaryPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=(0,o.un)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=(0,o.un)(this,(e=>this._filteredInlineCompletionItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this.activeCommands=(0,o.C)({owner:this,equalsFn:(0,K.S3)()},(e=>this.selectedInlineCompletion.read(e)?.inlineCompletion.source.inlineCompletions.commands??[])),this.lastTriggerKind=this._source.inlineCompletions.map(this,(e=>e?.request.context.triggerKind)),this.inlineCompletionsCount=(0,o.un)(this,(e=>this.lastTriggerKind.read(e)===X.qw.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=(0,o.C)({owner:this,equalsFn:(e,t)=>e&&t?(0,A.AL)(e.ghostTexts,t.ghostTexts)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{const t=this.textModel,i=this.selectedSuggestItem.read(e);if(i){const n=ne(i.toSingleTextEdit(),t),s=this._computeAugmentation(n,e);if(!this._suggestPreviewEnabled.read(e)&&!s)return;const o=s?.edit??n,r=s?s.edit.text.length-n.text.length:0,a=this._suggestPreviewMode.read(e),l=this._positions.read(e),c=[o,...ye(this.textModel,l,o)],d=c.map(((e,i)=>oe(e,t,a,l[i],r))).filter(_.O9);return{edits:c,primaryGhostText:d[0]??new A.xD(o.range.endLineNumber,[]),ghostTexts:d,inlineCompletion:s?.completion,suggestItem:i}}{if(!this._isActive.read(e))return;const i=this.selectedInlineCompletion.read(e);if(!i)return;const n=i.toSingleTextEdit(e),s=this._inlineSuggestMode.read(e),o=this._positions.read(e),r=[n,...ye(this.textModel,o,n)],a=r.map(((e,i)=>oe(e,t,s,o[i],0))).filter(_.O9);if(!a[0])return;return{edits:r,primaryGhostText:a[0],ghostTexts:a,inlineCompletion:i,suggestItem:void 0}}})),this.ghostTexts=(0,o.C)({owner:this,equalsFn:A.AL},(e=>{const t=this.state.read(e);if(t)return t.ghostTexts})),this.primaryGhostText=(0,o.C)({owner:this,equalsFn:A.x9},(e=>{const t=this.state.read(e);if(t)return t?.primaryGhostText})),this._register((0,o.OI)(this._fetchInlineCompletionsPromise)),this._register((0,o.fm)((e=>{const t=this.state.read(e),i=t?.inlineCompletion;if(i?.semanticId!==g?.semanticId&&(g=i,i)){const e=i.inlineCompletion,t=e.source;t.provider.handleItemDidShow?.(t.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}_getReason(e){return e?.isUndoing?Ce.Undo:e?.isRedoing?Ce.Redo:this.isAcceptingPartially?Ce.AcceptWord:Ce.Other}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){(0,o.PO)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineCompletionsPromise.get()}stop(e){(0,o.PO)(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentation(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t),s=n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(_.O9);return(0,q.oH)(s,(n=>{let s=n.toSingleTextEdit(t);return s=ne(s,i,E.Q.fromPositions(s.range.getStartPosition(),e.range.getEndPosition())),se(s,e)?{completion:n,edit:s}:void 0}))}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new $.D7;const t=this.state.get();if(!t||t.primaryGhostText.isEmpty()||!t.inlineCompletion)return;const i=t.inlineCompletion.toInlineCompletion(void 0);if(i.command&&i.source.addRef(),e.pushUndoStop(),i.snippetInfo)e.executeEdits("inlineSuggestion.accept",[G.k.replace(i.range,""),...i.additionalTextEdits]),e.setPosition(i.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),me.O.get(e)?.insert(i.snippetInfo.snippet,{undoStopBefore:!1});else{const n=t.edits,s=Se(n).map((e=>Q.L.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",[...n.map((e=>G.k.replace(e.range,e.text))),...i.additionalTextEdits]),e.setSelections(s,"inlineCompletionAccept")}this.stop(),i.command&&(await this._commandService.executeCommand(i.command.id,...i.command.arguments||[]).then(void 0,$.M_),i.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),s=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),o=t.match(s);let r=0;r=o&&void 0!==o.index?0===o.index?o[0].length:o.index:t.length;const a=/\s+/g.exec(t);return a&&void 0!==a.index&&a.index+a[0].length{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}),1)}async _acceptNext(e,t,i){if(e.getModel()!==this.textModel)throw new $.D7;const n=this.state.get();if(!n||n.primaryGhostText.isEmpty()||!n.inlineCompletion)return;const s=n.primaryGhostText,o=n.inlineCompletion.toInlineCompletion(void 0);if(o.snippetInfo||o.filterText!==o.insertText)return void await this.accept(e);const r=s.parts[0],a=new w.y(s.lineNumber,r.column),l=r.text,c=t(a,l);if(c===l.length&&1===s.parts.length)return void this.accept(e);const d=l.substring(0,c),h=this._positions.get(),u=h[0];o.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const t=E.Q.fromPositions(u,a),i=e.getModel().getValueInRange(t)+d,n=new Y.WR(t,i),s=[n,...ye(this.textModel,h,n)],o=Se(s).map((e=>Q.L.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",s.map((e=>G.k.replace(e.range,e.text)))),e.setSelections(o,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(o.source.provider.handlePartialAccept){const t=E.Q.fromPositions(o.range.getStartPosition(),Z.W.ofText(d).addToPosition(a)),n=e.getModel().getValueInRange(t,1);o.source.provider.handlePartialAccept(o.source.inlineCompletions,o.sourceInlineCompletion,n.length,{kind:i})}}finally{o.source.removeRef()}}handleSuggestAccepted(e){const t=ne(e.toSingleTextEdit(),this.textModel),i=this._computeAugmentation(t,void 0);if(!i)return;const n=i.completion.inlineCompletion;n.source.provider.handlePartialAccept?.(n.source.inlineCompletions,n.sourceInlineCompletion,t.text.length,{kind:2})}};var Ce;function ye(e,t,i){if(1===t.length)return[];const n=t[0],s=t.slice(1),o=i.range.getStartPosition(),r=i.range.getEndPosition(),a=e.getValueInRange(E.Q.fromPositions(n,r)),l=(0,O.tN)(n,o);if(l.lineNumber<1)return(0,$.dz)(new $.D7(`positionWithinTextEdit line number should be bigger than 0.\n\t\t\tInvalid subtraction between ${n.toString()} and ${o.toString()}`)),[];const c=function(e,t){let i="";const n=(0,x.en)(e);for(let e=t.lineNumber-1;e{const i=(0,O.OA)((0,O.tN)(t,o),r),n=e.getValueInRange(E.Q.fromPositions(t,i)),s=(0,x.Qp)(a,n),l=E.Q.fromPositions(t,t.delta(0,s));return new Y.WR(l,c)}))}function Se(e){const t=j.t9.createSortPermutation(e,(0,j.VE)((e=>e.range),E.Q.compareRangesUsingStarts)),i=new Y.mF(t.apply(e)).getNewRanges();return t.inverse().apply(i).map((e=>e.getEndPosition()))}we=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([be(9,ve._Y),be(10,_e.d),be(11,J.JZ)],we),function(e){e[e.Undo=0]="Undo",e[e.Redo=1]="Redo",e[e.AcceptWord=2]="AcceptWord",e[e.Other=3]="Other"}(Ce||(Ce={}));var ke=i(62347),xe=i(93155),Le=i(6503);class De extends h.jG{get selectedItem(){return this._currentSuggestItemInfo}constructor(e,t,i){super(),this.editor=e,this.suggestControllerPreselector=t,this.onWillAccept=i,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._onDidSelectedItemChange=this._register(new k.vl),this.onDidSelectedItemChange=this._onDidSelectedItemChange.event,this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const n=Le.D.get(this.editor);if(n){this._register(n.registerSelector({priority:100,select:(e,t,i)=>{const s=this.editor.getModel();if(!s)return-1;const o=this.suggestControllerPreselector(),r=o?ne(o,s):void 0;if(!r)return-1;const a=w.y.lift(t),l=i.map(((e,t)=>{const i=ne(Ee.fromSuggestion(n,s,a,e,this.isShiftKeyPressed).toSingleTextEdit(),s);return{index:t,valid:se(r,i),prefixLength:i.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),c=(0,q.Cn)(l,(0,j.VE)((e=>e.prefixLength),j.U9));return c?c.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(n.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(n.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(n.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(k.Jh.once(n.model.onDidTrigger)((e=>{t()}))),this._register(n.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const s=Ee.fromSuggestion(n,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(s)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();var i,n;this._isActive===e&&((i=this._currentSuggestItemInfo)===(n=t)||i&&n&&i.equals(n))||(this._isActive=e,this._currentSuggestItemInfo=t,this._onDidSelectedItemChange.fire())}getSuggestItemInfo(){const e=Le.D.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?Ee.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=Le.D.get(this.editor);e?.stopForceRenderingAbove()}forceRenderingAbove(){const e=Le.D.get(this.editor);e?.forceRenderingAbove()}}class Ee{static fromSuggestion(e,t,i,n,s){let{insertText:o}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new ke.fr).parse(o);e.children.length<100&&xe.O.adjustWhitespace(t,i,!0,e),o=e.toString(),r=!0}const a=e.getOverwriteInfo(n,s);return new Ee(E.Q.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),o,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new X.GE(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new Y.WR(this.range,this.insertText)}}var Ne,Ie=i(14374),Me=i(68745),Te=i(54673),Re=i(47901),Pe=i(97848),Ae=i(87163),Oe=function(e,t){return function(i,n){t(i,n,e)}};let Fe=class extends h.jG{static{Ne=this}static{this.ID="editor.contrib.inlineCompletionsController"}static get(e){return e.getContribution(Ne.ID)}constructor(e,t,i,n,s,r,a,u,C,y){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=s,this._debounceService=r,this._languageFeaturesService=a,this._accessibilitySignalService=u,this._keybindingService=C,this._accessibilityService=y,this._editorObs=(0,b.Ud)(this.editor),this._positions=(0,o.un)(this,(e=>this._editorObs.selections.read(e)?.map((e=>e.getEndPosition()))??[new w.y(1,1)])),this._suggestWidgetAdaptor=this._register(new De(this.editor,(()=>(this._editorObs.forceUpdate(),this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(void 0))),(e=>this._editorObs.forceUpdate((t=>{this.model.get()?.handleSuggestAccepted(e)}))))),this._suggestWidgetSelectedItem=(0,o.y0)(this,(e=>this._suggestWidgetAdaptor.onDidSelectedItemChange((()=>{this._editorObs.forceUpdate((t=>e(void 0)))}))),(()=>this._suggestWidgetAdaptor.selectedItem)),this._enabledInConfig=(0,o.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).enabled)),this._isScreenReaderEnabled=(0,o.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this._editorDictationInProgress=(0,o.y0)(this,this._contextKeyService.onDidChangeContext,(()=>!0===this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress"))),this._enabled=(0,o.un)(this,(e=>this._enabledInConfig.read(e)&&(!this._isScreenReaderEnabled.read(e)||!this._editorDictationInProgress.read(e)))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this.model=(0,f.a0)(this,(e=>{if(this._editorObs.isReadonly.read(e))return;const t=this._editorObs.model.read(e);return t?this._instantiationService.createInstance(we,t,this._suggestWidgetSelectedItem,this._editorObs.versionId,this._positions,this._debounceValue,(0,o.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(119).preview)),(0,o.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(119).previewMode)),(0,o.y0)(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).mode)),this._enabled):void 0})).recomputeInitiallyAndOnChange(this._store),this._ghostTexts=(0,o.un)(this,(e=>{const t=this.model.read(e);return t?.ghostTexts.read(e)??[]})),this._stablizedGhostTexts=function(e,t){const i=(0,o.FY)("result",[]),n=[];return t.add((0,o.fm)((t=>{const s=e.read(t);(0,o.Rn)((e=>{if(s.length!==n.length){n.length=s.length;for(let e=0;et.set(s[i],e)))}))}))),i}(this._ghostTexts,this._store),this._ghostTextWidgets=(0,m.Rl)(this,this._stablizedGhostTexts,((e,t)=>t.add(this._instantiationService.createInstance(B,this.editor,{ghostText:e,minReservedLineCount:(0,o.lk)(0),targetTextModel:this.model.map((e=>e?.textModel))})))).recomputeInitiallyAndOnChange(this._store),this._playAccessibilitySignal=(0,o.Yd)(this),this._fontFamily=(0,o.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).fontFamily)),this._register(new c.p(this._contextKeyService,this.model)),this._register((0,b.jD)(this._editorObs.onDidType,((e,t)=>{this._enabled.get()&&this.model.get()?.trigger()}))),this._register(this._commandService.onDidExecuteCommand((t=>{new Set([v.Yh.Tab.id,v.Yh.DeleteLeft.id,v.Yh.DeleteRight.id,l.Wt,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&this._editorObs.forceUpdate((e=>{this.model.get()?.trigger(e)}))}))),this._register((0,b.jD)(this._editorObs.selections,((e,t)=>{t.some((e=>3===e.reason||"api"===e.source))&&this.model.get()?.stop()}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||U.bo.dropDownVisible||(0,o.Rn)((e=>{this.model.get()?.stop(e)}))}))),this._register((0,o.fm)((e=>{const t=this.model.read(e)?.state.read(e);t?.suggestItem?t.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register((0,h.s)((()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()})));const S=(0,m.ZX)(this,((e,t)=>{const i=this.model.read(e),n=i?.state.read(e);return this._suggestWidgetSelectedItem.get()?t:n?.inlineCompletion?.semanticId}));this._register((0,b.Qg)((0,o.un)((e=>(this._playAccessibilitySignal.read(e),S.read(e),{}))),(async(e,t,i)=>{const n=this.model.get(),s=n?.state.get();if(!s||!n)return;const r=n.textModel.getLineContent(s.primaryGhostText.lineNumber);await(0,g.wR)(50,(0,p.bs)(i)),await(0,o.oJ)(this._suggestWidgetSelectedItem,_.b0,(()=>!1),(0,p.bs)(i)),await this._accessibilitySignalService.playSignal(Te.Rh.inlineSuggestion),this.editor.getOption(8)&&this._provideScreenReaderUpdate(s.primaryGhostText.renderForScreenReader(r))}))),this._register(new U.Pm(this.editor,this.model,this._instantiationService)),this._register(function(e){const t=new h.Cm,i=t.add((0,d.jh)());return t.add((0,o.fm)((t=>{i.setStyle(e.read(t))}))),t}((0,o.un)((e=>{const t=this._fontFamily.read(e);return""===t||"default"===t?"":`\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${t};\n}`})))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}_provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(150)&&(n=(0,Ie.kg)("showAccessibleViewHint","Inspect this in the accessible view ({0})",i.getAriaLabel())),(0,u.xE)(n?e+", "+n:e)}shouldShowHoverAt(e){const t=this.model.get()?.primaryGhostText.get();return!!t&&t.parts.some((i=>e.containsPosition(new w.y(t.lineNumber,i.column))))}shouldShowHoverAtViewZone(e){return this._ghostTextWidgets.get()[0]?.ownsViewZone(e)??!1}};Fe=Ne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Oe(1,ve._Y),Oe(2,Pe.fN),Oe(3,Re.pG),Oe(4,_e.d),Oe(5,C.ILanguageFeatureDebounceService),Oe(6,y.ILanguageFeaturesService),Oe(7,Te.Nt),Oe(8,Ae.b),Oe(9,Me.j)],Fe);var Be=i(9408),We=i(93223);class He extends n.ks{static{this.ID=l.PA}constructor(){super({id:He.ID,label:Ie.kg("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){const i=Fe.get(t);i?.model.get()?.next()}}class Ve extends n.ks{static{this.ID=l.Vl}constructor(){super({id:Ve.ID,label:Ie.kg("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){const i=Fe.get(t);i?.model.get()?.previous()}}class ze extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:Ie.kg("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:a.R.writable})}async run(e,t){const i=Fe.get(t);await(0,r.fL)((async e=>{await(i?.model.get()?.triggerExplicitly(e)),i?.playAccessibilitySignal(e)}))}}class Ue extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:Ie.kg("action.inlineSuggest.acceptNextWord","Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible)},menuOpts:[{menuId:We.D8.InlineSuggestionToolbar,title:Ie.kg("acceptWord","Accept Word"),group:"primary",order:2}]})}async run(e,t){const i=Fe.get(t);await(i?.model.get()?.acceptNextWord(i.editor))}}class je extends n.ks{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:Ie.kg("action.inlineSuggest.acceptNextLine","Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:Pe.M$.and(a.R.writable,c.p.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:We.D8.InlineSuggestionToolbar,title:Ie.kg("acceptLine","Accept Line"),group:"secondary",order:2}]})}async run(e,t){const i=Fe.get(t);await(i?.model.get()?.acceptNextLine(i.editor))}}class qe extends n.ks{constructor(){super({id:l.Wt,label:Ie.kg("action.inlineSuggest.accept","Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:c.p.inlineSuggestionVisible,menuOpts:[{menuId:We.D8.InlineSuggestionToolbar,title:Ie.kg("accept","Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:Pe.M$.and(c.p.inlineSuggestionVisible,a.R.tabMovesFocus.toNegated(),c.p.inlineSuggestionHasIndentationLessThanTabSize,Be.ob.Visible.toNegated(),a.R.hoverFocused.toNegated())}})}async run(e,t){const i=Fe.get(t);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}class Ke extends n.ks{static{this.ID="editor.action.inlineSuggest.hide"}constructor(){super({id:Ke.ID,label:Ie.kg("action.inlineSuggest.hide","Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:c.p.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=Fe.get(t);(0,o.Rn)((e=>{i?.model.get()?.stop(e)}))}}class $e extends We.L{static{this.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}constructor(){super({id:$e.ID,title:Ie.kg("action.inlineSuggest.alwaysShowToolbar","Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:We.D8.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:Pe.M$.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){const i=e.get(Re.pG),n="always"===i.getValue("editor.inlineSuggest.showToolbar")?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",n)}}var Ge=i(85584),Qe=i(69498),Ye=i(95607),Ze=i(2727),Xe=function(e,t){return function(i,n){t(i,n,e)}};class Je{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let et=class{constructor(e,t,i,n,s,o){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=s,this._telemetryService=o,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=Fe.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new s.mm(1e3,this,E.Q.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new s.mm(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if("onHover"!==this._editor.getOption(62).showToolbar)return[];const i=Fe.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new Je(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new h.Cm,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&i.add(this.renderScreenReaderText(e,n));const r=n.controller.model.get(),a=this._instantiationService.createInstance(U.bo,this._editor,!1,(0,o.lk)(null),r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.activeCommands),l=a.getDomNode();e.fragment.appendChild(l),r.triggerExplicitly(),i.add(a);const c={hoverPart:n,hoverElement:l,dispose(){i.dispose()}};return new s.Ke([c])}renderScreenReaderText(e,t){const i=new h.Cm,n=d.$,s=n("div.hover-row.markdown-hover"),r=d.BC(s,n("div.hover-contents",{"aria-live":"assertive"})),a=i.add(new Qe.T({editor:this._editor},this._languageService,this._openerService));return i.add((0,o.fm)((n=>{const s=t.controller.model.read(n)?.primaryGhostText.read(n);if(s){const t=this._editor.getModel().getLineContent(s.lineNumber);(t=>{i.add(a.onDidRenderAsync((()=>{r.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=Ie.kg("inlineSuggestionFollows","Suggestion:"),s=i.add(a.render((new Ge.Bc).appendText(n).appendCodeblock("text",t)));r.replaceChildren(s.element)})(s.renderForScreenReader(t))}else d.Ln(r)}))),e.fragment.appendChild(s),i}};et=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Xe(1,I.L),Xe(2,Ye.C),Xe(3,Me.j),Xe(4,ve._Y),Xe(5,Ze.k)],et);var tt=i(92998);(0,n.HW)(Fe.ID,Fe,3),(0,n.Fl)(ze),(0,n.Fl)(He),(0,n.Fl)(Ve),(0,n.Fl)(Ue),(0,n.Fl)(je),(0,n.Fl)(qe),(0,n.Fl)(Ke),(0,We.ug)($e),s.B2.register(et),tt.Z.register(new class{})},59046:function(e,t,i){"use strict";i.d(t,{AL:function(){return h},Vs:function(){return d},x9:function(){return u},xD:function(){return l},yP:function(){return c}});var n=i(97358),s=i(43920),o=i(62993),r=i(40393),a=i(30479);class l{constructor(e,t){this.lineNumber=e,this.parts=t}equals(e){return this.lineNumber===e.lineNumber&&this.parts.length===e.parts.length&&this.parts.every(((t,i)=>t.equals(e.parts[i])))}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return new a.mF([...this.parts.map((e=>new a.WR(r.Q.fromPositions(new o.y(1,e.column)),e.lines.join("\n"))))]).applyToString(i).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class c{constructor(e,t,i){this.column=e,this.text=t,this.preview=i,this.lines=(0,s.uz)(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class d{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.text=i,this.additionalReservedLineCount=n,this.parts=[new c(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=(0,s.uz)(this.text)}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every(((t,i)=>t===e.newLines[i]))&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function h(e,t){return(0,n.aI)(e,t,u)}function u(e,t){return e===t||!(!e||!t)&&(e instanceof l&&t instanceof l||e instanceof d&&t instanceof d)&&e.equals(t)}},33597:function(e,t,i){"use strict";i.d(t,{Yk:function(){return b}});var n=i(93066),s=i(90890),o=i(76611),r=i(52732),a=i(20187),l=i(62993),c=i(40393),d=i(46218),h=i(91727),u=i(4138),g=i(24536),p=i(6730);class f{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}var m=i(30479),_=i(35173),v=i(62347);async function b(e,t,i,n,d=o.XO.None,h){const u=t instanceof l.y?function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new c.Q(e.lineNumber,i.startColumn,e.lineNumber,n):c.Q.fromPositions(e,e.with(void 0,n))}(t,i):t,g=e.all(i),p=new r.db;for(const e of g)e.groupId&&p.add(e.groupId,e);function f(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=p.get(i);for(const i of e)t.push(i)}return t}const m=new Map,_=new Set;function v(e,t){if(t=[...t,e],_.has(e))return t;_.add(e);try{const i=f(e);for(const e of i){const i=v(e,t);if(i)return i}}finally{_.delete(e)}}function b(e){const o=m.get(e);if(o)return o;const r=v(e,[]);r&&(0,a.M_)(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const c=new s.Zv;return m.set(e,c.p),(async()=>{if(!r){const t=f(e);for(const e of t){const t=await b(e);if(t&&t.items.length>0)return}}try{return t instanceof l.y?await e.provideInlineCompletions(i,t,n,d):await(e.provideInlineEdits?.(i,t,n,d))}catch(e){return void(0,a.M_)(e)}})().then((e=>c.complete(e)),(e=>c.error(e))),c.p}const S=await Promise.all(g.map((async e=>({provider:e,completions:await b(e)})))),k=new Map,x=[];for(const e of S){const t=e.completions;if(!t)continue;const n=new C(t,e.provider);x.push(n);for(const e of t.items){const t=y.from(e,n,u,i,h);k.set(t.hash(),t)}}return new w(Array.from(k.values()),new Set(k.keys()),x)}class w{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class C{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class y{static from(e,t,i,s,o){let r,a,l=e.range?c.Q.lift(e.range):i;if("string"==typeof e.insertText){if(r=e.insertText,o&&e.completeBracketPairs){r=S(r,l.getStartPosition(),s,o);const t=r.length-e.insertText.length;0!==t&&(l=new c.Q(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+t))}a=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=S(e.insertText.snippet,l.getStartPosition(),s,o);const i=e.insertText.snippet.length-t;0!==i&&(l=new c.Q(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn+i))}const i=(new v.fr).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof v.EY?(r=i.children[0].value,a=void 0):(r=i.toString(),a={snippet:e.insertText.snippet,range:l})}else(0,n.xb)(e.insertText);return new y(r,e.command,l,r,a,e.additionalTextEdits||(0,_.zk)(),e,t)}constructor(e,t,i,n,s,o,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=s,this.additionalTextEdits=o,this.sourceInlineCompletion=r,this.source=a,n=(e=e.replace(/\r\n|\r/g,"\n")).replace(/\r\n|\r/g,"\n")}withRange(e){return new y(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}toSingleTextEdit(){return new m.WR(this.range,this.insertText)}}function S(e,t,i,n){const s=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,o=i.tokenization.tokenizeLineWithEdit(t,s.length-(t.column-1),e),r=o?.sliceAndInflate(t.column-1,s.length,0);if(!r)return e;const a=function(e,t){const i=new g.Mg,n=new d.Z(i,(e=>t.getLanguageConfiguration(e))),s=new p.tk(new f([e]),n),o=(0,u.T)(s,[],void 0,!0);let r="";const a=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=(0,h.QB)(i,t.openingBracket.length),t.child&&(e(t.child,i),i=(0,h.QB)(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=(0,h.QB)(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);r+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)r+=a.substring((0,h.sS)(i),(0,h.sS)((0,h.QB)(i,t.length)));else if(4===t.kind)for(const n of t.children)e(n,i),i=(0,h.QB)(i,n.length)}(o,h.Vp),r}(r,n);return a}},35173:function(e,t,i){"use strict";i.d(t,{GM:function(){return d},OA:function(){return u},pY:function(){return h},tN:function(){return g},zk:function(){return c}});var n=i(20187),s=i(35114),o=i(73755),r=i(62993),a=i(40393);const l=[];function c(){return l}class d{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new n.D7(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new a.Q(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function h(e,t){const i=new s.Cm,n=e.createDecorationsCollection();return i.add((0,o.zL)({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function u(e,t){return new r.y(e.lineNumber+t.lineNumber-1,1===t.lineNumber?e.column+t.column-1:t.column)}function g(e,t){return new r.y(e.lineNumber-t.lineNumber+1,e.lineNumber-t.lineNumber==0?e.column-t.column+1:e.column)}},95392:function(e,t,i){"use strict";var n=i(52694),s=i(49678),o=i(35114),r=i(73755),a=i(48905),l=i(62993),c=i(40393),d=i(41750),h=i(62067),u=i(10621),g=i(35173),p=i(51903);const f="inline-edit";let m=class extends o.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=(0,r.FY)(this,!1),this.currentTextModel=(0,r.y0)(this,this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=(0,r.un)(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;let n=this.model.range?.read(e);n&&n.startLineNumber===n.endLineNumber&&n.startColumn===n.endColumn&&(n=void 0);const s=(!n||n.startLineNumber===n.endLineNumber)&&1===i.parts.length&&1===i.parts[0].lines.length,o=1===i.parts.length&&i.parts[0].lines.every((e=>0===e.length)),r=[],a=[];function l(e,t){if(a.length>0){const i=a[a.length-1];t&&i.decorations.push(new u.d(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)a.push({content:i,decorations:t?[new u.d(1,i.length+1,t,0)]:[]})}const c=t.getLineContent(i.lineNumber);let d,h=0;if(!o&&(s||!n)){for(const e of i.parts){let t=e.lines;n&&!s&&(l(t,f),t=[]),void 0===d?(r.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):l([c.substring(h,e.column-1)],void 0),t.length>0&&(l(t,f),void 0===d&&e.column<=c.length&&(d=e.column)),h=e.column-1}void 0!==d&&l([c.substring(h)],void 0)}const p=void 0!==d?new g.GM(d,c.length+1):void 0,m=s||!n?i.lineNumber:n.endLineNumber-1;return{inlineTexts:r,additionalLines:a,hiddenRange:p,lineNumber:m,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t,range:n,isSingleLine:s,isPureRemove:o}})),this.decorations=(0,r.un)(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];if(t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),t.range){const e=[];if(t.isSingleLine)e.push(t.range);else if(!t.isPureRemove){const i=t.range.endLineNumber-t.range.startLineNumber;for(let n=0;n{this.isDisposed.set(!0,void 0)}))),this._register((0,g.pY)(this.editor,this.decorations))}};var _,v;m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(_=2,v=d.L,function(e,t){v(e,t,_)})],m);var b,w=i(97848),C=i(63619),y=i(35720),S=i(69122),k=i(76611),x=i(59046),L=i(21335),D=i(84201),E=i(15339),N=i(30981),I=i(97358),M=i(79783),T=i(42574),R=i(86051),P=i(93223),A=i(14280),O=i(87163),F=i(2727),B=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W=function(e,t){return function(i,n){t(i,n,e)}};let H=class extends o.jG{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=(0,r.y0)(this,this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(63).showToolbar)),this.sessionPosition=void 0,this.position=(0,r.un)(this,(e=>{const t=this.model.read(e)?.model.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!t||0===t.parts.length)return this.sessionPosition=void 0,null;const i=t.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==t.lineNumber&&(this.sessionPosition=void 0);const n=new l.y(t.lineNumber,Math.min(i,this.sessionPosition?.column??Number.MAX_SAFE_INTEGER));return this.sessionPosition=n,n})),this._register((0,r.yC)(((t,i)=>{if(!this.model.read(t)||!this.alwaysShowToolbar.read(t))return;const n=i.add(this.instantiationService.createInstance(V,this.editor,!0,this.position));e.addContentWidget(n),i.add((0,o.s)((()=>e.removeContentWidget(n))))})))}};H=B([W(2,C._Y)],H);let V=class extends o.jG{static{b=this}static{this._dropDownVisible=!1}static{this.id=0}constructor(e,t,i,n,s,o){super(),this.editor=e,this.withBorder=t,this._position=i,this._contextKeyService=s,this._menuService=o,this.id="InlineEditHintsContentWidget"+b.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,D.h)("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[(0,D.h)("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(P.D8.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(n.createInstance(U,this.nodes.toolBar,this.editor,P.D8.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof P.Xe)return n.createInstance(z,e,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{b._dropDownVisible=e}))),this._register((0,r.fm)((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register((0,r.fm)((e=>{const t=[];for(const[e,i]of this.inlineCompletionsActionsMenus.getActions())for(const e of i)e instanceof P.Xe&&t.push(e);t.length>0&&t.unshift(new N.wv),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};V=b=B([W(3,C._Y),W(4,w.fN),W(5,P.ez)],V);class z extends T.oq{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=(0,D.h)("div.keybinding").root;this._register(new E.x(t,M.OS,{disableTitle:!0,...E.l})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let U=class extends R.p{constructor(e,t,i,n,s,o,r,a,l,c){super(e,{resetMenu:i,...n},s,o,r,a,l,c),this.editor=t,this.menuId=i,this.options2=n,this.menuService=s,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this._store.add(this.editor.onDidChangeCursorPosition((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){const e=[],t=[];(0,T.Ot)(this.menu,this.options2?.menuOptions,{primary:e,secondary:t},this.options2?.toolbarOptions?.primaryGroup,this.options2?.toolbarOptions?.shouldInlineSubmenu,this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions),t.push(...this.additionalActions),e.unshift(...this.prependedPrimaryActions),this.setActions(e,t)}setAdditionalSecondaryActions(e){(0,I.aI)(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};U=B([W(4,P.ez),W(5,w.fN),W(6,A.Z),W(7,O.b),W(8,L.d),W(9,F.k)],U);var j,q,K=i(47901),$=i(20187),G=i(98018),Q=i(54244),Y=i(90072),Z=i(11797),X=i(41006),J=i(11521),ee=i(49079),te=i(59266),ie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ne=function(e,t){return function(i,n){t(i,n,e)}};function se(e){const t=e[0].match(/^\s*/)?.[0]??"",i=t.length;return{text:e.map((e=>e.replace(new RegExp("^"+t),""))),shift:i}}let oe=class extends o.jG{static{j=this}static{this._modelId=0}static _createUniqueUri(){return Q.r.from({scheme:"inline-edit-widget",path:(new Date).toString()+String(j._modelId++)})}constructor(e,t,i,n,s){super(),this._editor=e,this._model=t,this._instantiationService=i,this._diffProviderFactoryService=n,this._modelService=s,this._position=(0,r.un)(this,(e=>{const t=this._model.read(e);if(!t||0===t.text.length)return null;if(t.range.startLineNumber===t.range.endLineNumber&&(t.range.startColumn!==t.range.endColumn||1!==t.range.startColumn))return null;const i=this._editor.getModel();if(!i)return null;const n=Array.from(function*(e,t,i=1){void 0===t&&([t,e]=[e,0]);for(let n=e;ni.getLineLastNonWhitespaceColumn(e))),o=Math.max(...s),r=n[s.indexOf(o)],a=new l.y(r,o);return{top:t.range.startLineNumber,left:a}})),this._text=(0,r.un)(this,(e=>{const t=this._model.read(e);if(!t)return{text:"",shift:0};const i=se(t.text.split("\n"));return{text:i.text.join("\n"),shift:i.shift}})),this._originalModel=(0,G.a0)((()=>this._modelService.createModel("",null,j._createUniqueUri()))).keepObserved(this._store),this._modifiedModel=(0,G.a0)((()=>this._modelService.createModel("",null,j._createUniqueUri()))).keepObserved(this._store),this._diff=(0,r.un)(this,(e=>this._diffPromise.read(e)?.promiseResult.read(e)?.data)),this._diffPromise=(0,r.un)(this,(e=>{const t=this._model.read(e);if(!t)return;const i=this._editor.getModel();if(!i)return;const n=se(i.getValueInRange(t.range).split("\n")).text.join("\n"),s=se(t.text.split("\n")).text.join("\n");this._originalModel.get().setValue(n),this._modifiedModel.get().setValue(s);const o=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return r.BK.fromFn((async()=>{const e=await o.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},k.XO.None);if(!e.identical)return e.changes}))})),this._register((0,r.yC)(((t,i)=>{if(!this._model.read(t))return;if(null===this._position.get())return;const n=i.add(this._instantiationService.createInstance(re,this._editor,this._position,this._text.map((e=>e.text)),this._text.map((e=>e.shift)),this._diff));e.addOverlayWidget(n),i.add((0,o.s)((()=>e.removeOverlayWidget(n))))})))}};oe=j=ie([ne(2,C._Y),ne(3,X.Hg),ne(4,te.IModelService)],oe);let re=class extends o.jG{static{q=this}static{this.id=0}constructor(e,t,i,n,s,o){super(),this._editor=e,this._position=t,this._text=i,this._shift=n,this._diff=s,this._instantiationService=o,this.id="InlineEditSideBySideContentWidget"+q.id++,this.allowEditorOverflow=!1,this._nodes=(0,D.$)("div.inlineEditSideBySide",void 0),this._scrollChanged=(0,r.yQ)("editor.onDidScrollChange",this._editor.onDidScrollChange),this._previewEditor=this._register(this._instantiationService.createInstance(Z.t,this._nodes,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1,handleMouseWheel:!1},readOnly:!0,wordWrap:"off",wordWrapOverride1:"off",wordWrapOverride2:"off",wrappingIndent:"none",wrappingStrategy:void 0},{contributions:[],isSimpleWidget:!0},this._editor)),this._previewEditorObs=(0,Y.Ud)(this._previewEditor),this._editorObs=(0,Y.Ud)(this._editor),this._previewTextModel=this._register(this._instantiationService.createInstance(ee.Bz,"",this._editor.getModel()?.getLanguageId()??J.vH,ee.Bz.DEFAULT_CREATION_OPTIONS,null)),this._setText=(0,r.un)((e=>{const t=this._text.read(e);t&&this._previewTextModel.setValue(t)})).recomputeInitiallyAndOnChange(this._store),this._decorations=(0,r.un)(this,(e=>{this._setText.read(e);const t=this._position.read(e);if(!t)return{org:[],mod:[]};const i=this._diff.read(e);if(!i)return{org:[],mod:[]};const n=[],s=[];if(1===i.length&&i[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return{org:[],mod:[]};const o=this._shift.get(),r=e=>new c.Q(e.startLineNumber+t.top-1,e.startColumn+o,e.endLineNumber+t.top-1,e.endColumn+o);for(const e of i)if(e.original.isEmpty||n.push({range:r(e.original.toInclusiveRange()),options:p.Ob}),e.modified.isEmpty||s.push({range:e.modified.toInclusiveRange(),options:p.Kl}),e.modified.isEmpty||e.original.isEmpty)e.original.isEmpty||n.push({range:r(e.original.toInclusiveRange()),options:p.KL}),e.modified.isEmpty||s.push({range:e.modified.toInclusiveRange(),options:p.Ou});else for(const t of e.innerChanges||[])e.original.contains(t.originalRange.startLineNumber)&&n.push({range:r(t.originalRange),options:t.originalRange.isEmpty()?p.wp:p.Zb}),e.modified.contains(t.modifiedRange.startLineNumber)&&s.push({range:t.modifiedRange,options:t.modifiedRange.isEmpty()?p.GM:p.bk});return{org:n,mod:s}})),this._originalDecorations=(0,r.un)(this,(e=>this._decorations.read(e).org)),this._modifiedDecorations=(0,r.un)(this,(e=>this._decorations.read(e).mod)),this._previewEditor.setModel(this._previewTextModel),this._register(this._editorObs.setDecorations(this._originalDecorations)),this._register(this._previewEditorObs.setDecorations(this._modifiedDecorations)),this._register((0,r.fm)((e=>{const t=this._previewEditorObs.contentWidth.read(e),i=this._text.read(e).split("\n").length-1,n=this._editor.getOption(67)*i;t<=0||this._previewEditor.layout({height:n,width:t})}))),this._register((0,r.fm)((e=>{this._position.read(e),this._editor.layoutOverlayWidget(this)}))),this._register((0,r.fm)((e=>{this._scrollChanged.read(e),this._position.read(e)&&this._editor.layoutOverlayWidget(this)})))}getId(){return this.id}getDomNode(){return this._nodes}getPosition(){const e=this._position.get();if(!e)return null;const t=this._editor.getLayoutInfo(),i=this._editor.getScrolledVisiblePosition(new l.y(e.top,1));if(!i)return null;const n=i.top-1,s=this._editor.getOffsetForColumn(e.left.lineNumber,e.left.column);return{preference:{left:t.contentLeft+s+10,top:n}}}};re=q=ie([ne(5,C._Y)],re);var ae,le=function(e,t){return function(i,n){t(i,n,e)}};let ce=class extends o.jG{static{ae=this}static{this.ID="editor.contrib.inlineEditController"}static{this.inlineEditVisibleKey="inlineEditVisible"}static{this.inlineEditVisibleContext=new w.N1(this.inlineEditVisibleKey,!1)}static{this.cursorAtInlineEditKey="cursorAtInlineEdit"}static{this.cursorAtInlineEditContext=new w.N1(this.cursorAtInlineEditKey,!1)}static get(e){return e.getContribution(ae.ID)}constructor(e,t,i,n,s,o,a,l){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.languageFeaturesService=n,this._commandService=s,this._configurationService=o,this._diffProviderFactoryService=a,this._modelService=l,this._isVisibleContext=ae.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=ae.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=(0,r.FY)(this,void 0),this._currentWidget=(0,G.a0)(this._currentEdit,(e=>{const t=this._currentEdit.read(e);if(!t)return;const i=t.range.endLineNumber,n=t.range.endColumn,s=!t.text.endsWith("\n")||t.range.startLineNumber===t.range.endLineNumber&&t.range.startColumn===t.range.endColumn?t.text:t.text.slice(0,-1),o=new x.xD(i,[new x.yP(n,s,!1)]),a=t.range.startLineNumber===t.range.endLineNumber&&1===o.parts.length&&1===o.parts[0].lines.length,l=""===t.text;return a||l?this.instantiationService.createInstance(m,this.editor,{ghostText:(0,r.lk)(o),minReservedLineCount:(0,r.lk)(0),targetTextModel:(0,r.lk)(this.editor.getModel()??void 0),range:(0,r.lk)(t.range)}):void 0})),this._isAccepting=(0,r.FY)(this,!1),this._enabled=(0,r.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).enabled)),this._fontFamily=(0,r.y0)(this,this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).fontFamily));const c=(0,r.yQ)("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register((0,r.fm)((t=>{this._enabled.read(t)&&(c.read(t),this._isAccepting.read(t)||this.getInlineEdit(e,!0))})));const d=(0,r.y0)(this,e.onDidChangeCursorPosition,(()=>e.getPosition()));this._register((0,r.fm)((e=>{if(!this._enabled.read(e))return;const t=d.read(e);t&&this.checkCursorPosition(t)}))),this._register((0,r.fm)((t=>{const i=this._currentEdit.read(t);if(this._isCursorAtInlineEditContext.set(!1),!i)return void this._isVisibleContext.set(!1);this._isVisibleContext.set(!0);const n=e.getPosition();n&&this.checkCursorPosition(n)})));const h=(0,r.yQ)("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register((0,r.fm)((async t=>{this._enabled.read(t)&&(h.read(t),this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur||(this._currentRequestCts?.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))})));const u=(0,r.yQ)("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register((0,r.fm)((t=>{this._enabled.read(t)&&(u.read(t),this.getInlineEdit(e,!0))})));const g=this._register((0,D.jh)());this._register((0,r.fm)((e=>{const t=this._fontFamily.read(e);g.setStyle(""===t||"default"===t?"":`\n.monaco-editor .inline-edit-decoration,\n.monaco-editor .inline-edit-decoration-preview,\n.monaco-editor .inline-edit {\n\tfont-family: ${t};\n}`)}))),this._register(new H(this.editor,this._currentWidget,this.instantiationService)),this._register(new oe(this.editor,this._currentEdit,this.instantiationService,this._diffProviderFactoryService,this._modelService))}checkCursorPosition(e){if(!this._currentEdit)return void this._isCursorAtInlineEditContext.set(!1);const t=this._currentEdit.get();t?this._isCursorAtInlineEditContext.set(c.Q.containsPosition(t.range,e)):this._isCursorAtInlineEditContext.set(!1)}validateInlineEdit(e,t){if(t.text.includes("\n")&&t.range.startLineNumber!==t.range.endLineNumber&&t.range.startColumn!==t.range.endColumn){if(1!==t.range.startColumn)return!1;const i=t.range.endLineNumber;if(t.range.endColumn!==(e.getModel()?.getLineLength(i)??0)+1)return!1}return!0}async fetchInlineEdit(e,t){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const i=e.getModel();if(!i)return;const n=i.getVersionId(),s=this.languageFeaturesService.inlineEditProvider.all(i);if(0===s.length)return;const o=s[0];this._currentRequestCts=new k.Qi;const r=this._currentRequestCts.token,a=t?y.sm.Automatic:y.sm.Invoke;var l;if(t&&await(l=r,new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),50);l&&(t=l.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))}))),r.isCancellationRequested||i.isDisposed()||i.getVersionId()!==n)return;const c=await o.provideInlineEdit(i,{triggerKind:a},r);return c&&!r.isCancellationRequested&&!i.isDisposed()&&i.getVersionId()===n&&this.validateInlineEdit(e,c)?c:void 0}async getInlineEdit(e,t){this._isCursorAtInlineEditContext.set(!1),await this.clear();const i=await this.fetchInlineEdit(e,t);i&&this._currentEdit.set(i,void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){this._isAccepting.set(!0,void 0);const e=this._currentEdit.get();if(!e)return;let t=e.text;e.text.startsWith("\n")&&(t=e.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[a.k.replace(c.Q.lift(e.range),t)]),e.accepted&&await this._commandService.executeCommand(e.accepted.id,...e.accepted.arguments||[]).then(void 0,$.M_),this.freeEdit(e),(0,r.Rn)((e=>{this._currentEdit.set(void 0,e),this._isAccepting.set(!1,e)}))}jumpToCurrent(){this._jumpBackPosition=this.editor.getSelection()?.getStartPosition();const e=this._currentEdit.get();if(!e)return;const t=l.y.lift({lineNumber:e.range.startLineNumber,column:e.range.startColumn});this.editor.setPosition(t),this.editor.revealPositionInCenterIfOutsideViewport(t)}async clear(e=!0){const t=this._currentEdit.get();t&&t?.rejected&&e&&await this._commandService.executeCommand(t.rejected.id,...t.rejected.arguments||[]).then(void 0,$.M_),t&&this.freeEdit(t),this._currentEdit.set(void 0,void 0)}freeEdit(e){const t=this.editor.getModel();if(!t)return;const i=this.languageFeaturesService.inlineEditProvider.all(t);0!==i.length&&i[0].freeInlineEdit(e)}};ce=ae=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([le(1,C._Y),le(2,w.fN),le(3,S.ILanguageFeaturesService),le(4,L.d),le(5,K.pG),le(6,X.Hg),le(7,te.IModelService)],ce);class de extends n.ks{constructor(){super({id:"editor.action.inlineEdit.accept",label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:w.M$.and(s.R.writable,ce.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:w.M$.and(s.R.writable,ce.inlineEditVisibleContext,ce.cursorAtInlineEditContext)}],menuOpts:[{menuId:P.D8.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,t){const i=ce.get(t);await(i?.accept())}}class he extends n.ks{constructor(){const e=w.M$.and(s.R.writable,w.M$.not(ce.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,t){const i=ce.get(t);i?.trigger()}}class ue extends n.ks{constructor(){const e=w.M$.and(s.R.writable,ce.inlineEditVisibleContext,w.M$.not(ce.cursorAtInlineEditKey));super({id:"editor.action.inlineEdit.jumpTo",label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:P.D8.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,t){const i=ce.get(t);i?.jumpToCurrent()}}class ge extends n.ks{constructor(){const e=w.M$.and(s.R.writable,ce.cursorAtInlineEditContext);super({id:"editor.action.inlineEdit.jumpBack",label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:P.D8.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,t){const i=ce.get(t);i?.jumpBack()}}class pe extends n.ks{constructor(){const e=w.M$.and(s.R.writable,ce.inlineEditVisibleContext);super({id:"editor.action.inlineEdit.reject",label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:P.D8.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,t){const i=ce.get(t);await(i?.clear())}}(0,n.Fl)(de),(0,n.Fl)(pe),(0,n.Fl)(ue),(0,n.Fl)(ge),(0,n.Fl)(he),(0,n.HW)(ce.ID,ce,3)},91720:function(e,t,i){"use strict";var n=i(52694),s=i(93231),o=i(73755),r=i(1878),a=i(11797),l=i(49678),c=i(14374),d=i(97848);const h=new d.N1("inlineEditsVisible",!1,(0,c.kg)("inlineEditsVisible","Whether an inline edit is visible")),u=new d.N1("inlineEditsIsPinned",!1,(0,c.kg)("isPinned","Whether an inline edit is visible"));var g=i(35114),p=i(98018),f=i(90072),m=i(64523),_=i(56218),v=i(82688),b=i(69122),w=i(90890),C=i(76611),y=i(57981),S=i(20187),k=i(54244),x=i(41006),L=i(80487),D=i(35720),E=i(59266),N=i(33597),I=i(84201),M=i(39159),T=i(51903),R=i(72540),P=i(11521),A=i(49079),O=i(1452),F=i(36206),B=i(6503),W=i(63619);class H{constructor(e,t,i){this.range=e,this.newLines=t,this.changes=i}}let V=class extends g.jG{constructor(e,t,i,s){super(),this._editor=e,this._edit=t,this._userPrompt=i,this._instantiationService=s,this._editorObs=(0,f.Ud)(this._editor),this._elements=(0,I.h)("div.inline-edits-widget",{style:{position:"absolute",overflow:"visible",top:"0px",left:"0px"}},[(0,I.h)("div@editorContainer",{style:{position:"absolute",top:"0px",left:"0px",width:"500px",height:"500px"}},[(0,I.h)("div.toolbar@toolbar",{style:{position:"absolute",top:"-25px",left:"0px"}}),(0,I.h)("div.promptEditor@promptEditor",{style:{position:"absolute",top:"-25px",left:"80px",width:"300px",height:"22px"}}),(0,I.h)("div.preview@editor",{style:{position:"absolute",top:"0px",left:"0px"}})]),(0,I.Mc)("svg",{style:{overflow:"visible",pointerEvents:"none"}},[(0,I.Mc)("defs",[(0,I.Mc)("linearGradient",{id:"Gradient2",x1:"0",y1:"0",x2:"1",y2:"0"},[(0,I.Mc)("stop",{offset:"0%",class:"gradient-stop"}),(0,I.Mc)("stop",{offset:"100%",class:"gradient-stop"})])]),(0,I.Mc)("path@path",{d:"",fill:"url(#Gradient2)"})])]),this._previewTextModel=this._register(this._instantiationService.createInstance(A.Bz,"",P.vH,A.Bz.DEFAULT_CREATION_OPTIONS,null)),this._setText=(0,o.un)((e=>{const t=this._edit.read(e);t&&this._previewTextModel.setValue(t.newLines.join("\n"))})).recomputeInitiallyAndOnChange(this._store),this._promptTextModel=this._register(this._instantiationService.createInstance(A.Bz,"",P.vH,A.Bz.DEFAULT_CREATION_OPTIONS,null)),this._promptEditor=this._register(this._instantiationService.createInstance(a.t,this._elements.promptEditor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0,placeholder:"Describe the change you want...",fontFamily:M.z},{contributions:n.dS.getSomeEditorContributions([B.D.ID,F.X.ID,O.d.ID]),isSimpleWidget:!0},this._editor)),this._previewEditor=this._register(this._instantiationService.createInstance(a.t,this._elements.editor,{glyphMargin:!1,lineNumbers:"off",minimap:{enabled:!1},guides:{indentation:!1,bracketPairs:!1,bracketPairsHorizontal:!1,highlightActiveIndentation:!1},folding:!1,selectOnLineNumbers:!1,selectionHighlight:!1,columnSelection:!1,overviewRulerBorder:!1,overviewRulerLanes:0,lineDecorationsWidth:0,lineNumbersMinChars:0},{contributions:[]},this._editor)),this._previewEditorObs=(0,f.Ud)(this._previewEditor),this._decorations=(0,o.un)(this,(e=>{this._setText.read(e);const t=this._edit.read(e)?.changes;if(!t)return[];const i=[],n=[];if(1===t.length&&t[0].innerChanges[0].modifiedRange.equalsRange(this._previewTextModel.getFullModelRange()))return[];for(const e of t)if(e.original.isEmpty||i.push({range:e.original.toInclusiveRange(),options:T.Ob}),e.modified.isEmpty||n.push({range:e.modified.toInclusiveRange(),options:T.Kl}),e.modified.isEmpty||e.original.isEmpty)e.original.isEmpty||i.push({range:e.original.toInclusiveRange(),options:T.KL}),e.modified.isEmpty||n.push({range:e.modified.toInclusiveRange(),options:T.Ou});else for(const t of e.innerChanges||[])e.original.contains(t.originalRange.startLineNumber)&&i.push({range:t.originalRange,options:t.originalRange.isEmpty()?T.wp:T.Zb}),e.modified.contains(t.modifiedRange.startLineNumber)&&n.push({range:t.modifiedRange,options:t.modifiedRange.isEmpty()?T.GM:T.bk});return n})),this._layout1=(0,o.un)(this,(e=>{const t=this._editor.getModel(),i=this._edit.read(e);if(!i)return null;const n=i.range;let s=0;for(let e=n.startLineNumber;e{const t=this._edit.read(e);if(!t)return null;const i=t.range,n=this._editorObs.scrollLeft.read(e),s=this._layout1.read(e).left+20-n,o=this._editor.getTopForLineNumber(i.startLineNumber)-this._editorObs.scrollTop.read(e),r=this._editor.getTopForLineNumber(i.endLineNumberExclusive)-this._editorObs.scrollTop.read(e),a=new j(s,o),l=new j(s,r),c=r-o,d=this._editor.getOption(67)*t.newLines.length,h=c-d;return{topCode:a,bottomCode:l,codeHeight:c,topEdit:new j(s+50,o+h/2),bottomEdit:new j(s+50,r-h/2),editHeight:d}}));const r=(0,o.un)(this,(e=>void 0!==this._edit.read(e)||void 0!==this._userPrompt.read(e)));var l,c;this._register((0,R.AV)(this._elements.root,{display:(0,o.un)(this,(e=>r.read(e)?"block":"none"))})),this._register((0,R.rX)(this._editor.getDomNode(),this._elements.root)),this._register((0,f.Ud)(e).createOverlayWidget({domNode:this._elements.root,position:(0,o.lk)(null),allowEditorOverflow:!1,minContentWidthInPx:(0,o.un)((e=>{const t=this._layout1.read(e)?.left;return void 0===t?0:t+this._previewEditorObs.contentWidth.read(e)}))})),this._previewEditor.setModel(this._previewTextModel),this._register(this._previewEditorObs.setDecorations(this._decorations)),this._register((0,o.fm)((e=>{const t=this._layout.read(e);if(!t)return;const{topCode:i,bottomCode:n,topEdit:s,bottomEdit:o,editHeight:r}=t,a=(new q).moveTo(i).lineTo(i.deltaX(10)).curveTo(i.deltaX(50),s.deltaX(-40),s.deltaX(-0)).lineTo(s).lineTo(o).lineTo(o.deltaX(-0)).curveTo(o.deltaX(-40),n.deltaX(50),n.deltaX(10)).lineTo(n).build();this._elements.path.setAttribute("d",a),this._elements.editorContainer.style.top=`${s.y}px`,this._elements.editorContainer.style.left=`${s.x}px`,this._elements.editorContainer.style.height=`${r}px`;const l=this._previewEditorObs.contentWidth.read(e);this._previewEditor.layout({height:r,width:l})}))),this._promptEditor.setModel(this._promptTextModel),this._promptEditor.layout(),this._register(function(e,t){const i=new g.Cm;return i.add((0,o.fm)((i=>{const n=e.read(i);t.set(n,void 0)}))),i.add((0,o.fm)((i=>{const n=t.read(i);e.set(n,void 0)}))),i}((l=this._userPrompt,c=e=>e??"",(0,p.dQ)(void 0,(e=>c(l.read(e))),((e,t)=>l.set(e,t)))),(0,f.Ud)(this._promptEditor).value)),this._register((0,o.fm)((e=>{const t=(0,f.Ud)(this._promptEditor).isFocused.read(e);this._elements.root.classList.toggle("focused",t)})))}};var z,U;V=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(z=3,U=W._Y,function(e,t){U(e,t,z)})],V);class j{constructor(e,t){this.x=e,this.y=t}deltaX(e){return new j(this.x+e,this.y)}}class q{constructor(){this._data=""}moveTo(e){return this._data+=`M ${e.x} ${e.y} `,this}lineTo(e){return this._data+=`L ${e.x} ${e.y} `,this}curveTo(e,t,i){return this._data+=`C ${e.x} ${e.y} ${t.x} ${t.y} ${i.x} ${i.y} `,this}build(){return this._data}}var K,$=function(e,t){return function(i,n){t(i,n,e)}};let G=class extends g.jG{static{K=this}static{this._modelId=0}static _createUniqueUri(){return k.r.from({scheme:"inline-edits",path:(new Date).toString()+String(K._modelId++)})}constructor(e,t,i,n,s,r,a){super(),this.textModel=e,this._textModelVersionId=t,this._selection=i,this._debounceValue=n,this.languageFeaturesService=s,this._diffProviderFactoryService=r,this._modelService=a,this._forceUpdateExplicitlySignal=(0,o.Yd)(this),this._selectedInlineCompletionId=(0,o.FY)(this,void 0),this._isActive=(0,o.FY)(this,!1),this._originalModel=(0,p.a0)((()=>this._modelService.createModel("",null,K._createUniqueUri()))).keepObserved(this._store),this._modifiedModel=(0,p.a0)((()=>this._modelService.createModel("",null,K._createUniqueUri()))).keepObserved(this._store),this._pinnedRange=new Y(this.textModel,this._textModelVersionId),this.isPinned=this._pinnedRange.range.map((e=>!!e)),this.userPrompt=(0,o.FY)(this,void 0),this.inlineEdit=(0,o.un)(this,(e=>this._inlineEdit.read(e)?.promiseResult.read(e)?.data)),this._inlineEdit=(0,o.un)(this,(e=>{const t=this.selectedInlineEdit.read(e);if(!t)return;const i=t.inlineCompletion.range;if(""===t.inlineCompletion.insertText.trim())return;let n=t.inlineCompletion.insertText.split(/\r\n|\r|\n/);function s(e){const t=e[0].match(/^\s*/)?.[0]??"";return e.map((e=>e.replace(new RegExp("^"+t),"")))}n=s(n);let r=this.textModel.getValueInRange(i).split(/\r\n|\r|\n/);r=s(r),this._originalModel.get().setValue(r.join("\n")),this._modifiedModel.get().setValue(n.join("\n"));const a=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:"advanced"});return o.BK.fromFn((async()=>{const e=await a.computeDiff(this._originalModel.get(),this._modifiedModel.get(),{computeMoves:!1,ignoreTrimWhitespace:!1,maxComputationTimeMs:1e3},C.XO.None);if(!e.identical)return new H(L.M.fromRangeInclusive(i),s(n),e.changes)}))})),this._fetchStore=this._register(new g.Cm),this._inlineEditsFetchResult=(0,o.X2)(this,void 0),this._inlineEdits=(0,o.C)({owner:this,equalsFn:y.dB},(e=>this._inlineEditsFetchResult.read(e)?.completions.map((e=>new Q(e)))??[])),this._fetchInlineEditsPromise=(0,o.nb)({owner:this,createEmptyChangeSummary:()=>({inlineCompletionTriggerKind:D.qw.Automatic}),handleChange:(e,t)=>(e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=D.qw.Explicit),!0)},(async(e,t)=>{this._fetchStore.clear(),this._forceUpdateExplicitlySignal.read(e),this._textModelVersionId.read(e);const i=this._pinnedRange.range.read(e)??(s=this._selection.read(e),(n=s).isEmpty()?void 0:n);var n,s;if(!i)return this._inlineEditsFetchResult.set(void 0,void 0),void this.userPrompt.set(void 0,void 0);const o={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:void 0,userPrompt:this.userPrompt.read(e)},r=(0,C.bs)(this._fetchStore);await(0,w.wR)(200,r);const a=await(0,N.Yk)(this.languageFeaturesService.inlineCompletionsProvider,i,this.textModel,o,r);r.isCancellationRequested||this._inlineEditsFetchResult.set(a,void 0)})),this._filteredInlineEditItems=(0,o.C)({owner:this,equalsFn:(0,y.S3)()},(e=>this._inlineEdits.read(e))),this.selectedInlineCompletionIndex=(0,o.un)(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineEditItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineEdit=(0,o.un)(this,(e=>this._filteredInlineEditItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this._register((0,o.OI)(this._fetchInlineEditsPromise))}async triggerExplicitly(e){(0,o.PO)(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineEditsPromise.get()}stop(e){(0,o.PO)(e,(e=>{this.userPrompt.set(void 0,e),this._isActive.set(!1,e),this._inlineEditsFetchResult.set(void 0,e),this._pinnedRange.setRange(void 0,e)}))}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineEditItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){if(e.getModel()!==this.textModel)throw new S.D7;const t=this.selectedInlineEdit.get();t&&(e.pushUndoStop(),e.executeEdits("inlineSuggestion.accept",[t.inlineCompletion.toSingleTextEdit().toSingleEditOperation()]),this.stop())}};G=K=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([$(4,b.ILanguageFeaturesService),$(5,x.Hg),$(6,E.IModelService)],G);class Q{constructor(e){this.inlineCompletion=e,this.semanticId=this.inlineCompletion.hash()}}class Y extends g.jG{constructor(e,t){super(),this._textModel=e,this._versionId=t,this._decorations=(0,o.FY)(this,[]),this.range=(0,o.un)(this,(e=>{this._versionId.read(e);const t=this._decorations.read(e)[0];return t?this._textModel.getDecorationRange(t)??null:null})),this._register((0,g.s)((()=>{this._textModel.deltaDecorations(this._decorations.get(),[])})))}setRange(e,t){this._decorations.set(this._textModel.deltaDecorations(this._decorations.get(),e?[{range:e,options:{description:"trackedRange"}}]:[]),t)}}var Z,X=i(47901),J=i(74827),ee=function(e,t){return function(i,n){t(i,n,e)}};let te=class extends g.jG{static{Z=this}static{this.ID="editor.contrib.inlineEditsController"}static get(e){return e.getContribution(Z.ID)}constructor(e,t,i,n,s,r){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._debounceService=n,this._languageFeaturesService=s,this._configurationService=r,this._enabled=(0,J.V)("editor.inlineEdits.enabled",!1,this._configurationService),this._editorObs=(0,f.Ud)(this.editor),this._selection=(0,o.un)(this,(e=>this._editorObs.cursorSelection.read(e)??new _.L(1,1,1,1))),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineEditsDebounce",{min:50,max:50}),this.model=(0,p.a0)(this,(e=>{if(!this._enabled.read(e))return;if(this._editorObs.isReadonly.read(e))return;const t=this._editorObs.model.read(e);return t?this._instantiationService.createInstance((0,m.b)(G,e),t,this._editorObs.versionId,this._selection,this._debounceValue):void 0})),this._hadInlineEdit=(0,o.ZX)(this,((e,t)=>t||void 0!==this.model.read(e)?.inlineEdit.read(e))),this._widget=(0,p.a0)(this,(e=>{var t;if(this._hadInlineEdit.read(e))return this._instantiationService.createInstance((0,m.b)(V,e),this.editor,this.model.map(((e,t)=>e?.inlineEdit.read(t))),(t=e=>this.model.read(e)?.userPrompt??(0,o.FY)("empty",""),(0,p.dQ)(void 0,(e=>t(e).read(e)),((e,i)=>{t(void 0).set(e,i)}))))})),this._register((0,J.w)(h,this._contextKeyService,(e=>!!this.model.read(e)?.inlineEdit.read(e)))),this._register((0,J.w)(u,this._contextKeyService,(e=>!!this.model.read(e)?.isPinned.read(e)))),this.model.recomputeInitiallyAndOnChange(this._store),this._widget.recomputeInitiallyAndOnChange(this._store)}};te=Z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ee(1,W._Y),ee(2,d.fN),ee(3,v.ILanguageFeatureDebounceService),ee(4,b.ILanguageFeaturesService),ee(5,X.pG)],te);var ie=i(93223);function ne(e){return{label:e.value,alias:e.original}}class se extends n.ks{static{this.ID="editor.action.inlineEdits.showNext"}constructor(){super({id:se.ID,...ne(c.aS("action.inlineEdits.showNext","Show Next Inline Edit")),precondition:d.M$.and(l.R.writable,h),kbOpts:{weight:100,primary:606}})}async run(e,t){const i=te.get(t);i?.model.get()?.next()}}class oe extends n.ks{static{this.ID="editor.action.inlineEdits.showPrevious"}constructor(){super({id:oe.ID,...ne(c.aS("action.inlineEdits.showPrevious","Show Previous Inline Edit")),precondition:d.M$.and(l.R.writable,h),kbOpts:{weight:100,primary:604}})}async run(e,t){const i=te.get(t);i?.model.get()?.previous()}}class re extends n.ks{constructor(){super({id:"editor.action.inlineEdits.trigger",...ne(c.aS("action.inlineEdits.trigger","Trigger Inline Edit")),precondition:l.R.writable})}async run(e,t){const i=te.get(t);await(0,r.fL)((async e=>{await(i?.model.get()?.triggerExplicitly(e))}))}}class ae extends n.ks{constructor(){super({id:"editor.action.inlineEdits.accept",...ne(c.aS("action.inlineEdits.accept","Accept Inline Edit")),precondition:h,menuOpts:{menuId:ie.D8.InlineEditsActions,title:c.kg("inlineEditsActions","Accept Inline Edit"),group:"primary",order:1,icon:s.W.check},kbOpts:{primary:2058,weight:2e4,kbExpr:h}})}async run(e,t){t instanceof a.t&&(t=t.getParentEditor());const i=te.get(t);i&&(i.model.get()?.accept(i.editor),i.editor.focus())}}class le extends n.ks{static{this.ID="editor.action.inlineEdits.hide"}constructor(){super({id:le.ID,...ne(c.aS("action.inlineEdits.hide","Hide Inline Edit")),precondition:h,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=te.get(t);(0,o.Rn)((e=>{i?.model.get()?.stop(e)}))}}(0,n.HW)(te.ID,te,3),(0,n.Fl)(re),(0,n.Fl)(se),(0,n.Fl)(oe),(0,n.Fl)(ae),(0,n.Fl)(le)},57972:function(e,t,i){"use strict";i.d(t,{I:function(){return p}});var n=i(84201),s=i(90890),o=i(93231),r=i(35114),a=i(43920),l=i(56613),c=i(40393),d=i(49079),h=i(63619);const u=d.kI.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:a.S8,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class g extends r.jG{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=n.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=n.$("span.icon");this.domNode.append(t),t.classList.add(...l.L.asClassNameArray(o.W.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(67);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(52)||e.hasChanged(67))&&i()}))),this._register(n.ko(this.domNode,n.Bx.CLICK,(e=>{this.delegate.cancel()})))}getId(){return g.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}let p=class extends r.jG{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new r.HE),this._currentWidget=this._register(new r.HE),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,n,o){const r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=(0,s.EQ)((()=>{const i=c.Q.fromPositions(e);this._currentDecorations.set([{range:i,options:u}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(g,this.id,this._editor,i,t,n))}),o??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};var f,m;p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(f=2,m=h._Y,function(e,t){m(e,t,f)})],p)},37052:function(e,t,i){"use strict";var n=i(52694),s=i(66092),o=i(49678),r=i(14374);class a extends n.ks{constructor(){super({id:"expandLineSelection",label:r.kg("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:o.R.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,s.c.expandLineSelection(n,n.getCursorStates())),n.revealAllCursors(i.source,!0)}}(0,n.Fl)(a)},23982:function(e,t,i){"use strict";var n=i(62167),s=i(34157),o=i(52694),r=i(24608),a=i(43920),l=i(48905),c=i(40393);class d{constructor(e,t,i){this._selection=e,this._cursors=t,this._selectionId=null,this._trimInRegexesAndStrings=i}getEditOperations(e,t){const i=function(e,t,i){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);const n=[];let s=0,o=0;const r=t.length;for(let d=1,h=e.getLineCount();d<=h;d++){const h=e.getLineContent(d),u=h.length+1;let g=0;if(oe.getLanguageId(),n=(t,i)=>e.getLanguageIdAtPosition(t,i),s=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===s)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let o=this._selection;o.startLineNumbert===o.startLineNumber?e.tokenization.getLineTokens(s):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?e.getLineContent(s):e.getLineContent(t)},c=(0,C.$f)(this._autoIndent,t,e.getLanguageIdAtPosition(s,1),o.startLineNumber,h,this._languageConfigurationService);if(null!==c){const t=a.UU(e.getLineContent(s)),i=w.c(c,r);if(i!==w.c(t,r)){const e=w.k(i,r,d);u=e+this.trimStart(l)}}}t.addEditOperation(new c.Q(o.startLineNumber,1,o.startLineNumber,1),u+"\n");const p=this.matchEnterRuleMovingDown(e,h,r,o.startLineNumber,s,u);if(null!==p)0!==p&&this.getIndentEditsOfMovingBlock(e,t,o,r,d,p);else{const l={tokenization:{getLineTokens:t=>t===o.startLineNumber?e.tokenization.getLineTokens(s):t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.tokenization.getLineTokens(t-1):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o.startLineNumber?u:t>=o.startLineNumber+1&&t<=o.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)},c=(0,C.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(s,1),o.startLineNumber+1,h,this._languageConfigurationService);if(null!==c){const i=a.UU(e.getLineContent(o.startLineNumber)),n=w.c(c,r),s=w.c(i,r);if(n!==s){const i=n-s;this.getIndentEditsOfMovingBlock(e,t,o,r,d,i)}}}}else t.addEditOperation(new c.Q(o.startLineNumber,1,o.startLineNumber,1),u+"\n")}else if(s=o.startLineNumber-1,l=e.getLineContent(s),t.addEditOperation(new c.Q(s,1,s+1,1),null),t.addEditOperation(new c.Q(o.endLineNumber,e.getLineMaxColumn(o.endLineNumber),o.endLineNumber,e.getLineMaxColumn(o.endLineNumber)),"\n"+l),this.shouldAutoIndent(e,o)){const l={tokenization:{getLineTokens:t=>t===s?e.tokenization.getLineTokens(o.startLineNumber):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s?e.getLineContent(o.startLineNumber):e.getLineContent(t)},c=this.matchEnterRule(e,h,r,o.startLineNumber,o.startLineNumber-2);if(null!==c)0!==c&&this.getIndentEditsOfMovingBlock(e,t,o,r,d,c);else{const i=(0,C.$f)(this._autoIndent,l,e.getLanguageIdAtPosition(o.startLineNumber,1),s,h,this._languageConfigurationService);if(null!==i){const n=a.UU(e.getLineContent(o.startLineNumber)),s=w.c(i,r),l=w.c(n,r);if(s!==l){const i=s-l;this.getIndentEditsOfMovingBlock(e,t,o,r,d,i)}}}}}this._selectionId=t.trackSelection(o)}buildIndentConverter(e,t,i){return{shiftIndent:n=>_.Y.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>_.Y.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===v.l.None||s.indentAction===v.l.Indent?o=s.indentation+s.appendText:s.indentAction===v.l.IndentOutdent?o=s.indentation:s.indentAction===v.l.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(o))>=0){const s=a.UU(e.getLineContent(n));let r=a.UU(o);const l=(0,C.Yb)(e,n,this._languageConfigurationService);return null!==l&&2&l&&(r=t.unshiftIndent(r)),w.c(r,i)-w.c(s,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(a.lT(o)>=0){const o=e.getLineMaxColumn(s),r=(0,y.h)(this._autoIndent,e,new c.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let s=n-1;for(;s>=1;){const t=e.getLineContent(s);if(a.lT(t)>=0)break;s--}if(s<1||n>e.getLineCount())return null;const o=e.getLineMaxColumn(s),r=(0,y.h)(this._autoIndent,e,new c.Q(s,o,s,o),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,s,o){let r=s;for(;r>=1;){let t;if(t=r===s&&void 0!==o?o:e.getLineContent(r),a.lT(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const l=e.getLineMaxColumn(r),d=(0,y.h)(this._autoIndent,e,new c.Q(r,l,r,l),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,d)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const l=e.getLineContent(r),d=a.UU(l),h=w.c(d,n)+o,u=w.k(h,n,s);u!==d&&(t.addEditOperation(new c.Q(r,1,r,d.length+1),u),r===i.endLineNumber&&i.endColumn<=d.length+1&&""===u&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(k=3,x=b.JZ,function(e,t){x(e,t,k)})],S);class L{static{this._COLLATOR=null}static getCollator(){return L._COLLATOR||(L._COLLATOR=new Intl.Collator),L._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){const i=function(e,t,i){const n=D(e,t,i);return n?l.k.replace(new c.Q(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;const n=D(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e=s)return null;const o=[];for(let t=n;t<=s;t++)o.push(e.getLineContent(t));let r=o.slice(0);return r.sort(L.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:s,before:o,after:r}}var E=i(14374),N=i(93223),I=i(47901);class M extends o.ks{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>c.Q.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;enew g.y(e.positionLineNumber,e.positionColumn))));const s=t.getSelection();if(null===s)return;const o=e.get(I.pG),r=t.getModel(),a=o.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:r?.getLanguageId(),resource:r?.uri}),l=new d(s,n,a);t.pushUndoStop(),t.executeCommands(this.id,[l]),t.pushUndoStop()}}class F extends o.ks{constructor(){super({id:"editor.action.deleteLines",label:E.kg("lines.delete","Delete Line"),alias:"Delete Line",precondition:f.R.writable,kbOpts:{kbExpr:f.R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let s=0;const o=[],r=[];for(let e=0,t=i.length;e1&&(a-=1,d=n.getLineMaxColumn(a)),o.push(l.k.replace(new p.L(a,d,c,h),"")),r.push(new p.L(a-s,t.positionColumn,a-s,t.positionColumn)),s+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class B extends o.ks{constructor(){super({id:"editor.action.indentLines",label:E.kg("lines.indent","Indent Line"),alias:"Indent Line",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,h.T.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class W extends o.ks{constructor(){super({id:"editor.action.outdentLines",label:E.kg("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:2140,weight:100}})}run(e,t){s.Yh.Outdent.runEditorCommand(e,t,null)}}class H extends o.ks{constructor(){super({id:"editor.action.insertLineBefore",label:E.kg("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,u.AO.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class V extends o.ks{constructor(){super({id:"editor.action.insertLineAfter",label:E.kg("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,u.AO.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class z extends o.ks{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),s=[];for(let e=0,t=n.length-1;el.k.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,o),t.pushUndoStop()}}class U extends o.ks{constructor(){super({id:"editor.action.joinLines",label:E.kg("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(c.Q.compareRangesUsingStarts);const s=[],o=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(s.push(e),t):new p.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(s.push(e),t):new p.L(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));s.push(o);const r=t.getModel();if(null===r)return;const a=[],d=[];let h=n,u=0;for(let e=0,t=s.length;e=1){let e=!0;""===v&&(e=!1),!e||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(e=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));const n=t.substr(i-1);v+=(e?" ":"")+n,m=e?n.length+1:n.length}else m=0}const b=new c.Q(i,o,g,f);if(!b.isEmpty()){let e;t.isEmpty()?(a.push(l.k.replace(b,v)),e=new p.L(b.startLineNumber-u,v.length-m+1,i-u,v.length-m+1)):t.startLineNumber===t.endLineNumber?(a.push(l.k.replace(b,v)),e=new p.L(t.startLineNumber-u,t.startColumn,t.endLineNumber-u,t.endColumn)):(a.push(l.k.replace(b,v)),e=new p.L(t.startLineNumber-u,t.startColumn,t.startLineNumber-u,v.length-_)),null!==c.Q.intersectRanges(b,n)?h=e:d.push(e)}u+=b.endLineNumber-b.startLineNumber}d.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,d),t.pushUndoStop()}}class j extends o.ks{constructor(){super({id:"editor.action.transpose",label:E.kg("editor.transpose","Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:f.R.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const s=[];for(let e=0,t=i.length;e=a){if(o.lineNumber===n.getLineCount())continue;const e=new c.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new r.iu(new p.L(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t))}else{const e=new c.Q(o.lineNumber,Math.max(1,o.column-1),o.lineNumber,o.column+1),t=n.getValueInRange(e).split("").reverse().join("");s.push(new r.ui(e,t,new p.L(o.lineNumber,o.column+1,o.lineNumber,o.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class q extends o.ks{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const s=t.getOption(132),o=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;const a=new c.Q(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),d=n.getValueInRange(a);o.push(l.k.replace(a,this._modifyText(d,s)))}else{const t=n.getValueInRange(e);o.push(l.k.replace(e,this._modifyText(t,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class K{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class $ extends q{static{this.titleBoundary=new K("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu")}constructor(){super({id:"editor.action.transformToTitlecase",label:E.kg("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:f.R.writable})}_modifyText(e,t){const i=$.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}class G extends q{static{this.caseBoundary=new K("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new K("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu")}constructor(){super({id:"editor.action.transformToSnakecase",label:E.kg("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:f.R.writable})}_modifyText(e,t){const i=G.caseBoundary.get(),n=G.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}class Q extends q{static{this.wordBoundary=new K("[_\\s-]","gm")}constructor(){super({id:"editor.action.transformToCamelcase",label:E.kg("editor.transformToCamelcase","Transform to Camel Case"),alias:"Transform to Camel Case",precondition:f.R.writable})}_modifyText(e,t){const i=Q.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}class Y extends q{static{this.wordBoundary=new K("[_\\s-]","gm")}static{this.wordBoundaryToMaintain=new K("(?<=\\.)","gm")}constructor(){super({id:"editor.action.transformToPascalcase",label:E.kg("editor.transformToPascalcase","Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:f.R.writable})}_modifyText(e,t){const i=Y.wordBoundary.get(),n=Y.wordBoundaryToMaintain.get();return i&&n?e.split(n).map((e=>e.split(i))).flat().map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join(""):e}}class Z extends q{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}static{this.caseBoundary=new K("(\\p{Ll})(\\p{Lu})","gmu")}static{this.singleLetters=new K("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu")}static{this.underscoreBoundary=new K("(\\S)(_)(\\S)","gm")}constructor(){super({id:"editor.action.transformToKebabcase",label:E.kg("editor.transformToKebabcase","Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:f.R.writable})}_modifyText(e,t){const i=Z.caseBoundary.get(),n=Z.singleLetters.get(),s=Z.underscoreBoundary.get();return i&&n&&s?e.replace(s,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}(0,o.Fl)(class extends M{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:E.kg("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:N.D8.MenubarSelectionMenu,group:"2_line",title:E.kg({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,o.Fl)(class extends M{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:E.kg("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:N.D8.MenubarSelectionMenu,group:"2_line",title:E.kg({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,o.Fl)(T),(0,o.Fl)(class extends R{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:E.kg("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:N.D8.MenubarSelectionMenu,group:"2_line",title:E.kg({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,o.Fl)(class extends R{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:E.kg("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:f.R.writable,kbOpts:{kbExpr:f.R.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:N.D8.MenubarSelectionMenu,group:"2_line",title:E.kg({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,o.Fl)(class extends P{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:E.kg("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:f.R.writable})}}),(0,o.Fl)(class extends P{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:E.kg("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:f.R.writable})}}),(0,o.Fl)(A),(0,o.Fl)(O),(0,o.Fl)(F),(0,o.Fl)(B),(0,o.Fl)(W),(0,o.Fl)(H),(0,o.Fl)(V),(0,o.Fl)(class extends z{constructor(){super({id:"deleteAllLeft",label:E.kg("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:f.R.writable,kbOpts:{kbExpr:f.R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let s=0;return t.forEach((t=>{let o;if(1===t.endColumn&&s>0){const e=t.startLineNumber-s;o=new p.L(e,t.startColumn,e,t.startColumn)}else o=new p.L(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);s+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=o:n.push(o)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(c.Q.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new c.Q(t,i,e.startLineNumber,1)}return new c.Q(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.Q(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}),(0,o.Fl)(class extends z{constructor(){super({id:"deleteAllRight",label:E.kg("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:f.R.writable,kbOpts:{kbExpr:f.R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let s=0,o=t.length,r=0;s{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new c.Q(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new c.Q(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(c.Q.compareRangesUsingStarts),n}}),(0,o.Fl)(U),(0,o.Fl)(j),(0,o.Fl)(class extends q{constructor(){super({id:"editor.action.transformToUppercase",label:E.kg("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:f.R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}),(0,o.Fl)(class extends q{constructor(){super({id:"editor.action.transformToLowercase",label:E.kg("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:f.R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}),G.caseBoundary.isSupported()&&G.singleLetters.isSupported()&&(0,o.Fl)(G),Q.wordBoundary.isSupported()&&(0,o.Fl)(Q),Y.wordBoundary.isSupported()&&(0,o.Fl)(Y),$.titleBoundary.isSupported()&&(0,o.Fl)($),Z.isSupported()&&(0,o.Fl)(Z)},4812:function(e,t,i){"use strict";var n,s=i(97358),o=i(90890),r=i(76611),a=i(59321),l=i(20187),c=i(80670),d=i(35114),h=i(43920),u=i(54244),g=i(52694),p=i(72777),f=i(62993),m=i(40393),_=i(49678),v=i(49079),b=i(8494),w=i(14374),C=i(97848),y=i(69122),S=i(4195),k=i(82688),x=i(43857),L=function(e,t){return function(i,n){t(i,n,e)}};const D=new C.N1("LinkedEditingInputVisible",!1);let E=class extends d.jG{static{n=this}static{this.ID="editor.contrib.linkedEditing"}static{this.DECORATION=v.kI.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"})}static get(e){return e.getContribution(n.ID)}constructor(e,t,i,n,s){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new d.Cm),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=D.bindTo(t),this._debounceInformation=s.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new d.Cm),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(70)||e.hasChanged(94))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(70)||this._editor.getOption(94))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(c.Jh.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new o.ve(this._debounceInformation.get(t)),s=()=>{this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),this._debounceDuration??this._debounceInformation.get(t))},r=new o.ve(0),a=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{s()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void a(this._syncRangesToken)}s()}))),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const s=[];for(let e=1,i=this._currentDecorations.length;e1)return void this.clearRanges();const i=this._editor.getModel(),s=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=s;const o=this._currentRequestCts=new r.Qi;try{const e=new x.W(!1),r=await M(this._providers,i,t,o.token);if(this._debounceInformation.update(i,e.elapsed()),o!==this._currentRequestCts)return;if(this._currentRequestCts=null,s!==i.getVersionId())return;let a=[];r?.ranges&&(a=r.ranges),this._currentWordPattern=r?.wordPattern||this._languageWordPattern;let l=!1;for(let e=0,i=a.length;e({range:e,options:n.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(c),this._syncRangesToken++}catch(e){(0,l.MB)(e)||(0,l.dz)(e),this._currentRequestCts!==o&&this._currentRequestCts||this.clearRanges()}}};E=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([L(1,C.fN),L(2,y.ILanguageFeaturesService),L(3,b.JZ),L(4,k.ILanguageFeatureDebounceService)],E);class N extends g.ks{constructor(){super({id:"editor.action.linkedEditing",label:w.kg("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:C.M$.and(_.R.writable,_.R.hasRenameProvider),kbOpts:{kbExpr:_.R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(p.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return u.r.isUri(n)&&f.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(s),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),l.dz):super.runCommand(e,t)}run(e,t){const i=E.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const I=g.DX.bindToContribution(E.get);function M(e,t,i,n){const r=e.ordered(t);return(0,o.$1)(r.map((e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,n)}catch(e){return void(0,l.M_)(e)}})),(e=>!!e&&s.EI(e?.ranges)))}(0,g.E_)(new I({id:"cancelLinkedEditingInput",precondition:D,handler:e=>e.clearRanges(),kbOpts:{kbExpr:_.R.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),(0,S.x1A)("editor.linkedEditingBackground",{dark:a.Q1.fromHex("#f00").transparent(.3),light:a.Q1.fromHex("#f00").transparent(.3),hcDark:a.Q1.fromHex("#f00").transparent(.3),hcLight:a.Q1.white},w.kg("editorLinkedEditingBackground","Background color when the editor auto renames on type.")),(0,g.ke)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(y.ILanguageFeaturesService);return M(n,t,i,r.XO.None)})),(0,g.HW)(E.ID,E,1),(0,g.Fl)(N)},69143:function(e,t,i){"use strict";var n=i(90890),s=i(76611),o=i(20187),r=i(85584),a=i(35114),l=i(84756),c=i(79783),d=i(59951),h=i(43857),u=i(54244),g=i(52694),p=i(49079),f=i(82688),m=i(69122),_=i(48843),v=i(97358),b=i(24219),w=i(40393),C=i(59266),y=i(21335);class S{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}}class k{constructor(e){this._disposables=new a.Cm;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new S(e,n)));t=k._union(t,e),(0,a.Xm)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,s,o,r;for(n=0,o=0,s=e.length,r=t.length;nPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[s]=[t,e])}),o.M_)));return Promise.all(s).then((()=>{const e=new k((0,v.Yc)(n));return i.isCancellationRequested?(e.dispose(),new k([])):e}))}y.w.registerCommand("_executeLinkProvider",(async(e,...t)=>{let[i,n]=t;(0,b.j)(i instanceof u.r),"number"!=typeof n&&(n=0);const{linkProvider:o}=e.get(m.ILanguageFeaturesService),r=e.get(C.IModelService).getModel(i);if(!r)return[];const a=await x(o,r,s.XO.None);if(!a)return[];for(let e=0;ethis.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new _.gi(e));this._register(r.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(r.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(r.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,n.SS)((t=>x(this.providers,e,t)));try{const t=new h.W(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,o.dz)(e)}finally{this.computePromise=null}}}updateDecorations(e){const t="altKey"===this.editor.getOption(78),i=[],n=Object.keys(this.currentOccurrences);for(const e of n){const t=this.currentOccurrences[e];i.push(t.decorationId)}const s=[];if(e)for(const i of e)s.push(P.decoration(i,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=n.length;t{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(78);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(s.XO.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l.ny.file&&e.startsWith(`${l.ny.file}:`)){const i=u.r.parse(e);if(i.scheme===l.ny.file){const n=d.su(i);let s=null;n.startsWith("/./")||n.startsWith("\\.\\")?s=`.${n.substr(1)}`:(n.startsWith("//./")||n.startsWith("\\\\.\\"))&&(s=`.${n.substr(2)}`),s&&(e=d.uJ(t,s))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(D.kg("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(D.kg("missing.url","Failed to open this link because its target is missing.")):(0,o.dz)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){this.computeLinks.cancel(),this.activeLinksList&&(this.activeLinksList?.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};M=L=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([I(1,N.C),I(2,E.Ot),I(3,m.ILanguageFeaturesService),I(4,f.ILanguageFeatureDebounceService)],M);const T=p.kI.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),R=p.kI.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"});class P{static decoration(e,t){return{range:e.range,options:P._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?R:T};return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?D.kg("links.navigate.executeCmd","Execute command"):D.kg("links.navigate.follow","Follow link"),s=t?c.zx?D.kg("links.navigate.kb.meta.mac","cmd + click"):D.kg("links.navigate.kb.meta","ctrl + click"):c.zx?D.kg("links.navigate.kb.alt.mac","option + click"):D.kg("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=D.kg("tooltip.explanation","Execute command {0}",e)}}return new r.Bc("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${s})`)}return(new r.Bc).appendText(`${n} (${s})`)}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,P._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,P._getOptions(this.link,t,!1))}}class A extends g.ks{constructor(){super({id:"editor.action.openLink",label:D.kg("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=M.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const e of n){const t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,g.HW)(M.ID,M,1),(0,g.Fl)(A)},84956:function(e,t,i){"use strict";var n=i(35114),s=i(52694);class o extends n.jG{static{this.ID="editor.contrib.longLinesHelper"}constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(118);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}(0,s.HW)(o.ID,o,2)},7588:function(e,t,i){"use strict";i.d(t,{k:function(){return _}});var n,s=i(96710),o=i(15075),r=i(80670),a=i(85584),l=i(35114),c=i(52694),d=i(40393),h=i(69498),u=i(14374),g=i(97848),p=i(95607),f=i(84201),m=function(e,t){return function(i,n){t(i,n,e)}};let _=class{static{n=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new g.N1("messageVisible",!1,u.kg("messageVisible","Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(n.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new l.HE,this._messageListeners=new l.Cm,this._mouseOverMessage=!1,this._editor=e,this._visible=n.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._message?.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,o.xE)((0,a.VS)(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,a.VS)(e)?(0,s.Gc)(e,{actionHandler:{callback:t=>{this.closeMessage(),(0,h.i)(this._openerService,t,(0,a.VS)(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new b(this._editor,t,"string"==typeof e?e:this._message.element),this._messageListeners.add(r.Jh.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&f.QX(f.bq(),this._messageWidget.value.getDomNode())||this.closeMessage()}))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(f.ko(this._messageWidget.value.getDomNode(),f.Bx.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(f.ko(this._messageWidget.value.getDomNode(),f.Bx.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new d.Q(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(b.fadeOut(this._messageWidget.value))}};_=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([m(1,g.fN),m(2,p.C)],_);const v=c.DX.bindToContribution(_.get);(0,c.E_)(new v({id:"leaveEditorMessage",precondition:_.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class b{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");"string"==typeof n?(o.classList.add("message"),o.textContent=n):(n.classList.add("message"),o.appendChild(n)),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,c.HW)(_.ID,_,4)},36988:function(e,t,i){"use strict";var n,s=i(15075),o=i(90890),r=i(62167),a=i(35114),l=i(52694),c=i(66092),d=i(40393),h=i(56218),u=i(49678),g=i(23793),p=i(14374),f=i(93223),m=i(97848),_=i(69122),v=i(22136),b=i(63619);function w(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?p.kg("cursorAdded","Cursor added: {0}",e):p.kg("cursorsAdded","Cursors added: {0}",e);(0,s.h5)(t)}}class C extends l.ks{constructor(){super({id:"editor.action.insertCursorAbove",label:p.kg("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:u.R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const o=s.getCursorStates();s.setCursorStates(i.source,3,c.c.addCursorUp(s,o,n)),s.revealTopMostCursor(i.source),w(o,s.getCursorStates())}}class y extends l.ks{constructor(){super({id:"editor.action.insertCursorBelow",label:p.kg("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:u.R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.model.pushStackElement();const o=s.getCursorStates();s.setCursorStates(i.source,3,c.c.addCursorDown(s,o,n)),s.revealBottomMostCursor(i.source),w(o,s.getCursorStates())}}class S extends l.ks{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:p.kg("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:u.R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new h.L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),s=t._getViewModel(),o=s.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),w(o,s.getCursorStates())}}class k extends l.ks{constructor(){super({id:"editor.action.addCursorsToBottom",label:p.kg("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),s=[];for(let e=i[0].startLineNumber;e<=n;e++)s.push(new h.L(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),r=o.getCursorStates();s.length>0&&t.setSelections(s),w(r,o.getCursorStates())}}class x extends l.ks{constructor(){super({id:"editor.action.addCursorsToTop",label:p.kg("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new h.L(e,i[0].startColumn,e,i[0].endColumn));const s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),w(o,s.getCursorStates())}}class L{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class D{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new D(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,s,o=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(o=!0,n=!0,s=!0):(n=i.wholeWord,s=i.matchCase);const a=e.getSelection();let l,c=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,c=new h.L(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new D(e,t,o,l,n,s,c)}constructor(e,t,i,n,s,o,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new h.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1);return i?new h.L(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(132):null,!1,1073741824)}}class E extends a.jG{static{this.ID="editor.contrib.multiCursorController"}static get(e){return e.getContribution(E.ID)}constructor(e){super(),this._sessionDispose=this._register(new a.Cm),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=D.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new h.L(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!T(this._editor.getModel(),t,i)){const e=this._editor.getModel(),i=[];for(let n=0,s=t.length;n0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(132):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew h.L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}class N extends l.ks{run(e,t){const i=E.get(t);if(!i)return;const n=t._getViewModel();if(n){const s=n.getCursorStates(),o=g.z0.get(t);if(o)this._run(i,o);else{const n=e.get(b._Y).createInstance(g.z0,t);this._run(i,n),n.dispose()}w(s,n.getCursorStates())}}}class I{constructor(e,t,i,n,s){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,s&&this._model===s._model&&this._searchText===s._searchText&&this._matchCase===s._matchCase&&this._wordSeparators===s._wordSeparators&&this._modelVersionId===s._modelVersionId&&(this._cachedFindMatches=s._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(d.Q.compareRangesUsingStarts)),this._cachedFindMatches}}let M=class extends a.jG{static{n=this}static{this.ID="editor.contrib.selectionHighlighter"}constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(109),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new o.uC((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(109)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=g.z0.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(n._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const s=E.get(i);if(!s)return null;const o=g.z0.get(i);if(!o)return null;let r=s.getSession(o);if(!r){const e=i.getSelections();if(e.length>1){const t=o.getState().matchCase;if(!T(i.getModel(),e,t))return null}r=D.create(i,o)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=o.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new I(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(132):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(d.Q.compareRangesUsingStarts);const s=[];for(let e=0,t=0,o=i.length,r=n.length;e=r)s.push(o),e++;else{const i=d.Q.compareRangesUsingStarts(o,n[t]);i<0?(!n[t].isEmpty()&&d.Q.areIntersecting(o,n[t])||s.push(o),e++):(i>0||e++,t++)}}const o="off"!==this.editor.getOption(81),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&o,a=s.map((e=>({range:e,options:(0,v.v)(r)})));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function T(e,t,i){const n=R(e,t[0],!i);for(let s=1,o=t.length;s=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(P=1,A=_.ILanguageFeaturesService,function(e,t){A(e,t,P)})],M);class O extends l.ks{constructor(){super({id:"editor.action.focusNextCursor",label:p.kg("mutlicursor.focusNextCursor","Focus Next Cursor"),metadata:{description:p.kg("mutlicursor.focusNextCursor.description","Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const s=Array.from(n.getCursorStates()),o=s.shift();o&&(s.push(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),w(s,n.getCursorStates()))}}class F extends l.ks{constructor(){super({id:"editor.action.focusPreviousCursor",label:p.kg("mutlicursor.focusPreviousCursor","Focus Previous Cursor"),metadata:{description:p.kg("mutlicursor.focusPreviousCursor.description","Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const s=Array.from(n.getCursorStates()),o=s.pop();o&&(s.unshift(o),n.setCursorStates(i.source,3,s),n.revealPrimaryCursor(i.source,!0),w(s,n.getCursorStates()))}}(0,l.HW)(E.ID,E,4),(0,l.HW)(M.ID,M,1),(0,l.Fl)(C),(0,l.Fl)(y),(0,l.Fl)(S),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:p.kg("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.R.focus,primary:2082,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:p.kg("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:p.kg("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:u.R.focus,primary:(0,r.m5)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:p.kg("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.selectHighlights",label:p.kg("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:u.R.focus,primary:3114,weight:100},menuOpts:{menuId:f.D8.MenubarSelectionMenu,group:"3_multi",title:p.kg({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}),(0,l.Fl)(class extends N{constructor(){super({id:"editor.action.changeAll",label:p.kg("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:m.M$.and(u.R.writable,u.R.editorTextFocus),kbOpts:{kbExpr:u.R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}),(0,l.Fl)(k),(0,l.Fl)(x),(0,l.Fl)(O),(0,l.Fl)(F)},22400:function(e,t,i){"use strict";var n=i(72582),s=i(35114),o=i(52694),r=i(49678),a=i(35720),l=i(69122),c=i(90890),d=i(20187),h=i(80670),u=i(82282),g=i(76611),p=i(24219),f=i(54244),m=i(62993),_=i(20878),v=i(21335),b=i(97848);const w={Visible:new b.N1("parameterHintsVisible",!1),MultipleSignatures:new b.N1("parameterHintsMultipleSignatures",!1)};async function C(e,t,i,n,s){const o=e.ordered(t);for(const e of o)try{const o=await e.provideSignatureHelp(t,i,s,n);if(o)return o}catch(e){(0,d.M_)(e)}}var y;v.w.registerCommand("_executeSignatureHelpProvider",(async(e,...t)=>{const[i,n,s]=t;(0,p.j)(f.r.isUri(i)),(0,p.j)(m.y.isIPosition(n)),(0,p.j)("string"==typeof s||!s);const o=e.get(l.ILanguageFeaturesService),r=await e.get(_.ITextModelService).createModelReference(i);try{const e=await C(o.signatureHelpProvider,r.object.textEditorModel,m.y.lift(n),{triggerKind:a.WA.Invoke,isRetrigger:!1,triggerCharacter:s},g.XO.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}})),function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(y||(y={}));class S extends s.jG{static{this.DEFAULT_DELAY=120}constructor(e,t,i=S.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new h.vl),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=y.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new s.HE),this.triggerChars=new u.y,this.retriggerChars=new u.y,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new c.ve(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=y.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(d.dz)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new y.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(k);this._pendingTriggers=[];const s={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),r=this.editor.getPosition();this.state=new y.Pending((0,c.SS)((e=>C(this.providers,o,r,s,e))),i);try{const t=await this.state.request;return e!==this.triggerId?(t?.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new y.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(t?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=y.Default),(0,d.dz)(t),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:a.WA.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:a.WA.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:a.WA.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function k(e,t){switch(t.triggerKind){case a.WA.Invoke:return t;case a.WA.ContentChange:return e;case a.WA.TriggerCharacter:default:return t}}var x,L=i(14374),D=i(63619),E=i(84201),N=i(15075),I=i(5390),M=i(93231),T=i(43920),R=i(3520),P=i(41750),A=i(69498),O=i(95607),F=i(4195),B=i(51310),W=i(56613),H=i(43857),V=i(2727),z=function(e,t){return function(i,n){t(i,n,e)}};const U=E.$,j=(0,B.pU)("parameter-hints-next",M.W.chevronDown,L.kg("parameterHintsNextIcon","Icon for show next parameter hint.")),q=(0,B.pU)("parameter-hints-previous",M.W.chevronUp,L.kg("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let K=class extends s.jG{static{x=this}static{this.ID="editor.widget.parameterHintsWidget"}constructor(e,t,i,n,o,r){super(),this.editor=e,this.model=t,this.telemetryService=r,this.renderDisposeables=this._register(new s.Cm),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new A.T({editor:e},o,n)),this.keyVisible=w.Visible.bindTo(i),this.keyMultipleSignatures=w.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=U(".editor-widget.parameter-hints-widget"),t=E.BC(e,U(".phwrapper"));t.tabIndex=-1;const i=E.BC(t,U(".controls")),n=E.BC(i,U(".button"+W.L.asCSSSelector(q))),s=E.BC(i,U(".overloads")),o=E.BC(i,U(".button"+W.L.asCSSSelector(j)));this._register(E.ko(n,"click",(e=>{E.fs.stop(e),this.previous()}))),this._register(E.ko(o,"click",(e=>{E.fs.stop(e),this.next()})));const r=U(".body"),a=new I.MU(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=E.BC(r,U(".signature")),c=E.BC(r,U(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:s,docs:c,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const d=()=>{if(!this.domNodes)return;const e=this.editor.getOption(50),t=this.domNodes.element;t.style.fontSize=`${e.fontSize}px`,t.style.lineHeight=""+e.lineHeight/e.fontSize,t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamily",e.fontFamily),t.style.setProperty("--vscode-parameterHintsWidget-editorFontFamilyDefault",R.jU.fontFamily)};d(),this._register(h.Jh.chain(this.editor.onDidChangeConfiguration.bind(this.editor),(e=>e.filter((e=>e.hasChanged(50)))))(d)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{this.domNodes?.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){if(this.renderDisposeables.clear(),!this.domNodes)return;const t=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",t),this.keyMultipleSignatures.set(t),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const i=e.signatures[e.activeSignature];if(!i)return;const n=E.BC(this.domNodes.signature,U(".code")),s=i.parameters.length>0,o=i.activeParameter??e.activeParameter;s?this.renderParameters(n,i,o):E.BC(n,U("span")).textContent=i.label;const r=i.parameters[o];if(r?.documentation){const e=U("span.documentation");if("string"==typeof r.documentation)e.textContent=r.documentation;else{const t=this.renderMarkdownDocs(r.documentation);e.appendChild(t.element)}E.BC(this.domNodes.docs,U("p",{},e))}if(void 0===i.documentation);else if("string"==typeof i.documentation)E.BC(this.domNodes.docs,U("p",{},i.documentation));else{const e=this.renderMarkdownDocs(i.documentation);E.BC(this.domNodes.docs,e.element)}const a=this.hasDocs(i,r);if(this.domNodes.signature.classList.toggle("has-docs",a),this.domNodes.docs.classList.toggle("empty",!a),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,r){let e="";const t=i.parameters[o];e=Array.isArray(t.label)?i.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),i.documentation&&(e+="string"==typeof i.documentation?`, ${i.documentation}`:`, ${i.documentation.value}`),this.announcedLabel!==e&&(N.xE(L.kg("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=new H.W,i=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));i.element.classList.add("markdown-docs");const n=t.elapsed();return n>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:n}),i}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,p.eU)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,p.eU)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,p.eU)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,p.eU)(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,s]=this.getParameterLabelOffsets(t,i),o=document.createElement("span");o.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,s),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(s),E.BC(e,o,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,T.bm)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return x.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};K=x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([z(2,b.fN),z(3,O.C),z(4,P.L),z(5,V.k)],K),(0,F.x1A)("editorHoverWidget.highlightForeground",F.QI5,L.kg("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));var $,G=function(e,t){return function(i,n){t(i,n,e)}};let Q=class extends s.jG{static{$=this}static{this.ID="editor.controller.parameterHints"}static get(e){return e.getContribution($.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new S(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{e?(this.widget.value.show(),this.widget.value.render(e)):this.widget.rawValue?.hide()}))),this.widget=new n.d((()=>this._register(t.createInstance(K,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(e){this.model.trigger(e,0)}};Q=$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([G(1,D._Y),G(2,l.ILanguageFeaturesService)],Q);class Y extends o.ks{constructor(){super({id:"editor.action.triggerParameterHints",label:L.kg("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:r.R.hasSignatureHelpProvider,kbOpts:{kbExpr:r.R.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=Q.get(t);i?.trigger({triggerKind:a.WA.Invoke})}}(0,o.HW)(Q.ID,Q,2),(0,o.Fl)(Y);const Z=o.DX.bindToContribution(Q.get);(0,o.E_)(new Z({id:"closeParameterHints",precondition:w.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:r.R.focus,primary:9,secondary:[1033]}})),(0,o.E_)(new Z({id:"showPrevParameterHint",precondition:b.M$.and(w.Visible,w.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:r.R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,o.E_)(new Z({id:"showNextParameterHint",precondition:b.M$.and(w.Visible,w.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:r.R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},70776:function(e,t,i){"use strict";i.d(t,{zn:function(){return R},x2:function(){return P},j6:function(){return B},RL:function(){return O},zl:function(){return z},n6:function(){return U},z0:function(){return W},_X:function(){return H},e3:function(){return V}});var n=i(84201),s=i(98099),o=i(30981),r=i(93231),a=i(56613),l=i(59321),c=i(80670),d=i(49134),h=i(52694),u=i(72777),g=i(11797),p=i(38175),f=i(68860),m=i(35114),_=i(40393),v=i(49079);const b=new l.Q1(new l.bU(0,122,204)),w={showArrow:!0,showFrame:!0,className:"",frameColor:b,arrowColor:b,keepEditorSelection:!1};class C{constructor(e,t,i,n,s,o,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=s,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class y{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class S{static{this._IdGenerator=new f.n(".arrow-decoration-")}constructor(e){this._editor=e,this._ruleName=S._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),n.U2(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){n.U2(this._ruleName),n.Wt(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:_.Q.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}class k{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new m.Cm,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=d.Go(t),d.co(this.options,w,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new S(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){const t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash?.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=_.Q.isIRange(e)?_.Q.lift(e):_.Q.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:v.kI.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const o=document.createElement("div");o.style.overflow="hidden";const r=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new C(o,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new y("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const c=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,s),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const t=d.validateRange(new _.Q(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new p.m(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(67),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var x=i(14374),L=i(42574),D=i(97848),E=i(48682),N=i(63619),I=i(4195),M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},T=function(e,t){return function(i,n){t(i,n,e)}};const R=(0,N.u1)("IPeekViewService");var P;(0,E.v)(R,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}},1),function(e){e.inPeekEditor=new D.N1("inReferenceSearchEditor",!0,x.kg("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(P||(P={}));let A=class{static{this.ID="editor.contrib.referenceController"}constructor(e,t){e instanceof g.t&&P.inPeekEditor.bindTo(t)}dispose(){}};function O(e){const t=e.get(u.T).getFocusedCodeEditor();return t instanceof g.t?t.getParentEditor():t}A=M([T(1,D.fN)],A),(0,h.HW)(A.ID,A,0);const F={headerBackgroundColor:l.Q1.white,primaryHeadingColor:l.Q1.fromHex("#333333"),secondaryHeadingColor:l.Q1.fromHex("#6c6c6cb3")};let B=class extends k{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new c.vl,this.onDidClose=this._onDidClose.event,d.co(this.options,F,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=n.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),n.b2(this._titleElement,"click",(e=>this._onTitleClick(e)))),n.BC(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.BC(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=n.$(".peekview-actions");n.BC(this._headElement,i);const l=this._getActionBarOptions();this._actionbarWidget=new s.E(i,l),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new o.rc("peekview.close",x.kg("label.close","Close"),a.L.asClassName(r.W.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:L.rN.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:n.w_(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.WU(this._metaHeading)):n.jD(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(67)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};B=M([T(2,N._Y)],B);const W=(0,I.x1A)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Q1.black,hcLight:l.Q1.white},x.kg("peekViewTitleBackground","Background color of the peek view title area.")),H=(0,I.x1A)("peekViewTitleLabel.foreground",{dark:l.Q1.white,light:l.Q1.black,hcDark:l.Q1.white,hcLight:I.By2},x.kg("peekViewTitleForeground","Color of the peek view title.")),V=(0,I.x1A)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},x.kg("peekViewTitleInfoForeground","Color of the peek view title info.")),z=(0,I.x1A)("peekView.border",{dark:I.pOz,light:I.pOz,hcDark:I.b1q,hcLight:I.b1q},x.kg("peekViewBorder","Color of the peek view borders and arrow.")),U=(0,I.x1A)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:l.Q1.black,hcLight:l.Q1.white},x.kg("peekViewResultsBackground","Background color of the peek view result list.")),j=((0,I.x1A)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:l.Q1.white,hcLight:I.By2},x.kg("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),(0,I.x1A)("peekViewResult.fileForeground",{dark:l.Q1.white,light:"#1E1E1E",hcDark:l.Q1.white,hcLight:I.By2},x.kg("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),(0,I.x1A)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},x.kg("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),(0,I.x1A)("peekViewResult.selectionForeground",{dark:l.Q1.white,light:"#6C6C6C",hcDark:l.Q1.white,hcLight:I.By2},x.kg("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),(0,I.x1A)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:l.Q1.black,hcLight:l.Q1.white},x.kg("peekViewEditorBackground","Background color of the peek view editor.")));(0,I.x1A)("peekViewEditorGutter.background",j,x.kg("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),(0,I.x1A)("peekViewEditorStickyScroll.background",j,x.kg("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor.")),(0,I.x1A)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},x.kg("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),(0,I.x1A)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},x.kg("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),(0,I.x1A)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:I.buw,hcLight:I.buw},x.kg("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},90098:function(e,t,i){"use strict";var n=i(52694),s=i(99851),o=i(14374),r=i(8552),a=i(36206),l=i(87312),c=i(64523),d=i(73755),h=i(63619);class u{constructor(e){this.instantiationService=e}init(...e){}}let g=class extends u{constructor(e,t){super(t),this.init(e)}};var p,f,m;g=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(f=1,m=h._Y,function(e,t){m(e,t,f)})],g),(0,n.HW)(a.X.ID,(p=()=>a.X,(0,l.e)()?function(e,t){return class extends t{constructor(){super(...arguments),this._autorun=void 0}init(...t){this._autorun=(0,d.yC)(((i,n)=>{const s=(0,c.b)(e(),i);n.add(this.instantiationService.createInstance(s,...t))}))}dispose(){this._autorun?.dispose()}}}(p,g):p()),0),(0,r.x1)("editor.placeholder.foreground",s.Ek,(0,o.kg)("placeholderForeground","Foreground color of the placeholder text in the editor."))},36206:function(e,t,i){"use strict";i.d(t,{X:function(){return c}});var n=i(84201),s=i(57981),o=i(35114),r=i(73755),a=i(98018),l=i(90072);class c extends o.jG{static{this.ID="editor.contrib.placeholderText"}constructor(e){var t;super(),this._editor=e,this._editorObs=(0,l.Ud)(this._editor),this._placeholderText=this._editorObs.getOption(88),this._state=(0,r.C)({owner:this,equalsFn:s.dB},(e=>{const t=this._placeholderText.read(e);if(t&&this._editorObs.valueIsEmpty.read(e))return{placeholder:t}})),this._shouldViewBeAlive=(t=e=>void 0!==this._state.read(e)?.placeholder,(0,r.ZX)(this,((e,i)=>!0===i||t(e)))),this._view=(0,a.rm)(((e,t)=>{if(!this._shouldViewBeAlive.read(e))return;const i=(0,n.h)("div.editorPlaceholder");t.add((0,r.fm)((e=>{const t=this._state.read(e),n=void 0!==t?.placeholder;i.root.style.display=n?"block":"none",i.root.innerText=t?.placeholder??""}))),t.add((0,r.fm)((e=>{const t=this._editorObs.layoutInfo.read(e);i.root.style.left=`${t.contentLeft}px`,i.root.style.width=t.contentWidth-t.verticalScrollbarWidth+"px",i.root.style.top=`${this._editor.getTopForLineNumber(0)}px`}))),t.add((0,r.fm)((e=>{i.root.style.fontFamily=this._editorObs.getOption(49).read(e),i.root.style.fontSize=this._editorObs.getOption(52).read(e)+"px",i.root.style.lineHeight=this._editorObs.getOption(67).read(e)+"px"}))),t.add(this._editorObs.createOverlayWidget({allowEditorOverflow:!1,minContentWidthInPx:(0,r.lk)(0),position:(0,r.lk)(null),domNode:i.root}))})),this._view.recomputeInitiallyAndOnChange(this._store)}}},769:function(e,t,i){"use strict";i.d(t,{o:function(){return d}});var n=i(96845),s=i(35114),o=i(47010),r=i(62067),a=i(99851),l=i(40616),c=i(15075);class d{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){const n=new s.Cm;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new s.HE);return o.value=this.doProvide(e,t,i),n.add(this.onDidActiveTextEditorControlChange((()=>{o.value=void 0,o.value=this.doProvide(e,t)}))),n}doProvide(e,t,i){const r=new s.Cm,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const l={editor:a},c=(0,o.jA)(a);if(c){let e=a.saveViewState()??void 0;r.add(c.onDidChangeCursorPosition((()=>{e=a.saveViewState()??void 0}))),l.restoreViewState=()=>{e&&a===this.activeTextEditorControl&&a.restoreViewState(e)},r.add((0,n.P)(t.onCancellationRequested)((()=>l.restoreViewState?.())))}r.add((0,s.s)((()=>this.clearDecorations(a)))),r.add(this.provideWithTextEditor(l,e,t,i))}else r.add(this.provideWithoutTextEditor(e,t));return r}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&(0,c.h5)(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){return(0,o.Np)(e)?e.getModel()?.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,l.Yf)(a.vp),position:r.A5.Full}}}],[s,o]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:s,overviewRulerDecorationId:o}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},18615:function(e,t,i){"use strict";var n=i(85584),s=i(35114),o=i(52694),r=i(7588),a=i(14374);class l extends s.jG{static{this.ID="editor.contrib.readOnlyMessageController"}constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=r.k.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(93);t||(t=this.editor.isSimpleWidget?new n.Bc(a.kg("editor.simple.readonly","Cannot edit in read-only input")):new n.Bc(a.kg("editor.readonly","Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}(0,o.HW)(l.ID,l,2)},49204:function(e,t,i){"use strict";var n=i(15075),s=i(90890),o=i(76611),r=i(20187),a=i(85584),l=i(35114),c=i(24219),d=i(54244),h=i(52694),u=i(98325),g=i(72777),p=i(62993),f=i(40393),m=i(49678),_=i(35720),v=i(69122),b=i(17492),w=i(765),C=i(7588),y=i(14374),S=i(93223),k=i(16434),x=i(97848),L=i(63619),D=i(76925),E=i(31835),N=i(86171),I=i(56419),M=i(2727),T=i(84201),R=i(40478),P=i(12048),A=i(24764),O=i(43014),F=i(67334),B=i(97358),W=i(93231),H=i(80670),V=i(43857),z=i(43193),U=i(87163),j=i(52010),q=i(4195),K=i(40616),$=function(e,t){return function(i,n){t(i,n,e)}};const G=new x.N1("renameInputVisible",!1,y.kg("renameInputVisible","Whether the rename input widget is visible"));new x.N1("renameInputFocused",!1,y.kg("renameInputFocused","Whether the rename input widget is focused"));let Q=class{constructor(e,t,i,n,s,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=o,this.allowEditorOverflow=!0,this._disposables=new l.Cm,this._visibleContextKey=G.bindTo(s),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new V.W,this._inputWithButton=new Z,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new Y(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange((()=>{void 0!==this._renameCandidateListView?.focusedCandidate&&(this._isEditingRenameCandidate=!0),this._timeBeforeFirstInputFieldEdit??=this._beforeFirstInputFieldEditSW.elapsed(),!1===this._renameCandidateProvidersCts?.token.isCancellationRequested&&this._renameCandidateProvidersCts.cancel(),this._renameCandidateListView?.clearFocus()}))),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){if(!this._domNode)return;const t=e.getColor(q.f9l),i=e.getColor(q.DSL);this._domNode.style.backgroundColor=String(e.getColor(q.CgL)??""),this._domNode.style.boxShadow=t?` 0 0 8px 2px ${t}`:"",this._domNode.style.border=i?`1px solid ${i}`:"",this._domNode.style.color=String(e.getColor(q.cws)??"");const n=e.getColor(q.Zgs);this._inputWithButton.domNode.style.backgroundColor=String(e.getColor(q.L4c)??""),this._inputWithButton.input.style.backgroundColor=String(e.getColor(q.L4c)??""),this._inputWithButton.domNode.style.borderWidth=n?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=n?"solid":"none",this._inputWithButton.domNode.style.borderColor=n?.toString()??"none"}_updateFont(){if(void 0===this._domNode)return;(0,c.j)(void 0!==this._label,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return.8*e}getPosition(){if(!this._visible)return null;if(!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=T.tG(this.getDomNode().ownerDocument.body),t=T.BK(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const n=this._editor.getOption(67),{totalHeight:s}=X.getLayoutInfo({lineHeight:n}),o=this._nPxAvailableBelow>6*s?[2,1]:[1,2];return{position:this._position,preference:o}}beforeRender(){const[e,t]=this._acceptKeybindings;return this._label.innerText=y.kg({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",this._keybindingService.lookupKeybinding(e)?.getLabel(),this._keybindingService.lookupKeybinding(t)?.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;(0,c.j)(this._renameCandidateListView),(0,c.j)(void 0!==this._nPxAvailableAbove),(0,c.j)(void 0!==this._nPxAvailableBelow);const t=T.OK(this._inputWithButton.domNode),i=T.OK(this._label);let n;n=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._renameCandidateListView.layout({height:n-i-t,width:T.Tr(this._inputWithButton.domNode)})}acceptInput(e){this._trace("invoking acceptInput"),this._currentAcceptInput?.(e)}cancelInput(e,t){this._currentCancelInput?.(e)}focusNextRenameSuggestion(){this._renameCandidateListView?.focusNext()||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){this._renameCandidateListView?.focusPrevious()||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,o){const{start:r,end:a}=this._getSelection(e,t);this._renameCts=o;const d=new l.Cm;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,void 0===n?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),d.add(T.ko(this._inputWithButton.button,"click",(()=>this._requestRenameCandidates(t,!0)))),d.add(T.ko(this._inputWithButton.button,T.Bx.KEY_DOWN,(e=>{const i=new R.Z(e);(i.equals(3)||i.equals(10))&&(i.stopPropagation(),i.preventDefault(),this._requestRenameCandidates(t,!0))})))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new p.y(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",r.toString()),this._inputWithButton.input.setAttribute("selectionEnd",a.toString()),this._inputWithButton.input.size=Math.max(1.1*(e.endColumn-e.startColumn),20),this._beforeFirstInputFieldEditSW.reset(),d.add((0,l.s)((()=>{this._renameCts=void 0,o.dispose(!0)}))),d.add((0,l.s)((()=>{void 0!==this._renameCandidateProvidersCts&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)}))),d.add((0,l.s)((()=>this._candidates.clear())));const h=new s.Zv;return h.p.finally((()=>{d.dispose(),this._hide()})),this._currentCancelInput=e=>(this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView?.clearCandidates(),h.complete(e),!0),this._currentAcceptInput=e=>{this._trace("invoking _currentAcceptInput"),(0,c.j)(void 0!==this._renameCandidateListView);const n=this._renameCandidateListView.nCandidates;let s,o;const r=this._renameCandidateListView.focusedCandidate;void 0!==r?(this._trace("using new name from renameSuggestion"),s=r,o={k:"renameSuggestion"}):(this._trace("using new name from inputField"),s=this._inputWithButton.input.value,o=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),s!==t&&0!==s.trim().length?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),h.complete({newName:s,wantsPreview:i&&e,stats:{source:o,nRenameSuggestions:n,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})):this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)")},d.add(o.token.onCancellationRequested((()=>this.cancelInput(!0,"cts.token.onCancellationRequested")))),d.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!this._domNode?.ownerDocument.hasFocus(),"editor.onDidBlurEditorWidget")))),this._show(),h.p}_requestRenameCandidates(e,t){if(void 0!==this._requestRenameCandidatesOnce&&(void 0!==this._renameCandidateProvidersCts&&this._renameCandidateProvidersCts.dispose(!0),(0,c.j)(this._renameCts),"stop"!==this._inputWithButton.buttonState)){this._renameCandidateProvidersCts=new o.Qi;const i=t?_.YT.Invoke:_.YT.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(0===n.length)return void this._inputWithButton.setSparkleButton();t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){(0,c.j)(this._editor.hasModel());const i=this._editor.getSelection();let n=0,s=t.length;return f.Q.isEmpty(i)||f.Q.spansMultipleLines(i)||!f.Q.containsRange(e,i)||(n=Math.max(0,i.startColumn-e.startColumn),s=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:s}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))}),100)}async _updateRenameCandidates(e,t,i){const n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");const o=await(0,s.PK)(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),void 0===o)return void n("returning early - received updateRenameCandidates results - undefined");const r=o.flatMap((e=>"fulfilled"===e.status&&(0,c.O9)(e.value)?e.value:[]));n(`received updateRenameCandidates results - total (unfiltered) ${r.length} candidates.`);const a=B.dM(r,(e=>e.newSymbolName));n(`distinct candidates - ${a.length} candidates.`);const l=a.filter((({newSymbolName:e})=>e.trim().length>0&&e!==this._inputWithButton.input.value&&e!==t&&!this._candidates.has(e)));n(`valid distinct candidates - ${r.length} candidates.`),l.forEach((e=>this._candidates.add(e.newSymbolName))),l.length<1?n("returning early - no valid distinct candidates"):(n("setting candidates"),this._renameCandidateListView.setCandidates(l),n("asking editor to re-layout"),this._editor.layoutContentWidget(this))}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};Q=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([$(2,K.Gy),$(3,U.b),$(4,x.fN),$(5,D.rr)],Q);class Y{constructor(e,t){this._disposables=new l.Cm,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=Y._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._listWidget.onDidChangeFocus((e=>{1===e.elements.length&&t.onFocusChange(e.elements[0].newSymbolName)}),this._disposables),this._listWidget.onDidChangeSelection((e=>{1===e.elements.length&&t.onSelectionChange()}),this._disposables),this._disposables.add(this._listWidget.onDidBlur((e=>{this._listWidget.setFocus([])}))),this._listWidget.style((0,j.t8)({listInactiveFocusForeground:q.nH,listInactiveFocusBackground:q.AlL}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);const t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,n.h5(y.kg("renameSuggestionsReceivedAria","Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(0===this._listWidget.length)return;const e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];return void 0!==t?t.newSymbolName:void 0}focusNext(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}focusPrevious(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length){this._listWidget.focusLast();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}if(0===e[0])return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=X.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,7*this._candidateViewHeight)}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map((e=>e.newSymbolName.length)))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,i){const n=new class{getTemplateId(e){return"candidate"}getHeight(e){return t}},s=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new X(e,i)}renderElement(e,t,i){i.populate(e)}disposeTemplate(e){e.dispose()}};return new F.B8("NewSymbolNameCandidates",e,n,[s],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class Z{constructor(){this._onDidInputChange=new H.vl,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new l.Cm}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",y.kg("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=y.kg("generateRenameSuggestionsButton","Generate new name suggestions"),this._buttonCancelHoverText=y.kg("cancelRenameSuggestionsButton","Cancel"),this._buttonHover=(0,P.i)().setupManagedHover((0,A.nZ)("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(T.ko(this.input,T.Bx.INPUT,(()=>this._onDidInputChange.fire()))),this._disposables.add(T.ko(this.input,T.Bx.KEY_DOWN,(e=>{const t=new R.Z(e);15!==t.keyCode&&17!==t.keyCode||this._onDidInputChange.fire()}))),this._disposables.add(T.ko(this.input,T.Bx.CLICK,(()=>this._onDidInputChange.fire()))),this._disposables.add(T.ko(this.input,T.Bx.FOCUS,(()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"}))),this._disposables.add(T.ko(this.input,T.Bx.BLUR,(()=>{this.domNode.style.outline="none"})))),this._domNode}get input(){return(0,c.j)(this._inputNode),this._inputNode}get button(){return(0,c.j)(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){this._buttonState="sparkle",this._sparkleIcon??=(0,O.s)(W.W.sparkle),T.w_(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),this._buttonHover?.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){this._buttonState="stop",this._stopIcon??=(0,O.s)(W.W.primitiveSquare),T.w_(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),this._buttonHover?.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}class X{static{this._PADDING=2}constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${X._PADDING}px`;const i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=.8*t.lineHeight+"px",this._domNode.appendChild(i),this._icon=(0,O.s)(W.W.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),z.M(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){const t=!!e.tags?.includes(_.OV.AIGenerated);this._icon.style.display=t?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+2*X._PADDING}}dispose(){}}var J,ee=function(e,t){return function(i,n){t(i,n,e)}};class te{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:f.Q.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join("\n")};const o=await s.provideRenameEdits(this.model,this.position,e,n);return o?o.rejectReason?this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n):o:this._provideRenameEdits(e,t+1,i.concat(y.kg("no result","No result.")),n)}}let ie=class{static{J=this}static{this.ID="editor.contrib.renameController"}static get(e){return e.getContribution(J.ID)}constructor(e,t,i,n,s,r,a,c,d){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=r,this._configService=a,this._languageFeaturesService=c,this._telemetryService=d,this._disposableStore=new l.Cm,this._cts=new o.Qi,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(Q,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){const e=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new o.Qi,!this.editor.hasModel())return void e("editor has no model");const t=this.editor.getPosition(),i=new te(this.editor.getModel(),t,this._languageFeaturesService.renameProvider);if(!i.hasProvider())return void e("skeleton has no provider");const l=new w.gI(this.editor,5,void 0,this._cts.token);let c;try{e("resolving rename location");const t=i.resolveRenameLocation(l.token);this._progressService.showWhile(t,250),c=await t,e("resolved rename location")}catch(i){return void(i instanceof r.AL?e("resolve rename location cancelled",JSON.stringify(i,null,"\t")):(e("resolve rename location failed",i instanceof Error?i:JSON.stringify(i,null,"\t")),("string"==typeof i||(0,a.VS)(i))&&C.k.get(this.editor)?.showMessage(i||y.kg("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),t)))}finally{l.dispose()}if(!c)return void e("returning early - no loc");if(c.rejectReason)return e(`returning early - rejected with reason: ${c.rejectReason}`,c.rejectReason),void C.k.get(this.editor)?.showMessage(c.rejectReason,t);if(l.token.isCancellationRequested)return void e("returning early - cts1 cancelled");const d=new w.gI(this.editor,5,c.range,this._cts.token),h=this.editor.getModel(),u=this._languageFeaturesService.newSymbolNamesProvider.all(h),g=await Promise.all(u.map((async e=>[e,await e.supportsAutomaticNewSymbolNamesTriggerKind??!1])));e("creating rename input field and awaiting its result");const p=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),m=await this._renameWidget.getInput(c.range,c.text,p,u.length>0?(e,t)=>{let i=g.slice();return e===_.YT.Automatic&&(i=i.filter((([e,t])=>t))),i.map((([i])=>i.provideNewSymbolNames(h,c.range,e,t)))}:void 0,d);if(e("received response from rename input field"),u.length>0&&this._reportTelemetry(u.length,h.getLanguageId(),m),"boolean"==typeof m)return e(`returning early - rename input field response - ${m}`),m&&this.editor.focus(),void d.dispose();this.editor.focus(),e("requesting rename edits");const v=(0,s.PK)(i.provideRenameEdits(m.newName,d.token),d.token).then((async t=>{if(t)if(this.editor.hasModel()){if(t.rejectReason)return e(`returning early - rejected with reason: ${t.rejectReason}`),void this._notificationService.info(t.rejectReason);this.editor.setSelection(f.Q.fromPositions(this.editor.getSelection().getPosition())),e("applying edits"),this._bulkEditService.apply(t,{editor:this.editor,showPreview:m.wantsPreview,label:y.kg("label","Renaming '{0}' to '{1}'",c?.text,m.newName),code:"undoredo.rename",quotableLabel:y.kg("quotableLabel","Renaming {0} to {1}",c?.text,m.newName),respectAutoSaveConfig:!0}).then((t=>{e("edits applied"),t.ariaSummary&&(0,n.xE)(y.kg("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",c.text,m.newName,t.ariaSummary))})).catch((t=>{e(`error when applying edits ${JSON.stringify(t,null,"\t")}`),this._notificationService.error(y.kg("rename.failedApply","Rename failed to apply edits")),this._logService.error(t)}))}else e("returning early - no model after rename edits are provided");else e("returning early - no rename edits result")}),(t=>{e("error when providing rename edits",JSON.stringify(t,null,"\t")),this._notificationService.error(y.kg("rename.failed","Rename failed to compute edits")),this._logService.error(t)})).finally((()=>{d.dispose()}));return e("returning rename operation"),this._progressService.showWhile(v,250),v}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,i){const n="boolean"==typeof i?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:i.stats.source.k,nRenameSuggestions:i.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:i.stats.timeBeforeFirstInputFieldEdit,wantsPreview:i.wantsPreview,nRenameSuggestionsInvocations:i.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:i.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",n)}};ie=J=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ee(1,L._Y),ee(2,E.Ot),ee(3,u.nu),ee(4,N.N8),ee(5,D.rr),ee(6,b.ITextResourceConfigurationService),ee(7,v.ILanguageFeaturesService),ee(8,M.k)],ie);class ne extends h.ks{constructor(){super({id:"editor.action.rename",label:y.kg("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:x.M$.and(m.R.writable,m.R.hasRenameProvider),kbOpts:{kbExpr:m.R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(g.T),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return d.r.isUri(n)&&p.y.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(s),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),r.dz):super.runCommand(e,t)}run(e,t){const i=e.get(D.rr),n=ie.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}}(0,h.HW)(ie.ID,ie,4),(0,h.Fl)(ne);const se=h.DX.bindToContribution(ie.get);(0,h.E_)(new se({id:"acceptRenameInput",precondition:G,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:x.M$.and(m.R.focus,x.M$.not("isComposing")),primary:3}})),(0,h.E_)(new se({id:"acceptRenameInputWithPreview",precondition:x.M$.and(G,x.M$.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:x.M$.and(m.R.focus,x.M$.not("isComposing")),primary:2051}})),(0,h.E_)(new se({id:"cancelRenameInput",precondition:G,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:m.R.focus,primary:9,secondary:[1033]}})),(0,S.ug)(class extends S.L{constructor(){super({id:"focusNextRenameSuggestion",title:{...y.aS("focusNextRenameSuggestion","Focus Next Rename Suggestion")},precondition:G,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(g.T).getFocusedCodeEditor();if(!t)return;const i=ie.get(t);i&&i.focusNextRenameSuggestion()}}),(0,S.ug)(class extends S.L{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...y.aS("focusPreviousRenameSuggestion","Focus Previous Rename Suggestion")},precondition:G,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(g.T).getFocusedCodeEditor();if(!t)return;const i=ie.get(t);i&&i.focusPreviousRenameSuggestion()}}),(0,h.ke)("_executeDocumentRenameProvider",(function(e,t,i,...n){const[s]=n;(0,c.j)("string"==typeof s);const{renameProvider:r}=e.get(v.ILanguageFeaturesService);return async function(e,t,i,n){const s=new te(t,i,e),r=await s.resolveRenameLocation(o.XO.None);return r?.rejectReason?{edits:[],rejectReason:r.rejectReason}:s.provideRenameEdits(n,o.XO.None)}(r,t,i,s)})),(0,h.ke)("_executePrepareRename",(async function(e,t,i){const{renameProvider:n}=e.get(v.ILanguageFeaturesService),s=new te(t,i,n),r=await s.resolveRenameLocation(o.XO.None);if(r?.rejectReason)throw new Error(r.rejectReason);return r})),I.O.as(k.Fd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:y.kg("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},57698:function(e,t,i){"use strict";var n=i(90890),s=i(35114),o=i(52694),r=i(8494),a=i(49079),l=i(56812),c=function(e,t){return function(i,n){t(i,n,e)}};let d=class extends s.jG{static{this.ID="editor.sectionHeaderDetector"}constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(e.onDidChangeModelLanguage((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(t.onDidChange((t=>{const i=this.editor.getModel()?.getLanguageId();i&&t.affects(i)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(e.onDidChangeConfiguration((t=>{this.options&&!t.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(this.editor.onDidChangeModelContent((e=>{this.computeSectionHeaders.schedule()}))),this._register(e.onDidChangeModelTokens((e=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)}))),this.computeSectionHeaders=this._register(new n.uC((()=>{this.findSectionHeaders()}),250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;return i||n?.markers?{foldingRules:n,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}:void 0}findSectionHeaders(){if(!this.editor.hasModel()||!this.options?.findMarkSectionHeaders&&!this.options?.findRegionSectionHeaders)return;const e=this.editor.getModel();if(e.isDisposed()||e.isTooLargeForSyncing())return;const t=e.getVersionId();this.editorWorkerService.findSectionHeaders(e.uri,this.options).then((i=>{e.isDisposed()||e.getVersionId()!==t||this.updateDecorations(i)}))}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter((e=>{if(!e.shouldBeInComments)return!0;const i=t.validateRange(e.range),n=t.tokenization.getLineTokens(i.startLineNumber),s=n.findTokenIndexAtOffset(i.startColumn-1),o=n.getStandardTokenType(s);return n.getLanguageId(s)===t.getLanguageId()&&1===o})));const i=Object.values(this.currentOccurrences).map((e=>e.decorationId)),n=e.map((e=>function(e){return{range:e.range,options:a.kI.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:e.hasSeparatorLine?2:1,sectionHeaderText:e.text}})}}(e)));this.editor.changeDecorations((t=>{const s=t.deltaDecorations(i,n);this.currentOccurrences={};for(let t=0,i=s.length;t=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([c(1,r.JZ),c(2,l.IEditorWorkerService)],d),(0,o.HW)(d.ID,d,1)},19933:function(e,t,i){"use strict";var n,s=i(35114),o=i(20187),r=i(59266),a=i(47901),l=i(90890),c=i(76611),d=i(40616),h=i(38620),u=i(45271),g=i(82688),p=i(43857),f=i(69122),m=i(17239),_=i(23534),v=i(41261),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};let C=class extends s.jG{constructor(e,t,i,n,s,o){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new y(t,e,i,s,o)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];(0,v.K)(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach((e=>{(0,v.K)(e,i,n)&&r(e)})),this._register(t.onModelAdded((e=>{(0,v.K)(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(v.r)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};C=b([w(0,m.ISemanticTokensStylingService),w(1,r.IModelService),w(2,d.Gy),w(3,a.pG),w(4,g.ILanguageFeatureDebounceService),w(5,f.ILanguageFeaturesService)],C);let y=class extends s.jG{static{n=this}static{this.REQUEST_MIN_DELAY=300}static{this.REQUEST_MAX_DELAY=2e3}constructor(e,t,i,o,r){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=r.documentSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentSemanticTokens",{min:n.REQUEST_MIN_DELAY,max:n.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new l.uC((()=>this._fetchDocumentSemanticTokensNow()),n.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeAttached((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const a=()=>{(0,s.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};a(),this._register(this._provider.onDidChange((()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,s.AS)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,u.br)(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new c.Qi,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,u.aw)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const s=[],r=this._model.onDidChangeContent((e=>{s.push(e)})),a=new p.W(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,s)}else this._setDocumentSemanticTokens(null,null,null,s)}),(e=>{e&&(o.MB(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||o.dz(e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),(s.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,s){s=Math.min(s,i.length-n,e.length-t);for(let o=0;o{(s.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void r();if((0,u.yS)(t)){if(!o)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const s=o.data,r=new Uint32Array(s.length+e);let a=s.length,l=r.length;for(let e=t.edits.length-1;e>=0;e--){const c=t.edits[e];if(c.start>s.length)return i.warnInvalidEditStart(o.resultId,t.resultId,e,c.start,s.length),void this._model.tokenization.setSemanticTokens(null,!0);const d=a-(c.start+c.deleteCount);d>0&&(n._copy(s,a-d,r,l-d,d),l-=d),c.data&&(n._copy(c.data,0,r,l-c.data.length,c.data.length),l-=c.data.length),a=c.start}a>0&&n._copy(s,0,r,0,a),t={resultId:t.resultId,data:r}}}if((0,u.BB)(t)){this._currentDocumentResponse=new S(e,t.resultId,t.data);const n=(0,h.toMultilineTokens2)(t,i,this._model.getLanguageId());if(s.length>0)for(const e of s)for(const t of n)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(n,!0)}else this._model.tokenization.setSemanticTokens(null,!0);r()}else this._model.tokenization.setSemanticTokens(null,!1)}};y=n=b([w(1,m.ISemanticTokensStylingService),w(2,d.Gy),w(3,g.ILanguageFeatureDebounceService),w(4,f.ILanguageFeaturesService)],y);class S{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,_.x)(C)},58722:function(e,t,i){"use strict";var n=i(90890),s=i(35114),o=i(52694),r=i(45271),a=i(41261),l=i(38620),c=i(47901),d=i(40616),h=i(82688),u=i(43857),g=i(69122),p=i(17239),f=function(e,t){return function(i,n){t(i,n,e)}};let m=class extends s.jG{static{this.ID="editor.contrib.viewportSemanticTokens"}constructor(e,t,i,s,o,r){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=s,this._editor=e,this._provider=r.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new n.uC((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const l=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{l()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),l()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),l()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),l()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(a.r)&&(this._cancelAll(),l())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),l()}))),l()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),s=(0,n.SS)((i=>Promise.resolve((0,r.nZ)(this._provider,e,t,i)))),o=new u.W(!1);return s.then((n=>{if(this._debounceInformation.update(e,o.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:s,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(s);e.tokenization.setPartialSemanticTokens(t,(0,l.toMultilineTokens2)(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(s)),(()=>this._removeOutstandingRequest(s))),s}};m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([f(1,p.ISemanticTokensStylingService),f(2,d.Gy),f(3,c.pG),f(4,h.ILanguageFeatureDebounceService),f(5,g.ILanguageFeaturesService)],m),(0,o.HW)(m.ID,m,1)},45271:function(e,t,i){"use strict";i.d(t,{BB:function(){return u},WG:function(){return v},aw:function(){return m},br:function(){return f},nZ:function(){return w},yS:function(){return g}});var n=i(76611),s=i(20187),o=i(54244),r=i(59266),a=i(21335),l=i(24219),c=i(85124),d=i(40393),h=i(69122);function u(e){return e&&!!e.data}function g(e){return e&&Array.isArray(e.edits)}class p{constructor(e,t,i){this.provider=e,this.tokens=t,this.error=i}}function f(e,t){return e.has(t)}async function m(e,t,i,n,s){const o=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}(e,t),r=await Promise.all(o.map((async e=>{let o,r=null;try{o=await e.provideDocumentSemanticTokens(t,e===i?n:null,s)}catch(e){r=e,o=null}return o&&(u(o)||g(o))||(o=null),new p(e,o,r)})));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}class _{constructor(e,t){this.provider=e,this.tokens=t}}function v(e,t){return e.has(t)}function b(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function w(e,t,i,n){const o=b(e,t),r=await Promise.all(o.map((async e=>{let o;try{o=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,s.M_)(e),o=null}return o&&u(o)||(o=null),new _(e,o)})));for(const e of r)if(e.tokens)return e;return r.length>0?r[0]:null}a.w.registerCommand("_provideDocumentSemanticTokensLegend",(async(e,...t)=>{const[i]=t;(0,l.j)(i instanceof o.r);const n=e.get(r.IModelService).getModel(i);if(!n)return;const{documentSemanticTokensProvider:s}=e.get(h.ILanguageFeaturesService),c=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(s,n);return c?c[0].getLegend():e.get(a.d).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})),a.w.registerCommand("_provideDocumentSemanticTokens",(async(e,...t)=>{const[i]=t;(0,l.j)(i instanceof o.r);const s=e.get(r.IModelService).getModel(i);if(!s)return;const{documentSemanticTokensProvider:d}=e.get(h.ILanguageFeaturesService);if(!f(d,s))return e.get(a.d).executeCommand("_provideDocumentRangeSemanticTokens",i,s.getFullModelRange());const g=await m(d,s,null,null,n.XO.None);if(!g)return;const{provider:p,tokens:_}=g;if(!_||!u(_))return;const v=(0,c.encodeSemanticTokensDto)({id:0,type:"full",data:_.data});return _.resultId&&p.releaseDocumentSemanticTokens(_.resultId),v})),a.w.registerCommand("_provideDocumentRangeSemanticTokensLegend",(async(e,...t)=>{const[i,s]=t;(0,l.j)(i instanceof o.r);const a=e.get(r.IModelService).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:c}=e.get(h.ILanguageFeaturesService),u=b(c,a);if(0===u.length)return;if(1===u.length)return u[0].getLegend();if(!s||!d.Q.isIRange(s))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),u[0].getLegend();const g=await w(c,a,d.Q.lift(s),n.XO.None);return g?g.provider.getLegend():void 0})),a.w.registerCommand("_provideDocumentRangeSemanticTokens",(async(e,...t)=>{const[i,s]=t;(0,l.j)(i instanceof o.r),(0,l.j)(d.Q.isIRange(s));const a=e.get(r.IModelService).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:u}=e.get(h.ILanguageFeaturesService),g=await w(u,a,d.Q.lift(s),n.XO.None);return g&&g.tokens?(0,c.encodeSemanticTokensDto)({id:0,type:"full",data:g.tokens.data}):void 0}))},41261:function(e,t,i){"use strict";i.d(t,{K:function(){return s},r:function(){return n}});const n="editor.semanticHighlighting";function s(e,t,i){const s=i.getValue(n,{overrideIdentifier:e.getLanguageId(),resource:e.uri})?.enabled;return"boolean"==typeof s?s:t.getColorTheme().semanticHighlighting}},60738:function(e,t,i){"use strict";i.d(t,{n:function(){return r}});var n=i(54409),s=i(62993),o=i(40393);class r{async provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t);const s=new Map;await new Promise((t=>r._bracketsRightYield(t,0,e,n,s))),await new Promise((i=>r._bracketsLeftYield(i,0,e,n,s,t)))}return i}static{this._maxDuration=30}static{this._maxRounds=2}static _bracketsRightYield(e,t,i,s,o){const a=new Map,l=Date.now();for(;;){if(t>=r._maxRounds){e();break}if(!s){e();break}const c=i.bracketPairs.findNextBracket(s);if(!c){e();break}if(Date.now()-l>r._maxDuration){setTimeout((()=>r._bracketsRightYield(e,t+1,i,s,o)));break}if(c.bracketInfo.isOpeningBracket){const e=c.bracketInfo.bracketText,t=a.has(e)?a.get(e):0;a.set(e,t+1)}else{const e=c.bracketInfo.getOpeningBrackets()[0].bracketText;let t=a.has(e)?a.get(e):0;if(t-=1,a.set(e,Math.max(0,t)),t<0){let t=o.get(e);t||(t=new n.w,o.set(e,t)),t.push(c.range)}}s=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,a){const l=new Map,c=Date.now();for(;;){if(t>=r._maxRounds&&0===s.size){e();break}if(!n){e();break}const d=i.bracketPairs.findPrevBracket(n);if(!d){e();break}if(Date.now()-c>r._maxDuration){setTimeout((()=>r._bracketsLeftYield(e,t+1,i,n,s,a)));break}if(d.bracketInfo.isOpeningBracket){const e=d.bracketInfo.bracketText;let t=l.has(e)?l.get(e):0;if(t-=1,l.set(e,Math.max(0,t)),t<0){const t=s.get(e);if(t){const n=t.shift();0===t.size&&s.delete(e);const l=o.Q.fromPositions(d.range.getEndPosition(),n.getStartPosition()),c=o.Q.fromPositions(d.range.getStartPosition(),n.getEndPosition());a.push({range:l}),a.push({range:c}),r._addBracketLeading(i,c,a)}}}else{const e=d.bracketInfo.getOpeningBrackets()[0].bracketText,t=l.has(e)?l.get(e):0;l.set(e,t+1)}n=d.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,r=e.getLineFirstNonWhitespaceColumn(n);0!==r&&r!==t.startColumn&&(i.push({range:o.Q.fromPositions(new s.y(n,r),t.getEndPosition())}),i.push({range:o.Q.fromPositions(new s.y(n,1),t.getEndPosition())}));const a=n-1;if(a>0){const n=e.getLineFirstNonWhitespaceColumn(a);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:o.Q.fromPositions(new s.y(a,n),t.getEndPosition())}),i.push({range:o.Q.fromPositions(new s.y(a,1),t.getEndPosition())}))}}}},42452:function(e,t,i){"use strict";var n=i(97358),s=i(76611),o=i(20187),r=i(52694),a=i(62993),l=i(40393),c=i(56218),d=i(49678),h=i(60738),u=i(43920);class g{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:s,startColumn:o}=n,r=i.column-o;let a=r,c=r,d=0;for(;a>=0;a--){const e=s.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if((0,u.Lv)(e)&&(0,u.Wv)(d))break;d=e}for(a+=1;c0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new l.Q(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var p,f=i(14374),m=i(93223),_=i(21335),v=i(69122),b=i(20878),w=i(24219),C=i(54244);class y{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new y(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let S=class{static{p=this}static{this.ID="editor.contrib.smartSelectController"}static get(e){return e.getContribution(p.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await D(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(114),s.XO.None).then((e=>{if(n.EI(e)&&e.length===t.length&&this._editor.hasModel()&&n.aI(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new y(0,e))),this._selectionListener?.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{this._ignoreSelection||(this._selectionListener?.dispose(),this._state=void 0)}))}})),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const o=this._state.map((e=>c.L.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(o)}finally{this._ignoreSelection=!1}}};var k,x;S=p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(k=1,x=v.ILanguageFeaturesService,function(e,t){x(e,t,k)})],S);class L extends r.ks{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=S.get(t);i&&await i.run(this._forward)}}async function D(e,t,i,s,r){const c=e.all(t).concat(new g(s.selectSubwords));1===c.length&&c.unshift(new h.n);const d=[],u=[];for(const e of c)d.push(Promise.resolve(e.provideSelectionRanges(t,i,r)).then((e=>{if(n.EI(e)&&e.length===i.length)for(let t=0;t{if(0===e.length)return[];e.sort(((e,t)=>a.y.isBefore(e.getStartPosition(),t.getStartPosition())?1:a.y.isBefore(t.getStartPosition(),e.getStartPosition())||a.y.isBefore(e.getEndPosition(),t.getEndPosition())?-1:a.y.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let n;for(const t of e)(!n||l.Q.containsRange(t,n)&&!l.Q.equalsRange(t,n))&&(i.push(t),n=t);if(!s.selectLeadingAndTrailingWhitespace)return i;const o=[i[0]];for(let e=1;e")}}_doInsert(e,t){if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!=typeof e&&this.cancel(),this._session?((0,o.j)("string"==typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new f.O(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!a.y.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),s=Boolean(i.choice.options.find((e=>e.value===n))),o=[];for(let e=0;e{i?.dispose(),n=!1},o=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:o,disable:s}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:e}=this._session;if(!e||!this._choiceCompletions)return this._choiceCompletions?.disable(),void(this._currentChoice=void 0);this._currentChoice!==e.choice&&(this._currentChoice=e.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{(0,h.p3)(this._editor,this._choiceCompletions.provider)})))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};v=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([m(1,p.rr),m(2,d.ILanguageFeaturesService),m(3,g.fN),m(4,c.JZ)],v),(0,r.HW)(v.ID,v,4);const b=r.DX.bindToContribution(v.get);(0,r.E_)(new b({id:"jumpToNextSnippetPlaceholder",precondition:g.M$.and(v.InSnippetMode,v.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:2}})),(0,r.E_)(new b({id:"jumpToPrevSnippetPlaceholder",precondition:g.M$.and(v.InSnippetMode,v.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:1026}})),(0,r.E_)(new b({id:"leaveSnippet",precondition:v.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:l.R.textInputFocus,primary:9,secondary:[1033]}})),(0,r.E_)(new b({id:"acceptSnippet",precondition:v.InSnippetMode,handler:e=>e.finish()}))},62347:function(e,t,i){"use strict";i.d(t,{EY:function(){return o},GR:function(){return l},Or:function(){return a},fr:function(){return p},mQ:function(){return g}});class n{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t,i=0,s=this.value.charCodeAt(e);if(t=n._table[s],"number"==typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(n.isDigitCharacter(s)){t=8;do{i+=1,s=this.value.charCodeAt(e+i)}while(n.isDigitCharacter(s));return this.pos+=i,{type:t,pos:e,len:i}}if(n.isVariableCharacter(s)){t=9;do{s=this.value.charCodeAt(e+ ++i)}while(n.isVariableCharacter(s)||n.isDigitCharacter(s));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,s=this.value.charCodeAt(e+i)}while(!isNaN(s)&&void 0===n._table[s]&&!n.isDigitCharacter(s)&&!n.isVariableCharacter(s));return this.pos+=i,{type:t,pos:e,len:i}}}class s{constructor(){this._children=[]}appendChild(e){return e instanceof o&&this._children[this._children.length-1]instanceof o?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class o extends s{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new o(this.value)}}class r extends s{}class a extends r{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){const e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends s{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof o&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new l;return this.options.forEach(e.appendChild,e),e}}class c extends s{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof d&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof d){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new c;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class d extends s{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){return new d(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class h extends r{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new o(t)],!0)}clone(){const e=new h(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function u(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class g extends s{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof a&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return u([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof h&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){u(this.children,e)}}class p{constructor(){this._scanner=new n,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new g;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk((e=>(e instanceof a&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):s.push(e)),!0)));const o=(e,i)=>{const s=n.get(e.index);if(!s)return;const r=new a(e.index);r.transform=e.transform;for(const e of s){const t=e.clone();r.appendChild(t),t instanceof a&&n.has(t.index)&&!i.has(t.index)&&(i.add(t.index),o(t,i),i.delete(t.index))}t.replace(e,[r])},r=new Set;for(const e of s)o(e,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find((e=>0===e.index))||e.appendChild(new a(0)))}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new o(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new h(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new o("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new o(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new h(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new o("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new c;let i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new o(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new d(Number(n))),!0;if(this._accept(4))return e.appendChild(new d(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new d(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new d(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new d(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new o(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},93155:function(e,t,i){"use strict";i.d(t,{O:function(){return P}});var n=i(97358),s=i(35114),o=i(43920),r=i(48905),a=i(40393),l=i(56218),c=i(8494),d=i(49079),h=i(41517),u=i(1255),g=i(62347),p=i(11354),f=i(79783);function m(e,t=f.uF){return(0,p.No)(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null);var _=i(68847),v=i(59951),b=i(20419),w=i(14374);Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class C{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class y{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=(0,o.UU)(i,0,this._selection.startColumn-1);let s=n;e.snippet.walk((t=>t!==e&&(t instanceof g.EY&&(s=(0,o.UU)((0,o.uz)(t.value).pop())),!0)));const r=(0,o.Qp)(s,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${s.substr(r)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class S{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return _.P8(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=_.P8(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===_.pD(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,v.pD)(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class k{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,o.AV)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let x=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};var L,D;x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(L=2,D=c.JZ,function(e,t){D(e,t,L)})],x);class E{constructor(){this._date=new Date}static{this.dayNames=[w.kg("Sunday","Sunday"),w.kg("Monday","Monday"),w.kg("Tuesday","Tuesday"),w.kg("Wednesday","Wednesday"),w.kg("Thursday","Thursday"),w.kg("Friday","Friday"),w.kg("Saturday","Saturday")]}static{this.dayNamesShort=[w.kg("SundayShort","Sun"),w.kg("MondayShort","Mon"),w.kg("TuesdayShort","Tue"),w.kg("WednesdayShort","Wed"),w.kg("ThursdayShort","Thu"),w.kg("FridayShort","Fri"),w.kg("SaturdayShort","Sat")]}static{this.monthNames=[w.kg("January","January"),w.kg("February","February"),w.kg("March","March"),w.kg("April","April"),w.kg("May","May"),w.kg("June","June"),w.kg("July","July"),w.kg("August","August"),w.kg("September","September"),w.kg("October","October"),w.kg("November","November"),w.kg("December","December")]}static{this.monthNamesShort=[w.kg("JanuaryShort","Jan"),w.kg("FebruaryShort","Feb"),w.kg("MarchShort","Mar"),w.kg("AprilShort","Apr"),w.kg("MayShort","May"),w.kg("JuneShort","Jun"),w.kg("JulyShort","Jul"),w.kg("AugustShort","Aug"),w.kg("SeptemberShort","Sep"),w.kg("OctoberShort","Oct"),w.kg("NovemberShort","Nov"),w.kg("DecemberShort","Dec")]}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return E.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return E.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return E.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return E.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,s=Math.abs(e)-60*i;return t+n+":"+(s<10?"0"+s:s)}}}class N{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=(0,u.Q_)(this._workspaceService.getWorkspace());return(0,u.A7)(t)?void 0:"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0}_resolveWorkspaceName(e){if((0,u.jB)(e))return _.P8(e.uri.path);let t=_.P8(e.configPath.path);return t.endsWith(u.kF)&&(t=t.substr(0,t.length-u.kF.length-1)),t}_resoveWorkspacePath(e){if((0,u.jB)(e))return m(e.uri.fsPath);const t=_.P8(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?m(i):"/"}}class I{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?(0,b.b)():void 0}}var M;class T{static{this._decor={active:d.kI.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:d.kI.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:d.kI.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:d.kI.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})}}constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,n.$z)(t.placeholders,g.Or.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),o=a.Q.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),r=i.isFinalTabstop?T._decor.inactiveFinal:T._decor.inactive,l=t.addDecoration(o,r);this._placeholderDecorations.set(i,l)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),s=this._editor.getModel().getValueInRange(n),o=t.transform.resolve(s).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const o=this._placeholderDecorations.get(s),r=this._editor.getModel().getDecorationRange(o);n.push(new l.L(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(s),e.changeDecorationOptions(o,s.isFinalTabstop?T._decor.activeFinal:T._decor.active),i.add(s);for(const t of this._snippet.enclosingPlaceholders(s)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?T._decor.activeFinal:T._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?T._decor.inactiveFinal:T._decor.inactive);return n}));return t?this.move(e):i??[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof g.Or){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),s=this._editor.getModel().getDecorationRange(t);if(!s){e.delete(n.index);break}i.push(s)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!e?.choice)return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof g.GR,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(-1!==s._offset),console.assert(!s._placeholderDecorations);const o=s._snippet.placeholderInfo.last.index;for(const e of s._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(o+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of s._snippet.placeholders){const n=s._snippet.offset(e),o=s._snippet.fullLen(e),r=a.Q.fromPositions(t.getPositionAt(s._offset+n),t.getPositionAt(s._offset+n+o)),l=i.addDecoration(r,T._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=(0,n.$z)(this._snippet.placeholders,g.Or.compareByIndex)}))}}const R={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let P=M=class{static adjustWhitespace(e,t,i,n,s){const r=e.getLineContent(t.lineNumber),a=(0,o.UU)(r,0,t.column-1);let l;return n.walk((t=>{if(!(t instanceof g.EY)||t.parent instanceof g.GR)return!0;if(s&&!s.has(t))return!0;const o=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)o[0]=e.normalizeIndentation(o[0]);else{l=l??n.toString();const t=l.charCodeAt(i-1);10!==t&&13!==t||(o[0]=e.normalizeIndentation(a+o[0]))}for(let t=1;te.get(u.VR))),v=e.invokeWithinContext((e=>new S(e.get(h.L),m))),b=()=>l,w=m.getValueInRange(M.adjustSelection(m,e.getSelection(),i,0)),L=m.getValueInRange(M.adjustSelection(m,e.getSelection(),0,n)),D=m.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),R=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>a.Q.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:a,idx:l}of R){let h=M.adjustSelection(m,a,i,0),u=M.adjustSelection(m,a,0,n);w!==m.getValueInRange(h)&&(h=a),L!==m.getValueInRange(u)&&(u=a);const S=a.setStartPosition(h.startLineNumber,h.startColumn).setEndPosition(u.endLineNumber,u.endColumn),P=(new g.fr).parse(t,!0,s),A=S.getStartPosition(),O=M.adjustWhitespace(m,A,o||l>0&&D!==m.getLineFirstNonWhitespaceColumn(a.positionLineNumber),P);P.resolveVariables(new C([v,new k(b,l,R.length,"spread"===e.getOption(79)),new y(m,a,l,c),new x(m,a,d),new E,new N(_),new I])),p[l]=r.k.replace(S,P.toString()),p[l].identifier={major:l,minor:0},p[l]._isTracked=!0,f[l]=new T(e,P,O)}return{edits:p,snippets:f}}static createEditsAndSnippetsFromEdits(e,t,i,n,s,o,l){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const c=[],d=e.getModel(),p=new g.fr,f=new g.mQ,m=new C([e.invokeWithinContext((e=>new S(e.get(h.L),d))),new k((()=>s),0,e.getSelections().length,"spread"===e.getOption(79)),new y(d,e.getSelection(),0,o),new x(d,e.getSelection(),l),new E,new N(e.invokeWithinContext((e=>e.get(u.VR)))),new I]);t=t.sort(((e,t)=>a.Q.compareRangesUsingStarts(e.range,t.range)));let _=0;for(let e=0;e0){const n=t[e-1].range,s=a.Q.fromPositions(n.getEndPosition(),i.getStartPosition()),o=new g.EY(d.getValueInRange(s));f.appendChild(o),_+=o.value.length}const s=p.parseFragment(n,f);M.adjustWhitespace(d,i.getStartPosition(),!0,f,new Set(s)),f.resolveVariables(m);const o=f.toString(),l=o.slice(_);_=o.length;const h=r.k.replace(i,l);h.identifier={major:e,minor:0},h._isTracked=!0,c.push(h)}return p.ensureFinalTabstop(f,i,!0),{edits:c,snippets:[new T(e,f,"")]}}constructor(e,t,i=R,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){(0,s.AS)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"==typeof this._template?M.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):M.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let e=0;el.L.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=R){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=M.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let e=0;el.L.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(a.Q.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(a.Q.compareRangesUsingStarts);for(let s=0;s0}};P=M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,c.JZ)],P)},65450:function(e,t,i){"use strict";var n=i(52694),s=i(14374);const o=Object.freeze({View:(0,s.aS)("view","View"),Help:(0,s.aS)("help","Help"),Test:(0,s.aS)("test","Test"),File:(0,s.aS)("file","File"),Preferences:(0,s.aS)("preferences","Preferences"),Developer:(0,s.aS)({key:"developer",comment:["A developer on Code itself or someone diagnosing issues in Code"]},"Developer")});var r=i(93223),a=i(47901),l=i(97848),c=i(49678),d=i(35114),h=i(69122),u=i(84201),g=i(38945),p=i(97358),f=i(56613),m=i(19213),_=i(11797),v=i(62993),b=i(52192),w=i(10621),C=i(73055),y=i(54961);class S{constructor(e,t,i,n=null){this.startLineNumbers=e,this.endLineNumbers=t,this.lastLineRelativePosition=i,this.showEndForLine=n}equals(e){return!!e&&this.lastLineRelativePosition===e.lastLineRelativePosition&&this.showEndForLine===e.showEndForLine&&(0,p.aI)(this.startLineNumbers,e.startLineNumbers)&&(0,p.aI)(this.endLineNumbers,e.endLineNumbers)}static get Empty(){return new S([],[],0)}}const k=(0,g.H)("stickyScrollViewLayer",{createHTML:e=>e}),x="data-sticky-line-index",L="data-sticky-is-line",D="data-sticky-is-folding-icon";class E extends d.jG{constructor(e){super(),this._editor=e,this._foldingIconStore=new d.Cm,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof _.t),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(116).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&t(),e.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{this._updateWidgetWidth()}))),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find((t=>t.lineNumber===e))}getCurrentLines(){return this._lineNumbers}setState(e,t,i){if(void 0===i&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const n=this._isWidgetHeightZero(e),s=n?void 0:e,o=n?0:this._findLineToRebuildWidgetFrom(e,i);this._renderRootNode(s,t,o),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];return 0===t}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(void 0!==t)return t;const i=this._previousState,n=e.startLineNumbers.findIndex((e=>!i.startLineNumbers.includes(e)));return-1===n?0:n}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",this._editor.getScrollWidth()-e.verticalScrollbarWidth+"px"),this._rootDomNode.style.width=e.width-e.verticalScrollbarWidth+"px"}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;te.scrollWidth)))+n.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){"mouseover"===this._editor.getOption(111)&&(this._foldingIconStore.add(u.ko(this._lineNumbersDomNode,u.Bx.MOUSE_ENTER,(()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(u.ko(this._lineNumbersDomNode,u.Bx.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const s=this._editor._getViewModel();if(!s)return;const o=s.coordinatesConverter.convertModelPositionToViewPosition(new v.y(t,1)).lineNumber,r=s.getViewLineRenderingData(o),a=this._editor.getOption(68);let l;try{l=w.d.filter(r.inlineDecorations,o,r.minColumn,r.maxColumn)}catch(e){l=[]}const c=new C.zL(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,l,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),d=new b.fe(2e3),h=(0,C.UW)(c,d);let u;u=k?k.createHTML(d.build()):d.build();const g=document.createElement("span");g.setAttribute(x,String(e)),g.setAttribute(L,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=u;const p=document.createElement("span");p.setAttribute(x,String(e)),p.setAttribute("data-sticky-is-line-number",""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const f=n.contentLeft;p.style.width=`${f}px`;const m=document.createElement("span");1===a.renderType||3===a.renderType&&t%10==0?m.innerText=t.toString():2===a.renderType&&(m.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),m.className="sticky-line-number-inner",m.style.lineHeight=`${this._lineHeight}px`,m.style.width=`${n.lineNumbersWidth}px`,m.style.paddingLeft=`${n.lineNumbersLeft}px`,p.appendChild(m);const _=this._renderFoldingIconForLine(i,t);_&&p.appendChild(_.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(m),p.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const y=new N(e,t,g,p,_,h.characterMapping,g.scrollWidth);return this._updateTopAndZIndexOfStickyLine(y)}_updateTopAndZIndexOfStickyLine(e){const t=e.index,i=e.lineDomNode,n=e.lineNumberDomNode,s=t===this._lineNumbers.length-1;i.style.zIndex=s?"0":"1",n.style.zIndex=s?"0":"1";const o=`${t*this._lineHeight+this._lastLineRelativePosition+(e.foldingIcon?.isCollapsed?1:0)}px`,r=t*this._lineHeight+"px";return i.style.top=s?o:r,n.style.top=s?o:r,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(111);if(!e||"never"===i)return;const n=e.regions,s=n.findRange(t),o=n.getStartLineNumber(s);if(t!==o)return;const r=n.isCollapsed(s),a=new I(r,o,n.getEndLineNumber(s),this._lineHeight);return a.setVisible(!!this._isOnGlyphMargin||r||"always"===i),a.domNode.setAttribute(D,""),a}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=(0,m.rk)(t.characterMapping,e,0);return new v.y(t.lineNumber,i)}getLineNumberFromChildDomNode(e){return this._getRenderedStickyLineFromChildDomNode(e)?.lineNumber??null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,x);return t?parseInt(t,10):null}isInStickyLine(e){return void 0!==this._getAttributeValue(e,L)}isInFoldingIconDomNode(e){return void 0!==this._getAttributeValue(e,D)}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(null!==i)return i;e=e.parentElement}}}class N{constructor(e,t,i,n,s,o,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=s,this.characterMapping=o,this.scrollWidth=r}}class I{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=f.L.asClassName(e?y.k0:y.E0)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}var M=i(76611),T=i(90890),R=i(80670),P=i(8494),A=i(51099),O=i(69904),F=i(45692),B=i(59691),W=i(20187);class H{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class V{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class z{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var U,j,q=i(26182),K=i(63619),$=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},G=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.OUTLINE_MODEL="outlineModel",e.FOLDING_PROVIDER_MODEL="foldingProviderModel",e.INDENTATION_MODEL="indentationModel"}(U||(U={})),function(e){e[e.VALID=0]="VALID",e[e.INVALID=1]="INVALID",e[e.CANCELED=2]="CANCELED"}(j||(j={}));let Q=class extends d.jG{constructor(e,t,i,n){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new T.ve(300)),this._updateOperation=this._register(new d.Cm),this._editor.getOption(116).defaultModel){case U.OUTLINE_MODEL:this._modelProviders.push(new Z(this._editor,n));case U.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new ee(this._editor,t,n));case U.INDENTATION_MODEL:this._modelProviders.push(new J(this._editor,i))}}dispose(){this._modelProviders.forEach((e=>e.dispose())),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger((async()=>{for(const t of this._modelProviders){const{statusPromise:i,modelPromise:n}=t.computeStickyModel(e);this._modelPromise=n;const s=await i;if(this._modelPromise!==n)return null;switch(s){case j.CANCELED:return this._updateOperation.clear(),null;case j.VALID:return t.stickyModel}}return null})).catch((e=>((0,W.dz)(e),null)))}};Q=$([G(2,K._Y),G(3,h.ILanguageFeaturesService)],Q);class Y extends d.jG{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,j.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=(0,T.SS)((e=>this.createModelFromProvider(e)));return{statusPromise:t.then((t=>this.isModelValid(t)?e.isCancellationRequested?j.CANCELED:(this._stickyModel=this.createStickyModel(e,t),j.VALID):this._invalid())).then(void 0,(e=>((0,W.dz)(e),j.CANCELED))),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let Z=class extends Y{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return A.i9.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){const{stickyOutlineElement:i,providerID:n}=this._stickyModelFromOutlineModel(t,this._stickyModel?.outlineProviderId),s=this._editor.getModel();return new z(s.uri,s.getVersionId(),i,n)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(q.f.first(e.children.values())instanceof A.e0){const n=q.f.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,s="",o=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>o&&(n=i,o=e,s=i.id)}t=s,i=n.children}}else i=e.children;const n=[],s=Array.from(i.values()).sort(((e,t)=>{const i=new H(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new H(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const e of s)n.push(this._stickyModelFromOutlineElement(e,e.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new V(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const n of e.children.values())if(n.symbol.selectionRange.startLineNumber!==n.symbol.range.endLineNumber)if(n.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(n,n.symbol.selectionRange.startLineNumber));else for(const e of n.children.values())i.push(this._stickyModelFromOutlineElement(e,n.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new H(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new V(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof A.LC?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};Z=$([G(1,h.ILanguageFeaturesService)],Z);class X extends Y{constructor(e){super(e),this._foldingLimitReporter=new O.BP(e)}createStickyModel(e,t){const i=this._fromFoldingRegions(t),n=this._editor.getModel();return new z(n.uri,n.getVersionId(),i,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new V(void 0,[],void 0);for(let s=0;s0&&(this.provider=this._register(new F.M(e.getModel(),n,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return void 0!==this.provider}async createModelFromProvider(e){return this.provider?.compute(e)??null}};ee=$([G(2,h.ILanguageFeaturesService)],ee);var te=function(e,t){return function(i,n){t(i,n,e)}};class ie{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let ne=class extends d.jG{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new R.vl),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new d.Cm),this._updateSoon=this._register(new T.uC((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(116)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(116).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>this.update()))),this._sessionStore.add((0,d.s)((()=>{this._stickyModelProvider?.dispose(),this._stickyModelProvider=null}))),this.updateStickyModelProvider(),this.update())}getVersionId(){return this._model?.version}updateStickyModelProvider(){this._stickyModelProvider?.dispose(),this._stickyModelProvider=null;const e=this._editor;e.hasModel()&&(this._stickyModelProvider=new Q(e,(()=>this._updateSoon.schedule()),this._languageConfigurationService,this._languageFeaturesService))}async update(){this._cts?.dispose(!0),this._cts=new M.Qi,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization())return void(this._model=null);const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,s){if(0===t.children.length)return;let o=s;const r=[];for(let e=0;ee-t))),l=this.updateIndex((0,p.El)(r,e.startLineNumber+n,((e,t)=>e-t)));for(let r=a;r<=l;r++){const a=t.children[r];if(!a)return;if(a.range){const t=a.range.startLineNumber,s=a.range.endLineNumber;e.startLineNumber<=s+1&&t-1<=e.endLineNumber&&t!==o&&(o=t,i.push(new ie(t,s-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n,s)}}getCandidateStickyLinesIntersecting(e){if(!this._model?.element)return[];let t=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,t,0,-1);const i=this._editor._getViewModel()?.getHiddenAreas();if(i)for(const e of i)t=t.filter((t=>!(t.startLineNumber>=e.startLineNumber&&t.endLineNumber<=e.endLineNumber+1)));return t}};ne=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([te(1,h.ILanguageFeaturesService),te(2,P.JZ)],ne);var se,oe=i(14280),re=i(48843),ae=i(40393),le=i(3638),ce=i(59460),de=i(82688),he=i(34287),ue=i(93795),ge=function(e,t){return function(i,n){t(i,n,e)}};let pe=class extends d.jG{static{se=this}static{this.ID="store.contrib.stickyScrollController"}constructor(e,t,i,n,s,o,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new d.Cm,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._stickyScrollWidget=new E(this._editor),this._stickyLineCandidateProvider=new ne(this._editor,i,s),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=S.Empty,this._onDidResize(),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{this._readConfigurationChange(e)}))),this._register(u.ko(a,u.Bx.CONTEXT_MENU,(async e=>{this._onContextMenu(u.zk(a),e)}))),this._stickyScrollFocusedContextKey=c.R.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=c.R.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(u.w5(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(u.ko(a,u.Bx.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(se.ID)}_disposeFocusStickyScrollStore(){this._stickyScrollFocusedContextKey.set(!1),this._focusDisposableStore?.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();!0!==this._stickyScrollFocusedContextKey.get()&&(this._focused=!0,this._focusDisposableStore=new d.Cm,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,(()=>this._editor.revealPosition(e)))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,(()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0)))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(ae.Q.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new d.Cm),t=this._register(new re.gi(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new ae.Q(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(u.b2(n,u.Bx.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new v.y(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}if(this._stickyScrollWidget.isInFoldingIconDomNode(e.target)){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);return void this._toggleFoldingRegionForLine(t)}if(!this._stickyScrollWidget.isInStickyLine(e.target))return;let t=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!t){const i=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===i)return;t=new v.y(i,1)}this._revealPosition(t)}))),this._register(u.b2(n,u.Bx.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}void 0!==this._showEndForLine&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._register(u.ko(n,u.Bx.MOUSE_LEAVE,(e=>{void 0!==this._showEndForLine&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const s=i(t);if(!s||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:o,textElement:r}=s;if(o.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=o,e.clear();const a=new M.Qi;let l;e.add((0,d.s)((()=>a.dispose(!0)))),(0,le.hE)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new v.y(o.startLineNumber,o.startColumn+1),!1,a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add((0,d.s)((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add((0,d.s)((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((async e=>{if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&this._editor.hasModel()&&this._stickyRangeProjectedOnEditor&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(ce.U,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e,t){const i=new he.P(e,t);this._contextMenuService.showContextMenu({menuId:r.D8.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||null===e)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),i=t?.foldingIcon;if(!i)return;(0,ue.bC)(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(116);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=void 0,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=void 0,this._renderStickyScroll()}))),this._enabled=!0),2===this._editor.getOption(68).renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=void 0,this._renderStickyScroll(0)})))}_readConfigurationChange(e){(e.hasChanged(116)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(111)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const e=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(.25*e)}async _renderStickyScroll(e){const t=this._editor.getModel();if(!t||t.isTooLargeForTokenization())return void this._resetState();const i=this._updateAndGetMinRebuildFromLine(e),n=this._stickyLineCandidateProvider.getVersionId();if(void 0===n||n===t.getVersionId())if(this._focused)if(-1===this._focusedStickyElementIndex)await this._updateState(i),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const e=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];await this._updateState(i),0===this._stickyScrollWidget.lineNumberCount?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(e)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}else await this._updateState(i)}_updateAndGetMinRebuildFromLine(e){if(void 0!==e){const t=void 0!==this._minRebuildFromLine?this._minRebuildFromLine:1/0;this._minRebuildFromLine=Math.min(e,t)}return this._minRebuildFromLine}async _updateState(e){this._minRebuildFromLine=void 0,this._foldingModel=await(O.WR.get(this._editor)?.getFoldingModel())??void 0,this._widgetState=this.findScrollWidgetState();const t=this._widgetState.startLineNumbers.length>0;this._stickyScrollVisibleContextKey.set(t),this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}async _resetState(){this._minRebuildFromLine=void 0,this._foldingModel=void 0,this._widgetState=S.Empty,this._stickyScrollVisibleContextKey.set(!1),this._stickyScrollWidget.setState(void 0,void 0)}findScrollWidgetState(){const e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(116).maxLineCount),i=this._editor.getScrollTop();let n=0;const s=[],o=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new H(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,c=r.nestingDepth;if(l-a>0){const r=(c-1)*e,d=c*e,h=this._editor.getBottomForLineNumber(a)-i,u=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>u&&r<=g){s.push(a),o.push(l+1),n=g-d;break}if(d>h&&d<=g&&(s.push(a),o.push(l+1)),s.length===t)break}}}return this._endLineNumbers=o,new S(s,o,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};pe=se=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ge(1,oe.Z),ge(2,h.ILanguageFeaturesService),ge(3,K._Y),ge(4,P.JZ),ge(5,de.ILanguageFeatureDebounceService),ge(6,l.fN)],pe);class fe extends r.L{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...(0,s.aS)("toggleEditorStickyScroll","Toggle Editor Sticky Scroll"),mnemonicTitle:(0,s.kg)({key:"mitoggleStickyScroll",comment:["&& denotes a mnemonic"]},"&&Toggle Editor Sticky Scroll")},metadata:{description:(0,s.aS)("toggleEditorStickyScroll.description","Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:o.View,toggled:{condition:l.M$.equals("config.editor.stickyScroll.enabled",!0),title:(0,s.kg)("stickyScroll","Sticky Scroll"),mnemonicTitle:(0,s.kg)({key:"miStickyScroll",comment:["&& denotes a mnemonic"]},"&&Sticky Scroll")},menu:[{id:r.D8.CommandPalette},{id:r.D8.MenubarAppearanceMenu,group:"4_editor",order:3},{id:r.D8.StickyScrollContext}]})}async run(e){const t=e.get(a.pG),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}}const me=100;class _e extends n.qO{constructor(){super({id:"editor.action.focusStickyScroll",title:{...(0,s.aS)("focusStickyScroll","Focus on the editor sticky scroll"),mnemonicTitle:(0,s.kg)({key:"mifocusStickyScroll",comment:["&& denotes a mnemonic"]},"&&Focus Sticky Scroll")},precondition:l.M$.and(l.M$.has("config.editor.stickyScroll.enabled"),c.R.stickyScrollVisible),menu:[{id:r.D8.CommandPalette}]})}runEditorCommand(e,t){pe.get(t)?.focus()}}class ve extends n.qO{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:(0,s.aS)("selectNextStickyScrollLine.title","Select the next editor sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:me,primary:18}})}runEditorCommand(e,t){pe.get(t)?.focusNext()}}class be extends n.qO{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:(0,s.aS)("selectPreviousStickyScrollLine.title","Select the previous sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:me,primary:16}})}runEditorCommand(e,t){pe.get(t)?.focusPrevious()}}class we extends n.qO{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:(0,s.aS)("goToFocusedStickyScrollLine.title","Go to the focused sticky scroll line"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:me,primary:3}})}runEditorCommand(e,t){pe.get(t)?.goToFocused()}}class Ce extends n.qO{constructor(){super({id:"editor.action.selectEditor",title:(0,s.aS)("selectEditor.title","Select Editor"),precondition:c.R.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:me,primary:9}})}runEditorCommand(e,t){pe.get(t)?.selectEditor()}}(0,n.HW)(pe.ID,pe,1),(0,r.ug)(fe),(0,r.ug)(_e),(0,r.ug)(be),(0,r.ug)(ve),(0,r.ug)(we),(0,r.ug)(Ce)},329:function(e,t,i){"use strict";i.d(t,{C:function(){return a},O:function(){return r}});var n=i(97358),s=i(17793),o=i(43920);class r{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class a{constructor(e,t,i,n,o,r,l=s.Nd.default,c=void 0){this.clipboardText=c,this._snippetCompareFn=a._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=l,"top"===r?this._snippetCompareFn=a._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=a._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let r="",a="";const l=1===this._refilterKind?this._items:this._filteredItems,c=[],d=!this._options.filterGraceful||l.length>2e3?s.dt:s.uU;for(let n=0;n=p)h.score=s.ne.Default;else if("string"==typeof h.completion.filterText){const t=d(r,a,e,h.completion.filterText,h.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===(0,o.W1)(h.completion.filterText,h.textLabel)?h.score=t:(h.score=(0,s.Jo)(r,a,e,h.textLabel,h.labelLow,0),h.score[0]=t[0])}else{const t=d(r,a,e,h.textLabel,h.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;h.score=t}}h.idx=n,h.distance=this._wordDistance.distance(h.position,h.completion),c.push(h),e.push(h.textLabel.length)}this._filteredItems=c.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,n.SO)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return a._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return a._compareCompletionItems(e,t)}}},9408:function(e,t,i){"use strict";i.d(t,{aR:function(){return L},dt:function(){return w},f3:function(){return k},l1:function(){return y},ob:function(){return b},p3:function(){return N},r3:function(){return I}});var n=i(76611),s=i(20187),o=i(17793),r=i(35114),a=i(43857),l=i(24219),c=i(54244),d=i(62993),h=i(40393),u=i(20878),g=i(62347),p=i(14374),f=i(93223),m=i(21335),_=i(97848),v=i(69122);const b={Visible:i(87438).dg,HasFocusedSuggestion:new _.N1("suggestWidgetHasFocusedSuggestion",!1,(0,p.kg)("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new _.N1("suggestWidgetDetailsVisible",!1,(0,p.kg)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new _.N1("suggestWidgetMultipleSuggestions",!1,(0,p.kg)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new _.N1("suggestionMakesTextEdit",!0,(0,p.kg)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new _.N1("acceptSuggestionOnEnter",!0,(0,p.kg)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new _.N1("suggestionHasInsertAndReplaceRange",!1,(0,p.kg)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new _.N1("suggestionInsertMode",void 0,{type:"string",description:(0,p.kg)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new _.N1("suggestionCanResolve",!1,(0,p.kg)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new f.D8("suggestWidgetStatusBar");class C{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=o.ne.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label?.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,h.Q.isIRange(t.range)?(this.editStart=new d.y(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new d.y(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new d.y(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||h.Q.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new d.y(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new d.y(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new d.y(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||h.Q.spansMultipleLines(t.range.insert)||h.Q.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new a.W(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed()}),(e=>{(0,s.MB)(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})).finally((()=>{t.dispose()}))}return this._resolveCache}}class y{static{this.default=new y}constructor(e=2,t=new Set,i=new Set,n=new Map,s=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=s}}let S;function k(){return S}class x{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function L(e,t,i,o=y.default,l={triggerKind:0},c=n.XO.None){const d=new a.W;i=i.clone();const u=t.getWordAtPosition(i),p=u?new h.Q(i.lineNumber,u.startColumn,i.lineNumber,u.endColumn):h.Q.fromPositions(i),f={replace:p,insert:p.setEndPosition(i.lineNumber,i.column)},m=[],_=new r.Cm,v=[];let b=!1;const w=(e,t,n)=>{let s=!1;if(!t)return s;for(const n of t.suggestions)if(!o.kindFilter.has(n.kind)){if(!o.showDeprecated&&n?.tags?.includes(1))continue;n.range||(n.range=f),n.sortText||(n.sortText="string"==typeof n.label?n.label:n.label.label),!b&&n.insertTextRules&&4&n.insertTextRules&&(b=g.fr.guessNeedsClipboard(n.insertText)),m.push(new C(i,n,t,e)),s=!0}return(0,r.Xm)(t)&&_.add(t),v.push({providerName:e._debugDisplayName??"unknown_provider",elapsedProvider:t.duration??-1,elapsedOverall:n.elapsed()}),s},k=(async()=>{if(!S||o.kindFilter.has(27))return;const e=o.providerItemsToReuse.get(S);if(e)return void e.forEach((e=>m.push(e)));if(o.providerFilter.size>0&&!o.providerFilter.has(S))return;const n=new a.W,s=await S.provideCompletionItems(t,i,l,c);w(S,s,n)})();for(const n of e.orderedGroups(t)){let e=!1;if(await Promise.all(n.map((async n=>{if(o.providerItemsToReuse.has(n)){const t=o.providerItemsToReuse.get(n);return t.forEach((e=>m.push(e))),void(e=e||t.length>0)}if(!(o.providerFilter.size>0)||o.providerFilter.has(n))try{const s=new a.W,o=await n.provideCompletionItems(t,i,l,c);e=w(n,o,s)||e}catch(e){(0,s.M_)(e)}}))),e||c.isCancellationRequested)break}return await k,c.isCancellationRequested?(_.dispose(),Promise.reject(new s.AL)):new x(m.sort((L=o.snippetSortOrder,E.get(L))),b,{entries:v,elapsed:d.elapsed()},_);var L}function D(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.textLabelt.textLabel?1:e.completion.kind-t.completion.kind}const E=new Map;function N(e,t){e.getContribution("editor.contrib.suggestController")?.triggerSuggest((new Set).add(t),void 0,!0)}E.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return D(e,t)})),E.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return D(e,t)})),E.set(1,D),m.w.registerCommand("_executeCompletionItemProvider",(async(e,...t)=>{const[i,s,o,r]=t;(0,l.j)(c.r.isUri(i)),(0,l.j)(d.y.isIPosition(s)),(0,l.j)("string"==typeof o||!o),(0,l.j)("number"==typeof r||!r);const{completionProvider:a}=e.get(v.ILanguageFeaturesService),h=await e.get(u.ITextModelService).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=h.object.textEditorModel.validatePosition(s),l=await L(a,h.object.textEditorModel,i,void 0,{triggerCharacter:o??void 0,triggerKind:o?1:0});for(const i of l.items)t.length<(r??0)&&t.push(i.resolve(n.XO.None)),e.incomplete=e.incomplete||i.container.incomplete,e.suggestions.push(i.completion);try{return await Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{h.dispose()}}));class I{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}},6503:function(e,t,i){"use strict";i.d(t,{D:function(){return Fe}});var n,s=i(15075),o=i(97358),r=i(76611),a=i(20187),l=i(80670),c=i(99559),d=i(35114),h=i(79783),u=i(43857),g=i(24219),p=i(61554),f=i(52694),m=i(48905),_=i(62993),v=i(40393),b=i(49678),w=i(83012),C=i(62347),y=i(49195),S=i(97848);let k=class{static{n=this}static{this.AtEnd=new S.N1("atEndOfWord",!1)}constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=n.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(124)&&this._update())),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(124);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};var x,L;k=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(x=1,L=S.fN,function(e,t){L(e,t,x)})],k);var D,E=i(14374),N=i(21335),I=i(63619),M=i(76925),T=i(9408);let R=class{static{D=this}static{this.OtherSuggestions=new S.N1("hasOtherSuggestions",!1)}constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=D.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){0!==e.items.length&&D._moveIndex(!0,e,t)!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let s=t.items.length;s>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i)&&t.items[n].completion.additionalTextEdits;s--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=D._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};R=D=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,S.fN)],R);var P=i(82282);class A{constructor(e,t,i,n){this._disposables=new d.Cm,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((s=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!(0,o.EI)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new P.y;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var O=i(82919);class F{static{this._maxSelectionLength=51200}constructor(e,t){this._disposables=new d.Cm,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eF._maxSelectionLength)return;this._lastOvertyped[e]={value:s.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&ee instanceof K.Xe?i.createInstance(q.rr,e,{useComma:!0}):void 0;this._leftActions=new j.E(this.element,{actionViewItemProvider:o}),this._rightActions=new j.E(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,s]of e.getActions())"left"===n?t.push(...s):i.push(...s);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};G=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([$(2,I._Y),$(3,K.ez),$(4,S.fN)],G),i(83172);var Q=i(87332),Y=i(4195),Z=i(39679),X=i(40616),J=i(98435),ee=i(5390),te=i(93231),ie=i(56613),ne=i(85584),se=i(69498);function oe(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let re=class{constructor(e,t){this._editor=e,this._onDidClose=new l.vl,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new l.vl,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new d.Cm,this._renderDisposeable=new d.Cm,this._borderWidth=1,this._size=new B.fg(330,0),this.domNode=B.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(se.T,{editor:e}),this._body=B.$(".body"),this._scrollbar=new ee.MU(this._body,{alwaysConsumeMouseWheel:!0}),B.BC(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=B.BC(this._body,B.$(".header")),this._close=B.BC(this._header,B.$("span"+ie.L.asCSSSelector(te.W.close))),this._close.title=E.kg("details.close","Close"),this._type=B.BC(this._header,B.$("p.type")),this._docs=B.BC(this._body,B.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(120)||t.fontSize,s=e.get(121)||t.lineHeight,o=t.fontWeight,r=`${n}px`,a=`${s}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+s/n,this.domNode.style.fontWeight=o,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(121)||this._editor.getOption(50).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=E.kg("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){this._renderDisposeable.clear();let{detail:i,documentation:n}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${e.word??"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${e.completion.commitCharacters?.join("")}\n`,n=(new ne.Bc).appendCodeblock("empty",t),i=`Provider: ${e.provider._debugDisplayName}`}if(t||oe(e)){if(this.domNode.classList.remove("no-docs","no-type"),i){const e=i.length>1e5?`${i.substr(0,1e5)}…`:i;this._type.textContent=e,this._type.title=e,B.WU(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else B.w_(this._type),this._type.title="",B.jD(this._type),this.domNode.classList.add("no-type");if(B.w_(this._docs),"string"==typeof n)this._docs.classList.remove("markdown-docs"),this._docs.textContent=n;else if(n){this._docs.classList.add("markdown-docs"),B.w_(this._docs);const e=this._markdownRenderer.render(n);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){const i=new B.fg(e,t);B.fg.equals(i,this._size)||(this._size=i,B.Ej(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};re=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,I._Y)],re);class ae{constructor(e,t){let i,n;this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new d.Cm,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new J.v,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let s=0,o=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(o=n.width-e.dimension.width,t=!0),e.north&&(s=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+s,left:i.left+o})}e.done&&(i=void 0,n=void 0,s=0,o=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{this._anchorBox&&this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){const i=e.getBoundingClientRect();this._anchorBox=i,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,t)}_placeAtAnchor(e,t,i){const n=B.tG(this.getDomNode().ownerDocument.body),s=this.widget.getLayoutInfo(),o=new B.fg(220,2*s.lineHeight),r=e.top,a=function(){const i=n.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),a=-s.borderWidth+e.left+e.width,l=new B.fg(i,n.height-e.top-s.borderHeight-s.verticalPadding),c=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:o.with(Math.min(i,o.width))}}(),l=function(){const i=e.left-s.borderWidth-s.horizontalPadding,a=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),l=new B.fg(i,n.height-e.top-s.borderHeight-s.verticalPadding),c=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:r,left:a,fit:i-t.width,maxSizeTop:l,maxSizeBottom:c,minSize:o.with(Math.min(i,o.width))}}(),c=function(){const i=e.left,r=-s.borderWidth+e.top+e.height,a=new B.fg(e.width-s.borderHeight,n.height-e.top-e.height-s.verticalPadding);return{top:r,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:o.with(a.width)}}(),d=[a,l,c],h=d.find((e=>e.fit>=0))??d.sort(((e,t)=>t.fit-e.fit))[0],u=e.top+e.height-s.borderHeight;let g,p=t.height;const f=Math.max(h.maxSizeTop.height,h.maxSizeBottom.height);let m;p>f&&(p=f),i?p<=h.maxSizeTop.height?(g=!0,m=h.maxSizeTop):(g=!1,m=h.maxSizeBottom):p<=h.maxSizeBottom.height?(g=!1,m=h.maxSizeBottom):(g=!0,m=h.maxSizeTop);let{top:_,left:v}=h;!g&&p>e.height&&(_=u-p);const b=this._editor.getDomNode();if(b){const e=b.getBoundingClientRect();_-=e.top,v-=e.left}this._applyTopLeft({left:v,top:_}),this._resizable.enableSashes(!g,h===a,g,h!==a),this._resizable.minSize=h.minSize,this._resizable.maxSize=m,this._resizable.layout(p,Math.min(m.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var le=i(38403),ce=i(17793),de=i(54244),he=i(35720),ue=i(32352),ge=i(59266),pe=i(41750),fe=i(65127),me=function(e,t){return function(i,n){t(i,n,e)}};function _e(e){return`suggest-aria-id:${e}`}const ve=(0,i(51310).pU)("suggest-more-info",te.W.chevronRight,E.kg("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),be=new class e{static{this._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/}static{this._regexStrict=new RegExp(`^${e._regexRelaxed.source}$`,"i")}extract(t,i){if(t.textLabel.match(e._regexStrict))return i[0]=t.textLabel,!0;if(t.completion.detail&&t.completion.detail.match(e._regexStrict))return i[0]=t.completion.detail,!0;if(t.completion.documentation){const n="string"==typeof t.completion.documentation?t.completion.documentation:t.completion.documentation.value,s=e._regexRelaxed.exec(n);if(s&&(0===s.index||s.index+s[0].length===n.length))return i[0]=s[0],!0}return!1}};let we=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._languageService=i,this._themeService=n,this._onDidToggleDetails=new l.vl,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=new d.Cm,i=e;i.classList.add("show-file-icons");const n=(0,B.BC)(e,(0,B.$)(".icon")),s=(0,B.BC)(n,(0,B.$)("span.colorspan")),o=(0,B.BC)(e,(0,B.$)(".contents")),r=(0,B.BC)(o,(0,B.$)(".main")),a=(0,B.BC)(r,(0,B.$)(".icon-label.codicon")),l=(0,B.BC)(r,(0,B.$)("span.left")),c=(0,B.BC)(r,(0,B.$)("span.right")),h=new le.s(l,{supportHighlights:!0,supportIcons:!0});t.add(h);const u=(0,B.BC)(l,(0,B.$)("span.signature-label")),g=(0,B.BC)(l,(0,B.$)("span.qualifier-label")),p=(0,B.BC)(c,(0,B.$)("span.details-label")),f=(0,B.BC)(c,(0,B.$)("span.readMore"+ie.L.asCSSSelector(ve)));return f.title=E.kg("readMore","Read More"),{root:i,left:l,right:c,icon:n,colorspan:s,iconLabel:h,iconContainer:a,parametersLabel:u,qualifierLabel:g,detailsLabel:p,readMore:f,disposables:t,configureFont:()=>{const e=this._editor.getOptions(),t=e.get(50),s=t.getMassagedFontFamily(),o=t.fontFeatureSettings,a=e.get(120)||t.fontSize,l=e.get(121)||t.lineHeight,c=t.fontWeight,d=`${a}px`,h=`${l}px`,u=`${t.letterSpacing}px`;i.style.fontSize=d,i.style.fontWeight=c,i.style.letterSpacing=u,r.style.fontFamily=s,r.style.fontFeatureSettings=o,r.style.lineHeight=h,n.style.height=h,n.style.width=h,f.style.height=h,f.style.width=h}}}renderElement(e,t,i){i.configureFont();const{completion:n}=e;i.root.id=_e(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:(0,ce.WJ)(e.score)},o=[];if(19===n.kind&&be.extract(e,o))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=o[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=(0,ue.getIconClasses)(this._modelService,this._languageService,de.r.from({scheme:"fake",path:e.textLabel}),fe.p.FILE),o=(0,ue.getIconClasses)(this._modelService,this._languageService,de.r.from({scheme:"fake",path:n.detail}),fe.p.FILE);s.extraClasses=t.length>o.length?t:o}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=[(0,ue.getIconClasses)(this._modelService,this._languageService,de.r.from({scheme:"fake",path:e.textLabel}),fe.p.FOLDER),(0,ue.getIconClasses)(this._modelService,this._languageService,de.r.from({scheme:"fake",path:n.detail}),fe.p.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...ie.L.asClassNameArray(he.HC.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=Ce(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=Ce(n.label.detail||""),i.detailsLabel.textContent=Ce(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(119).showInlineDetails?(0,B.WU)(i.detailsLabel):(0,B.jD)(i.detailsLabel),oe(e)?(i.right.classList.add("can-expand-details"),(0,B.WU)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,B.jD)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Ce(e){return e.replace(/\r\n|\r|\n/g,"")}we=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([me(1,ge.IModelService),me(2,pe.L),me(3,X.Gy)],we);var ye,Se=i(52010),ke=function(e,t){return function(i,n){t(i,n,e)}};(0,Y.x1A)("editorSuggestWidget.background",Y.CgL,E.kg("editorSuggestWidgetBackground","Background color of the suggest widget.")),(0,Y.x1A)("editorSuggestWidget.border",Y.sIe,E.kg("editorSuggestWidgetBorder","Border color of the suggest widget."));const xe=(0,Y.x1A)("editorSuggestWidget.foreground",Y.By2,E.kg("editorSuggestWidgetForeground","Foreground color of the suggest widget."));(0,Y.x1A)("editorSuggestWidget.selectedForeground",Y.nH,E.kg("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),(0,Y.x1A)("editorSuggestWidget.selectedIconForeground",Y.c7i,E.kg("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget."));const Le=(0,Y.x1A)("editorSuggestWidget.selectedBackground",Y.AlL,E.kg("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget."));(0,Y.x1A)("editorSuggestWidget.highlightForeground",Y.QI5,E.kg("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),(0,Y.x1A)("editorSuggestWidget.focusHighlightForeground",Y.eMz,E.kg("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused.")),(0,Y.x1A)("editorSuggestWidgetStatus.foreground",(0,Y.JO0)(xe,.5),E.kg("editorSuggestWidgetStatusForeground","Foreground color of the suggest widget status."));class De{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof U.t}`}restore(){const e=this._service.get(this._key,0)??"";try{const t=JSON.parse(e);if(B.fg.is(t))return B.fg.lift(t)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Ee=class{static{ye=this}static{this.LOADING_MESSAGE=E.kg("suggestWidget.loading","Loading...")}static{this.NO_SUGGESTIONS_MESSAGE=E.kg("suggestWidget.noSuggestions","No suggestions.")}constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new d.HE,this._pendingShowDetails=new d.HE,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new H.pc,this._disposables=new d.Cm,this._onDidSelect=new l.fV,this._onDidFocus=new l.fV,this._onDidHide=new l.vl,this._onDidShow=new l.vl,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new l.vl,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new J.v,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Ne(this,e),this._persistedSize=new De(t,e);class o{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new o(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:t}=this.getLayoutInfo(),i=Math.round(e/2);let{width:n,height:s}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-s)<=i)&&(s=r.persistedSize?.height??t.height),(!r.persistWidth||Math.abs(r.currentSize.width-n)<=i)&&(n=r.persistedSize?.width??t.width),this._persistedSize.store(new B.fg(n,s))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=B.BC(this.element.domNode,B.$(".message")),this._listElement=B.BC(this.element.domNode,B.$(".tree"));const a=this._disposables.add(s.createInstance(re,this.editor));a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new ae(a,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(119).showIcons);c();const h=s.createInstance(we,this.editor);this._disposables.add(h),this._disposables.add(h.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new W.B8("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[h],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>E.kg("suggest","Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!=typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=E.kg("label.full","{0} {1}, {2}",t,i,n):i?t=E.kg("label.detail","{0} {1}",t,i):n&&(t=E.kg("label.desc","{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion,s=z.GP("{0}{1}",n||"",i?"string"==typeof i?i:i.value:"");return E.kg("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,s)}}}),this._list.style((0,Se.t8)({listInactiveFocusBackground:Le,listInactiveFocusOutline:Y.buw})),this._status=s.createInstance(G,this.element.domNode,T.dt);const u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(119).showStatusBar);u(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(119)&&(u(),c()),this._completionModel&&(e.hasChanged(50)||e.hasChanged(120)||e.hasChanged(121))&&this._list.splice(0,this._list.length,this._completionModel.items)}))),this._ctxSuggestWidgetVisible=T.ob.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=T.ob.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=T.ob.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=T.ob.HasFocusedSuggestion.bindTo(i),this._disposables.add(B.b2(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=(0,Z.Bb)(e.type)?2:1}_onListFocus(e){if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const t=e.elements[0],i=e.indexes[0];t!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=t,this._list.reveal(i),this._currentSuggestionDetails=(0,H.SS)((async e=>{const i=(0,H.EQ)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>i.dispose()));try{return await t.resolve(e)}finally{i.dispose(),n.dispose()}})),this._currentSuggestionDetails.then((()=>{i>=this._list.length||t!==this._list.element(i)||(this._ignoreFocusEvents=!0,this._list.splice(i,1,[t]),this._list.setFocus([i]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:_e(i)}))})).catch(a.dz)),this._onDidFocus.fire({item:t,index:i,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:B.jD(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=ye.LOADING_MESSAGE,B.jD(this._listElement,this._status.element),B.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,s.h5)(ye.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=ye.NO_SUGGESTIONS_MESSAGE,B.jD(this._listElement,this._status.element),B.WU(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,s.h5)(ye.NO_SUGGESTIONS_MESSAGE);break;case 3:case 4:B.jD(this._messageElement),B.WU(this._listElement,this._status.element),this._show();break;case 5:B.jD(this._messageElement),B.WU(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,H.EQ)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,s){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const o=this._completionModel.items.length,r=0===o;if(this._ctxSuggestWidgetMultipleSuggestions.set(o>1),r)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(s?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=B.Oq(B.zk(this.element.domNode),(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!oe(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=B.Oq(B.zk(this.element.domNode),(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){this._pendingLayout.clear(),this._pendingShowDetails.clear(),this._loadingTimeout?.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const e=this._persistedSize.restore(),t=Math.ceil(4.3*this.getLayoutInfo().itemHeight);e&&e.heighto&&(s=o);const r=this._completionModel?this._completionModel.stats.pLabelLen*i.typicalHalfwidthCharacterWidth:s,a=i.statusBarHeight+this._list.contentHeight+i.borderHeight,l=i.itemHeight+i.statusBarHeight,c=B.BK(this.editor.getDomNode()),d=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),h=c.top+d.top+d.height,u=Math.min(t.height-h-i.verticalPadding,a),g=c.top+d.top-i.verticalPadding,p=Math.min(g,a);let f=Math.min(Math.max(p,u)+i.borderHeight,a);n===this._cappedHeight?.capped&&(n=this._cappedHeight.wanted),nf&&(n=f);const m=150;n>u||this._forceRenderingAbove&&g>m?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),f=p):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),f=u),this.element.preferredSize=new B.fg(r,i.defaultSize.height),this.element.maxSize=new B.fg(o,f),this.element.minSize=new B.fg(220,l),this._cappedHeight=n===a?{wanted:this._cappedHeight?.wanted??e.height,capped:n}:void 0}this._resize(s,n)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=t-s+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===this._contentWidget.getPosition()?.preference[0])}getLayoutInfo(){const e=this.editor.getOption(50),t=(0,V.qE)(this.editor.getOption(121)||e.lineHeight,8,1e3),i=this.editor.getOption(119).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new B.fg(430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Ee=ye=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ke(1,Q.CS),ke(2,S.fN),ke(3,X.Gy),ke(4,I._Y)],Ee);class Ne{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new B.fg(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var Ie,Me=i(2727),Te=i(59951),Re=i(65260),Pe=i(49079),Ae=function(e,t){return function(i,n){t(i,n,e)}};class Oe{constructor(e,t){if(this._model=e,this._position=t,this._decorationOptions=Pe.kI.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);e.changeDecorations((e=>{this._marker&&e.removeDecoration(this._marker),this._marker=e.addDecoration(v.Q.fromPositions(t,n),this._decorationOptions)}))}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations((e=>{e.removeDecoration(this._marker),this._marker=void 0}))}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Fe=class{static{Ie=this}static{this.ID="editor.contrib.suggestController"}static get(e){return e.getContribution(Ie.ID)}constructor(e,t,i,n,s,o,r){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=o,this._telemetryService=r,this._lineSuffix=new d.HE,this._toDispose=new d.Cm,this._selectors=new Be((e=>e.priority)),this._onWillInsertSuggestItem=new l.vl,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=s.createInstance(O.Y,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const a=T.ob.InsertMode.bindTo(n);a.set(e.getOption(119).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>a.set(e.getOption(119).insertMode)))),this.widget=this._toDispose.add(new B.Ij((0,B.zk)(e.getDomNode()),(()=>{const e=this._instantiationService.createInstance(Ee,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new A(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=T.ob.MakesTextEdit.bindTo(this._contextKeyService),n=T.ob.HasInsertAndReplaceRange.bindTo(this._contextKeyService),s=T.ob.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,d.s)((()=>{i.reset(),n.reset(),s.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),o=e.editStart.column,r=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-o!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:o,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText),i.set(a),n.set(!_.y.equals(e.editInsertEnd,e.editReplaceEnd)),s.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new c.dG(!0,!1,!1,!1,33))||h.zx&&e.toKeyCodeChord().equals(new c.dG(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new B.Ij((0,B.zk)(e.getDomNode()),(()=>this._toDispose.add(new F(this.editor,this.model))))),this._alternatives=this._toDispose.add(new B.Ij((0,B.zk)(e.getDomNode()),(()=>this._toDispose.add(new R(this.editor,this._contextKeyService))))),this._toDispose.add(s.createInstance(k,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new Oe(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const i of this._selectors.itemsOrderedByPriorityDesc)if(t=i.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;if(-1===t&&(t=0),0===this.model.state)return;let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(119);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));const u=T.ob.AcceptSuggestionsOnEnter.bindTo(n),g=()=>{const e=this.editor.getOption(1);u.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>g()))),g()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=w.O.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),s=n.getAlternativeVersionId(),{item:o}=e,l=[],c=new r.Qi;1&t||this.editor.pushUndoStop();const d=this.getOverwriteInfo(o,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),o);const h=o.isResolved;let g=-1,f=-1;if(Array.isArray(o.completion.additionalTextEdits)){this.model.cancel();const e=p.D.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((e=>{let t=v.Q.lift(e.range);if(t.startLineNumber===o.position.lineNumber&&t.startColumn>o.position.column){const e=this.editor.getPosition().column-o.position.column,i=e,n=v.Q.spansMultipleLines(t)?0:e;t=new v.Q(t.startLineNumber,t.startColumn+i,t.endLineNumber,t.endColumn+n)}return m.k.replaceMove(t,e.text)}))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!h){const e=new u.W;let i;const s=n.onDidChangeContent((e=>{if(e.isFlush)return c.cancel(),void s.dispose();for(const t of e.changes){const e=v.Q.getEndPosition(t.range);i&&!_.y.isBefore(e,i)||(i=e)}})),r=t;t|=2;let a=!1;const d=this.editor.onWillType((()=>{d.dispose(),a=!0,2&r||this.editor.pushUndoStop()}));l.push(o.resolve(c.token).then((()=>{if(!o.completion.additionalTextEdits||c.token.isCancellationRequested)return;if(i&&o.completion.additionalTextEdits.some((e=>_.y.isBefore(i,v.Q.getStartPosition(e.range)))))return!1;a&&this.editor.pushUndoStop();const e=p.D.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((e=>m.k.replaceMove(v.Q.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!a&&2&r||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),f=!0===t?1:!1===t?0:-2})).finally((()=>{s.dispose(),d.dispose()})))}let{insertText:b}=o.completion;if(4&o.completion.insertTextRules||(b=C.fr.escape(b)),this.model.cancel(),i.insert(b,{overwriteBefore:d.overwriteBefore,overwriteAfter:d.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command)if(o.completion.command.id===We.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new u.W;l.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch((e=>{o.completion.extensionId?(0,a.M_)(e):(0,a.dz)(e)})).finally((()=>{g=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{for(c.cancel();n.canUndo();){s!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(l).finally((()=>{this._reportSuggestionAcceptedTelemetry(o,n,h,g,f,e.index,e.model.items),this.model.clear(),c.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,s,o,r){if(0===Math.floor(100*Math.random()))return;const a=new Map;for(let e=0;e1?l[0]:-1;this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:e.extensionId?.value??"unknown",providerId:e.provider._debugDisplayName??"unknown",kind:e.completion.kind,basenameHash:(0,Re.tW)((0,Te.P8)(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:(0,Te.LC)(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:s,index:o,firstIndex:c})}getOverwriteInfo(e,t){(0,g.j)(this.editor.hasModel());let i="replace"===this.editor.getOption(119).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:s+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,o.EI)(e.completion.additionalTextEdits)){const t=E.kg("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,s.xE)(t)}}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:t??!1,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};l.Jh.once(this.model.onDidTrigger)((e=>{const t=[];l.Jh.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,d.AS)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,d.AS)(t),0===e.items.length)return void i();const s=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),o=e.items[s];n(o)?(this.editor.pushUndoStop(),this._insertSuggestion({index:s,item:o,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};Fe=Ie=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([Ae(1,y.GS),Ae(2,N.d),Ae(3,S.fN),Ae(4,I._Y),Ae(5,M.rr),Ae(6,Me.k)],Fe);class Be{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class We extends f.ks{static{this.id="editor.action.triggerSuggest"}constructor(){super({id:We.id,label:E.kg("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:S.M$.and(b.R.writable,b.R.hasCompletionItemProvider,T.ob.Visible.toNegated()),kbOpts:{kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=Fe.get(t);if(!n)return;let s;i&&"object"==typeof i&&!0===i.auto&&(s=!0),n.triggerSuggest(void 0,s,void 0)}}(0,f.HW)(Fe.ID,Fe,2),(0,f.Fl)(We);const He=190,Ve=f.DX.bindToContribution(Fe.get);(0,f.E_)(new Ve({id:"acceptSelectedSuggestion",precondition:S.M$.and(T.ob.Visible,T.ob.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:S.M$.and(T.ob.Visible,b.R.textInputFocus),weight:He},{primary:3,kbExpr:S.M$.and(T.ob.Visible,b.R.textInputFocus,T.ob.AcceptSuggestionsOnEnter,T.ob.MakesTextEdit),weight:He}],menuOpts:[{menuId:T.dt,title:E.kg("accept.insert","Insert"),group:"left",order:1,when:T.ob.HasInsertAndReplaceRange.toNegated()},{menuId:T.dt,title:E.kg("accept.insert","Insert"),group:"left",order:1,when:S.M$.and(T.ob.HasInsertAndReplaceRange,T.ob.InsertMode.isEqualTo("insert"))},{menuId:T.dt,title:E.kg("accept.replace","Replace"),group:"left",order:1,when:S.M$.and(T.ob.HasInsertAndReplaceRange,T.ob.InsertMode.isEqualTo("replace"))}]})),(0,f.E_)(new Ve({id:"acceptAlternativeSelectedSuggestion",precondition:S.M$.and(T.ob.Visible,b.R.textInputFocus,T.ob.HasFocusedSuggestion),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:T.dt,group:"left",order:2,when:S.M$.and(T.ob.HasInsertAndReplaceRange,T.ob.InsertMode.isEqualTo("insert")),title:E.kg("accept.replace","Replace")},{menuId:T.dt,group:"left",order:2,when:S.M$.and(T.ob.HasInsertAndReplaceRange,T.ob.InsertMode.isEqualTo("replace")),title:E.kg("accept.insert","Insert")}]})),N.w.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,f.E_)(new Ve({id:"hideSuggestWidget",precondition:T.ob.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:9,secondary:[1033]}})),(0,f.E_)(new Ve({id:"selectNextSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,f.E_)(new Ve({id:"selectNextPageSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:12,secondary:[2060]}})),(0,f.E_)(new Ve({id:"selectLastSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),(0,f.E_)(new Ve({id:"selectPrevSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,f.E_)(new Ve({id:"selectPrevPageSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:11,secondary:[2059]}})),(0,f.E_)(new Ve({id:"selectFirstSuggestion",precondition:S.M$.and(T.ob.Visible,S.M$.or(T.ob.MultipleSuggestions,T.ob.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),(0,f.E_)(new Ve({id:"focusSuggestion",precondition:S.M$.and(T.ob.Visible,T.ob.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,f.E_)(new Ve({id:"focusAndAcceptSuggestion",precondition:S.M$.and(T.ob.Visible,T.ob.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),(0,f.E_)(new Ve({id:"toggleSuggestionDetails",precondition:S.M$.and(T.ob.Visible,T.ob.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:T.dt,group:"right",order:1,when:S.M$.and(T.ob.DetailsVisible,T.ob.CanResolve),title:E.kg("detail.more","Show Less")},{menuId:T.dt,group:"right",order:1,when:S.M$.and(T.ob.DetailsVisible.toNegated(),T.ob.CanResolve),title:E.kg("detail.less","Show More")}]})),(0,f.E_)(new Ve({id:"toggleExplainMode",precondition:T.ob.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,f.E_)(new Ve({id:"toggleSuggestionFocus",precondition:T.ob.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:2570,mac:{primary:778}}})),(0,f.E_)(new Ve({id:"insertBestCompletion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),k.AtEnd,T.ob.Visible.toNegated(),R.OtherSuggestions.toNegated(),w.O.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,g.Gv)(t)?{fallback:"tab",...t}:{fallback:"tab"})},kbOpts:{weight:He,primary:2}})),(0,f.E_)(new Ve({id:"insertNextSuggestion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),R.OtherSuggestions,T.ob.Visible.toNegated(),w.O.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:2}})),(0,f.E_)(new Ve({id:"insertPrevSuggestion",precondition:S.M$.and(b.R.textInputFocus,S.M$.equals("config.editor.tabCompletion","on"),R.OtherSuggestions,T.ob.Visible.toNegated(),w.O.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:He,kbExpr:b.R.textInputFocus,primary:1026}})),(0,f.Fl)(class extends f.ks{constructor(){super({id:"editor.action.resetSuggestSize",label:E.kg("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){Fe.get(t)?.resetWidgetSize()}})},43370:function(e,t,i){"use strict";var n=i(76611),s=i(17793),o=i(26182),r=i(35114),a=i(72777),l=i(40393),c=i(23534),d=i(69122),h=i(329),u=i(9408),g=i(49195),p=i(82919),f=i(14043),m=i(42558),_=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},v=function(e,t){return function(i,n){t(i,n,e)}};class b{constructor(e,t,i,n,s,o){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=s,this.completion=o}}let w=class extends r.mp{constructor(e,t,i,n,s,o){super(s.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=o}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&t.resolve(n.XO.None)}return e}};w=_([v(5,g.GS)],w);let C=class extends r.jG{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){if(i.selectedSuggestionInfo)return;let s;for(const t of this._editorService.listCodeEditors())if(t.getModel()===e){s=t;break}if(!s)return;const o=s.getOption(90);if(u.r3.isAllOff(o))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const r=e.tokenization.getLineTokens(t.lineNumber),a=r.getStandardTokenType(r.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==u.r3.valueFor(o,a))return;let c,d,g=e.getWordAtPosition(t);if(g?.word||(c=this._getTriggerCharacterInfo(e,t)),!g?.word&&!c)return;if(g||(g=e.getWordUntilPosition(t)),g.endColumn!==t.column)return;const m=e.getValueInRange(new l.Q(t.lineNumber,1,t.lineNumber,t.column));if(!c&&this._lastResult?.canBeReused(e,t.lineNumber,g)){const e=new h.O(m,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),d=this._lastResult}else{const i=await(0,u.aR)(this._languageFeatureService.completionProvider,e,t,new u.l1(void 0,p.Y.createSuggestFilter(s).itemKind,c?.providers),c&&{triggerKind:1,triggerCharacter:c.ch},n);let o;i.needsClipboard&&(o=await this._clipboardService.readText());const r=new h.C(i.items,t.column,new h.O(m,0),f.S.None,s.getOption(119),s.getOption(113),{boostFullMatch:!1,firstMatchCanBeWeak:!1},o);d=new w(e,t.lineNumber,g,r,i,this._suggestMemoryService)}return this._lastResult=d,d}handleItemDidShow(e,t){t.completion.resolve(n.XO.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){const i=e.getValueInRange(l.Q.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),n=new Set;for(const t of this._languageFeatureService.completionProvider.all(e))t.triggerCharacters?.includes(i)&&n.add(t);if(0!==n.size)return{providers:n,ch:i}}};C=_([v(0,d.ILanguageFeaturesService),v(1,m.h),v(2,g.GS),v(3,a.T)],C),(0,c.x)(C)},49195:function(e,t,i){"use strict";i.d(t,{GS:function(){return b}});var n,s=i(90890),o=i(35114),r=i(52732),a=i(80945),l=i(35720),c=i(47901),d=i(48682),h=i(63619),u=i(87332),g=function(e,t){return function(i,n){t(i,n,e)}};class p{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let e=0;er&&s.type===i[t].completion.kind&&s.insertText===i[t].completion.insertText&&(r=s.touch,o=t),i[t].completion.preselect)return t}return-1!==o?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:l.HC.fromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}class _ extends p{constructor(){super("recentlyUsedByPrefix"),this._trie=a.cB.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageId()}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const s=`${e.getLanguageId()}/${n}`;let o=this._trie.get(s);if(o||(o=this._trie.findSubstr(s)),o)for(let e=0;ee.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:l.HC.fromString(i.type),this._trie.set(t,i)}}}let v=class{static{n=this}static{this._strategyCtors=new Map([["recentlyUsedByPrefix",_],["recentlyUsed",m],["first",f]])}static{this._storagePrefix="suggest/memories"}constructor(e,t){this._storageService=e,this._configService=t,this._disposables=new o.Cm,this._persistSoon=new s.uC((()=>this._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===u.LP.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){const i=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if(this._strategy?.name!==i){this._saveState();const e=n._strategyCtors.get(i)||f;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=this._storageService.get(`${n._storagePrefix}/${i}`,e);t&&this._strategy.fromJSON(JSON.parse(t))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=JSON.stringify(this._strategy);this._storageService.store(`${n._storagePrefix}/${this._strategy.name}`,t,e,1)}}};v=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([g(0,u.CS),g(1,c.pG)],v);const b=(0,h.u1)("ISuggestMemories");(0,d.v)(b,v,1)},82919:function(e,t,i){"use strict";i.d(t,{Y:function(){return E}});var n,s=i(90890),o=i(76611),r=i(20187),a=i(80670),l=i(35114),c=i(43920),d=i(56218),h=i(56812),u=i(14043),g=i(42558),p=i(47901),f=i(97848),m=i(76925),_=i(2727),v=i(329),b=i(9408),w=i(69122),C=i(17793),y=i(24219),S=i(99575),k=i(83012),x=i(37351),L=function(e,t){return function(i,n){t(i,n,e)}};class D{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column&&n.startColumn+1!==i.column||!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}let E=n=class{constructor(e,t,i,n,o,r,c,h,u){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=o,this._contextKeyService=r,this._configurationService=c,this._languageFeaturesService=h,this._envService=u,this._toDispose=new l.Cm,this._triggerCharacterListener=new l.Cm,this._triggerQuickSuggest=new s.pc,this._triggerState=void 0,this._completionDisposables=new l.Cm,this._onDidCancel=new a.vl,this._onDidTrigger=new a.vl,this._onDidSuggest=new a.vl,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new d.L(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let g=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{g=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{g=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{g||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{g||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){(0,l.AS)(this._triggerCharacterListener),(0,l.AS)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(92)||!this._editor.hasModel()||!this._editor.getOption(122))return;const e=new Map;for(const t of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);if(!n){n=new Set;const t=(0,b.f3)();t&&n.add(t),e.set(i,n)}n.add(t)}const t=t=>{if(!function(e,t){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getContextKeyValue(S.p.suppressSuggestions.key);return void 0!==i?!i:!e.getOption(62).suppressSuggestions}(this._editor,this._contextKeyService,this._configurationService))return;if(D.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";(0,c.LJ)(t.charCodeAt(t.length-1))?(0,c.pc)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const n=e.get(i);if(n){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())n.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:i,retrigger:Boolean(this._completionModel),clipboardText:this._completionModel?.clipboardText,completionOptions:{providerFilter:n,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),this._requestToken?.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){b.r3.isAllOff(this._editor.getOption(90))||this._editor.getOption(119).snippetsPreventQuickSuggestions&&k.O.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!D.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(90);if(!b.r3.isAllOff(i)){if(!b.r3.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),s=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==b.r3.valueFor(i,s))return}(function(e,t){if(!Boolean(t.getContextKeyValue(S.p.inlineSuggestionVisible.key)))return!0;const i=t.getContextKeyValue(S.p.suppressSuggestions.key);return void 0!==i?!i:!e.getOption(62).suppressSuggestions})(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(91)))}_refilterCompletionItems(){(0,y.j)(this._editor.hasModel()),(0,y.j)(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new D(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=new D(t,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:e.shy??!1,position:this._editor.getPosition()}),this._context=i;let s={triggerKind:e.triggerKind??0};e.triggerCharacter&&(s={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new o.Qi;let a=1;switch(this._editor.getOption(113)){case"top":a=0;break;case"bottom":a=2}const{itemKind:l,showDeprecated:c}=n.createSuggestFilter(this._editor),d=new b.l1(a,e.completionOptions?.kindFilter??l,e.completionOptions?.providerFilter,e.completionOptions?.providerItemsToReuse,c),h=u.S.create(this._editorWorkerService,this._editor),g=(0,b.aR)(this._languageFeaturesService.completionProvider,t,this._editor.getPosition(),d,s,this._requestToken.token);Promise.all([g,h]).then((async([t,i])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let n=e?.clipboardText;if(!n&&t.needsClipboard&&(n=await this._clipboardService.readText()),void 0===this._triggerState)return;const s=this._editor.getModel(),o=new D(s,this._editor.getPosition(),e),r={...C.Nd.default,firstMatchCanBeWeak:!this._editor.getOption(119).matchOnWordStartOnly};if(this._completionModel=new v.C(t.items,this._context.column,{leadingLineContent:o.leadingLineContent,characterCountDelta:o.column-this._context.column},i,this._editor.getOption(119),this._editor.getOption(113),r,n),this._completionDisposables.add(t.disposable),this._onNewContext(o),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)})).catch(r.dz)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static createSuggestFilter(e){const t=new Set;"none"===e.getOption(113)&&t.add(27);const i=e.getOption(119);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,c.UU)(e.leadingLineContent)===(0,c.UU)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){if(D.shouldAutoTrigger(this._editor)&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=D.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};E=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([L(1,h.IEditorWorkerService),L(2,g.h),L(3,_.k),L(4,m.rr),L(5,f.fN),L(6,p.pG),L(7,w.ILanguageFeaturesService),L(8,x.k)],E)},14043:function(e,t,i){"use strict";i.d(t,{S:function(){return r}});var n=i(97358),s=i(40393),o=i(60738);class r{static{this.None=new class extends r{distance(){return 0}}}static async create(e,t){if(!t.getOption(119).localityBonus)return r.None;if(!t.hasModel())return r.None;const i=t.getModel(),a=t.getPosition();if(!e.canComputeWordRanges(i.uri))return r.None;const[l]=await(new o.n).provideSelectionRanges(i,[a]);if(0===l.length)return r.None;const c=await e.computeWordRanges(i.uri,l[0].range);if(!c)return r.None;const d=i.getWordUntilPosition(a);return delete c[d.word],new class extends r{distance(e,i){if(!a.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const o="string"==typeof i.label?i.label:i.label.label,r=c[o];if((0,n.Ct)(r))return 2<<20;const d=(0,n.El)(r,s.Q.fromPositions(e),s.Q.compareRangesUsingStarts),h=d>=0?r[d]:r[Math.max(0,~d-1)];let u=l.length;for(const e of l){if(!s.Q.containsRange(e.range,h))break;u-=1}return u}}}}},83172:function(e,t,i){"use strict";var n=i(14374),s=i(4195);(0,s.x1A)("symbolIcon.arrayForeground",s.CU6,(0,n.kg)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.booleanForeground",s.CU6,(0,n.kg)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.colorForeground",s.CU6,(0,n.kg)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.constantForeground",s.CU6,(0,n.kg)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,n.kg)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.fileForeground",s.CU6,(0,n.kg)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.folderForeground",s.CU6,(0,n.kg)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.keyForeground",s.CU6,(0,n.kg)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.keywordForeground",s.CU6,(0,n.kg)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,n.kg)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.moduleForeground",s.CU6,(0,n.kg)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.namespaceForeground",s.CU6,(0,n.kg)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.nullForeground",s.CU6,(0,n.kg)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.numberForeground",s.CU6,(0,n.kg)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.objectForeground",s.CU6,(0,n.kg)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.operatorForeground",s.CU6,(0,n.kg)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.packageForeground",s.CU6,(0,n.kg)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.propertyForeground",s.CU6,(0,n.kg)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.referenceForeground",s.CU6,(0,n.kg)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.snippetForeground",s.CU6,(0,n.kg)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.stringForeground",s.CU6,(0,n.kg)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.structForeground",s.CU6,(0,n.kg)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.textForeground",s.CU6,(0,n.kg)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.typeParameterForeground",s.CU6,(0,n.kg)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.unitForeground",s.CU6,(0,n.kg)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),(0,s.x1A)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,n.kg)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."))},59396:function(e,t,i){"use strict";var n=i(15075),s=i(52055),o=i(14374),r=i(93223);class a extends r.L{static{this.ID="editor.action.toggleTabFocusMode"}constructor(){super({id:a.ID,title:o.aS({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:o.aS("tabMovesFocusDescriptions","Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const e=!s.M.getTabFocusMode();s.M.setTabFocusMode(e),e?(0,n.xE)(o.kg("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,n.xE)(o.kg("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}(0,r.ug)(a)},99842:function(e,t,i){"use strict";var n=i(43857),s=i(52694),o=i(14374);class r extends s.ks{constructor(){super({id:"editor.action.forceRetokenize",label:o.kg("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const s=new n.W;i.tokenization.forceTokenization(i.getLineCount()),s.stop(),console.log(`tokenization took ${s.elapsed()}`)}}(0,s.Fl)(r)},39923:function(e,t,i){"use strict";var n=i(90890),s=i(93231),o=i(85584),r=i(35114),a=i(79783),l=i(43920),c=i(52694),d=i(3520),h=i(49079),u=i(18827),g=i(56812),p=i(41750),f=i(77002),m=i(51059),_=i(8106),v=i(84201),b=i(98099),w=i(30981),C=i(69498),y=i(63619),S=i(26745),k=i(40478),x=i(53510),L=i(80670),D=i(95607),E=i(24764),N=i(74856),I=function(e,t){return function(i,n){t(i,n,e)}};let M=class extends r.jG{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,s){super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=(0,v.BC)(e,(0,v.$)("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??(0,E.nZ)("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const o=this._register(new S.f(this.el,"click")),r=this._register(new S.f(this.el,"keypress")),a=L.Jh.chain(r.event,(e=>e.map((e=>new k.Z(e))).filter((e=>3===e.keyCode)))),l=this._register(new S.f(this.el,x.B.Tap)).event;this._register(x.q.addTarget(this.el));const c=L.Jh.any(o.event,a,l);this._register(c((e=>{this.enabled&&(v.fs.stop(e,!0),i?.opener?i.opener(this._link.href):s.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=e??"":!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([I(3,N.TN),I(4,D.C)],M);var T=i(51310),R=i(56613),P=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};let O=class extends r.jG{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(F))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{this.hide(),e.onClose?.()}}),this._editor.setBanner(this.banner.element,26)}};O=P([A(1,y._Y)],O);let F=class extends r.jG{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(C.T,{}),this.element=(0,v.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){const t=(0,v.$)("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){(0,v.w_)(this.element)}show(e){(0,v.w_)(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=(0,v.BC)(this.element,(0,v.$)("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild((0,v.$)(`div${R.L.asCSSSelector(e.icon)}`));const n=(0,v.BC)(this.element,(0,v.$)("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=(0,v.BC)(this.element,(0,v.$)("div.message-actions-container")),e.actions)for(const t of e.actions)this._register(this.instantiationService.createInstance(M,this.messageActionsContainer,{...t,tabIndex:-1},{}));const s=(0,v.BC)(this.element,(0,v.$)("div.action-container"));this.actionBar=this._register(new b.E(s)),this.actionBar.push(this._register(new w.rc("banner.close","Close Banner",R.L.asClassName(T.$_),!0,(()=>{"function"==typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};F=P([A(0,y._Y)],F);var B=i(14374),W=i(47901),H=i(43575),V=i(35477),z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},U=function(e,t){return function(i,n){t(i,n,e)}};const j=(0,T.pU)("extensions-warning-message",s.W.warning,B.kg("warningIcon","Icon shown with a warning message in the extensions editor."));let q=class extends r.jG{static{this.ID="editor.contrib.unicodeHighlighter"}constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:B.kg("unicodeHighlighting.thisDocumentHasManyNonBasicAsciiUnicodeCharacters","This document contains many non-basic ASCII unicode characters"),command:new se};else if(e.ambiguousCharacterCount>=t)i={message:B.kg("unicodeHighlighting.thisDocumentHasManyAmbiguousUnicodeCharacters","This document contains many ambiguous unicode characters"),command:new ie};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:B.kg("unicodeHighlighting.thisDocumentHasManyInvisibleUnicodeCharacters","This document contains many invisible unicode characters"),command:new ne}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:j,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(O,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(126),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(126)&&(this._options=e.getOption(126),this._updateHighlighter())}))),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=function(e,t){return{nonBasicASCII:t.nonBasicASCII===d.XR?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===d.XR?!e:t.includeComments,includeStrings:t.includeStrings===d.XR?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>"_os"===e?(new Intl.NumberFormat).resolvedOptions().locale:"_vscode"===e?a.BH:e))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new K(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new $(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};q=z([U(1,g.IEditorWorkerService),U(2,V.L),U(3,y._Y)],q);let K=class extends r.jG{constructor(e,t,i,s){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=s,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.uC((()=>this._update()),250)),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:J.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();return(0,f.GN)(t,e)?{reason:X(t.getValueInRange(e.range),this._options),inComment:(0,f.a6)(t,e),inString:(0,f.wc)(t,e)}:null}};K=z([U(3,g.IEditorWorkerService)],K);class $ extends r.jG{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new n.uC((()=>this._update()),250)),this._register(this._editor.onDidLayoutChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidScrollChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeHiddenAreas((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const t of e){const e=u.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,t);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const e of i.ranges)t.push({range:e,options:J.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return(0,f.GN)(t,e)?{reason:X(i,this._options),inComment:(0,f.a6)(t,e),inString:(0,f.wc)(t,e)}:null}}const G=B.kg("unicodeHighlight.configureUnicodeHighlightOptions","Configure Unicode Highlight Options");let Q=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(q.ID);if(!n)return[];const s=[],r=new Set;let a=300;for(const e of t){const t=n.getDecorationInfo(e);if(!t)continue;const c=i.getValueInRange(e.range).codePointAt(0),d=Z(c);let h;switch(t.reason.kind){case 0:h=(0,l.aC)(t.reason.confusableWith)?B.kg("unicodeHighlight.characterIsAmbiguousASCII","The character {0} could be confused with the ASCII character {1}, which is more common in source code.",d,Z(t.reason.confusableWith.codePointAt(0))):B.kg("unicodeHighlight.characterIsAmbiguous","The character {0} could be confused with the character {1}, which is more common in source code.",d,Z(t.reason.confusableWith.codePointAt(0)));break;case 1:h=B.kg("unicodeHighlight.characterIsInvisible","The character {0} is invisible.",d);break;case 2:h=B.kg("unicodeHighlight.characterIsNonBasicAscii","The character {0} is not a basic ASCII character.",d)}if(r.has(h))continue;r.add(h);const u={codePoint:c,reason:t.reason,inComment:t.inComment,inString:t.inString},g=B.kg("unicodeHighlight.adjustSettings","Adjust settings"),p=`command:${oe.ID}?${encodeURIComponent(JSON.stringify(u))}`,f=new o.Bc("",!0).appendMarkdown(h).appendText(" ").appendLink(p,g,G);s.push(new _.eH(this,e.range,[f],!1,a++))}return s}renderHoverParts(e,t){return(0,_.fm)(e,t,this._editor,this._languageService,this._openerService)}};function Y(e){return`U+${e.toString(16).padStart(4,"0")}`}function Z(e){let t=`\`${Y(e)}\``;return l.y_.isInvisibleCharacter(e)||(t+=` "${function(e){return 96===e?"`` ` ``":"`"+String.fromCodePoint(e)+"`"}(e)}"`),t}function X(e,t){return u.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(e,t)}Q=z([U(1,p.L),U(2,D.C)],Q);class J{constructor(){this.map=new Map}static{this.instance=new J}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=h.kI.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}class ee extends c.ks{constructor(){super({id:ie.ID,label:B.kg("action.unicodeHighlight.disableHighlightingInComments","Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingInComments.shortLabel","Disable Highlight In Comments")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.includeComments,!1,2)}}class te extends c.ks{constructor(){super({id:ie.ID,label:B.kg("action.unicodeHighlight.disableHighlightingInStrings","Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingInStrings.shortLabel","Disable Highlight In Strings")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.includeStrings,!1,2)}}class ie extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters"}constructor(){super({id:ie.ID,label:B.kg("action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters","Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingOfAmbiguousCharacters.shortLabel","Disable Ambiguous Highlight")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.ambiguousCharacters,!1,2)}}class ne extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters"}constructor(){super({id:ne.ID,label:B.kg("action.unicodeHighlight.disableHighlightingOfInvisibleCharacters","Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingOfInvisibleCharacters.shortLabel","Disable Invisible Highlight")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.invisibleCharacters,!1,2)}}class se extends c.ks{static{this.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters"}constructor(){super({id:se.ID,label:B.kg("action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters","Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=B.kg("unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters.shortLabel","Disable Non ASCII Highlight")}async run(e,t,i){const n=e?.get(W.pG);n&&this.runAction(n)}async runAction(e){await e.updateValue(d.Of.nonBasicASCII,!1,2)}}class oe extends c.ks{static{this.ID="editor.action.unicodeHighlight.showExcludeOptions"}constructor(){super({id:oe.ID,label:B.kg("action.unicodeHighlight.showExcludeOptions","Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,i){const{codePoint:n,reason:s,inString:o,inComment:r}=i,a=String.fromCodePoint(n),c=e.get(H.GK),h=e.get(W.pG),u=[];if(0===s.kind)for(const e of s.notAmbiguousInLocales)u.push({label:B.kg("unicodeHighlight.allowCommonCharactersInLanguage",'Allow unicode characters that are more common in the language "{0}".',e),run:async()=>{re(h,[e])}});if(u.push({label:function(e){return l.y_.isInvisibleCharacter(e)?B.kg("unicodeHighlight.excludeInvisibleCharFromBeingHighlighted","Exclude {0} (invisible character) from being highlighted",Y(e)):B.kg("unicodeHighlight.excludeCharFromBeingHighlighted","Exclude {0} from being highlighted",`${Y(e)} "${a}"`)}(n),run:()=>async function(e,t){const i=e.getValue(d.Of.allowedCharacters);let n;n="object"==typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;await e.updateValue(d.Of.allowedCharacters,n,2)}(h,[n])}),r){const e=new ee;u.push({label:e.label,run:async()=>e.runAction(h)})}else if(o){const e=new te;u.push({label:e.label,run:async()=>e.runAction(h)})}if(0===s.kind){const e=new ie;u.push({label:e.label,run:async()=>e.runAction(h)})}else if(1===s.kind){const e=new ne;u.push({label:e.label,run:async()=>e.runAction(h)})}else if(2===s.kind){const e=new se;u.push({label:e.label,run:async()=>e.runAction(h)})}else!function(e){throw new Error(`Unexpected value: ${e}`)}(s);const g=await c.pick(u,{title:G});g&&await g.run()}}async function re(e,t){const i=e.inspect(d.Of.allowedLocales).user?.value;let n;n="object"==typeof i&&i?Object.assign({},i):{};for(const e of t)n[e]=!0;await e.updateValue(d.Of.allowedLocales,n,2)}(0,c.Fl)(ie),(0,c.Fl)(ne),(0,c.Fl)(se),(0,c.Fl)(oe),(0,c.HW)(q.ID,q,1),m.B2.register(Q)},8438:function(e,t,i){"use strict";var n=i(35114),s=i(59951),o=i(52694),r=i(72777),a=i(14374),l=i(13675),c=function(e,t){return function(i,n){t(i,n,e)}};const d="ignoreUnusualLineTerminators";let h=class extends n.jG{static{this.ID="editor.contrib.unusualLineTerminatorsDetector"}constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(127),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(127)&&(this._config=this._editor.getOption(127),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,d)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(92))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:a.kg("unusualLineTerminators.title","Unusual Line Terminators"),message:a.kg("unusualLineTerminators.message","Detected unusual line terminators"),detail:a.kg("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,s.P8)(e.uri)),primaryButton:a.kg({key:"unusualLineTerminators.fix",comment:["&& denotes a mnemonic"]},"&&Remove Unusual Line Terminators"),cancelButton:a.kg("unusualLineTerminators.ignore","Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t){e.setModelProperty(t.uri,d,!0)}(this._codeEditorService,e)}};h=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([c(1,l.X),c(2,r.T)],h),(0,o.HW)(h.ID,h,1)},22136:function(e,t,i){"use strict";i.d(t,{P:function(){return b},v:function(){return w}});var n=i(62067),s=i(49079),o=i(35720),r=i(14374),a=i(4195),l=i(40616);const c=(0,a.x1A)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},r.kg("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);(0,a.x1A)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},r.kg("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),(0,a.x1A)("editor.wordHighlightTextBackground",c,r.kg("wordHighlightText","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const d=(0,a.x1A)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:a.buw,hcLight:a.buw},r.kg("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable."));(0,a.x1A)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:a.buw,hcLight:a.buw},r.kg("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),(0,a.x1A)("editor.wordHighlightTextBorder",d,r.kg("wordHighlightTextBorder","Border color of a textual occurrence for a symbol."));const h=(0,a.x1A)("editorOverviewRuler.wordHighlightForeground","#A0A0A0CC",r.kg("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),u=(0,a.x1A)("editorOverviewRuler.wordHighlightStrongForeground","#C0A0C0CC",r.kg("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),g=(0,a.x1A)("editorOverviewRuler.wordHighlightTextForeground",a.z5H,r.kg("overviewRulerWordHighlightTextForeground","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),p=s.kI.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,l.Yf)(u),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),f=s.kI.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,l.Yf)(g),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),m=s.kI.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,l.Yf)(a.z5H),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}}),_=s.kI.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),v=s.kI.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,l.Yf)(h),position:n.A5.Center},minimap:{color:(0,l.Yf)(a.Xp1),position:1}});function b(e){return e===o.Kb.Write?p:e===o.Kb.Text?f:v}function w(e){return e?_:m}(0,l.zy)(((e,t)=>{const i=e.getColor(a.QwA);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}))},24035:function(e,t,i){"use strict";var n=i(14374),s=i(15075),o=i(90890),r=i(76611),a=i(20187),l=i(35114),c=i(47010),d=i(52694),h=i(72777),u=i(40393),g=i(49678),p=i(62067),f=i(69122),m=i(22136),_=i(97848),v=i(84756),b=i(52732),w=i(71543),C=i(59951),y=i(86506),S=i(35720);class k{constructor(){this.selector={language:"*"}}provideDocumentHighlights(e,t,i){const n=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});return n?e.isDisposed()?void 0:e.findMatches(n.word,!0,!1,!0,y.J3,!1).map((e=>({range:e.range,kind:S.Kb.Text}))):Promise.resolve([])}provideMultiDocumentHighlights(e,t,i,n){const s=new b.fT,o=e.getWordAtPosition({lineNumber:t.lineNumber,column:t.column});if(!o)return Promise.resolve(s);for(const t of[e,...i]){if(t.isDisposed())continue;const e=t.findMatches(o.word,!0,!1,!0,y.J3,!1).map((e=>({range:e.range,kind:S.Kb.Text})));e&&s.set(t.uri,e)}return s}}let x=class extends l.jG{constructor(e){super(),this._register(e.documentHighlightProvider.register("*",new k)),this._register(e.multiDocumentHighlightProvider.register("*",new k))}};var L,D;x=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(L=0,D=f.ILanguageFeaturesService,function(e,t){D(e,t,L)})],x);var E,N,I=i(23534),M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},T=function(e,t){return function(i,n){t(i,n,e)}};const R=new _.N1("hasWordHighlights",!1);function P(e,t,i,n){const s=e.ordered(t);return(0,o.$1)(s.map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,a.M_))),(e=>null!=e)).then((e=>{if(e){const i=new b.fT;return i.set(t.uri,e),i}return new b.fT}))}class A{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=(0,o.SS)((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new u.Q(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,o=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let e=0,t=i.length;!a&&e=o&&(a=!0)}return a}cancel(){this.result.cancel()}}class O extends A{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return P(this._providers,e,t.getPosition(),n).then((e=>e||new b.fT))}}class F extends A{constructor(e,t,i,n,s){super(e,t,i),this._providers=n,this._otherModels=s}_compute(e,t,i,n){return function(e,t,i,n,s,r){const l=e.ordered(t);return(0,o.$1)(l.map((e=>()=>{const n=r.filter((e=>(0,p.vd)(e))).filter((t=>(0,w.f)(e.selector,t.uri,t.getLanguageId(),!0,void 0,void 0)>0));return Promise.resolve(e.provideMultiDocumentHighlights(t,i,n,s)).then(void 0,a.M_)})),(e=>null!=e))}(this._providers,e,t.getPosition(),0,n,this._otherModels).then((e=>e||new b.fT))}}(0,d.ke)("_executeDocumentHighlights",(async(e,t,i)=>{const n=e.get(f.ILanguageFeaturesService),s=await P(n.documentHighlightProvider,t,i,r.XO.None);return s?.get(t.uri)}));let B=class{static{E=this}static{this.storedDecorationIDs=new b.fT}static{this.query=null}constructor(e,t,i,n,s){this.toUnhook=new l.Cm,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new b.fT,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.runDelayer=this.toUnhook.add(new o.ve(50)),this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=s,this._hasWordHighlights=R.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlight&&this.runDelayer.trigger((()=>{this._onPositionChanged(e)}))}))),this.toUnhook.add(e.onDidFocusEditorText((e=>{"off"!==this.occurrencesHighlight&&(this.workerRequest||this.runDelayer.trigger((()=>{this._run()})))}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{(0,v.v$)(this.model.uri,"output")||this._stopAll()}))),this.toUnhook.add(e.onDidChangeModel((e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():E.query&&this._run()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(81);if(this.occurrencesHighlight!==t)switch(this.occurrencesHighlight=t,t){case"off":this._stopAll();break;case"singleFile":this._stopAll(E.query?.modelInfo?.model);break;case"multiFile":E.query&&this._run(!0);break;default:console.warn("Unknown occurrencesHighlight setting value:",t)}}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,E.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){"off"!==this.occurrencesHighlight&&(this.runDelayer.cancel(),this._run())}_getSortedHighlights(){return this.decorations.getRanges().sort(u.Q.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){const o=this.editor.getModel().getLineContent(n.startLineNumber);(0,s.xE)(`${o}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();if(t){const o=this.editor.getModel().getLineContent(n.startLineNumber);(0,s.xE)(`${o}, ${i+1} of ${e.length} for '${t.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=E.storedDecorationIDs.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),E.storedDecorationIDs.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(e){const t=this.codeEditorService.listCodeEditors(),i=[];for(const n of t){if(!n.hasModel()||(0,C.n4)(n.getModel().uri,e?.uri))continue;const t=E.storedDecorationIDs.get(n.getModel().uri);if(!t)continue;n.removeDecorations(t),i.push(n.getModel().uri);const s=W.get(n);s?.wordHighlighter&&s.wordHighlighter.decorations.length>0&&(s.wordHighlighter.decorations.clear(),s.wordHighlighter.workerRequest=null,s.wordHighlighter._hasWordHighlights.set(!1))}for(const e of i)E.storedDecorationIDs.delete(e)}_stopSingular(){this._removeSingleDecorations(),this.editor.hasTextFocus()&&(this.editor.getModel()?.uri.scheme!==v.ny.vscodeNotebookCell&&E.query?.modelInfo?.model.uri.scheme!==v.ny.vscodeNotebookCell?(E.query=null,this._run()):E.query?.modelInfo&&(E.query.modelInfo=null)),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(e){this._removeAllDecorations(e),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){"off"===this.occurrencesHighlight||3!==e.reason&&this.editor.getModel()?.uri.scheme!==v.ny.vscodeNotebookCell?this._stopAll():this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===v.ny.vscodeNotebookCell){const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){const i=n.getModel();i&&i!==e&&i.uri.scheme===v.ny.vscodeNotebookCell&&t.push(i)}return t}const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){if(!(0,c.Np)(n))continue;const i=n.getModel();i&&e===i.modified&&t.push(i.modified)}if(t.length)return t;if("singleFile"===this.occurrencesHighlight)return[];for(const n of i){const i=n.getModel();i&&i!==e&&t.push(i)}return t}_run(e){let t;if(this.editor.hasTextFocus()){const e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber)return E.query=null,void this._stopAll();const i=e.startColumn,n=e.endColumn,s=this._getWord();if(!s||s.startColumn>i||s.endColumn{t===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations())}),a.dz)}}computeWithModel(e,t,i,n){return n.length?function(e,t,i,n,s,o){return new F(t,i,s,e,o)}(this.multiDocumentProviders,e,t,0,this.editor.getOption(132),n):function(e,t,i,n,s){return new O(t,i,s,e)}(this.providers,e,t,0,this.editor.getOption(132))}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;const e=this.codeEditorService.listCodeEditors();for(const t of e){const e=W.get(t);if(!e)continue;const i=[],n=t.getModel()?.uri;if(n&&this.workerRequestValue.has(n)){const s=E.storedDecorationIDs.get(n),o=this.workerRequestValue.get(n);if(o)for(const e of o)e.range&&i.push({range:e.range,options:(0,m.P)(e.kind)});let r=[];t.changeDecorations((e=>{r=e.deltaDecorations(s??[],i)})),E.storedDecorationIDs=E.storedDecorationIDs.set(n,r),i.length>0&&(e.wordHighlighter?.decorations.set(i),e.wordHighlighter?._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};B=E=M([T(4,h.T)],B);let W=class extends l.jG{static{N=this}static{this.ID="editor.contrib.wordHighlighter"}static get(e){return e.getContribution(N.ID)}constructor(e,t,i,n){super(),this._wordHighlighter=null;const s=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new B(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,n))};this._register(e.onDidChangeModel((e=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),s()}))),s()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!(!this._wordHighlighter||!this._wordHighlighter.hasDecorations())}moveNext(){this._wordHighlighter?.moveNext()}moveBack(){this._wordHighlighter?.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};W=N=M([T(1,_.fN),T(2,f.ILanguageFeaturesService),T(3,h.T)],W);class H extends d.ks{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=W.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class V extends d.ks{constructor(){super({id:"editor.action.wordHighlight.trigger",label:n.kg("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:void 0,kbOpts:{kbExpr:g.R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=W.get(t);n&&n.restoreViewState(!0)}}(0,d.HW)(W.ID,W,0),(0,d.Fl)(class extends H{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:n.kg("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:R,kbOpts:{kbExpr:g.R.editorTextFocus,primary:65,weight:100}})}}),(0,d.Fl)(class extends H{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:n.kg("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:R,kbOpts:{kbExpr:g.R.editorTextFocus,primary:1089,weight:100}})}}),(0,d.Fl)(V),(0,I.x)(x)},81188:function(e,t,i){"use strict";i.d(t,{Jk:function(){return v},R7:function(){return C}});var n=i(52694),s=i(24608),o=i(3520),r=i(30699),a=i(40469),l=i(59810),c=i(62993),d=i(40393),h=i(56218),u=i(49678),g=i(8494),p=i(14374),f=i(68745),m=i(97848),_=i(56614);class v extends n.DX{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.i)(t.getOption(132),t.getOption(131)),s=t.getModel(),o=t.getSelections(),a=o.length>1,d=o.map((e=>{const t=new c.y(e.positionLineNumber,e.positionColumn),i=this._move(n,s,t,this._wordNavigationType,a);return this._moveTo(e,i,this._inSelectionMode)}));if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,d.map((e=>r.MF.fromModelSelection(e)))),1===d.length){const e=new c.y(d[0].positionLineNumber,d[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new h.L(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new h.L(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends v{_move(e,t,i,n,s){return a.z.moveWordLeft(e,t,i,n,s)}}class w extends v{_move(e,t,i,n,s){return a.z.moveWordRight(e,t,i,n)}}class C extends n.DX{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(g.JZ);if(!t.hasModel())return;const o=(0,l.i)(t.getOption(132),t.getOption(131)),r=t.getModel(),a=t.getSelections(),c=t.getOption(6),d=t.getOption(11),h=n.getLanguageConfiguration(r.getLanguageId()).getAutoClosingPairs(),u=t._getViewModel(),p=a.map((e=>{const i=this._delete({wordSeparators:o,model:r,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:c,autoClosingQuotes:d,autoClosingPairs:h,autoClosedCharacters:u.getCursorAutoClosedCharacters()},this._wordNavigationType);return new s.iu(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,p),t.pushUndoStop()}}class y extends C{_delete(e,t){return a.z.deleteWordLeft(e,t)||new d.Q(1,1,1,1)}}class S extends C{_delete(e,t){const i=a.z.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new d.Q(n,s,n,s)}}class k extends n.ks{constructor(){super({id:"deleteInsideWord",precondition:u.R.writable,label:p.kg("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.i)(t.getOption(132),t.getOption(131)),o=t.getModel(),r=t.getSelections().map((e=>{const t=a.z.deleteInsideWord(n,o,e);return new s.iu(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:m.M$.and(u.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:m.M$.and(u.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:m.M$.and(u.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:m.M$.and(u.R.textInputFocus,m.M$.and(f.f,_.nd)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,l.i)(o.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}),(0,n.E_)(new class extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,l.i)(o.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,l.i)(o.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}),(0,n.E_)(new class extends w{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n,s){return super._move((0,l.i)(o.qB.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n,s)}}),(0,n.E_)(new class extends y{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:u.R.writable})}}),(0,n.E_)(new class extends y{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:u.R.writable})}}),(0,n.E_)(new class extends y{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:u.R.writable,kbOpts:{kbExpr:u.R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}),(0,n.E_)(new class extends S{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:u.R.writable})}}),(0,n.E_)(new class extends S{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:u.R.writable})}}),(0,n.E_)(new class extends S{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:u.R.writable,kbOpts:{kbExpr:u.R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}),(0,n.Fl)(k)},138:function(e,t,i){"use strict";var n=i(52694),s=i(40469),o=i(40393),r=i(49678),a=i(81188),l=i(21335);class c extends a.R7{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:r.R.writable,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return s.c.deleteWordPartLeft(e)||new o.Q(1,1,1,1)}}class d extends a.R7{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:r.R.writable,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=s.c.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),r=e.model.getLineMaxColumn(n);return new o.Q(n,r,n,r)}}class h extends a.Jk{_move(e,t,i,n,o){return s.c.moveWordPartLeft(e,t,i,o)}}l.w.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft"),l.w.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class u extends a.Jk{_move(e,t,i,n,o){return s.c.moveWordPartRight(e,t,i)}}(0,n.E_)(new c),(0,n.E_)(new d),(0,n.E_)(new class extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}),(0,n.E_)(new class extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}),(0,n.E_)(new class extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}),(0,n.E_)(new class extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:r.R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}})},41158:function(e,t,i){"use strict";var n=i(84201),s=i(35114),o=i(52694),r=i(79783);class a extends s.jG{static{this.ID="editor.contrib.iPadShowKeyboard"}constructor(e){super(),this.editor=e,this.widget=null,r.un&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(92);!this.widget&&e?this.widget=new l(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}class l extends s.jG{static{this.ID="editor.contrib.ShowKeyboardWidget"}constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(n.ko(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(n.ko(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return l.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}(0,o.HW)(a.ID,a,3)},80540:function(e,t,i){"use strict";var n,s=i(84201),o=i(59321),r=i(35114),a=i(52694),l=i(35720),c=i(36138),d=i(5032),h=i(41750),u=i(86100),g=i(47025),p=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends r.jG{static{n=this}static{this.ID="editor.contrib.inspectTokens"}static get(e){return e.getContribution(n.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(l.dG.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new _(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};f=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([p(1,u.L),p(2,h.L)],f);class m extends a.ks{constructor(){super({id:"editor.action.inspectTokens",label:g.YN.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){const i=f.get(t);i?.launch()}}class _ extends r.jG{static{this._ID="editor.contrib.inspectTokensWidget"}constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){const i=l.dG.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>d.r3,tokenize:(e,i,n)=>(0,d.$H)(t,n),tokenizeEncoded:(e,t,i)=>(0,d.Lh)(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return _._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let n=t.tokens1.length-1;n>=0;n--){const s=t.tokens1[n];if(e.column-1>=s.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}const r=this._model.getLineContent(e.lineNumber);let a="";if(i0&&s.push({key:e,score:o})}}return s}static termFrequencies(e){return function(e){const t=new Map;for(const i of e)t.set(i,(t.get(i)??0)+1);return t}(f.splitTerms(e))}static*splitTerms(e){const t=e=>e.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(const i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){for(const{key:t}of e)this.deleteDocument(t);for(const t of e){const e=[];for(const i of t.textChunks){const t=f.termFrequencies(i);for(const e of t.keys())this.chunkOccurrences.set(e,(this.chunkOccurrences.get(e)??0)+1);e.push({text:i,tf:t})}this.chunkCount+=e.length,this.documents.set(t.key,{chunks:e})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const e of t.chunks)for(const t of e.tf.keys()){const e=this.chunkOccurrences.get(t);if("number"==typeof e){const i=e-1;i<=0?this.chunkOccurrences.delete(t):this.chunkOccurrences.set(t,i)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[s,o]of Object.entries(t)){const t=e.tf.get(s);if(!t)continue;let r=i.get(s);"number"!=typeof r&&(r=this.computeIdf(s),i.set(s,r)),n+=t*r*o}return n}computeEmbedding(e){const t=f.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){const t=this.chunkOccurrences.get(e)??0;return t>0?Math.log((this.chunkCount+1)/t):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}var m,_=i(14374),v=i(21335),b=i(47901),w=i(13675),C=i(63619),y=i(87163),S=i(76925),k=i(90890),x=i(76611),L=i(24219);function D(e){const t=e;return Array.isArray(t.items)}function E(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(m||(m={}));class N extends g.jG{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){const n=new g.Cm;let s;e.canAcceptInBackground=!!this.options?.canAcceptInBackground,e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new g.HE),r=async()=>{const n=o.value=new g.Cm;s?.dispose(!0),e.busy=!1,s=new x.Qi(t);const r=s.token;let a=e.value.substring(this.prefix.length);this.options?.shouldSkipTrimPickFilter||(a=a.trim());const l=this._getPicks(a,n,r,i),c=(t,i)=>{let n,s;if(D(t)?(n=t.items,s=t.active):n=t,0===n.length){if(i)return!1;(a.length>0||e.hideInput)&&this.options?.noResultsPick&&(n=(0,L.Tn)(this.options.noResultsPick)?[this.options.noResultsPick(a)]:[this.options.noResultsPick])}return e.items=n,s&&(e.activeItems=[s]),!0},d=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{"number"==typeof t.mergeDelay&&(await(0,k.wR)(t.mergeDelay),r.isCancellationRequested)||n||(i=c(t.picks,!0))})(),(async()=>{e.busy=!0;try{const n=await t.additionalPicks;if(r.isCancellationRequested)return;let s,o,a,l;if(D(t.picks)?(s=t.picks.items,o=t.picks.active):s=t.picks,D(n)?(a=n.items,l=n.active):a=n,a.length>0||!i){let t;if(!o&&!l){const i=e.activeItems[0];i&&-1!==s.indexOf(i)&&(t=i)}c({items:[...s,...a],active:o||l||t})}}finally{r.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===l);else if(E(l))await d(l);else if(l instanceof Promise){e.busy=!0;try{const e=await l;if(r.isCancellationRequested)return;E(e)?await d(e):c(e)}finally{r.isCancellationRequested||(e.busy=!1)}}else c(l)};n.add(e.onDidChangeValue((()=>r()))),r(),n.add(e.onDidAccept((t=>{if(i?.handleAccept)return t.inBackground||e.hide(),void i.handleAccept?.(e.activeItems[0]);const[n]=e.selectedItems;"function"==typeof n?.accept&&(t.inBackground||e.hide(),n.accept(e.keyMods,t))})));const a=async(i,n)=>{if("function"!=typeof n.trigger)return;const s=n.buttons?.indexOf(i)??-1;if(s>=0){const i=n.trigger(s,e.keyMods),o="number"==typeof i?i:await i;if(t.isCancellationRequested)return;switch(o){case m.NO_ACTION:break;case m.CLOSE_PICKER:e.hide();break;case m.REFRESH_PICKER:r();break;case m.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),s=e.activeItems.filter((e=>e!==n[0])),o=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,s&&(e.activeItems=s),e.keepScrollPosition=o}break}}}};return n.add(e.onDidTriggerItemButton((({button:e,item:t})=>a(e,t)))),n.add(e.onDidTriggerSeparatorButton((({button:e,separator:t})=>a(e,t)))),n}}var I,M,T=i(87332),R=i(2727),P=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},A=function(e,t){return function(i,n){t(i,n,e)}};let O=class extends N{static{I=this}static{this.PREFIX=">"}static{this.TFIDF_THRESHOLD=.5}static{this.TFIDF_MAX_RESULTS=5}static{this.WORD_FILTER=(0,h.or)(h.WP,h.J1,h.Tt)}constructor(e,t,i,n,s,o){super(I.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(this.instantiationService.createInstance(F)),this.options=e}async _getPicks(e,t,i,n){const s=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const o=(0,u.P)((()=>{const t=new f;return t.updateDocuments(s.map((e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]})))),function(e){const t=e.slice(0);t.sort(((e,t)=>t.score-e.score));const i=t[0]?.score??0;if(i>0)for(const e of t)e.score/=i;return t}(t.calculateScores(e,i)).filter((e=>e.score>I.TFIDF_THRESHOLD)).slice(0,I.TFIDF_MAX_RESULTS)})),r=[];for(const t of s){const n=I.WORD_FILTER(e,t.label)??void 0,s=t.commandAlias?I.WORD_FILTER(e,t.commandAlias)??void 0:void 0;if(n||s)t.highlights={label:n,detail:this.options.showAlias?s:void 0},r.push(t);else if(e===t.commandId)r.push(t);else if(e.length>=3){const e=o();if(i.isCancellationRequested)return[];const n=e.find((e=>e.key===t.commandId));n&&(t.tfIdfScore=n.score,r.push(t))}}const a=new Map;for(const e of r){const t=a.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):a.set(e.label,e)}r.sort(((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return-1;const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const l=[];let c=!1,d=!0,h=!!this.options.suggestedCommandIds;for(let e=0;e{const t=await this.getAdditionalCommandPicks(s,r,e,i);if(i.isCancellationRequested)return[];const o=t.map((e=>this.toCommandPick(e,n)));return d&&"separator"!==o[0]?.type&&o.unshift({type:"separator",label:(0,_.kg)("suggested","similar commands")}),o})()}:l}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?(0,_.kg)("commandPickAriaLabelWithKeybinding","{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:t?.from??"quick open"});try{e.args?.length?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(t){(0,d.MB)(t)||this.dialogService.error((0,_.kg)("canNotRun","Command '{0}' resulted in an error",e.label),(0,c.r)(t))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};O=I=P([A(1,C._Y),A(2,y.b),A(3,v.d),A(4,R.k),A(5,w.X)],O);let F=class extends g.jG{static{M=this}static{this.DEFAULT_COMMANDS_HISTORY_LENGTH=50}static{this.PREF_KEY_CACHE="commandPalette.mru.cache"}static{this.PREF_KEY_COUNTER="commandPalette.mru.counter"}static{this.counter=1}static{this.hasChanges=!1}constructor(e,t,i){super(),this.storageService=e,this.configurationService=t,this.logService=i,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>this.updateConfiguration(e)))),this._register(this.storageService.onWillSaveState((e=>{e.reason===T.LP.SHUTDOWN&&this.saveState()})))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=M.getConfiguredCommandHistoryLength(this.configurationService),M.cache&&M.cache.limit!==this.configuredCommandsHistoryLength&&(M.cache.limit=this.configuredCommandsHistoryLength,M.hasChanges=!0))}load(){const e=this.storageService.get(M.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(e){this.logService.error(`[CommandsHistory] invalid data: ${e}`)}const i=M.cache=new p.qK(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}M.counter=this.storageService.getNumber(M.PREF_KEY_COUNTER,0,M.counter)}push(e){M.cache&&(M.cache.set(e,M.counter++),M.hasChanges=!0)}peek(e){return M.cache?.peek(e)}saveState(){if(!M.cache)return;if(!M.hasChanges)return;const e={usesLRU:!0,entries:[]};M.cache.forEach(((t,i)=>e.entries.push({key:i,value:t}))),this.storageService.store(M.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(M.PREF_KEY_COUNTER,M.counter,0,0),M.hasChanges=!1}static getConfiguredCommandHistoryLength(e){const t=e.getValue(),i=t.workbench?.commandPalette?.history;return"number"==typeof i?i:M.DEFAULT_COMMANDS_HISTORY_LENGTH}};F=M=P([A(0,T.CS),A(1,b.pG),A(2,S.rr)],F);class B extends O{constructor(e,t,i,n,s,o){super(e,t,i,n,s,o)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions()){let e;i.metadata?.description&&(e=(0,l.f)(i.metadata.description)?i.metadata.description:{original:i.metadata.description,value:i.metadata.description}),t.push({commandId:i.id,commandAlias:i.alias,commandDescription:e,label:(0,a.pS)(i.label)||i.id})}return t}}var W=i(52694),H=i(49678),V=i(43575),z=function(e,t){return function(i,n){t(i,n,e)}};let U=class extends B{get activeTextEditorControl(){return this.codeEditorService.getFocusedCodeEditor()??void 0}constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};U=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([z(0,C._Y),z(1,r.T),z(2,y.b),z(3,v.d),z(4,R.k),z(5,w.X)],U);class j extends W.ks{static{this.ID="editor.action.quickCommand"}constructor(){super({id:j.ID,label:o.gf.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:H.R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(V.GK).quickAccess.show(U.PREFIX)}}(0,W.Fl)(j),n.O.as(s.Fd.Quickaccess).registerQuickAccessProvider({ctor:U,prefix:U.PREFIX,helpEntries:[{description:o.gf.quickCommandHelp,commandId:j.ID}]})},85210:function(e,t,i){"use strict";var n=i(35114),s=i(47010),o=i(769),r=i(14374);class a extends o.o{static{this.PREFIX=":"}constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,r.kg)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,n.jG.None}provideWithTextEditor(e,t,i){const o=e.editor,r=new n.Cm;r.add(t.onDidAccept((i=>{const[n]=t.selectedItems;if(n){if(!this.isValidLineNumber(o,n.lineNumber))return;this.gotoLocation(e,{range:this.toRange(n.lineNumber,n.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(o,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(o,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(o,e.lineNumber))return void this.clearDecorations(o);const n=this.toRange(e.lineNumber,e.column);o.revealRangeInCenter(n,0),this.addDecorations(o,n)};l(),r.add(t.onDidChangeValue((()=>l())));const c=(0,s.jA)(o);return c&&2===c.getOptions().get(68).renderType&&(c.updateOptions({lineNumbers:"on"}),r.add((0,n.s)((()=>c.updateOptions({lineNumbers:"relative"}))))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,r.kg)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,r.kg)("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?(0,r.kg)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):(0,r.kg)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const s={lineNumber:t,column:i};return n.validatePosition(s).equals(s)}lineCount(e){return this.getModel(e)?.getLineCount()??0}}var l=i(56419),c=i(6209),d=i(72777),h=i(47025),u=i(80670),g=i(52694),p=i(49678),f=i(43575);let m=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=u.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};var _,v;m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(_=0,v=d.T,function(e,t){v(e,t,_)})],m);class b extends g.ks{static{this.ID="editor.action.gotoLine"}constructor(){super({id:b.ID,label:h.Hw.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(f.GK).quickAccess.show(m.PREFIX)}}(0,g.Fl)(b),l.O.as(c.Fd.Quickaccess).registerQuickAccessProvider({ctor:m,prefix:m.PREFIX,helpEntries:[{description:h.Hw.gotoLineActionLabel,commandId:b.ID}]})},71246:function(e,t,i){"use strict";i(83172);var n=i(90890),s=i(76611),o=i(93231),r=i(56613),a=i(17793),l=i(68847),c=i(79783),d=i(43920);const h=[void 0,[]];function u(e,t,i=0,n=0){const s=t;return s.values&&s.values.length>1?function(e,t,i,n){let s=0;const o=[];for(const r of t){const[t,a]=g(e,r,i,n);if("number"!=typeof t)return h;s+=t,o.push(...a)}return[s,p(o)]}(e,s.values,i,n):g(e,t,i,n)}function g(e,t,i,n){const s=(0,a.dt)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],(0,a.WJ)(s)]:h}function p(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(o=e,(s=n).end=0,r=f(e);let a;const c=e.split(" ");if(c.length>1)for(const e of c){const t=f(e),{pathNormalized:i,normalized:n,normalizedLowercase:s}=_(e);n&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:i,normalized:n,normalizedLowercase:s,expectContiguousMatch:t}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:s,values:a,containsPathSeparator:o,expectContiguousMatch:r}}function _(e){let t;t=c.uF?e.replace(/\//g,l.Vn):e.replace(/\\/g,l.Vn);const i=(0,d.wB)(t).replace(/\s|"/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function v(e){return Array.isArray(e)?m(e.map((e=>e.original)).join(" ")):m(e.original)}Object.freeze({score:0});var b,w=i(35114),C=i(40393),y=i(35720),S=i(51099),k=i(769),x=i(14374),L=i(69122),D=i(64429),E=function(e,t){return function(i,n){t(i,n,e)}};let N=class extends k.o{static{b=this}static{this.PREFIX="@"}static{this.SCOPE_PREFIX=":"}static{this.PREFIX_BY_CATEGORY=`${this.PREFIX}${this.SCOPE_PREFIX}`}constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,x.kg)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),w.jG.None}provideWithTextEditor(e,t,i,n){const s=e.editor,o=this.getModel(s);return o?this._languageFeaturesService.documentSymbolProvider.has(o)?this.doProvideWithEditorSymbols(e,o,t,i,n):this.doProvideWithoutEditorSymbols(e,o,t,i):w.jG.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new w.Cm;return this.provideLabelPick(i,(0,x.kg)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(async()=>{await this.waitForLanguageSymbolRegistry(t,s)&&!n.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new n.Zv,s=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(s.dispose(),i.complete(!0))})));return t.add((0,w.s)((()=>i.complete(!1)))),i.p}doProvideWithEditorSymbols(e,t,i,n,o){const r=e.editor,a=new w.Cm;a.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),o?.handleAccept?.(n),t.inBackground||i.hide())}))),a.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const l=this.getDocumentSymbols(t,n);let c;const d=async e=>{c?.dispose(!0),i.busy=!1,c=new s.Qi(n),i.busy=!0;try{const s=m(i.value.substr(b.PREFIX.length).trim()),o=await this.doGetSymbolPicks(l,s,void 0,c.token,t);if(n.isCancellationRequested)return;if(o.length>0){if(i.items=o,e&&0===s.original.length){const t=(0,D.Uk)(o,(t=>Boolean("separator"!==t.type&&t.range&&C.Q.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else s.original.length>0?this.provideLabelPick(i,(0,x.kg)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,x.kg)("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue((()=>d(void 0)))),d(r.getSelection()?.getPosition()),a.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(r.revealRangeInCenter(e.range.selection,0),this.addDecorations(r,e.range.decoration))}))),a}async doGetSymbolPicks(e,t,i,n,s){const a=await e;if(n.isCancellationRequested)return[];const l=0===t.original.indexOf(b.SCOPE_PREFIX),c=l?1:0;let h,g,p;t.values&&t.values.length>1?(h=v(t.values[0]),g=v(t.values.slice(1))):h=t;const f=this.options?.openSideBySideDirection?.();f&&(p=[{iconClass:"right"===f?r.L.asClassName(o.W.splitHorizontal):r.L.asClassName(o.W.splitVertical),tooltip:"right"===f?(0,x.kg)("openToSide","Open to the Side"):(0,x.kg)("openToBottom","Open to the Bottom")}]);const m=[];for(let S=0;Sc){let F=!1;if(h!==t&&([N,T]=u(D,{...t,values:void 0},c,E),"number"==typeof N&&(F=!0)),"number"!=typeof N&&([N,T]=u(D,h,c,E),"number"!=typeof N))continue;if(!F&&g){if(A&&g.original.length>0&&([R,P]=u(A,g)),"number"!=typeof R)continue;"number"==typeof N&&(N+=R)}}const O=k.tags&&k.tags.indexOf(1)>=0;m.push({index:S,kind:k.kind,score:N,label:D,ariaLabel:(0,y.PK)(k.name,k.kind),description:A,highlights:O?void 0:{label:T,description:P},range:{selection:C.Q.collapseToStart(k.selectionRange),decoration:k.range},uri:s.uri,symbolName:L,strikethrough:O,buttons:p})}const _=m.sort(((e,t)=>l?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let w=[];if(l){let B,W,H=0;function V(){W&&"number"==typeof B&&H>0&&(W.label=(0,d.GP)(M[B]||I,H))}for(const z of _)B!==z.kind?(V(),B=z.kind,H=1,W={type:"separator"},w.push(W)):H++,w.push(z);V()}else _.length>0&&(w=[{label:(0,x.kg)("symbols","symbols ({0})",m.length),type:"separator"},..._]);return w}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=M[e.kind]||I,n=M[t.kind]||I,s=i.localeCompare(n);return 0===s?this.compareByScore(e,t):s}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};N=b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([E(0,L.ILanguageFeaturesService),E(1,S.gW)],N);const I=(0,x.kg)("property","properties ({0})"),M={5:(0,x.kg)("method","methods ({0})"),11:(0,x.kg)("function","functions ({0})"),8:(0,x.kg)("_constructor","constructors ({0})"),12:(0,x.kg)("variable","variables ({0})"),4:(0,x.kg)("class","classes ({0})"),22:(0,x.kg)("struct","structs ({0})"),23:(0,x.kg)("event","events ({0})"),24:(0,x.kg)("operator","operators ({0})"),10:(0,x.kg)("interface","interfaces ({0})"),2:(0,x.kg)("namespace","namespaces ({0})"),3:(0,x.kg)("package","packages ({0})"),25:(0,x.kg)("typeParameter","type parameters ({0})"),1:(0,x.kg)("modules","modules ({0})"),6:(0,x.kg)("property","properties ({0})"),9:(0,x.kg)("enum","enumerations ({0})"),21:(0,x.kg)("enumMember","enumeration members ({0})"),14:(0,x.kg)("string","strings ({0})"),0:(0,x.kg)("file","files ({0})"),17:(0,x.kg)("array","arrays ({0})"),15:(0,x.kg)("number","numbers ({0})"),16:(0,x.kg)("boolean","booleans ({0})"),18:(0,x.kg)("object","objects ({0})"),19:(0,x.kg)("key","keys ({0})"),7:(0,x.kg)("field","fields ({0})"),13:(0,x.kg)("constant","constants ({0})")};var T=i(56419),R=i(6209),P=i(72777),A=i(47025),O=i(80670),F=i(52694),B=i(49678),W=i(43575),H=function(e,t){return function(i,n){t(i,n,e)}};let V=class extends N{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=O.Jh.None}get activeTextEditorControl(){return this.editorService.getFocusedCodeEditor()??void 0}};V=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([H(0,P.T),H(1,L.ILanguageFeaturesService),H(2,S.gW)],V);class z extends F.ks{static{this.ID="editor.action.quickOutline"}constructor(){super({id:z.ID,label:A.n9.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:B.R.hasDocumentSymbolProvider,kbOpts:{kbExpr:B.R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(W.GK).quickAccess.show(N.PREFIX,{itemActivation:W.C1.NONE})}}(0,F.Fl)(z),T.O.as(R.Fd.Quickaccess).registerQuickAccessProvider({ctor:V,prefix:N.PREFIX,helpEntries:[{description:A.n9.quickOutlineActionLabel,prefix:N.PREFIX,commandId:z.ID},{description:A.n9.quickOutlineByCategoryActionLabel,prefix:N.PREFIX_BY_CATEGORY}]})},97273:function(e,t,i){"use strict";var n,s=i(56419),o=i(6209),r=i(47025),a=i(14374),l=i(35114),c=i(87163),d=i(43575),h=function(e,t){return function(i,n){t(i,n,e)}};let u=class{static{n=this}static{this.PREFIX="?"}constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=s.O.as(o.Fd.Quickaccess)}provide(e){const t=new l.Cm;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(n.PREFIX.length));t&&t.prefix&&t.prefix!==n.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==n.PREFIX)),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)))}createPicks(e){return e.helpEntries.map((t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:(0,a.kg)("helpPickAriaLabel","{0}, {1}",n,t.description),description:t.description}}))}};u=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([h(0,d.GK),h(1,c.b)],u),s.O.as(o.Fd.Quickaccess).registerQuickAccessProvider({ctor:u,prefix:"",helpEntries:[{description:r.oq.helpQuickAccessActionLabel}]})},76973:function(e,t,i){"use strict";var n=i(52694),s=i(72777),o=i(68625),r=i(47901),a=i(97848),l=i(63619),c=i(31835),d=i(87332),h=function(e,t){return function(i,n){t(i,n,e)}};let u=class extends o.X{constructor(e,t,i,n,s,o,r){super(!0,e,t,i,n,s,o,r)}};u=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([h(1,a.fN),h(2,s.T),h(3,c.Ot),h(4,l._Y),h(5,d.CS),h(6,r.pG)],u),(0,n.HW)(o.X.ID,u,4)},28954:function(e,t,i){"use strict";i.d(t,{aQ:function(){return T},nr:function(){return R},Sx:function(){return H},po:function(){return M},tj:function(){return I}});var n=i(84201),s=i(75969),o=i(59321),r=i(80670),a=i(35720),l=i(36138);class c{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}const d=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class h{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(d);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=o.Q1.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class u{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,s=e.length;n{const i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",s="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(s=t.background)}const o=new h;for(const e of t)o.getId(e);const r=o.getId(n),a=o.getId(s),l=new p(i,r,a),c=new f(l);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e)>>>0}}const g=/\b(comment|string|regex|regexp)\b/;class p{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new p(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class f{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const s=this._children.get(i);return void 0!==s?s.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const s=e.indexOf(".");let o,r;-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);void 0===a&&(a=new f(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,i,n)}}var m=i(99851),_=i(4195);const v={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_.YtV]:"#FFFFFE",[_.By2]:"#000000",[_.tan]:"#E5EBF1",[m.vV]:"#D3D3D3",[m.H0]:"#939393",[_.QwA]:"#ADD6FF4D"}},b={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_.YtV]:"#1E1E1E",[_.By2]:"#D4D4D4",[_.tan]:"#3A3D41",[m.vV]:"#404040",[m.H0]:"#707070",[_.QwA]:"#ADD6FF26"}},w={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[_.YtV]:"#000000",[_.By2]:"#FFFFFF",[m.vV]:"#FFFFFF",[m.H0]:"#FFFFFF"}},C={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[_.YtV]:"#FFFFFF",[_.By2]:"#292929",[m.vV]:"#292929",[m.H0]:"#292929"}};var y=i(56419),S=i(40616),k=i(35114),x=i(39679),L=i(56613),D=i(51310);class E{getIcon(e){const t=(0,D.HT)();let i=e.defaults;for(;L.L.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}var N=i(95601);const I="vs",M="vs-dark",T="hc-black",R="hc-light",P=y.O.as(_.FdG.ColorContribution),A=y.O.as(S.Fd.ThemingContribution);class O{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(F(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,o.Q1.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=B(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,o.Q1.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=P.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case I:return x.zM.LIGHT;case T:return x.zM.HIGH_CONTRAST_DARK;case R:return x.zM.HIGH_CONTRAST_LIGHT;default:return x.zM.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=B(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=u.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=l.x.getForeground(n),o=l.x.getFontStyle(n);return{foreground:s,italic:Boolean(1&o),bold:Boolean(2&o),underline:Boolean(4&o),strikethrough:Boolean(8&o)}}}function F(e){return e===I||e===M||e===T||e===R}function B(e){switch(e){case I:return v;case M:return b;case T:return w;case R:return C}}function W(e){const t=B(e);return new O(e,t)}class H extends k.jG{constructor(){super(),this._onColorThemeChange=this._register(new r.vl),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new r.vl),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new E,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(I,W(I)),this._knownThemes.set(M,W(M)),this._knownThemes.set(T,W(T)),this._knownThemes.set(R,W(R));const e=this._register(function(e){const t=new k.Cm,i=t.add(new r.vl),s=(0,D.HT)();return t.add(s.onDidChange((()=>i.fire()))),e&&t.add(e.onDidProductIconThemeChange((()=>i.fire()))),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){const t=e?e.getProductIconTheme():new E,i={},o=[],r=[];for(const e of s.getIcons()){const s=t.getIcon(e);if(!s)continue;const a=s.font,l=`--vscode-icon-${e.id}-font-family`,c=`--vscode-icon-${e.id}-content`;a?(i[a.id]=a.definition,r.push(`${l}: ${(0,n.yt)(a.id)};`,`${c}: '${s.fontCharacter}';`),o.push(`.codicon-${e.id}:before { content: '${s.fontCharacter}'; font-family: ${(0,n.yt)(a.id)}; }`)):(r.push(`${c}: '${s.fontCharacter}'; ${l}: 'codicon';`),o.push(`.codicon-${e.id}:before { content: '${s.fontCharacter}'; }`))}for(const e in i){const t=i[e],s=t.weight?`font-weight: ${t.weight};`:"",r=t.style?`font-style: ${t.style};`:"",a=t.src.map((e=>`${(0,n.Tf)(e.location)} format('${e.format}')`)).join(", ");o.push(`@font-face { src: ${a}; font-family: ${(0,n.yt)(e)};${s}${r} font-display: block; }`)}return o.push(`:root { ${r.join(" ")} }`),o.join("\n")}}}(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(I),this._onOSSchemeChanged(),this._register(e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}))),(0,s.Dy)(N.G,"(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return n.Cl(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=n.li(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),k.jG.None}_registerShadowDomContainer(e){const t=n.li(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(I),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=N.G.matchMedia("(forced-colors: active)").matches;if(e!==(0,x.Bb)(this._theme.type)){let t;t=(0,x.HD)(this._theme.type)?e?T:M:e?R:I,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};A.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of P.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${(0,_.Bbc)(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join("\n")} }`);const s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},67742:function(e,t,i){"use strict";var n=i(52694),s=i(86100),o=i(47025),r=i(39679),a=i(28954);class l extends n.ks{constructor(){super({id:"editor.action.toggleHighContrast",label:o.E6.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(s.L),n=i.getColorTheme();(0,r.Bb)(n.type)?(i.setTheme(this._originalThemeName||((0,r.HD)(n.type)?a.po:a.tj)),this._originalThemeName=null):(i.setTheme((0,r.HD)(n.type)?a.aQ:a.nr),this._originalThemeName=n.themeName)}}(0,n.Fl)(l)},86100:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=(0,i(63619).u1)("themeService")},95380:function(e,t,i){"use strict";var n=i(47091),s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||s(e,l,{get:()=>t[l],enumerable:!(n=o(t,l))||n.enumerable});return e},c={};l(c,n,"default");var d=class{constructor(e,t,i){this._onDidChange=new c.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},h={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},u={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},g=new d("css",h,u),p=new d("scss",h,u),f=new d("less",h,u);function m(){return i.e(6173).then(i.bind(i,26173))}c.languages.css={cssDefaults:g,lessDefaults:f,scssDefaults:p},c.languages.onLanguage("less",(()=>{m().then((e=>e.setupMode(f)))})),c.languages.onLanguage("scss",(()=>{m().then((e=>e.setupMode(p)))})),c.languages.onLanguage("css",(()=>{m().then((e=>e.setupMode(g)))}))},13028:function(e,t,i){"use strict";i.d(t,{IF:function(){return _}});var n=i(47091),s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||s(e,l,{get:()=>t[l],enumerable:!(n=o(t,l))||n.enumerable});return e},c={};l(c,n,"default");var d=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(d||{}),h=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(h||{}),u=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(u||{}),g=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(g||{}),p=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(p||{}),f=class{constructor(e,t,i,n,s){this._onDidChange=new c.Emitter,this._onDidExtraLibsChange=new c.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(s),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i=void 0===t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content;let n=1;this._removedExtraLibs[e]&&(n=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)}),0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},m={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},_=new f({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},m),v=new f({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},m);function b(){return i.e(9679).then(i.bind(i,29679))}c.languages.typescript={ModuleKind:d,JsxEmit:h,NewLineKind:u,ScriptTarget:g,ModuleResolutionKind:p,typescriptVersion:"5.4.5",typescriptDefaults:_,javascriptDefaults:v,getTypeScriptWorker:()=>b().then((e=>e.getTypeScriptWorker())),getJavaScriptWorker:()=>b().then((e=>e.getJavaScriptWorker()))},c.languages.onLanguage("typescript",(()=>b().then((e=>e.setupTypeScript(_))))),c.languages.onLanguage("javascript",(()=>b().then((e=>e.setupJavaScript(v)))))},14374:function(e,t,i){"use strict";function n(){return globalThis._VSCODE_NLS_MESSAGES}function s(){return globalThis._VSCODE_NLS_LANGUAGE}i.d(t,{i8:function(){return s},Ec:function(){return n},kg:function(){return a},aS:function(){return c}});const o="pseudo"===s()||"undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function r(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],s=t[n];let o=e;return"string"==typeof s?o=s:"number"!=typeof s&&"boolean"!=typeof s&&null!=s||(o=String(s)),o})),o&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function a(e,t,...i){return r("number"==typeof e?l(e,t):t,i)}function l(e,t){const i=n()?.[e];if("string"!=typeof i){if("string"==typeof t)return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return i}function c(e,t,...i){let n;n="number"==typeof e?l(e,t):t;const s=r(n,i);return{value:s,original:t===n?s:r(t,i)}}},92998:function(e,t,i){"use strict";i.d(t,{Z:function(){return n}});const n=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const t=this._implementations.indexOf(e);-1!==t&&this._implementations.splice(t,1)}}}getImplementations(){return this._implementations}}},68745:function(e,t,i){"use strict";i.d(t,{f:function(){return o},j:function(){return s}});var n=i(97848);const s=(0,i(63619).u1)("accessibilityService"),o=new n.N1("accessibilityModeEnabled",!1)},54673:function(e,t,i){"use strict";i.d(t,{Nt:function(){return s},Rh:function(){return a}});var n=i(14374);const s=(0,i(63619).u1)("accessibilitySignalService");Symbol("AcknowledgeDocCommentsToken");class o{static register(e){return new o(e.fileName)}static{this.error=o.register({fileName:"error.mp3"})}static{this.warning=o.register({fileName:"warning.mp3"})}static{this.success=o.register({fileName:"success.mp3"})}static{this.foldedArea=o.register({fileName:"foldedAreas.mp3"})}static{this.break=o.register({fileName:"break.mp3"})}static{this.quickFixes=o.register({fileName:"quickFixes.mp3"})}static{this.taskCompleted=o.register({fileName:"taskCompleted.mp3"})}static{this.taskFailed=o.register({fileName:"taskFailed.mp3"})}static{this.terminalBell=o.register({fileName:"terminalBell.mp3"})}static{this.diffLineInserted=o.register({fileName:"diffLineInserted.mp3"})}static{this.diffLineDeleted=o.register({fileName:"diffLineDeleted.mp3"})}static{this.diffLineModified=o.register({fileName:"diffLineModified.mp3"})}static{this.chatRequestSent=o.register({fileName:"chatRequestSent.mp3"})}static{this.chatResponseReceived1=o.register({fileName:"chatResponseReceived1.mp3"})}static{this.chatResponseReceived2=o.register({fileName:"chatResponseReceived2.mp3"})}static{this.chatResponseReceived3=o.register({fileName:"chatResponseReceived3.mp3"})}static{this.chatResponseReceived4=o.register({fileName:"chatResponseReceived4.mp3"})}static{this.clear=o.register({fileName:"clear.mp3"})}static{this.save=o.register({fileName:"save.mp3"})}static{this.format=o.register({fileName:"format.mp3"})}static{this.voiceRecordingStarted=o.register({fileName:"voiceRecordingStarted.mp3"})}static{this.voiceRecordingStopped=o.register({fileName:"voiceRecordingStopped.mp3"})}static{this.progress=o.register({fileName:"progress.mp3"})}constructor(e){this.fileName=e}}class r{constructor(e){this.randomOneOf=e}}class a{constructor(e,t,i,n,s,o){this.sound=e,this.name=t,this.legacySoundSettingsKey=i,this.settingsKey=n,this.legacyAnnouncementSettingsKey=s,this.announcementMessage=o}static{this._signals=new Set}static register(e){const t=new r("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new a(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage);return a._signals.add(i),i}static{this.errorAtPosition=a.register({name:(0,n.kg)("accessibilitySignals.positionHasError.name","Error at Position"),sound:o.error,announcementMessage:(0,n.kg)("accessibility.signals.positionHasError","Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"})}static{this.warningAtPosition=a.register({name:(0,n.kg)("accessibilitySignals.positionHasWarning.name","Warning at Position"),sound:o.warning,announcementMessage:(0,n.kg)("accessibility.signals.positionHasWarning","Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"})}static{this.errorOnLine=a.register({name:(0,n.kg)("accessibilitySignals.lineHasError.name","Error on Line"),sound:o.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:(0,n.kg)("accessibility.signals.lineHasError","Error on Line"),settingsKey:"accessibility.signals.lineHasError"})}static{this.warningOnLine=a.register({name:(0,n.kg)("accessibilitySignals.lineHasWarning.name","Warning on Line"),sound:o.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:(0,n.kg)("accessibility.signals.lineHasWarning","Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"})}static{this.foldedArea=a.register({name:(0,n.kg)("accessibilitySignals.lineHasFoldedArea.name","Folded Area on Line"),sound:o.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:(0,n.kg)("accessibility.signals.lineHasFoldedArea","Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"})}static{this.break=a.register({name:(0,n.kg)("accessibilitySignals.lineHasBreakpoint.name","Breakpoint on Line"),sound:o.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:(0,n.kg)("accessibility.signals.lineHasBreakpoint","Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"})}static{this.inlineSuggestion=a.register({name:(0,n.kg)("accessibilitySignals.lineHasInlineSuggestion.name","Inline Suggestion on Line"),sound:o.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"})}static{this.terminalQuickFix=a.register({name:(0,n.kg)("accessibilitySignals.terminalQuickFix.name","Terminal Quick Fix"),sound:o.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:(0,n.kg)("accessibility.signals.terminalQuickFix","Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"})}static{this.onDebugBreak=a.register({name:(0,n.kg)("accessibilitySignals.onDebugBreak.name","Debugger Stopped on Breakpoint"),sound:o.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:(0,n.kg)("accessibility.signals.onDebugBreak","Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"})}static{this.noInlayHints=a.register({name:(0,n.kg)("accessibilitySignals.noInlayHints","No Inlay Hints on Line"),sound:o.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:(0,n.kg)("accessibility.signals.noInlayHints","No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"})}static{this.taskCompleted=a.register({name:(0,n.kg)("accessibilitySignals.taskCompleted","Task Completed"),sound:o.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:(0,n.kg)("accessibility.signals.taskCompleted","Task Completed"),settingsKey:"accessibility.signals.taskCompleted"})}static{this.taskFailed=a.register({name:(0,n.kg)("accessibilitySignals.taskFailed","Task Failed"),sound:o.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:(0,n.kg)("accessibility.signals.taskFailed","Task Failed"),settingsKey:"accessibility.signals.taskFailed"})}static{this.terminalCommandFailed=a.register({name:(0,n.kg)("accessibilitySignals.terminalCommandFailed","Terminal Command Failed"),sound:o.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:(0,n.kg)("accessibility.signals.terminalCommandFailed","Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"})}static{this.terminalCommandSucceeded=a.register({name:(0,n.kg)("accessibilitySignals.terminalCommandSucceeded","Terminal Command Succeeded"),sound:o.success,announcementMessage:(0,n.kg)("accessibility.signals.terminalCommandSucceeded","Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"})}static{this.terminalBell=a.register({name:(0,n.kg)("accessibilitySignals.terminalBell","Terminal Bell"),sound:o.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:(0,n.kg)("accessibility.signals.terminalBell","Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"})}static{this.notebookCellCompleted=a.register({name:(0,n.kg)("accessibilitySignals.notebookCellCompleted","Notebook Cell Completed"),sound:o.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:(0,n.kg)("accessibility.signals.notebookCellCompleted","Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"})}static{this.notebookCellFailed=a.register({name:(0,n.kg)("accessibilitySignals.notebookCellFailed","Notebook Cell Failed"),sound:o.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:(0,n.kg)("accessibility.signals.notebookCellFailed","Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"})}static{this.diffLineInserted=a.register({name:(0,n.kg)("accessibilitySignals.diffLineInserted","Diff Line Inserted"),sound:o.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"})}static{this.diffLineDeleted=a.register({name:(0,n.kg)("accessibilitySignals.diffLineDeleted","Diff Line Deleted"),sound:o.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"})}static{this.diffLineModified=a.register({name:(0,n.kg)("accessibilitySignals.diffLineModified","Diff Line Modified"),sound:o.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"})}static{this.chatRequestSent=a.register({name:(0,n.kg)("accessibilitySignals.chatRequestSent","Chat Request Sent"),sound:o.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:(0,n.kg)("accessibility.signals.chatRequestSent","Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"})}static{this.chatResponseReceived=a.register({name:(0,n.kg)("accessibilitySignals.chatResponseReceived","Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[o.chatResponseReceived1,o.chatResponseReceived2,o.chatResponseReceived3,o.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"})}static{this.progress=a.register({name:(0,n.kg)("accessibilitySignals.progress","Progress"),sound:o.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:(0,n.kg)("accessibility.signals.progress","Progress"),settingsKey:"accessibility.signals.progress"})}static{this.clear=a.register({name:(0,n.kg)("accessibilitySignals.clear","Clear"),sound:o.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:(0,n.kg)("accessibility.signals.clear","Clear"),settingsKey:"accessibility.signals.clear"})}static{this.save=a.register({name:(0,n.kg)("accessibilitySignals.save","Save"),sound:o.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:(0,n.kg)("accessibility.signals.save","Save"),settingsKey:"accessibility.signals.save"})}static{this.format=a.register({name:(0,n.kg)("accessibilitySignals.format","Format"),sound:o.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:(0,n.kg)("accessibility.signals.format","Format"),settingsKey:"accessibility.signals.format"})}static{this.voiceRecordingStarted=a.register({name:(0,n.kg)("accessibilitySignals.voiceRecordingStarted","Voice Recording Started"),sound:o.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"})}static{this.voiceRecordingStopped=a.register({name:(0,n.kg)("accessibilitySignals.voiceRecordingStopped","Voice Recording Stopped"),sound:o.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"})}}},47755:function(e,t,i){"use strict";function n(e){return e&&"object"==typeof e&&"string"==typeof e.original&&"string"==typeof e.value}function s(e){return!!e&&void 0!==e.condition}i.d(t,{N:function(){return s},f:function(){return n}})},42574:function(e,t,i){"use strict";i.d(t,{$u:function(){return N},Ot:function(){return I},oq:function(){return T},rN:function(){return F},rr:function(){return R}});var n=i(84201),s=i(40478),o=i(9306),r=i(99457),a=i(30981),l=i(92479),c=i(35114),d=i(79783),h=i(14374),u=i(93223),g=i(47755),p=i(97848),f=i(14280),m=i(63619),_=i(87163),v=i(31835),b=i(87332),w=i(40616),C=i(56613),y=i(39679),S=i(24219),k=i(4195),x=i(52010),L=i(68745),D=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},E=function(e,t){return function(i,n){t(i,n,e)}};function N(e,t,i,s){let o,r,a;if(Array.isArray(e))a=e,o=t,r=i;else{const n=t;a=e.getActions(n),o=i,r=s}const l=n.Di.getInstance();M(a,o,l.keyStatus.altKey||(d.uF||d.j9)&&l.keyStatus.shiftKey,r?e=>e===r:e=>"navigation"===e)}function I(e,t,i,n,s,o){let r,a,l,c,d;if(Array.isArray(e))d=e,r=t,a=i,l=n,c=s;else{const h=t;d=e.getActions(h),r=i,a=n,l=s,c=o}M(d,r,!1,"string"==typeof a?e=>e===a:a,l,c)}function M(e,t,i,n=e=>"navigation"===e,s=()=>!1,o=!1){let r,l;Array.isArray(t)?(r=t,l=t):(r=t.primary,l=t.secondary);const c=new Set;for(const[t,s]of e){let e;n(t)?(e=r,e.length>0&&o&&e.push(new a.wv)):(e=l,e.length>0&&e.push(new a.wv));for(let n of s){i&&(n=n instanceof u.Xe&&n.alt?n.alt:n);const s=e.push(n);n instanceof a.YH&&c.add({group:t,action:n,index:s-1})}}for(const{group:e,action:t,index:i}of c){const o=n(e)?r:l,a=t.actions;s(t,e,o.length)&&o.splice(i,1,...a)}}let T=class extends o.Z4{constructor(e,t,i,s,o,r,a,l){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:t?.draggable,keybinding:t?.keybinding,hoverDelegate:t?.hoverDelegate}),this._options=t,this._keybindingService=i,this._notificationService=s,this._contextKeyService=o,this._themeService=r,this._contextMenuService=a,this._accessibilityService=l,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new c.HE),this._altKey=n.Di.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{const e=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register((0,n.ko)(e,"mouseleave",(e=>{t=!1,i()}))),this._register((0,n.ko)(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?(0,h.kg)("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),s=i?(0,h.kg)("titleAndKb","{0} ({1})",e,i):e;n=(0,h.kg)("titleAndKbAndAlt","{0}\n[{1}] {2}",n,l.Of.modifierLabels[d.OS].altKey,s)}return n}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const s=this._commandAction.checked&&(0,g.N)(e.toggled)&&e.toggled.icon?e.toggled.icon:e.icon;if(s)if(C.L.isThemeIcon(s)){const e=C.L.asClassNameArray(s);i.classList.add(...e),this._itemClassDispose.value=(0,c.s)((()=>{i.classList.remove(...e)}))}else i.style.backgroundImage=(0,y.HD)(this._themeService.getColorTheme().type)?(0,n.Tf)(s.dark):(0,n.Tf)(s.light),i.classList.add("icon"),this._itemClassDispose.value=(0,c.qE)((0,c.s)((()=>{i.style.backgroundImage="",i.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}};T=D([E(2,_.b),E(3,v.Ot),E(4,p.fN),E(5,w.Gy),E(6,f.Z),E(7,L.j)],T);class R extends T{render(e){this.options.label=!0,this.options.icon=!1,super.render(e),e.classList.add("text-only"),e.classList.toggle("use-comma",this._options?.useComma??!1)}updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=R._symbolPrintEnter(e);this._options?.conversational?this.label.textContent=(0,h.kg)({key:"content2",comment:['A label with keybindg like "ESC to dismiss"']},"{1} to {0}",this._action.label,t):this.label.textContent=(0,h.kg)({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",this._action.label,t)}}static _symbolPrintEnter(e){return e.getLabel()?.replace(/\benter\b/gi,"⏎").replace(/\bEscape\b/gi,"Esc")}}let P=class extends r.d{constructor(e,t,i,n,s){const o={...t,menuAsChild:t?.menuAsChild??!1,classNames:t?.classNames??(C.L.isThemeIcon(e.item.icon)?C.L.asClassName(e.item.icon):void 0),keybindingProvider:t?.keybindingProvider??(e=>i.lookupKeybinding(e.id))};super(e,{getActions:()=>e.actions},n,o),this._keybindingService=i,this._contextMenuService=n,this._themeService=s}render(e){super.render(e),(0,S.j)(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!C.L.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=(0,y.HD)(this._themeService.getColorTheme().type)?(0,n.Tf)(i.dark):(0,n.Tf)(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};P=D([E(2,_.b),E(3,f.Z),E(4,w.Gy)],P);let A=class extends o.EH{constructor(e,t,i,n,s,o,l,c){let d;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=o,this._instaService=l,this._storageService=c,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const h=t?.persistLastActionId?c.get(this._storageKey,1):void 0;h&&(d=e.actions.find((e=>h===e.id))),d||(d=e.actions[0]),this._defaultAction=this._instaService.createInstance(T,d,{keybinding:this._getDefaultActionKeybindingLabel(d)});const g={keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id),...t,menuAsChild:t?.menuAsChild??!0,classNames:t?.classNames??["codicon","codicon-chevron-down"],actionRunner:t?.actionRunner??new a.LN};this._dropdown=new r.d(e,e.actions,this._contextMenuService,g),this._register(this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof u.Xe&&this.update(e.action)})))}update(e){this._options?.persistLastActionId&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(T,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends a.LN{async runAction(e,t){await e.run(void 0)}},this._container&&this._defaultAction.render((0,n.Hs)(this._container,(0,n.$)(".action-container")))}_getDefaultActionKeybindingLabel(e){let t;if(this._options?.renderKeybindingWithDefaultActionLabel){const i=this._keybindingService.lookupKeybinding(e.id);i&&(t=`(${i.getLabel()})`)}return t}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=(0,n.$)(".action-container");this._defaultAction.render((0,n.BC)(this._container,t)),this._register((0,n.ko)(t,n.Bx.KEY_DOWN,(e=>{const t=new s.Z(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=(0,n.$)(".dropdown-action-container");this._dropdown.render((0,n.BC)(this._container,i)),this._register((0,n.ko)(i,n.Bx.KEY_DOWN,(e=>{const t=new s.Z(e);t.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),t.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};A=D([E(2,_.b),E(3,v.Ot),E(4,f.Z),E(5,u.ez),E(6,m._Y),E(7,b.CS)],A);let O=class extends o.XF{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===a.wv.ID?"─────────":e.label,isDisabled:!e.enabled}))),0,t,x.RE,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=(0,k.GuP)(k.HcB)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function F(e,t,i){return t instanceof u.Xe?e.createInstance(T,t,i):t instanceof u.nI?t.item.isSelection?e.createInstance(O,t):t.item.rememberDefaultAction?e.createInstance(A,t,{...i,persistLastActionId:!0}):e.createInstance(P,t,i):void 0}O=D([E(1,f.l)],O)},86051:function(e,t,i){"use strict";i.d(t,{m:function(){return M},p:function(){return I}});var n=i(84201),s=i(34287),o=i(98099),r=i(99457),a=i(30981),l=i(93231),c=i(56613),d=i(80670),h=i(35114),u=i(14374),g=i(24764);class p extends h.jG{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new d._B),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new h.Cm),i.hoverDelegate=i.hoverDelegate??this._register((0,g.bW)()),this.options=i,this.toggleMenuAction=this._register(new f((()=>this.toggleMenuActionViewItem?.show()),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new o.E(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(e,n)=>{if(e.id===f.ID)return this.toggleMenuActionViewItem=new r.d(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:c.L.asClassNameArray(i.moreIcon??l.W.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof a.YH){const i=new r.d(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach((e=>{this.actionBar.push(e,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){const t=this.options.getKeyBinding?.(e);return t?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class f extends a.rc{static{this.ID="toolbar.toggle.more"}constructor(e,t){t=t||u.kg("moreActions","More Actions..."),super(f.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}var m=i(97358),_=i(34027),v=i(20187),b=i(26182),w=i(42574),C=i(93223),y=i(79126),S=i(21335),k=i(97848),x=i(14280),L=i(87163),D=i(2727),E=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},N=function(e,t){return function(i,n){t(i,n,e)}};let I=class extends p{constructor(e,t,i,n,s,o,r,a){super(e,s,{getKeyBinding:e=>o.lookupKeybinding(e.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:"string"==typeof t?.telemetrySource}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._keybindingService=o,this._commandService=r,this._sessionDisposables=this._store.add(new h.Cm);const l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun((e=>a.publicLog2("workbenchActionExecuted",{id:e.action.id,from:l}))))}setActions(e,t=[],i){this._sessionDisposables.clear();const o=e.slice(),r=t.slice(),l=[];let c=0;const d=[];let h=!1;if(-1!==this._options?.hiddenItemStrategy)for(let e=0;ee?.id))),t=this._options.overflowBehavior.maxItems-e.size;let i=0;for(let n=0;n=t&&(o[n]=void 0,d[n]=s))}}(0,m.SK)(o),(0,m.SK)(d),super.setActions(o,a.wv.join(d,r)),(l.length>0||o.length>0)&&this._sessionDisposables.add((0,n.ko)(this.getElement(),"contextmenu",(e=>{const t=new s.P((0,n.zk)(this.getElement()),e),o=this.getItemAction(t.target);if(!o)return;t.preventDefault(),t.stopPropagation();const r=[];if(o instanceof C.Xe&&o.menuKeybinding)r.push(o.menuKeybinding);else if(!(o instanceof C.nI||o instanceof f)){const e=!!this._keybindingService.lookupKeybinding(o.id);r.push((0,y.D)(this._commandService,this._keybindingService,o.id,void 0,e))}if(l.length>0){let e=!1;if(1===c&&0===this._options?.hiddenItemStrategy){e=!0;for(let e=0;ethis._menuService.resetHiddenStates(i)}))),0!==d.length&&this._contextMenuService.showContextMenu({getAnchor:()=>t,getActions:()=>d,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:"string"==typeof this._options?.telemetrySource,contextKeyService:this._contextKeyService})})))}};I=E([N(2,C.ez),N(3,k.fN),N(4,x.Z),N(5,L.b),N(6,S.d),N(7,D.k)],I);let M=class extends I{constructor(e,t,i,n,s,o,r,a,l){super(e,{resetMenu:t,...i},n,s,o,r,a,l),this._onDidChangeMenuItems=this._store.add(new d.vl),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const c=this._store.add(n.createMenu(t,s,{emitEventsForSubmenuChanges:!0})),h=()=>{const t=[],n=[];(0,w.Ot)(c,i?.menuOptions,{primary:t,secondary:n},i?.toolbarOptions?.primaryGroup,i?.toolbarOptions?.shouldInlineSubmenu,i?.toolbarOptions?.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",0===t.length&&0===n.length),super.setActions(t,n)};this._store.add(c.onDidChange((()=>{h(),this._onDidChangeMenuItems.fire(this)}))),h()}setActions(){throw new v.D7("This toolbar is populated from a menu.")}};M=E([N(3,C.ez),N(4,k.fN),N(5,x.Z),N(6,L.b),N(7,S.d),N(8,D.k)],M)},93223:function(e,t,i){"use strict";i.d(t,{D8:function(){return m},L:function(){return y},Xe:function(){return C},ZG:function(){return b},ez:function(){return _},i1:function(){return f},is:function(){return p},nI:function(){return w},ug:function(){return S}});var n,s=i(30981),o=i(56613),r=i(80670),a=i(35114),l=i(54409),c=i(21335),d=i(97848),h=i(63619),u=i(19561),g=function(e,t){return function(i,n){t(i,n,e)}};function p(e){return void 0!==e.command}function f(e){return void 0!==e.submenu}class m{static{this._instances=new Map}static{this.CommandPalette=new m("CommandPalette")}static{this.DebugBreakpointsContext=new m("DebugBreakpointsContext")}static{this.DebugCallStackContext=new m("DebugCallStackContext")}static{this.DebugConsoleContext=new m("DebugConsoleContext")}static{this.DebugVariablesContext=new m("DebugVariablesContext")}static{this.NotebookVariablesContext=new m("NotebookVariablesContext")}static{this.DebugHoverContext=new m("DebugHoverContext")}static{this.DebugWatchContext=new m("DebugWatchContext")}static{this.DebugToolBar=new m("DebugToolBar")}static{this.DebugToolBarStop=new m("DebugToolBarStop")}static{this.DebugCallStackToolbar=new m("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new m("DebugCreateConfiguration")}static{this.EditorContext=new m("EditorContext")}static{this.SimpleEditorContext=new m("SimpleEditorContext")}static{this.EditorContent=new m("EditorContent")}static{this.EditorLineNumberContext=new m("EditorLineNumberContext")}static{this.EditorContextCopy=new m("EditorContextCopy")}static{this.EditorContextPeek=new m("EditorContextPeek")}static{this.EditorContextShare=new m("EditorContextShare")}static{this.EditorTitle=new m("EditorTitle")}static{this.EditorTitleRun=new m("EditorTitleRun")}static{this.EditorTitleContext=new m("EditorTitleContext")}static{this.EditorTitleContextShare=new m("EditorTitleContextShare")}static{this.EmptyEditorGroup=new m("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new m("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new m("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new m("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new m("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new m("EditorActionsPositionSubmenu")}static{this.ExplorerContext=new m("ExplorerContext")}static{this.ExplorerContextShare=new m("ExplorerContextShare")}static{this.ExtensionContext=new m("ExtensionContext")}static{this.GlobalActivity=new m("GlobalActivity")}static{this.CommandCenter=new m("CommandCenter")}static{this.CommandCenterCenter=new m("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new m("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new m("LayoutControlMenu")}static{this.MenubarMainMenu=new m("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new m("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new m("MenubarDebugMenu")}static{this.MenubarEditMenu=new m("MenubarEditMenu")}static{this.MenubarCopy=new m("MenubarCopy")}static{this.MenubarFileMenu=new m("MenubarFileMenu")}static{this.MenubarGoMenu=new m("MenubarGoMenu")}static{this.MenubarHelpMenu=new m("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new m("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new m("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new m("PanelAlignmentMenu")}static{this.PanelPositionMenu=new m("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new m("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new m("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new m("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new m("MenubarSelectionMenu")}static{this.MenubarShare=new m("MenubarShare")}static{this.MenubarSwitchEditorMenu=new m("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new m("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new m("MenubarTerminalMenu")}static{this.MenubarViewMenu=new m("MenubarViewMenu")}static{this.MenubarHomeMenu=new m("MenubarHomeMenu")}static{this.OpenEditorsContext=new m("OpenEditorsContext")}static{this.OpenEditorsContextShare=new m("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new m("ProblemsPanelContext")}static{this.SCMInputBox=new m("SCMInputBox")}static{this.SCMChangesSeparator=new m("SCMChangesSeparator")}static{this.SCMChangesContext=new m("SCMChangesContext")}static{this.SCMIncomingChanges=new m("SCMIncomingChanges")}static{this.SCMIncomingChangesContext=new m("SCMIncomingChangesContext")}static{this.SCMIncomingChangesSetting=new m("SCMIncomingChangesSetting")}static{this.SCMOutgoingChanges=new m("SCMOutgoingChanges")}static{this.SCMOutgoingChangesContext=new m("SCMOutgoingChangesContext")}static{this.SCMOutgoingChangesSetting=new m("SCMOutgoingChangesSetting")}static{this.SCMIncomingChangesAllChangesContext=new m("SCMIncomingChangesAllChangesContext")}static{this.SCMIncomingChangesHistoryItemContext=new m("SCMIncomingChangesHistoryItemContext")}static{this.SCMOutgoingChangesAllChangesContext=new m("SCMOutgoingChangesAllChangesContext")}static{this.SCMOutgoingChangesHistoryItemContext=new m("SCMOutgoingChangesHistoryItemContext")}static{this.SCMChangeContext=new m("SCMChangeContext")}static{this.SCMResourceContext=new m("SCMResourceContext")}static{this.SCMResourceContextShare=new m("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new m("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new m("SCMResourceGroupContext")}static{this.SCMSourceControl=new m("SCMSourceControl")}static{this.SCMSourceControlInline=new m("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new m("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new m("SCMHistoryTitle")}static{this.SCMTitle=new m("SCMTitle")}static{this.SearchContext=new m("SearchContext")}static{this.SearchActionMenu=new m("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new m("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new m("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new m("StickyScrollContext")}static{this.TestItem=new m("TestItem")}static{this.TestItemGutter=new m("TestItemGutter")}static{this.TestProfilesContext=new m("TestProfilesContext")}static{this.TestMessageContext=new m("TestMessageContext")}static{this.TestMessageContent=new m("TestMessageContent")}static{this.TestPeekElement=new m("TestPeekElement")}static{this.TestPeekTitle=new m("TestPeekTitle")}static{this.TestCallStack=new m("TestCallStack")}static{this.TouchBarContext=new m("TouchBarContext")}static{this.TitleBarContext=new m("TitleBarContext")}static{this.TitleBarTitleContext=new m("TitleBarTitleContext")}static{this.TunnelContext=new m("TunnelContext")}static{this.TunnelPrivacy=new m("TunnelPrivacy")}static{this.TunnelProtocol=new m("TunnelProtocol")}static{this.TunnelPortInline=new m("TunnelInline")}static{this.TunnelTitle=new m("TunnelTitle")}static{this.TunnelLocalAddressInline=new m("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new m("TunnelOriginInline")}static{this.ViewItemContext=new m("ViewItemContext")}static{this.ViewContainerTitle=new m("ViewContainerTitle")}static{this.ViewContainerTitleContext=new m("ViewContainerTitleContext")}static{this.ViewTitle=new m("ViewTitle")}static{this.ViewTitleContext=new m("ViewTitleContext")}static{this.CommentEditorActions=new m("CommentEditorActions")}static{this.CommentThreadTitle=new m("CommentThreadTitle")}static{this.CommentThreadActions=new m("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new m("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new m("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new m("CommentThreadCommentContext")}static{this.CommentTitle=new m("CommentTitle")}static{this.CommentActions=new m("CommentActions")}static{this.CommentsViewThreadActions=new m("CommentsViewThreadActions")}static{this.InteractiveToolbar=new m("InteractiveToolbar")}static{this.InteractiveCellTitle=new m("InteractiveCellTitle")}static{this.InteractiveCellDelete=new m("InteractiveCellDelete")}static{this.InteractiveCellExecute=new m("InteractiveCellExecute")}static{this.InteractiveInputExecute=new m("InteractiveInputExecute")}static{this.InteractiveInputConfig=new m("InteractiveInputConfig")}static{this.ReplInputExecute=new m("ReplInputExecute")}static{this.IssueReporter=new m("IssueReporter")}static{this.NotebookToolbar=new m("NotebookToolbar")}static{this.NotebookStickyScrollContext=new m("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new m("NotebookCellTitle")}static{this.NotebookCellDelete=new m("NotebookCellDelete")}static{this.NotebookCellInsert=new m("NotebookCellInsert")}static{this.NotebookCellBetween=new m("NotebookCellBetween")}static{this.NotebookCellListTop=new m("NotebookCellTop")}static{this.NotebookCellExecute=new m("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new m("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new m("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new m("NotebookDiffCellInputTitle")}static{this.NotebookDiffCellMetadataTitle=new m("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new m("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new m("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new m("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new m("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new m("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new m("NotebookKernelSource")}static{this.BulkEditTitle=new m("BulkEditTitle")}static{this.BulkEditContext=new m("BulkEditContext")}static{this.TimelineItemContext=new m("TimelineItemContext")}static{this.TimelineTitle=new m("TimelineTitle")}static{this.TimelineTitleContext=new m("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new m("TimelineFilterSubMenu")}static{this.AccountsContext=new m("AccountsContext")}static{this.SidebarTitle=new m("SidebarTitle")}static{this.PanelTitle=new m("PanelTitle")}static{this.AuxiliaryBarTitle=new m("AuxiliaryBarTitle")}static{this.AuxiliaryBarHeader=new m("AuxiliaryBarHeader")}static{this.TerminalInstanceContext=new m("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new m("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new m("TerminalNewDropdownContext")}static{this.TerminalTabContext=new m("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new m("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new m("TerminalStickyScrollContext")}static{this.WebviewContext=new m("WebviewContext")}static{this.InlineCompletionsActions=new m("InlineCompletionsActions")}static{this.InlineEditsActions=new m("InlineEditsActions")}static{this.InlineEditActions=new m("InlineEditActions")}static{this.NewFile=new m("NewFile")}static{this.MergeInput1Toolbar=new m("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new m("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new m("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new m("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new m("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new m("InlineEditToolbar")}static{this.ChatContext=new m("ChatContext")}static{this.ChatCodeBlock=new m("ChatCodeblock")}static{this.ChatCompareBlock=new m("ChatCompareBlock")}static{this.ChatMessageTitle=new m("ChatMessageTitle")}static{this.ChatExecute=new m("ChatExecute")}static{this.ChatExecuteSecondary=new m("ChatExecuteSecondary")}static{this.ChatInputSide=new m("ChatInputSide")}static{this.AccessibleView=new m("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new m("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new m("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new m("DiffEditorSelectionToolbar")}constructor(e){if(m._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);m._instances.set(e,this),this.id=e}}const _=(0,h.u1)("menuService");class v{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new v(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof v&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}const b=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new r.QT({merge:v.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(v.for(m.CommandPalette)),(0,a.s)((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(v.for(m.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new l.w,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(v.for(e)),(0,a.s)((()=>{n(),this._onDidChangeMenu.fire(v.for(e))}))}appendMenuItems(e){const t=new a.Cm;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===m.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)p(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class w extends s.YH{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let C=n=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,s,r,a,l){let c;if(this.hideActions=s,this.menuKeybinding=r,this._commandService=l,this.id=e.id,this.label=n.label(e,i),this.tooltip=("string"==typeof e.tooltip?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||a.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=a.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&o.L.isThemeIcon(t.icon)&&(c=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}c||(c=o.L.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,s,void 0,a,l):void 0,this._options=i,this.class=c&&o.L.asClassName(c)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};C=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([g(5,d.fN),g(6,c.d)],C);class y{constructor(e){this.desc=e}}function S(e){const t=[],i=new e,{f1:n,menu:s,keybinding:o,...r}=i.desc;if(c.w.getCommand(r.id))throw new Error(`Cannot register two commands with the same id: ${r.id}`);if(t.push(c.w.registerCommand({id:r.id,handler:(e,...t)=>i.run(e,...t),metadata:r.metadata})),Array.isArray(s))for(const e of s)t.push(b.appendMenuItem(e.id,{command:{...r,precondition:null===e.precondition?void 0:r.precondition},...e}));else s&&t.push(b.appendMenuItem(s.id,{command:{...r,precondition:null===s.precondition?void 0:r.precondition},...s}));if(n&&(t.push(b.appendMenuItem(m.CommandPalette,{command:r,when:r.precondition})),t.push(b.addCommand(r))),Array.isArray(o))for(const e of o)t.push(u.f.registerKeybindingRule({...e,id:r.id,when:r.precondition?d.M$.and(r.precondition,e.when):e.when}));else o&&t.push(u.f.registerKeybindingRule({...o,id:r.id,when:r.precondition?d.M$.and(r.precondition,o.when):o.when}));return{dispose(){(0,a.AS)(t)}}}},79126:function(e,t,i){"use strict";i.d(t,{$:function(){return v},D:function(){return k}});var n,s,o=i(90890),r=i(80670),a=i(35114),l=i(93223),c=i(21335),d=i(97848),h=i(30981),u=i(87332),g=i(97358),p=i(14374),f=i(87163),m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new b(i)}createMenu(e,t,i){return new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){const n=new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),s=n.getActions(i);return n.dispose(),s}resetHiddenStates(e){this._hiddenStates.reset(e)}};v=m([_(0,c.d),_(1,f.b),_(2,u.CS)],v);let b=class{static{n=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new a.Cm,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,n._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){const i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const n=this._data[e.id];if(i)n?n.indexOf(t)<0&&n.push(t):this._data[e.id]=[t];else if(n){const i=n.indexOf(t);i>=0&&(0,g.UH)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(const{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const e=JSON.stringify(this._data);this._storageService.store(n._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};b=n=m([_(0,u.CS)],b);class w{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const e=this._sort(l.ZG.getMenuItems(this._id));let t;for(const i of e){const e=i.group||"";t&&t[0]===e||(t=[e,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeysAndSubmenuIds(i)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(w._fillInKbExprKeys(e.when,this._structureContextKeys),(0,l.is)(e)){if(e.command.precondition&&w._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;w._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(l.ZG.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}}let C=s=class extends w{constructor(e,t,i,n,s,o){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=s,this._contextKeyService=o,this.refresh()}createActionGroups(e){const t=[];for(const i of this._menuGroups){const[n,o]=i;let r;for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,l.is)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);const n=S(this._id,i?t.command:t,this._hiddenStates);if(i){const i=k(this._commandService,this._keybindingService,t.command.id,t.when);(r??=[]).push(new l.Xe(t.command,t.alt,e,n,i,this._contextKeyService,this._commandService))}else{const i=new s(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),o=h.wv.join(...i.map((e=>e[1])));o.length>0&&(r??=[]).push(new l.nI(t,n,o))}}r&&r.length>0&&t.push([n,r])}return t}_sort(e){return e.sort(s._compareMenuItems)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const o=e.order||0,r=t.order||0;return or?1:s._compareTitles((0,l.is)(e)?e.command.title:e.title,(0,l.is)(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};C=s=m([_(3,c.d),_(4,f.b),_(5,d.fN)],C);let y=class{constructor(e,t,i,n,s,c){this._disposables=new a.Cm,this._menuInfo=new C(e,t,i.emitEventsForSubmenuChanges,n,s,c);const d=new o.uC((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(d),this._disposables.add(l.ZG.onDidChangeMenu((e=>{for(const t of this._menuInfo.allMenuIds)if(e.has(t)){d.schedule();break}})));const h=this._disposables.add(new a.Cm);this._onDidChange=new r.uI({onWillAddFirstListener:()=>{h.add(c.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),h.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))},onDidRemoveLastListener:h.clear.bind(h),delay:i.eventDebounceDelay,merge:e=>{let t=!1,i=!1,n=!1;for(const s of e)if(t=t||s.isStructuralChange,i=i||s.isEnablementChange,n=n||s.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}}}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function S(e,t,i){const n=(0,l.i1)(t)?t.submenu.id:t.id,s="string"==typeof t.title?t.title:t.title.value,o=(0,h.ih)({id:`hide/${e.id}/${n}`,label:(0,p.kg)("hide.label","Hide '{0}'",s),run(){i.updateHidden(e,n,!0)}}),r=(0,h.ih)({id:`toggle/${e.id}/${n}`,label:s,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:o,toggle:r,get isHidden(){return!r.checked}}}function k(e,t,i,n=void 0,s=!0){return(0,h.ih)({id:`configureKeybinding/${i}`,label:(0,p.kg)("configure keybinding","Configure Keybinding"),enabled:s,run(){const s=!t.lookupKeybinding(i)&&n?n.serialize():void 0;e.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(s?` +when:${s}`:""))}})}y=m([_(3,c.d),_(4,f.b),_(5,d.fN)],y)},42558:function(e,t,i){"use strict";i.d(t,{h:function(){return n}});const n=(0,i(63619).u1)("clipboardService")},21335:function(e,t,i){"use strict";i.d(t,{d:function(){return l},w:function(){return c}});var n=i(80670),s=i(26182),o=i(35114),r=i(54409),a=i(24219);const l=(0,i(63619).u1)("commandService"),c=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.vl,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.metadata&&Array.isArray(e.metadata.args)){const t=[];for(const i of e.metadata.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,a.jx)(n,t),i(e,...n)}}const{id:i}=e;let n=this._commands.get(i);n||(n=new r.w,this._commands.set(i,n));const s=n.unshift(e),l=(0,o.s)((()=>{s();const e=this._commands.get(i);e?.isEmpty()&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return c.registerCommand(e,((e,...i)=>e.get(l).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return s.f.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};c.registerCommand("noop",(()=>{}))},47901:function(e,t,i){"use strict";i.d(t,{Mo:function(){return c},ad:function(){return s},gD:function(){return l},iB:function(){return r},kW:function(){return o},pG:function(){return n}});const n=(0,i(63619).u1)("configurationService");function s(e,t){const i=Object.create(null);for(const n in e)o(i,n,e[n],t);return i}function o(e,t,i,n){const s=t.split("."),o=s.pop();let r=e;for(let e=0;e{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,s=3,r){s=o.z(e.scope)?s:e.scope;const a=e.properties;if(a)for(const e in a){const l=a[e];t&&x(e,l)?delete a[e]:(l.source=i,l.defaultDefaultValue=a[e].default,this.updatePropertyDefaultValue(e,l),y.test(e)?l.scope=void 0:(l.scope=o.z(l.scope)?s:l.scope,l.restricted=o.z(l.restricted)?!!n?.includes(e):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],a[e].policy?.name&&this.policyConfigurations.set(a[e].policy.name,e),!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),r.add(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e]))}const l=e.allOf;if(l)for(const e of l)this.validateAndRegisterProperties(e,t,i,n,s,r)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);const n=e.allOf;n?.forEach(t)};t(e)}updateSchema(e,t){switch(h.properties[e]=t,t.scope){case 1:u.properties[e]=t;break;case 2:g.properties[e]=t;break;case 6:p.properties[e]=t;break;case 3:f.properties[e]=t;break;case 4:m.properties[e]=t;break;case 5:m.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:r.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};this.updatePropertyDefaultValue(t,i),h.properties[t]=i,u.properties[t]=i,g.properties[t]=i,p.properties[t]=i,f.properties[t]=i,m.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:r.kg("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:r.kg("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:_};h.patternProperties[C]=e,u.patternProperties[C]=e,g.patternProperties[C]=e,p.patternProperties[C]=e,f.patternProperties[C]=e,m.patternProperties[C]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;let n,s;!i||t.disallowConfigurationDefault&&i.source||(n=i.value,s=i.source),o.b0(n)&&(n=t.defaultDefaultValue,s=void 0),o.b0(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=s}};function x(e,t){return e.trim()?y.test(e)?r.kg("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==k.getConfigurationProperties()[e]?r.kg("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):t.policy?.name&&void 0!==k.getPolicyConfigurations().get(t.policy?.name)?r.kg("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,t.policy?.name,k.getPolicyConfigurations().get(t.policy?.name)):null:r.kg("config.property.empty","Cannot register an empty property")}c.O.add(d.Configuration,k)},97848:function(e,t,i){"use strict";i.d(t,{f1:function(){return I},M$:function(){return k},fN:function(){return K},N1:function(){return q},jQ:function(){return x},M0:function(){return Q}});var n=i(79783),s=i(43920),o=i(20187),r=i(14374);function a(...e){switch(e.length){case 1:return(0,r.kg)("contextkey.scanner.hint.didYouMean1","Did you mean {0}?",e[0]);case 2:return(0,r.kg)("contextkey.scanner.hint.didYouMean2","Did you mean {0} or {1}?",e[0],e[1]);case 3:return(0,r.kg)("contextkey.scanner.hint.didYouMean3","Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}const l=(0,r.kg)("contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote","Did you forget to open or close the quote?"),c=(0,r.kg)("contextkey.scanner.hint.didYouForgetToEscapeSlash","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class d{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw(0,o.iH)(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0))))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(a("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(a("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(a("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&this._input.charCodeAt(this._current)===e&&(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=d._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(l):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(c);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}for(;e=this._input.length}}var h=i(63619);const u=new Map;u.set("false",!1),u.set("true",!0),u.set("isMac",n.zx),u.set("isLinux",n.j9),u.set("isWindows",n.uF),u.set("isWeb",n.HZ),u.set("isMacNative",n.zx&&!n.HZ),u.set("isEdge",n.UP),u.set("isFirefox",n.gm),u.set("isChrome",n.H8),u.set("isSafari",n.nr);const g=Object.prototype.hasOwnProperty,p={regexParsingWithErrorRecovery:!0},f=(0,r.kg)("contextkey.parser.error.emptyString","Empty context key expression"),m=(0,r.kg)("contextkey.parser.error.emptyString.hint","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),_=(0,r.kg)("contextkey.parser.error.noInAfterNot","'in' after 'not'."),v=(0,r.kg)("contextkey.parser.error.closingParenthesis","closing parenthesis ')'"),b=(0,r.kg)("contextkey.parser.error.unexpectedToken","Unexpected token"),w=(0,r.kg)("contextkey.parser.error.unexpectedToken.hint","Did you forget to put && or || before the token?"),C=(0,r.kg)("contextkey.parser.error.unexpectedEOF","Unexpected end of expression"),y=(0,r.kg)("contextkey.parser.error.unexpectedEOF.hint","Did you forget to put a context key?");class S{static{this._parseError=new Error}constructor(e=p){this._config=e,this._scanner=new d,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?w:void 0;throw this._parsingErrors.push({message:b,offset:e.offset,lexeme:d.getLexeme(e),additionalInfo:t}),S._parseError}return e}catch(e){if(e!==S._parseError)throw e;return}}else this._parsingErrors.push({message:f,offset:0,lexeme:"",additionalInfo:m})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:k.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:k.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),D.INSTANCE;case 12:return this._advance(),E.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,v),e?.negate()}case 17:return this._advance(),P.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),k.true();case 12:return this._advance(),k.false();case 0:{this._advance();const e=this._expr();return this._consume(1,v),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,n=i.lastIndexOf("/"),s=n===i.length-1?void 0:this._removeFlagsGY(i.substring(n+1));let o;try{o=new RegExp(i.substring(1,n),s)}catch(t){throw this._errExpectedButGot("REGEX",e)}return H.create(t,o)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let n=this._peek(),s=0;for(let t=0;t=0){const o=i.slice(t+1,s),r="i"===i[s+1]?"i":"";try{n=new RegExp(o,r)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===n)throw this._errExpectedButGot("REGEX",e);return H.create(t,n)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,_);const e=this._value();return k.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return k.equals(t,e);switch(e){case"true":return k.has(t);case"false":return k.not(t);default:return k.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return k.notEquals(t,e);switch(e){case"true":return k.not(t);case"false":return k.has(t);default:return k.notEquals(t,e)}}case 5:return this._advance(),B.create(t,this._value());case 6:return this._advance(),W.create(t,this._value());case 7:return this._advance(),O.create(t,this._value());case 8:return this._advance(),F.create(t,this._value());case 13:return this._advance(),k.in(t,this._value());default:return k.has(t)}}case 20:throw this._parsingErrors.push({message:C,offset:e.offset,lexeme:"",additionalInfo:y}),S._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=(0,r.kg)("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",e,d.getLexeme(t)),s=t.offset,o=d.getLexeme(t);return this._parsingErrors.push({message:n,offset:s,lexeme:o,additionalInfo:i}),S._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}class k{static false(){return D.INSTANCE}static true(){return E.INSTANCE}static has(e){return N.create(e)}static equals(e,t){return I.create(e,t)}static notEquals(e,t){return R.create(e,t)}static regex(e,t){return H.create(e,t)}static in(e,t){return M.create(e,t)}static notIn(e,t){return T.create(e,t)}static not(e){return P.create(e)}static and(...e){return U.create(e,null,!0)}static or(...e){return j.create(e,null,!0)}static{this._parser=new S({regexParsingWithErrorRecovery:!1})}static deserialize(e){if(null!=e)return this._parser.parse(e)}}function x(e,t){const i=e?e.substituteConstants():void 0,n=t?t.substituteConstants():void 0;return!i&&!n||!(!i||!n)&&i.equals(n)}function L(e,t){return e.cmp(t)}class D{static{this.INSTANCE=new D}constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return E.INSTANCE}}class E{static{this.INSTANCE=new E}constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return D.INSTANCE}}class N{static create(e,t=null){const i=u.get(e);return"boolean"==typeof i?i?E.INSTANCE:D.INSTANCE:new N(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=u.get(this.key);return"boolean"==typeof e?e?E.INSTANCE:D.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this)),this.negated}}class I{static create(e,t,i=null){if("boolean"==typeof t)return t?N.create(e,i):P.create(e,i);const n=u.get(e);return"boolean"==typeof n?t===(n?"true":"false")?E.INSTANCE:D.INSTANCE:new I(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=u.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?E.INSTANCE:D.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class M{static create(e,t){return new M(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&g.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=T.create(this.key,this.valueKey)),this.negated}}class T{static create(e,t){return new T(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=M.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class R{static create(e,t,i=null){if("boolean"==typeof t)return t?P.create(e,i):N.create(e,i);const n=u.get(e);return"boolean"==typeof n?t===(n?"true":"false")?D.INSTANCE:E.INSTANCE:new R(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=u.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?D.INSTANCE:E.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this.value,this)),this.negated}}class P{static create(e,t=null){const i=u.get(e);return"boolean"==typeof i?i?D.INSTANCE:E.INSTANCE:new P(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:$(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=u.get(this.key);return"boolean"==typeof e?e?D.INSTANCE:E.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this)),this.negated}}function A(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):D.INSTANCE}class O{static create(e,t,i=null){return A(t,(t=>new O(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this.key,this.value,this)),this.negated}}class F{static create(e,t,i=null){return A(t,(t=>new F(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class B{static create(e,t,i=null){return A(t,(t=>new B(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new W(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:G(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class H{static create(e,t){return new H(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this)),this.negated}}class V{static create(e){return new V(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function z(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),s=0===n.length,o=j.create(e.expr.map((e=>U.create([e,t],null,i))),null,s);o&&(n.push(o),n.sort(L))}if(1===n.length)return n[0];if(i){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=j.create(e,this,!0)}return this.negated}}class j{static create(e,t,i){return j._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of Z(t))for(const t of Z(i))n.push(U.create([e,t],null,!1));e.unshift(j.create(n,null,!1))}this.negated=j.create(e,this,!0)}return this.negated}}class q extends N{static{this._info=[]}static all(){return q._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?q._info.push({...i,key:e}):!0!==i&&q._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return I.create(this.key,e)}}const K=(0,h.u1)("contextKeyService");function $(e,t){return et?1:0}function G(e,t,i,n){return ei?1:tn?1:0}function Q(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&Y(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(Q(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return Y(t.expr,e.expr);for(const i of e.expr)if(Q(i,t))return!0;return!1}return e.equals(t)}function Y(e,t){let i=0,n=0;for(;i{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const g=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=g.indexOf(this.domNode.ownerDocument.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%g.length:e.equals(15)&&(i=0===t?g.length-1:t-1),e.equals(9)?(g[t].blur(),this.inputBox.focus()):i>=0&&g[i].focus(),s.fs.stop(e,!0)}}}));const f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.preserveCase.domNode),this.domNode.appendChild(f),e?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox?.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var m=i(97848),_=i(19561),v=i(35114),b=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},w=function(e,t){return function(i,n){t(i,n,e)}};const C=new m.N1("suggestWidgetVisible",!1,(0,d.kg)("suggestWidgetVisible","Whether suggestion are visible")),y="historyNavigationWidgetFocus",S="historyNavigationForwardsEnabled",k="historyNavigationBackwardsEnabled";let x;const L=[];function D(e,t){if(L.includes(t))throw new Error("Cannot register the same widget multiple times");L.push(t);const i=new v.Cm,n=new m.N1(y,!1).bindTo(e),o=new m.N1(S,!0).bindTo(e),r=new m.N1(k,!0).bindTo(e),a=()=>{n.set(!0),x=t},l=()=>{n.set(!1),x===t&&(x=void 0)};return(0,s.X7)(t.element)&&a(),i.add(t.onDidFocus((()=>a()))),i.add(t.onDidBlur((()=>l()))),i.add((0,v.s)((()=>{L.splice(L.indexOf(t),1),l()}))),{historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:r,dispose(){i.dispose()}}}let E=class extends n.c{constructor(e,t,i,n){super(e,t,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(D(s,this.inputBox))}};E=b([w(3,m.fN)],E);let N=class extends f{constructor(e,t,i,n,s=!1){super(e,t,s,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(D(o,this.inputBox))}};N=b([w(3,m.fN)],N),_.f.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:m.M$.and(m.M$.has(y),m.M$.equals(k,!0),m.M$.not("isComposing"),C.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{x?.showPreviousValue()}}),_.f.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:m.M$.and(m.M$.has(y),m.M$.equals(S,!0),m.M$.not("isComposing"),C.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{x?.showNextValue()}})},74856:function(e,t,i){"use strict";i.d(t,{TN:function(){return l},fO:function(){return c}});var n=i(63619),s=i(35114),o=i(47901),r=i(84201),a=function(e,t){return function(i,n){t(i,n,e)}};const l=(0,n.u1)("hoverService");let c=class extends s.jG{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,t,i={},n,o){super(),this.placement=e,this.instantHover=t,this.overrideOptions=i,this.configurationService=n,this.hoverService=o,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new s.Cm),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))})))}showHover(e,t){const i="function"==typeof this.overrideOptions?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();const n=(0,r.sb)(e.target)?[e.target]:e.target.targetElements;for(const e of n)this.hoverDisposables.add((0,r.b2)(e,"keydown",(e=>{e.equals(9)&&this.hoverService.hideHover()})));const s=(0,r.sb)(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...i,persistence:{hideOnKeyDown:!0,...i.persistence},id:s,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...i.appearance}},t)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([a(3,o.pG),a(4,l)],c)},44204:function(e,t,i){"use strict";i.d(t,{d:function(){return n}});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},48682:function(e,t,i){"use strict";i.d(t,{N:function(){return r},v:function(){return o}});var n=i(44204);const s=[];function o(e,t,i){t instanceof n.d||(t=new n.d(t,[],Boolean(i))),s.push([e,t])}function r(){return s}},63619:function(e,t,i){"use strict";var n;i.d(t,{_$:function(){return n},_Y:function(){return s},u1:function(){return o}}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(n||(n={}));const s=o("instantiationService");function o(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,s){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i}],t[n.DI_TARGET]=t)}(t,e,s)};return t.toString=()=>e,n.serviceIds.set(e,t),t}},24813:function(e,t,i){"use strict";i.d(t,{a:function(){return n}});class n{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}},97248:function(e,t,i){"use strict";i.d(t,{F:function(){return o}});var n=i(80670),s=i(56419);const o={JSONContribution:"base.contributions.json"},r=new class{constructor(){this._onDidChangeSchema=new n.vl,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};s.O.add(o.JSONContribution,r)},87163:function(e,t,i){"use strict";i.d(t,{b:function(){return n}});const n=(0,i(63619).u1)("keybindingService")},19561:function(e,t,i){"use strict";i.d(t,{f:function(){return d}});var n=i(99559),s=i(79783),o=i(21335),r=i(56419),a=i(35114),l=i(54409);class c{constructor(){this._coreKeybindings=new l.w,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===s.OS){if(e&&e.win)return e.win}else if(2===s.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=c.bindToCurrentPlatform(e),i=new a.Cm;if(t&&t.primary){const o=(0,n.Zv)(t.primary,s.OS);o&&i.add(this._registerDefaultKeybinding(o,e.id,e.args,e.weight,0,e.when))}if(t&&Array.isArray(t.secondary))for(let o=0,r=t.secondary.length;o{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(h)),this._cachedMergedKeybindings.slice(0)}}const d=new c;function h(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}r.O.add("platform.keybindingsRegistry",d)},41517:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=(0,i(63619).u1)("labelService")},76432:function(e,t,i){"use strict";i.d(t,{PE:function(){return ve},aG:function(){return be},er:function(){return ft},YD:function(){return ke},zL:function(){return ut},Nf:function(){return Ie},cH:function(){return Te}});var n=i(84201),s=i(97358),o=i(76611),r=i(80670),a=i(35114),l=i(67334);class c{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:a.jG.None}}renderElement(e,t,i,n){if(i.disposable?.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const r=new o.Qi,a=s.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class d{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class h{constructor(e,t,i,n,s={}){const o=()=>this.model,r=n.map((e=>new c(e,o)));this.list=new l.B8(e,t,i,r,function(e,t){return{...t,accessibilityProvider:t.accessibilityProvider&&new d(e,t.accessibilityProvider)}}(o,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return r.Jh.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return r.Jh.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return r.Jh.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,s.y1)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var u=i(12048),g=i(24764),p=i(50815);class f{static{this.TemplateId="row"}constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=f.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.BC)(e,(0,n.$)(".monaco-table-tr")),i=[],s=[];for(let e=0;ethis.disposables.add(new m(e,t)))),h={size:d.reduce(((e,t)=>e+t.column.weight),0),views:d.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new p.U(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:h})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const u=new f(s,o,(e=>this.splitview.getViewSize(e)));var g;this.list=this.disposables.add(new l.B8(e,this.domNode,(g=i,{getHeight(e){return g.getHeight(e)},getTemplateId(){return f.TemplateId}}),[u],c)),r.Jh.any(...d.map((e=>e.onDidLayout)))((([e,t])=>u.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=s.reduce(((e,t)=>e+t.weight),0),i=s[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=(0,n.li)(this.domNode),this.style(l.bG)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}var v=i(41703),b=i(26914),w=i(64476),C=i(37345),y=i(26182);class S{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new w.G6(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(e,t){return i.sorter.compare(e.element,t.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=y.f.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=y.f.empty(),i){const n=new Set,s=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:e=>{if(null===e.element)return;const t=e;if(n.add(t.element),this.nodes.set(t.element,t),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();s.add(e),this.nodesByIdentity.set(e,t)}i.onDidCreateNode?.(t)},onDidDeleteNode:e=>{if(null===e.element)return;const t=e;if(n.has(t.element)||this.nodes.delete(t.element),this.identityProvider){const e=this.identityProvider.getId(t.element).toString();s.has(e)||this.nodesByIdentity.delete(e)}i.onDidDeleteNode?.(t)}})}preserveCollapseState(e=y.f.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),y.f.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t=void 0===e.collapsed?void 0:e.collapsed===C.Yo.Collapsed||e.collapsed===C.Yo.PreserveOrCollapsed||e.collapsed!==C.Yo.Expanded&&e.collapsed!==C.Yo.PreserveOrExpanded&&Boolean(e.collapsed),{...e,children:this.preserveCollapseState(e.children),collapsed:t}}const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible;let n;return n=void 0===e.collapsed||e.collapsed===C.Yo.PreserveOrCollapsed||e.collapsed===C.Yo.PreserveOrExpanded?t.collapsed:e.collapsed===C.Yo.Collapsed||e.collapsed!==C.Yo.Expanded&&Boolean(e.collapsed),{...e,collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)}}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new C.jh(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new C.jh(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new C.jh(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new C.jh(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function k(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:y.f.map(y.f.from(e.children),k),collapsible:e.collapsible,collapsed:e.collapsed}}function x(e){const t=[e.element],i=e.incompressible||!1;let n,s;for(;[s,n]=y.f.consume(y.f.from(e.children),2),1===s.length&&!s[0].incompressible;)e=s[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:y.f.map(y.f.concat(s,n),x),collapsible:e.collapsible,collapsed:e.collapsed}}function L(e,t=0){let i;return i=tL(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function D(e){return L(e,0)}function E(e,t,i){return e.element===t?{...e,children:i}:{...e,children:y.f.map(y.f.from(e.children),(e=>E(e,t,i)))}}class N{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new S(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=y.f.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId(e){return e.elements.map((e=>o.getId(e).toString())).join("\0")}});var o;if(null===e){const e=y.f.map(t,this.enabled?x:k);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const r=this.nodes.get(e);if(!r)throw new C.jh(this.user,"Unknown compressed tree node");const a=this.model.getNode(r),l=this.model.getParentNodeLocation(r),c=this.model.getNode(l),d=E(D(a),e,t),h=(this.enabled?x:k)(d),u=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if((0,s.aI)(h.element.elements,a.element.elements,u))return void this._setChildren(r,h.children||y.f.empty(),{diffIdentityProvider:n,diffDepth:1});const g=c.children.map((e=>e===a?h:e));this._setChildren(c.element,g,{diffIdentityProvider:n,diffDepth:a.depth-c.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=y.f.map(t,D),n=y.f.map(i,e?x:k);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,{...i,onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new C.jh(this.user,`Tree element not found: ${e}`);return t}}const I=e=>e[e.length-1];class M{get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new M(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}class T{get onDidSplice(){return r.Jh.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return r.Jh.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return r.Jh.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||I;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new C.y2((e=>new M(n,e))),this.model=new N(e,function(e,t){return{splice(i,n,s){t.splice(i,n,s.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return{...t,identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(e(i))}},sorter:t.sorter&&{compare(e,i){return t.sorter.compare(e.elements[0],i.elements[0])}},filter:t.filter&&{filter(i,n){return t.filter.filter(e(i),n)}}}}(n,i))}setChildren(e,t=y.f.empty(),i={}){this.model.setChildren(e,t,i)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var R=i(95578);class P extends v.DO{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,s={}){super(e,t,i,n,s),this.user=e}setChildren(e,t=y.f.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new S(e,t,i)}}class A{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,i){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){let s=this.stickyScrollDelegate.getCompressedNode(e);s||(s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),1===s.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements?.(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement?.(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)}([R.B],A.prototype,"compressedTreeNodeProvider",null);class O{constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,i){if(this.compressedStickyNodes.clear(),0===e.length)return[];for(let n=0;ni||n>=t-1&&tthis,r=new O((()=>this.model));super(e,t,i,n.map((e=>new A(o,r,e))),{...F(o,s),stickyScrollDelegate:r})}setChildren(e,t=y.f.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new T(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var W=i(90890),H=i(93231),V=i(56613),z=i(20187),U=i(24219);function j(e){return{...e,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function q(e,t){return!!t.parent&&(t.parent===e||q(e,t.parent))}class K{get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new K(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class ${constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...V.L.asClassNameArray(H.W.treeItemLoading)),!0):(t.classList.remove(...V.L.asClassNameArray(H.W.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function G(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function Q(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class Y extends b.ur{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function Z(e){return e instanceof b.ur?new Y(e):e}class X{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart?.(Z(e),t)}onDragOver(e,t,i,n,s,o=!0){return this.dnd.onDragOver(Z(e),t&&t.element,i,n,s)}drop(e,t,i,n,s){this.dnd.drop(Z(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.dnd.dispose()}}function J(e){return e&&{...e,collapseByDefault:!0,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new X(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>!!e.accessibilityProvider?.isChecked(t.element):void 0,getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},filter:e.filter&&{filter(t,i){return e.filter.filter(t.element,i)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}},sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"==typeof e.defaultFindVisibility?e.defaultFindVisibility:void 0===e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)}}function ee(e,t){t(e),e.children.forEach((e=>ee(e,t)))}class te{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return r.Jh.map(this.tree.onDidChangeFocus,G)}get onDidChangeSelection(){return r.Jh.map(this.tree.onDidChangeSelection,G)}get onMouseDblClick(){return r.Jh.map(this.tree.onMouseDblClick,Q)}get onPointer(){return r.Jh.map(this.tree.onPointer,Q)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,s,o={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new r.vl,this._onDidChangeNodeSlowState=new r.vl,this.nodeMapper=new C.y2((e=>new K(e))),this.disposables=new a.Cm,this.identityProvider=o.identityProvider,this.autoExpandSingleChildren=void 0!==o.autoExpandSingleChildren&&o.autoExpandSingleChildren,this.sorter=o.sorter,this.getDefaultCollapseState=e=>o.collapseByDefault?o.collapseByDefault(e)?C.Yo.PreserveOrCollapsed:C.Yo.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,i,n,o),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=j({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,s){const o=new v.w0(i),r=n.map((e=>new $(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=J(s)||{};return new P(e,t,o,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,i=!1,n,s){if(void 0===this.root.element)throw new C.jh(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(await this.refreshAndRenderNode(o,t,n,s),i)try{this.tree.rerender(o)}catch{}}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if(void 0===this.root.element)throw new C.jh(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await this.root.refreshPromise,await r.Jh.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new C.jh(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i,n){await this.refreshNode(e,t,i),this.disposables.isDisposed||this.render(e,i,n)}async refreshNode(e,t,i){let n;return this.subTreeRefreshPromises.forEach(((s,o)=>{!n&&function(e,t){return e===t||q(e,t)||q(t,e)}(o,e)&&(n=s.then((()=>this.refreshNode(e,t,i))))})),n||(e!==this.root&&this.tree.getNode(e).collapsed?(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,void this.setChildren(e,[],t,i)):this.doRefreshSubTree(e,t,i))}async doRefreshSubTree(e,t,i){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=await this.doRefreshNode(e,t,i);e.stale=!1,await W.HC.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}async doRefreshNode(e,t,i){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if((0,U.xZ)(t))n=Promise.resolve(t);else{const i=(0,W.wR)(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(y.f.empty());try{const s=await n;return this.setChildren(e,s,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,z.MB)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return(0,U.xZ)(i)?this.processChildren(i):(t=(0,W.SS)((async()=>this.processChildren(await i))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(z.dz))}setChildren(e,t,i,n){const s=[...t];if(0===e.children.length&&0===s.length)return[];const o=new Map,r=new Map;for(const t of e.children)o.set(t.element,t),this.identityProvider&&r.set(t.id,{node:t,collapsed:this.tree.hasElement(t)&&this.tree.isCollapsed(t)});const a=[],l=s.map((t=>{const s=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=j({element:t,parent:e,hasChildren:s,defaultCollapseState:this.getDefaultCollapseState(t)});return s&&i.defaultCollapseState===C.Yo.PreserveOrExpanded&&a.push(i),i}const l=this.identityProvider.getId(t).toString(),c=r.get(l);if(c){const e=c.node;return o.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=s,i?c.collapsed?(e.children.forEach((e=>ee(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):s&&!c.collapsed&&a.push(e),e}const d=j({element:t,parent:e,id:l,hasChildren:s,defaultCollapseState:this.getDefaultCollapseState(t)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1||s&&d.defaultCollapseState===C.Yo.PreserveOrExpanded)&&a.push(d),d}));for(const e of o.values())ee(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].forceExpanded=!0,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),s=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(e){return i.diffIdentityProvider.getId(e.element)}}};this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?y.f.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class ie{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new ie(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class ne{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...V.L.asClassNameArray(H.W.treeItemLoading)),!0):(t.classList.remove(...V.L.asClassNameArray(H.W.treeItemLoading)),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement?.(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,a.AS)(this.disposables)}}class se extends te{constructor(e,t,i,n,s,o,r={}){super(e,t,i,s,o,r),this.compressionDelegate=n,this.compressibleNodeMapper=new C.y2((e=>new ie(e))),this.filter=r.filter}createTree(e,t,i,n,s){const o=new v.w0(i),r=n.map((e=>new ne(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&J(e);return t&&{...t,keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))}}}}(s)||{};return new B(e,t,o,r,a)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,i){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),s=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},o=s(this.tree.getSelection()),r=s(this.tree.getFocus());super.render(e,t,i);const a=this.getSelection();let l=!1;const c=this.getFocus();let d=!1;const h=e=>{const t=e.element;if(t)for(let e=0;e{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:(0,w.iZ)(i)?(0,w.Mn)(i.visibility):(0,w.Mn)(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class oe extends v.DO{constructor(e,t,i,n,s,o={}){super(e,t,i,n,o),this.user=e,this.dataSource=s,this.identityProvider=o.identityProvider}createModel(e,t,i){return new S(e,t,i)}}var re=i(14374),ae=i(47901),le=i(16434),ce=i(97848),de=i(56614),he=i(14280),ue=i(63619),ge=i(87163),pe=i(56419),fe=i(52010),me=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_e=function(e,t){return function(i,n){t(i,n,e)}};const ve=(0,ue.u1)("listService");class be{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new a.Cm,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){e!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new l.hb((0,n.li)(),"").style(fe.IN)),this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),(0,n.X7)(e.getHTMLElement())&&this.setLastFocusedList(e),(0,a.qE)(e.onDidFocus((()=>this.setLastFocusedList(e))),(0,a.s)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}}const we=new ce.N1("listScrollAtBoundary","none"),Ce=(ce.M$.or(we.isEqualTo("top"),we.isEqualTo("both")),ce.M$.or(we.isEqualTo("bottom"),we.isEqualTo("both")),new ce.N1("listFocus",!0)),ye=new ce.N1("treestickyScrollFocused",!1),Se=new ce.N1("listSupportsMultiselect",!0),ke=ce.M$.and(Ce,ce.M$.not(de.aV),ye.negate()),xe=new ce.N1("listHasSelectionOrFocus",!1),Le=new ce.N1("listDoubleSelection",!1),De=new ce.N1("listMultiSelection",!1),Ee=new ce.N1("listSelectionNavigation",!1),Ne=new ce.N1("listSupportsFind",!0),Ie=new ce.N1("treeElementCanCollapse",!1),Me=new ce.N1("treeElementHasParent",!1),Te=new ce.N1("treeElementCanExpand",!1),Re=new ce.N1("treeElementHasChild",!1),Pe=new ce.N1("treeFindOpen",!1),Ae="listTypeNavigationMode",Oe="listAutomaticKeyboardNavigation";function Fe(e,t){const i=e.createScoped(t.getHTMLElement());return Ce.bindTo(i),i}function Be(e,t){const i=we.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const We="workbench.list.multiSelectModifier",He="workbench.list.openMode",Ve="workbench.list.horizontalScrolling",ze="workbench.list.defaultFindMode",Ue="workbench.list.typeNavigationMode",je="workbench.list.keyboardNavigation",qe="workbench.list.scrollByPage",Ke="workbench.list.defaultFindMatchType",$e="workbench.tree.indent",Ge="workbench.tree.renderIndentGuides",Qe="workbench.list.smoothScrolling",Ye="workbench.list.mouseWheelScrollSensitivity",Ze="workbench.list.fastScrollSensitivity",Xe="workbench.tree.expandMode",Je="workbench.tree.enableStickyScroll",et="workbench.tree.stickyScrollMaxItemCount";function tt(e){return"alt"===e.getValue(We)}class it extends a.jG{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=tt(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(We)&&(this.useAltAsMultipleSelectionModifier=tt(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,l.tX)(e)}isSelectionRangeChangeEvent(e){return(0,l.mh)(e)}}function nt(e,t){const i=e.get(ae.pG),n=e.get(ge.b),s=new a.Cm;return[{...t,keyboardNavigationDelegate:{mightProducePrintableCharacter(e){return n.mightProducePrintableCharacter(e)}},smoothScrolling:Boolean(i.getValue(Qe)),mouseWheelScrollSensitivity:i.getValue(Ye),fastScrollSensitivity:i.getValue(Ze),multipleSelectionController:t.multipleSelectionController??s.add(new it(i)),keyboardNavigationEventFilter:ht(n),scrollByPage:Boolean(i.getValue(qe))},s]}let st=class extends l.B8{constructor(e,t,i,n,s,o,r,a,l){const c=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(a.getValue(Ve)),[d,h]=l.invokeFunction(nt,s);super(e,t,i,n,{keyboardSupport:!1,...d,horizontalScrolling:c}),this.disposables.add(h),this.contextKeyService=Fe(o,this),this.disposables.add(Be(this.contextKeyService,this)),this.listSupportsMultiSelect=Se.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),Ee.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=xe.bindTo(this.contextKeyService),this.listDoubleSelection=Le.bindTo(this.contextKeyService),this.listMultiSelection=De.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=tt(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(We)&&(this._useAltAsMultipleSelectionModifier=tt(a));let t={};if(e.affectsConfiguration(Ve)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(Ve));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qe)){const e=Boolean(a.getValue(qe));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Qe)){const e=Boolean(a.getValue(Qe));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Ye)){const e=a.getValue(Ye);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Ze)){const e=a.getValue(Ze);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new lt(this,{configurationService:a,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,fe.t8)(e):fe.IN)}};st=me([_e(5,ce.fN),_e(6,ve),_e(7,ae.pG),_e(8,ue._Y)],st);let ot=class extends h{constructor(e,t,i,n,s,o,r,l,c){const d=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(l.getValue(Ve)),[h,u]=c.invokeFunction(nt,s);super(e,t,i,n,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables=new a.Cm,this.disposables.add(u),this.contextKeyService=Fe(o,this),this.disposables.add(Be(this.contextKeyService,this.widget)),this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=Se.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),Ee.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=tt(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(We)&&(this._useAltAsMultipleSelectionModifier=tt(l));let t={};if(e.affectsConfiguration(Ve)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Ve));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qe)){const e=Boolean(l.getValue(qe));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Qe)){const e=Boolean(l.getValue(Qe));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Ye)){const e=l.getValue(Ye);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Ze)){const e=l.getValue(Ze);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new lt(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,fe.t8)(e):fe.IN)}dispose(){this.disposables.dispose(),super.dispose()}};ot=me([_e(5,ce.fN),_e(6,ve),_e(7,ae.pG),_e(8,ue._Y)],ot);let rt=class extends _{constructor(e,t,i,n,s,o,r,a,l,c){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(Ve)),[h,u]=c.invokeFunction(nt,o);super(e,t,i,n,s,{keyboardSupport:!1,...h,horizontalScrolling:d}),this.disposables.add(u),this.contextKeyService=Fe(r,this),this.disposables.add(Be(this.contextKeyService,this)),this.listSupportsMultiSelect=Se.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),Ee.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=xe.bindTo(this.contextKeyService),this.listDoubleSelection=Le.bindTo(this.contextKeyService),this.listMultiSelection=De.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=tt(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(We)&&(this._useAltAsMultipleSelectionModifier=tt(l));let t={};if(e.affectsConfiguration(Ve)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(Ve));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(qe)){const e=Boolean(l.getValue(qe));t={...t,scrollByPage:e}}if(e.affectsConfiguration(Qe)){const e=Boolean(l.getValue(Qe));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(Ye)){const e=l.getValue(Ye);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(Ze)){const e=l.getValue(Ze);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new ct(this,{configurationService:l,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?(0,fe.t8)(e):fe.IN)}dispose(){this.disposables.dispose(),super.dispose()}};rt=me([_e(6,ce.fN),_e(7,ve),_e(8,ae.pG),_e(9,ue._Y)],rt);class at extends a.jG{constructor(e,t){super(),this.widget=e,this._onDidOpen=this._register(new r.vl),this.onDidOpen=this._onDidOpen.event,this._register(r.Jh.filter(this.widget.onDidChangeSelection,(e=>(0,n.kx)(e.browserEvent)))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof t?.openOnSingleClick&&t?.configurationService?(this.openOnSingleClick="doubleClick"!==t?.configurationService.getValue(He),this._register(t?.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(He)&&(this.openOnSingleClick="doubleClick"!==t?.configurationService.getValue(He))})))):this.openOnSingleClick=t?.openOnSingleClick??!0}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class lt extends at{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ct extends at{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class dt extends at{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function ht(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let ut=class extends P{constructor(e,t,i,n,s,o,r,a,l){const{options:c,getTypeNavigationMode:d,disposable:h}=o.invokeFunction(bt,s);super(e,t,i,n,c),this.disposables.add(h),this.internals=new wt(this,s,d,s.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};ut=me([_e(5,ue._Y),_e(6,ce.fN),_e(7,ve),_e(8,ae.pG)],ut);let gt=class extends B{constructor(e,t,i,n,s,o,r,a,l){const{options:c,getTypeNavigationMode:d,disposable:h}=o.invokeFunction(bt,s);super(e,t,i,n,c),this.disposables.add(h),this.internals=new wt(this,s,d,s.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};gt=me([_e(5,ue._Y),_e(6,ce.fN),_e(7,ve),_e(8,ae.pG)],gt);let pt=class extends oe{constructor(e,t,i,n,s,o,r,a,l,c){const{options:d,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(bt,o);super(e,t,i,n,s,d),this.disposables.add(u),this.internals=new wt(this,o,h,o.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};pt=me([_e(6,ue._Y),_e(7,ce.fN),_e(8,ve),_e(9,ae.pG)],pt);let ft=class extends te{get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,s,o,r,a,l,c){const{options:d,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(bt,o);super(e,t,i,n,s,d),this.disposables.add(u),this.internals=new wt(this,o,h,o.overrideStyles,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};ft=me([_e(6,ue._Y),_e(7,ce.fN),_e(8,ve),_e(9,ae.pG)],ft);let mt=class extends se{constructor(e,t,i,n,s,o,r,a,l,c,d){const{options:h,getTypeNavigationMode:u,disposable:g}=a.invokeFunction(bt,r);super(e,t,i,n,s,o,h),this.disposables.add(g),this.internals=new wt(this,r,u,r.overrideStyles,l,c,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function _t(e){const t=e.getValue(ze);if("highlight"===t)return v.vD.Highlight;if("filter"===t)return v.vD.Filter;const i=e.getValue(je);return"simple"===i||"highlight"===i?v.vD.Highlight:"filter"===i?v.vD.Filter:void 0}function vt(e){const t=e.getValue(Ke);return"fuzzy"===t?v.RD.Fuzzy:"contiguous"===t?v.RD.Contiguous:void 0}function bt(e,t){const i=e.get(ae.pG),n=e.get(he.l),s=e.get(ce.fN),o=e.get(ue._Y),r=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(i.getValue(Ve)),[a,c]=o.invokeFunction(nt,t),d=t.paddingBottom,h=void 0!==t.renderIndentGuides?t.renderIndentGuides:i.getValue(Ge);return{getTypeNavigationMode:()=>{const e=s.getContextKeyValue(Ae);if("automatic"===e)return l._C.Automatic;if("trigger"===e)return l._C.Trigger;if(!1===s.getContextKeyValue(Oe))return l._C.Trigger;const t=i.getValue(Ue);return"automatic"===t?l._C.Automatic:"trigger"===t?l._C.Trigger:void 0},disposable:c,options:{keyboardSupport:!1,...a,indent:"number"==typeof i.getValue($e)?i.getValue($e):void 0,renderIndentGuides:h,smoothScrolling:Boolean(i.getValue(Qe)),defaultFindMode:_t(i),defaultFindMatchType:vt(i),horizontalScrolling:r,scrollByPage:Boolean(i.getValue(qe)),paddingBottom:d,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:t.expandOnlyOnTwistieClick??"doubleClick"===i.getValue(Xe),contextViewProvider:n,findWidgetStyles:fe.Dk,enableStickyScroll:Boolean(i.getValue(Je)),stickyScrollMaxItemCount:Number(i.getValue(et))}}}mt=me([_e(7,ue._Y),_e(8,ce.fN),_e(9,ve),_e(10,ae.pG)],mt);let wt=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,s,o,r){this.tree=e,this.disposables=[],this.contextKeyService=Fe(s,e),this.disposables.push(Be(this.contextKeyService,e)),this.listSupportsMultiSelect=Se.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),Ee.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=Ne.bindTo(this.contextKeyService),this.listSupportFindWidget.set(t.findWidgetEnabled??!0),this.hasSelectionOrFocus=xe.bindTo(this.contextKeyService),this.hasDoubleSelection=Le.bindTo(this.contextKeyService),this.hasMultiSelection=De.bindTo(this.contextKeyService),this.treeElementCanCollapse=Ie.bindTo(this.contextKeyService),this.treeElementHasParent=Me.bindTo(this.contextKeyService),this.treeElementCanExpand=Te.bindTo(this.contextKeyService),this.treeElementHasChild=Re.bindTo(this.contextKeyService),this.treeFindOpen=Pe.bindTo(this.contextKeyService),this.treeStickyScrollFocused=ye.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=tt(r),this.updateStyleOverrides(n);const a=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},l=new Set;l.add(Ae),l.add(Oe),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),a()})),e.onDidChangeCollapseState(a),e.onDidChangeModel(a),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),e.onDidChangeStickyScrollFocused((e=>this.treeStickyScrollFocused.set(e))),r.onDidChangeConfiguration((n=>{let s={};if(n.affectsConfiguration(We)&&(this._useAltAsMultipleSelectionModifier=tt(r)),n.affectsConfiguration($e)){const e=r.getValue($e);s={...s,indent:e}}if(n.affectsConfiguration(Ge)&&void 0===t.renderIndentGuides){const e=r.getValue(Ge);s={...s,renderIndentGuides:e}}if(n.affectsConfiguration(Qe)){const e=Boolean(r.getValue(Qe));s={...s,smoothScrolling:e}}if(n.affectsConfiguration(ze)||n.affectsConfiguration(je)){const e=_t(r);s={...s,defaultFindMode:e}}if(n.affectsConfiguration(Ue)||n.affectsConfiguration(je)){const e=i();s={...s,typeNavigationMode:e}}if(n.affectsConfiguration(Ke)){const e=vt(r);s={...s,defaultFindMatchType:e}}if(n.affectsConfiguration(Ve)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(Ve));s={...s,horizontalScrolling:e}}if(n.affectsConfiguration(qe)){const e=Boolean(r.getValue(qe));s={...s,scrollByPage:e}}if(n.affectsConfiguration(Xe)&&void 0===t.expandOnlyOnTwistieClick&&(s={...s,expandOnlyOnTwistieClick:"doubleClick"===r.getValue(Xe)}),n.affectsConfiguration(Je)){const e=r.getValue(Je);s={...s,enableStickyScroll:e}}if(n.affectsConfiguration(et)){const e=Math.max(1,r.getValue(et));s={...s,stickyScrollMaxItemCount:e}}if(n.affectsConfiguration(Ye)){const e=r.getValue(Ye);s={...s,mouseWheelScrollSensitivity:e}}if(n.affectsConfiguration(Ze)){const e=r.getValue(Ze);s={...s,fastScrollSensitivity:e}}Object.keys(s).length>0&&e.updateOptions(s)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(l)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new dt(e,{configurationService:r,...t}),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?(0,fe.t8)(e):fe.IN)}dispose(){this.disposables=(0,a.AS)(this.disposables)}};wt=me([_e(4,ce.fN),_e(5,ve),_e(6,ae.pG)],wt),pe.O.as(le.Fd.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,re.kg)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[We]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,re.kg)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,re.kg)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,re.kg)({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.")},[He]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,re.kg)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Ve]:{type:"boolean",default:!1,description:(0,re.kg)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[qe]:{type:"boolean",default:!1,description:(0,re.kg)("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[$e]:{type:"number",default:8,minimum:4,maximum:40,description:(0,re.kg)("tree indent setting","Controls tree indentation in pixels.")},[Ge]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,re.kg)("render tree indent guides","Controls whether the tree should render indent guides.")},[Qe]:{type:"boolean",default:!1,description:(0,re.kg)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Ye]:{type:"number",default:1,markdownDescription:(0,re.kg)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Ze]:{type:"number",default:5,markdownDescription:(0,re.kg)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[ze]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,re.kg)("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),(0,re.kg)("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:(0,re.kg)("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[je]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,re.kg)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,re.kg)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,re.kg)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,re.kg)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:(0,re.kg)("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[Ke]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,re.kg)("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),(0,re.kg)("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:(0,re.kg)("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[Xe]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,re.kg)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[Je]:{type:"boolean",default:!0,description:(0,re.kg)("sticky scroll","Controls whether sticky scrolling is enabled in trees.")},[et]:{type:"number",minimum:1,default:7,markdownDescription:(0,re.kg)("sticky scroll maximum items","Controls the number of sticky elements displayed in the tree when {0} is enabled.","`#workbench.tree.enableStickyScroll#`")},[Ue]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:(0,re.kg)("typeNavigationMode2","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}})},76925:function(e,t,i){"use strict";i.d(t,{$b:function(){return a},Cr:function(){return d},Dk:function(){return h},rr:function(){return r}});var n=i(80670),s=i(35114),o=i(97848);const r=(0,i(63619).u1)("logService");var a;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(a||(a={}));const l=a.Info;class c extends s.jG{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new n.vl),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==a.Off&&this.level<=e}}class d extends c{constructor(e=l,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(a.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(a.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(a.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(a.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(a.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}}class h extends c{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}new o.N1("logLevel",function(e){switch(e){case a.Trace:return"trace";case a.Debug:return"debug";case a.Info:return"info";case a.Warning:return"warn";case a.Error:return"error";case a.Off:return"off"}}(a.Info))},84119:function(e,t,i){"use strict";i.d(t,{DR:function(){return l},cj:function(){return n},oc:function(){return s}});var n,s,o=i(64159),r=i(14374),a=i(63619);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(n||(n={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,r.kg)("sev.error","Error"),t[e.Warning]=(0,r.kg)("sev.warning","Warning"),t[e.Info]=(0,r.kg)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case o.A.Error:return e.Error;case o.A.Warning:return e.Warning;case o.A.Info:return e.Info;case o.A.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return o.A.Error;case e.Warning:return o.A.Warning;case e.Info:return o.A.Info;case e.Hint:return o.A.Ignore}}}(n||(n={})),function(e){const t="";function i(e,i){const s=[t];return e.source?s.push(e.source.replace("¦","\\¦")):s.push(t),e.code?"string"==typeof e.code?s.push(e.code.replace("¦","\\¦")):s.push(e.code.value.replace("¦","\\¦")):s.push(t),void 0!==e.severity&&null!==e.severity?s.push(n.toString(e.severity)):s.push(t),e.message&&i?s.push(e.message.replace("¦","\\¦")):s.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?s.push(e.startLineNumber.toString()):s.push(t),void 0!==e.startColumn&&null!==e.startColumn?s.push(e.startColumn.toString()):s.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?s.push(e.endLineNumber.toString()):s.push(t),void 0!==e.endColumn&&null!==e.endColumn?s.push(e.endColumn.toString()):s.push(t),s.push(t),s.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(s||(s={}));const l=(0,a.u1)("markerService")},31835:function(e,t,i){"use strict";i.d(t,{AI:function(){return o},Kz:function(){return a},Ot:function(){return r}});var n=i(64159),s=i(63619),o=n.A;const r=(0,s.u1)("notificationService");class a{}},74827:function(e,t,i){"use strict";i.d(t,{V:function(){return o},w:function(){return r}});var n=i(73755),s=i(84230);function o(e,t,i){return(0,s.eP)({debugName:()=>`Configuration Key "${e}"`},(t=>i.onDidChangeConfiguration((i=>{i.affectsConfiguration(e)&&t(i)}))),(()=>i.getValue(e)??t))}function r(e,t,i){const s=e.bindTo(t);return(0,n.zL)({debugName:()=>`Set Context Key "${e.key}"`},(e=>{s.set(i(e))}))}},95607:function(e,t,i){"use strict";i.d(t,{C:function(){return n},e:function(){return s}});const n=(0,i(63619).u1)("openerService");function s(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},86171:function(e,t,i){"use strict";i.d(t,{G5:function(){return s},N8:function(){return r},ke:function(){return o}});var n=i(63619);const s=(0,n.u1)("progressService");Object.freeze({total(){},worked(){},done(){}});class o{static{this.None=Object.freeze({report(){}})}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}const r=(0,n.u1)("editorProgressService")},6209:function(e,t,i){"use strict";i.d(t,{Fd:function(){return a},aJ:function(){return n}});var n,s=i(97358),o=i(35114),r=i(56419);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};r.O.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,o.s)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,s.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},43575:function(e,t,i){"use strict";i.d(t,{C1:function(){return r},Fp:function(){return a},GK:function(){return c},Ym:function(){return s},dH:function(){return l},kF:function(){return o}});var n=i(63619);const s={ctrlCmd:!1,alt:!1};var o,r,a,l;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(o||(o={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={})),function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage",e[e.NextSeparator=8]="NextSeparator",e[e.PreviousSeparator=9]="PreviousSeparator"}(a||(a={})),function(e){e[e.Title=1]="Title",e[e.Inline=2]="Inline"}(l||(l={})),new class{constructor(e){this.options=e}};const c=(0,n.u1)("quickInputService")},56419:function(e,t,i){"use strict";i.d(t,{O:function(){return o}});var n=i(93066),s=i(24219);const o=new class{constructor(){this.data=new Map}add(e,t){n.ok(s.Kg(e)),n.ok(s.Gv(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},87332:function(e,t,i){"use strict";i.d(t,{CS:function(){return p},pc:function(){return _},LP:function(){return f}});var n,s,o=i(80670),r=i(35114),a=i(24219),l=i(90890),c=i(23560);!function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",e[e.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(s||(s={}));class d extends r.jG{static{this.DEFAULT_FLUSH_DELAY=100}constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new o.fV),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=s.None,this.cache=new Map,this.flushDelayer=this._register(new l.Th(d.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){this._onDidChangeStorage.pause();try{e.changed?.forEach(((e,t)=>this.acceptExternal(t,e))),e.deleted?.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===s.Closed)return;let i=!1;(0,a.z)(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return(0,a.z)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.z)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.z)(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===s.Closed)return;if((0,a.z)(t))return this.delete(e,i);const n=(0,a.Gv)(t)||Array.isArray(t)?(0,c.As)(t):String(t);return this.cache.get(e)!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}async delete(e,t=!1){if(this.state!==s.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()}))}async doFlush(e){return this.options.hint===n.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger((()=>this.flushPending()),e)}}class h{constructor(){this.onDidChangeItemsExternal=o.Jh.None,this.items=new Map}async updateItems(e){e.insert?.forEach(((e,t)=>this.items.set(t,e))),e.delete?.forEach((e=>this.items.delete(e)))}}var u=i(63619);const g="__$__targetStorageMarker",p=(0,u.u1)("storageService");var f;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(f||(f={}));class m extends r.jG{static{this.DEFAULT_FLUSH_INTERVAL=6e4}constructor(e={flushInterval:m.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new o.fV),this._onDidChangeTarget=this._register(new o.fV),this._onWillSaveState=this._register(new o.vl),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return o.Jh.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===g){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){return this.getStorage(t)?.get(e,i)}getBoolean(e,t,i){return this.getStorage(t)?.getBoolean(e,i)}getNumber(e,t,i){return this.getStorage(t)?.getNumber(e,i)}store(e,t,i,n,s=!1){(0,a.z)(t)?this.remove(e,i,s):this.withPausedEmitters((()=>{this.updateKeyTarget(e,i,n),this.getStorage(i)?.set(e,t,s)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{this.updateKeyTarget(e,t,void 0),this.getStorage(t)?.delete(e,i)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){const s=this.getKeyTargets(t);"number"==typeof i?s[e]!==i&&(s[e]=i,this.getStorage(t)?.set(g,JSON.stringify(s),n)):"number"==typeof s[e]&&(delete s[e],this.getStorage(t)?.set(g,JSON.stringify(s),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?function(e){const t=e.get(g);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}(t):Object.create(null)}}class _ extends m{constructor(){super(),this.applicationStorage=this._register(new d(new h,{hint:n.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new d(new h,{hint:n.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new d(new h,{hint:n.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}},2727:function(e,t,i){"use strict";i.d(t,{k:function(){return n}});const n=(0,i(63619).u1)("telemetryService")},52010:function(e,t,i){"use strict";i.d(t,{Dk:function(){return d},IN:function(){return u},RE:function(){return p},XS:function(){return f},cv:function(){return r},ho:function(){return c},ir:function(){return o},m$:function(){return h},mk:function(){return l},oJ:function(){return a},t8:function(){return g}});var n=i(4195),s=i(59321);const o={keybindingLabelBackground:(0,n.GuP)(n.HDX),keybindingLabelForeground:(0,n.GuP)(n.eUu),keybindingLabelBorder:(0,n.GuP)(n.zUX),keybindingLabelBottomBorder:(0,n.GuP)(n.Qfh),keybindingLabelShadow:(0,n.GuP)(n.f9l)},r={buttonForeground:(0,n.GuP)(n.G_h),buttonSeparator:(0,n.GuP)(n.Q1$),buttonBackground:(0,n.GuP)(n.XJc),buttonHoverBackground:(0,n.GuP)(n.T9h),buttonSecondaryForeground:(0,n.GuP)(n.Inn),buttonSecondaryBackground:(0,n.GuP)(n.xOA),buttonSecondaryHoverBackground:(0,n.GuP)(n.nZG),buttonBorder:(0,n.GuP)(n.raQ)},a={progressBarBackground:(0,n.GuP)(n.BTi)},l={inputActiveOptionBorder:(0,n.GuP)(n.uNK),inputActiveOptionForeground:(0,n.GuP)(n.$$0),inputActiveOptionBackground:(0,n.GuP)(n.c1f)},c=((0,n.GuP)(n.jOE),(0,n.GuP)(n.Ukx),(0,n.GuP)(n.Ips),(0,n.GuP)(n.kPT),(0,n.GuP)(n.xWN),(0,n.GuP)(n.ZBU),(0,n.GuP)(n.jr9),(0,n.GuP)(n.OcU),(0,n.GuP)(n.C5U),(0,n.GuP)(n.t0B),(0,n.GuP)(n.CgL),(0,n.GuP)(n.FiB),(0,n.GuP)(n.f9l),(0,n.GuP)(n.b1q),(0,n.GuP)(n.tYX),(0,n.GuP)(n.JPj),(0,n.GuP)(n.bNw),(0,n.GuP)(n.vwp),{inputBackground:(0,n.GuP)(n.L4c),inputForeground:(0,n.GuP)(n.cws),inputBorder:(0,n.GuP)(n.Zgs),inputValidationInfoBorder:(0,n.GuP)(n.YSW),inputValidationInfoBackground:(0,n.GuP)(n.I$A),inputValidationInfoForeground:(0,n.GuP)(n.L9Z),inputValidationWarningBorder:(0,n.GuP)(n.C1n),inputValidationWarningBackground:(0,n.GuP)(n.ULt),inputValidationWarningForeground:(0,n.GuP)(n.T5N),inputValidationErrorBorder:(0,n.GuP)(n.eYZ),inputValidationErrorBackground:(0,n.GuP)(n._$n),inputValidationErrorForeground:(0,n.GuP)(n.h9z)}),d={listFilterWidgetBackground:(0,n.GuP)(n.pnl),listFilterWidgetOutline:(0,n.GuP)(n.fiM),listFilterWidgetNoMatchesOutline:(0,n.GuP)(n.P9Z),listFilterWidgetShadow:(0,n.GuP)(n.H8q),inputBoxStyles:c,toggleStyles:l},h={badgeBackground:(0,n.GuP)(n.WMx),badgeForeground:(0,n.GuP)(n.zRE),badgeBorder:(0,n.GuP)(n.b1q)},u=((0,n.GuP)(n.vV$),(0,n.GuP)(n.mc0),(0,n.GuP)(n.etE),(0,n.GuP)(n.etE),(0,n.GuP)(n.sAS),{listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.GuP)(n.VFX),listFocusForeground:(0,n.GuP)(n.efJ),listFocusOutline:(0,n.GuP)(n.p7Y),listActiveSelectionBackground:(0,n.GuP)(n.Rjz),listActiveSelectionForeground:(0,n.GuP)(n.GVV),listActiveSelectionIconForeground:(0,n.GuP)(n.fED),listFocusAndSelectionOutline:(0,n.GuP)(n.gtq),listFocusAndSelectionBackground:(0,n.GuP)(n.Rjz),listFocusAndSelectionForeground:(0,n.GuP)(n.GVV),listInactiveSelectionBackground:(0,n.GuP)(n.uNx),listInactiveSelectionIconForeground:(0,n.GuP)(n.C9U),listInactiveSelectionForeground:(0,n.GuP)(n.f4y),listInactiveFocusBackground:(0,n.GuP)(n.CQ3),listInactiveFocusOutline:(0,n.GuP)(n.ijf),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listDropOverBackground:(0,n.GuP)(n.Yoe),listDropBetweenBackground:(0,n.GuP)(n.yIp),listSelectionOutline:(0,n.GuP)(n.buw),listHoverOutline:(0,n.GuP)(n.buw),treeIndentGuidesStroke:(0,n.GuP)(n.U4U),treeInactiveIndentGuidesStroke:(0,n.GuP)(n.pft),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:(0,n.GuP)(n.bXl),tableColumnsBorder:(0,n.GuP)(n.k5u),tableOddRowsBackgroundColor:(0,n.GuP)(n.sbQ)});function g(e){return function(e,t){const i={...t};for(const t in e){const s=e[t];i[t]=void 0!==s?(0,n.GuP)(s):void 0}return i}(e,u)}const p={selectBackground:(0,n.GuP)(n.rvE),selectListBackground:(0,n.GuP)(n.lWP),selectForeground:(0,n.GuP)(n.yqq),decoratorRightForeground:(0,n.GuP)(n.NBf),selectBorder:(0,n.GuP)(n.HcB),focusBorder:(0,n.GuP)(n.tAP),listFocusBackground:(0,n.GuP)(n.AlL),listInactiveSelectionIconForeground:(0,n.GuP)(n.c7i),listFocusForeground:(0,n.GuP)(n.nH),listFocusOutline:(0,n.HP_)(n.buw,s.Q1.transparent.toString()),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listHoverOutline:(0,n.GuP)(n.buw),selectListBorder:(0,n.GuP)(n.sIe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},f={shadowColor:(0,n.GuP)(n.f9l),borderColor:(0,n.GuP)(n.g$2),foregroundColor:(0,n.GuP)(n.dd_),backgroundColor:(0,n.GuP)(n.c6Y),selectionForegroundColor:(0,n.GuP)(n.pmr),selectionBackgroundColor:(0,n.GuP)(n.Ux$),selectionBorderColor:(0,n.GuP)(n.SNb),separatorColor:(0,n.GuP)(n.D7X),scrollbarShadow:(0,n.GuP)(n.bXl),scrollbarSliderBackground:(0,n.GuP)(n.gnV),scrollbarSliderHoverBackground:(0,n.GuP)(n.cI_),scrollbarSliderActiveBackground:(0,n.GuP)(n.mhZ)}},4195:function(e,t,i){"use strict";i.d(t,{FdG:function(){return n.Fd},buw:function(){return d},GuP:function(){return n.Gu},Bbc:function(){return n.Bb},HP_:function(){return n.HP},WMx:function(){return u},zRE:function(){return g},sAS:function(){return ce},vV$:function(){return ae},etE:function(){return le},mc0:function(){return re},XJc:function(){return Xe},raQ:function(){return et},G_h:function(){return Ye},T9h:function(){return Je},xOA:function(){return it},Inn:function(){return tt},nZG:function(){return nt},Q1$:function(){return Ze},OcU:function(){return ht},C5U:function(){return gt},t0B:function(){return ut},b1q:function(){return c},EY1:function(){return Z},ZEf:function(){return X},Gj6:function(){return J},ld8:function(){return te},$BZ:function(){return ie},GNm:function(){return ee},Ztu:function(){return T},YtV:function(){return b},AN$:function(){return x},Rbi:function(){return k},f3U:function(){return F},Ubg:function(){return B},ECk:function(){return H},p8Y:function(){return W},S5J:function(){return V},By2:function(){return w},i61:function(){return M},WfR:function(){return z},oZ8:function(){return U},tan:function(){return A},IIb:function(){return I},pOz:function(){return N},WL6:function(){return q},P6i:function(){return j},B2L:function(){return Q},sjA:function(){return G},_pU:function(){return $},HwT:function(){return K},seu:function(){return R},rm4:function(){return P},QwA:function(){return O},whs:function(){return L},Stt:function(){return E},Hng:function(){return D},CgL:function(){return C},sIe:function(){return S},FiB:function(){return y},tAP:function(){return l},CU6:function(){return r},t4B:function(){return a},c1f:function(){return Ae},uNK:function(){return Re},$$0:function(){return Oe},L4c:function(){return Ie},Zgs:function(){return Te},cws:function(){return Me},_$n:function(){return Ue},eYZ:function(){return qe},h9z:function(){return je},I$A:function(){return Fe},YSW:function(){return We},L9Z:function(){return Be},ULt:function(){return He},C1n:function(){return ze},T5N:function(){return Ve},HDX:function(){return pt},zUX:function(){return mt},Qfh:function(){return _t},eUu:function(){return ft},Rjz:function(){return yt},GVV:function(){return St},fED:function(){return kt},yIp:function(){return Rt},Yoe:function(){return Tt},pnl:function(){return Ot},P9Z:function(){return Bt},fiM:function(){return Ft},H8q:function(){return Wt},gtq:function(){return Ct},VFX:function(){return vt},efJ:function(){return bt},eMz:function(){return At},p7Y:function(){return wt},QI5:function(){return Pt},lO1:function(){return It},QRv:function(){return Mt},CQ3:function(){return Et},ijf:function(){return Nt},uNx:function(){return xt},f4y:function(){return Lt},C9U:function(){return Dt},c6Y:function(){return Kt},g$2:function(){return jt},dd_:function(){return qt},Ux$:function(){return Gt},SNb:function(){return Qt},pmr:function(){return $t},D7X:function(){return Yt},ILr:function(){return Ee},yLC:function(){return De},AjU:function(){return ye},K1Z:function(){return Ne},KoI:function(){return xe},yr0:function(){return ke},Xp1:function(){return Se},uMG:function(){return Le},yLr:function(){return n.yL},fAP:function(){return _e},z5H:function(){return ve},iwL:function(){return ti},NBf:function(){return ei},tYX:function(){return be},bNw:function(){return Ce},JPj:function(){return we},BTi:function(){return v},ELA:function(){return Zt},HJZ:function(){return Xt},AlL:function(){return oi},nH:function(){return ni},c7i:function(){return si},er1:function(){return Jt},Ukx:function(){return ot},Ips:function(){return rt},jOE:function(){return st},xWN:function(){return lt},ZBU:function(){return ct},kPT:function(){return at},jr9:function(){return dt},x1A:function(){return n.x1},bXl:function(){return p},mhZ:function(){return _},gnV:function(){return f},cI_:function(){return m},rvE:function(){return Ke},HcB:function(){return Qe},yqq:function(){return Ge},lWP:function(){return $e},k5u:function(){return zt},sbQ:function(){return Ut},vwp:function(){return h},JO0:function(){return n.JO},pft:function(){return Vt},U4U:function(){return Ht},DSL:function(){return se},f9l:function(){return ne}});var n=i(8552),s=i(14374),o=i(59321);const r=(0,n.x1)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},s.kg("foreground","Overall foreground color. This color is only used if not overridden by a component.")),a=((0,n.x1)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},s.kg("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component.")),(0,n.x1)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},s.kg("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),(0,n.x1)("descriptionForeground",{light:"#717171",dark:(0,n.JO)(r,.7),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},s.kg("descriptionForeground","Foreground color for description text providing additional information, for example for a label.")),(0,n.x1)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},s.kg("iconForeground","The default color for icons in the workbench."))),l=(0,n.x1)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},s.kg("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),c=(0,n.x1)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},s.kg("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),d=(0,n.x1)("contrastActiveBorder",{light:null,dark:null,hcDark:l,hcLight:l},s.kg("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),h=((0,n.x1)("selection.background",null,s.kg("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),(0,n.x1)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},s.kg("textLinkForeground","Foreground color for links in text."))),u=((0,n.x1)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},s.kg("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),(0,n.x1)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:o.Q1.black,hcLight:"#292929"},s.kg("textSeparatorForeground","Color for text separators.")),(0,n.x1)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},s.kg("textPreformatForeground","Foreground color for preformatted text segments.")),(0,n.x1)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},s.kg("textPreformatBackground","Background color for preformatted text segments.")),(0,n.x1)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},s.kg("textBlockQuoteBackground","Background color for block quotes in text.")),(0,n.x1)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:o.Q1.white,hcLight:"#292929"},s.kg("textBlockQuoteBorder","Border color for block quotes in text.")),(0,n.x1)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:o.Q1.black,hcLight:"#F2F2F2"},s.kg("textCodeBlockBackground","Background color for code blocks in text.")),(0,n.x1)("sash.hoverBorder",l,s.kg("sashActiveBorder","Border color of active sashes.")),(0,n.x1)("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:o.Q1.black,hcLight:"#0F4A85"},s.kg("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."))),g=(0,n.x1)("badge.foreground",{dark:o.Q1.white,light:"#333",hcDark:o.Q1.white,hcLight:o.Q1.white},s.kg("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),p=(0,n.x1)("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},s.kg("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),f=(0,n.x1)("scrollbarSlider.background",{dark:o.Q1.fromHex("#797979").transparent(.4),light:o.Q1.fromHex("#646464").transparent(.4),hcDark:(0,n.JO)(c,.6),hcLight:(0,n.JO)(c,.4)},s.kg("scrollbarSliderBackground","Scrollbar slider background color.")),m=(0,n.x1)("scrollbarSlider.hoverBackground",{dark:o.Q1.fromHex("#646464").transparent(.7),light:o.Q1.fromHex("#646464").transparent(.7),hcDark:(0,n.JO)(c,.8),hcLight:(0,n.JO)(c,.8)},s.kg("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),_=(0,n.x1)("scrollbarSlider.activeBackground",{dark:o.Q1.fromHex("#BFBFBF").transparent(.4),light:o.Q1.fromHex("#000000").transparent(.6),hcDark:c,hcLight:c},s.kg("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),v=(0,n.x1)("progressBar.background",{dark:o.Q1.fromHex("#0E70C0"),light:o.Q1.fromHex("#0E70C0"),hcDark:c,hcLight:c},s.kg("progressBarBackground","Background color of the progress bar that can show for long running operations.")),b=(0,n.x1)("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("editorBackground","Editor background color.")),w=(0,n.x1)("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:o.Q1.white,hcLight:r},s.kg("editorForeground","Editor default foreground color.")),C=((0,n.x1)("editorStickyScroll.background",b,s.kg("editorStickyScrollBackground","Background color of sticky scroll in the editor")),(0,n.x1)("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg("editorStickyScrollHoverBackground","Background color of sticky scroll on hover in the editor")),(0,n.x1)("editorStickyScroll.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("editorStickyScrollBorder","Border color of sticky scroll in the editor")),(0,n.x1)("editorStickyScroll.shadow",p,s.kg("editorStickyScrollShadow"," Shadow color of sticky scroll in the editor")),(0,n.x1)("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:o.Q1.white},s.kg("editorWidgetBackground","Background color of editor widgets, such as find/replace."))),y=(0,n.x1)("editorWidget.foreground",r,s.kg("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),S=(0,n.x1)("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:c,hcLight:c},s.kg("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.")),k=((0,n.x1)("editorWidget.resizeBorder",null,s.kg("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.")),(0,n.x1)("editorError.background",null,s.kg("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},s.kg("editorError.foreground","Foreground color of error squigglies in the editor."))),x=(0,n.x1)("editorError.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},s.kg("errorBorder","If set, color of double underlines for errors in the editor.")),L=(0,n.x1)("editorWarning.background",null,s.kg("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),D=(0,n.x1)("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},s.kg("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),E=(0,n.x1)("editorWarning.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#FFCC00").transparent(.8),hcLight:o.Q1.fromHex("#FFCC00").transparent(.8)},s.kg("warningBorder","If set, color of double underlines for warnings in the editor.")),N=((0,n.x1)("editorInfo.background",null,s.kg("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},s.kg("editorInfo.foreground","Foreground color of info squigglies in the editor."))),I=(0,n.x1)("editorInfo.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},s.kg("infoBorder","If set, color of double underlines for infos in the editor.")),M=(0,n.x1)("editorHint.foreground",{dark:o.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},s.kg("editorHint.foreground","Foreground color of hint squigglies in the editor.")),T=((0,n.x1)("editorHint.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},s.kg("hintBorder","If set, color of double underlines for hints in the editor.")),(0,n.x1)("editorLink.activeForeground",{dark:"#4E94CE",light:o.Q1.blue,hcDark:o.Q1.cyan,hcLight:"#292929"},s.kg("activeLinkForeground","Color of active links."))),R=(0,n.x1)("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},s.kg("editorSelectionBackground","Color of the editor selection.")),P=(0,n.x1)("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:o.Q1.white},s.kg("editorSelectionForeground","Color of the selected text for high contrast.")),A=(0,n.x1)("editor.inactiveSelectionBackground",{light:(0,n.JO)(R,.5),dark:(0,n.JO)(R,.5),hcDark:(0,n.JO)(R,.7),hcLight:(0,n.JO)(R,.5)},s.kg("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),O=(0,n.x1)("editor.selectionHighlightBackground",{light:(0,n.oG)(R,b,.3,.6),dark:(0,n.oG)(R,b,.3,.6),hcDark:null,hcLight:null},s.kg("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),F=((0,n.x1)("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:d,hcLight:d},s.kg("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),(0,n.x1)("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},s.kg("editorFindMatch","Color of the current search match.")),(0,n.x1)("editor.findMatchForeground",null,s.kg("editorFindMatchForeground","Text color of the current search match."))),B=(0,n.x1)("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},s.kg("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),W=(0,n.x1)("editor.findMatchHighlightForeground",null,s.kg("findMatchHighlightForeground","Foreground color of the other search matches."),!0),H=((0,n.x1)("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},s.kg("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editor.findMatchBorder",{light:null,dark:null,hcDark:d,hcLight:d},s.kg("editorFindMatchBorder","Border color of the current search match.")),(0,n.x1)("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:d,hcLight:d},s.kg("findMatchHighlightBorder","Border color of the other search matches."))),V=(0,n.x1)("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:(0,n.JO)(d,.4),hcLight:(0,n.JO)(d,.4)},s.kg("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),z=((0,n.x1)("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},s.kg("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),(0,n.x1)("editorHoverWidget.background",C,s.kg("hoverBackground","Background color of the editor hover."))),U=((0,n.x1)("editorHoverWidget.foreground",y,s.kg("hoverForeground","Foreground color of the editor hover.")),(0,n.x1)("editorHoverWidget.border",S,s.kg("hoverBorder","Border color of the editor hover."))),j=((0,n.x1)("editorHoverWidget.statusBarBackground",{dark:(0,n.a)(z,.2),light:(0,n.e$)(z,.05),hcDark:C,hcLight:C},s.kg("statusBarBackground","Background color of the editor hover status bar.")),(0,n.x1)("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:o.Q1.white,hcLight:o.Q1.black},s.kg("editorInlayHintForeground","Foreground color of inline hints"))),q=(0,n.x1)("editorInlayHint.background",{dark:(0,n.JO)(u,.1),light:(0,n.JO)(u,.1),hcDark:(0,n.JO)(o.Q1.white,.1),hcLight:(0,n.JO)(u,.1)},s.kg("editorInlayHintBackground","Background color of inline hints")),K=(0,n.x1)("editorInlayHint.typeForeground",j,s.kg("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),$=(0,n.x1)("editorInlayHint.typeBackground",q,s.kg("editorInlayHintBackgroundTypes","Background color of inline hints for types")),G=(0,n.x1)("editorInlayHint.parameterForeground",j,s.kg("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Q=(0,n.x1)("editorInlayHint.parameterBackground",q,s.kg("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),Y=(0,n.x1)("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},s.kg("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Z=((0,n.x1)("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},s.kg("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),(0,n.x1)("editorLightBulbAi.foreground",Y,s.kg("editorLightBulbAiForeground","The color used for the lightbulb AI icon.")),(0,n.x1)("editor.snippetTabstopHighlightBackground",{dark:new o.Q1(new o.bU(124,124,124,.3)),light:new o.Q1(new o.bU(10,50,100,.2)),hcDark:new o.Q1(new o.bU(124,124,124,.3)),hcLight:new o.Q1(new o.bU(10,50,100,.2))},s.kg("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),(0,n.x1)("editor.snippetTabstopHighlightBorder",null,s.kg("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBackground",null,s.kg("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Q1(new o.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},s.kg("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),new o.Q1(new o.bU(155,185,85,.2))),X=new o.Q1(new o.bU(255,0,0,.2)),J=(0,n.x1)("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},s.kg("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ee=(0,n.x1)("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},s.kg("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),te=((0,n.x1)("diffEditor.insertedLineBackground",{dark:Z,light:Z,hcDark:null,hcLight:null},s.kg("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditor.removedLineBackground",{dark:X,light:X,hcDark:null,hcLight:null},s.kg("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditorGutter.insertedLineBackground",null,s.kg("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted.")),(0,n.x1)("diffEditorGutter.removedLineBackground",null,s.kg("diffEditorRemovedLineGutter","Background color for the margin where lines got removed.")),(0,n.x1)("diffEditorOverview.insertedForeground",null,s.kg("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content."))),ie=(0,n.x1)("diffEditorOverview.removedForeground",null,s.kg("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content.")),ne=((0,n.x1)("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},s.kg("diffEditorInsertedOutline","Outline color for the text that got inserted.")),(0,n.x1)("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},s.kg("diffEditorRemovedOutline","Outline color for text that got removed.")),(0,n.x1)("diffEditor.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("diffEditorBorder","Border color between the two text editors.")),(0,n.x1)("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},s.kg("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),(0,n.x1)("diffEditor.unchangedRegionBackground","sideBar.background",s.kg("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedRegionForeground","foreground",s.kg("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},s.kg("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor.")),(0,n.x1)("widget.shadow",{dark:(0,n.JO)(o.Q1.black,.36),light:(0,n.JO)(o.Q1.black,.16),hcDark:null,hcLight:null},s.kg("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),se=(0,n.x1)("widget.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("widgetBorder","Border color of widgets such as find/replace inside the editor.")),oe=(0,n.x1)("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},s.kg("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),re=((0,n.x1)("toolbar.hoverOutline",{dark:null,light:null,hcDark:d,hcLight:d},s.kg("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse")),(0,n.x1)("toolbar.activeBackground",{dark:(0,n.a)(oe,.1),light:(0,n.e$)(oe,.1),hcDark:null,hcLight:null},s.kg("toolbarActiveBackground","Toolbar background when holding the mouse over actions")),(0,n.x1)("breadcrumb.foreground",(0,n.JO)(r,.8),s.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items."))),ae=(0,n.x1)("breadcrumb.background",b,s.kg("breadcrumbsBackground","Background color of breadcrumb items.")),le=(0,n.x1)("breadcrumb.focusForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},s.kg("breadcrumbsFocusForeground","Color of focused breadcrumb items.")),ce=(0,n.x1)("breadcrumb.activeSelectionForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},s.kg("breadcrumbsSelectedForeground","Color of selected breadcrumb items.")),de=((0,n.x1)("breadcrumbPicker.background",C,s.kg("breadcrumbsSelectedBackground","Background color of breadcrumb item picker.")),o.Q1.fromHex("#40C8AE").transparent(.5)),he=o.Q1.fromHex("#40A6FF").transparent(.5),ue=o.Q1.fromHex("#606060").transparent(.4),ge=(0,n.x1)("merge.currentHeaderBackground",{dark:de,light:de,hcDark:null,hcLight:null},s.kg("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),pe=((0,n.x1)("merge.currentContentBackground",(0,n.JO)(ge,.4),s.kg("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.incomingHeaderBackground",{dark:he,light:he,hcDark:null,hcLight:null},s.kg("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),fe=((0,n.x1)("merge.incomingContentBackground",(0,n.JO)(pe,.4),s.kg("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.commonHeaderBackground",{dark:ue,light:ue,hcDark:null,hcLight:null},s.kg("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),me=((0,n.x1)("merge.commonContentBackground",(0,n.JO)(fe,.4),s.kg("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},s.kg("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."))),_e=((0,n.x1)("editorOverviewRuler.currentContentForeground",{dark:(0,n.JO)(ge,1),light:(0,n.JO)(ge,1),hcDark:me,hcLight:me},s.kg("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.incomingContentForeground",{dark:(0,n.JO)(pe,1),light:(0,n.JO)(pe,1),hcDark:me,hcLight:me},s.kg("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.commonContentForeground",{dark:(0,n.JO)(fe,1),light:(0,n.JO)(fe,1),hcDark:me,hcLight:me},s.kg("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},s.kg("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),ve=(0,n.x1)("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",s.kg("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),be=(0,n.x1)("problemsErrorIcon.foreground",k,s.kg("problemsErrorIconForeground","The color used for the problems error icon.")),we=(0,n.x1)("problemsWarningIcon.foreground",D,s.kg("problemsWarningIconForeground","The color used for the problems warning icon.")),Ce=(0,n.x1)("problemsInfoIcon.foreground",N,s.kg("problemsInfoIconForeground","The color used for the problems info icon.")),ye=(0,n.x1)("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},s.kg("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),Se=(0,n.x1)("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},s.kg("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),ke=(0,n.x1)("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},s.kg("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),xe=(0,n.x1)("minimap.infoHighlight",{dark:N,light:N,hcDark:I,hcLight:I},s.kg("minimapInfo","Minimap marker color for infos.")),Le=(0,n.x1)("minimap.warningHighlight",{dark:D,light:D,hcDark:E,hcLight:E},s.kg("overviewRuleWarning","Minimap marker color for warnings.")),De=(0,n.x1)("minimap.errorHighlight",{dark:new o.Q1(new o.bU(255,18,18,.7)),light:new o.Q1(new o.bU(255,18,18,.7)),hcDark:new o.Q1(new o.bU(255,50,50,1)),hcLight:"#B5200D"},s.kg("minimapError","Minimap marker color for errors.")),Ee=(0,n.x1)("minimap.background",null,s.kg("minimapBackground","Minimap background color.")),Ne=(0,n.x1)("minimap.foregroundOpacity",o.Q1.fromHex("#000f"),s.kg("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),Ie=((0,n.x1)("minimapSlider.background",(0,n.JO)(f,.5),s.kg("minimapSliderBackground","Minimap slider background color.")),(0,n.x1)("minimapSlider.hoverBackground",(0,n.JO)(m,.5),s.kg("minimapSliderHoverBackground","Minimap slider background color when hovering.")),(0,n.x1)("minimapSlider.activeBackground",(0,n.JO)(_,.5),s.kg("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),(0,n.x1)("charts.foreground",r,s.kg("chartsForeground","The foreground color used in charts.")),(0,n.x1)("charts.lines",(0,n.JO)(r,.5),s.kg("chartsLines","The color used for horizontal lines in charts.")),(0,n.x1)("charts.red",k,s.kg("chartsRed","The red color used in chart visualizations.")),(0,n.x1)("charts.blue",N,s.kg("chartsBlue","The blue color used in chart visualizations.")),(0,n.x1)("charts.yellow",D,s.kg("chartsYellow","The yellow color used in chart visualizations.")),(0,n.x1)("charts.orange",ye,s.kg("chartsOrange","The orange color used in chart visualizations.")),(0,n.x1)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},s.kg("chartsGreen","The green color used in chart visualizations.")),(0,n.x1)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},s.kg("chartsPurple","The purple color used in chart visualizations.")),(0,n.x1)("input.background",{dark:"#3C3C3C",light:o.Q1.white,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("inputBoxBackground","Input box background."))),Me=(0,n.x1)("input.foreground",r,s.kg("inputBoxForeground","Input box foreground.")),Te=(0,n.x1)("input.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("inputBoxBorder","Input box border.")),Re=(0,n.x1)("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:c,hcLight:c},s.kg("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Pe=(0,n.x1)("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},s.kg("inputOption.hoverBackground","Background color of activated options in input fields.")),Ae=(0,n.x1)("inputOption.activeBackground",{dark:(0,n.JO)(l,.4),light:(0,n.JO)(l,.2),hcDark:o.Q1.transparent,hcLight:o.Q1.transparent},s.kg("inputOption.activeBackground","Background hover color of options in input fields.")),Oe=(0,n.x1)("inputOption.activeForeground",{dark:o.Q1.white,light:o.Q1.black,hcDark:r,hcLight:r},s.kg("inputOption.activeForeground","Foreground color of activated options in input fields.")),Fe=((0,n.x1)("input.placeholderForeground",{light:(0,n.JO)(r,.5),dark:(0,n.JO)(r,.5),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},s.kg("inputPlaceholderForeground","Input box foreground color for placeholder text.")),(0,n.x1)("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("inputValidationInfoBackground","Input validation background color for information severity."))),Be=(0,n.x1)("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg("inputValidationInfoForeground","Input validation foreground color for information severity.")),We=(0,n.x1)("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:c,hcLight:c},s.kg("inputValidationInfoBorder","Input validation border color for information severity.")),He=(0,n.x1)("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("inputValidationWarningBackground","Input validation background color for warning severity.")),Ve=(0,n.x1)("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg("inputValidationWarningForeground","Input validation foreground color for warning severity.")),ze=(0,n.x1)("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:c,hcLight:c},s.kg("inputValidationWarningBorder","Input validation border color for warning severity.")),Ue=(0,n.x1)("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("inputValidationErrorBackground","Input validation background color for error severity.")),je=(0,n.x1)("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg("inputValidationErrorForeground","Input validation foreground color for error severity.")),qe=(0,n.x1)("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:c,hcLight:c},s.kg("inputValidationErrorBorder","Input validation border color for error severity.")),Ke=(0,n.x1)("dropdown.background",{dark:"#3C3C3C",light:o.Q1.white,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("dropdownBackground","Dropdown background.")),$e=(0,n.x1)("dropdown.listBackground",{dark:null,light:null,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg("dropdownListBackground","Dropdown list background.")),Ge=(0,n.x1)("dropdown.foreground",{dark:"#F0F0F0",light:r,hcDark:o.Q1.white,hcLight:r},s.kg("dropdownForeground","Dropdown foreground.")),Qe=(0,n.x1)("dropdown.border",{dark:Ke,light:"#CECECE",hcDark:c,hcLight:c},s.kg("dropdownBorder","Dropdown border.")),Ye=(0,n.x1)("button.foreground",o.Q1.white,s.kg("buttonForeground","Button foreground color.")),Ze=(0,n.x1)("button.separator",(0,n.JO)(Ye,.4),s.kg("buttonSeparator","Button separator color.")),Xe=(0,n.x1)("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},s.kg("buttonBackground","Button background color.")),Je=(0,n.x1)("button.hoverBackground",{dark:(0,n.a)(Xe,.2),light:(0,n.e$)(Xe,.2),hcDark:Xe,hcLight:Xe},s.kg("buttonHoverBackground","Button background color when hovering.")),et=(0,n.x1)("button.border",c,s.kg("buttonBorder","Button border color.")),tt=(0,n.x1)("button.secondaryForeground",{dark:o.Q1.white,light:o.Q1.white,hcDark:o.Q1.white,hcLight:r},s.kg("buttonSecondaryForeground","Secondary button foreground color.")),it=(0,n.x1)("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:o.Q1.white},s.kg("buttonSecondaryBackground","Secondary button background color.")),nt=(0,n.x1)("button.secondaryHoverBackground",{dark:(0,n.a)(it,.2),light:(0,n.e$)(it,.2),hcDark:null,hcLight:null},s.kg("buttonSecondaryHoverBackground","Secondary button background color when hovering.")),st=(0,n.x1)("radio.activeForeground",Oe,s.kg("radioActiveForeground","Foreground color of active radio option.")),ot=(0,n.x1)("radio.activeBackground",Ae,s.kg("radioBackground","Background color of active radio option.")),rt=(0,n.x1)("radio.activeBorder",Re,s.kg("radioActiveBorder","Border color of the active radio option.")),at=(0,n.x1)("radio.inactiveForeground",null,s.kg("radioInactiveForeground","Foreground color of inactive radio option.")),lt=(0,n.x1)("radio.inactiveBackground",null,s.kg("radioInactiveBackground","Background color of inactive radio option.")),ct=(0,n.x1)("radio.inactiveBorder",{light:(0,n.JO)(st,.2),dark:(0,n.JO)(st,.2),hcDark:(0,n.JO)(st,.4),hcLight:(0,n.JO)(st,.2)},s.kg("radioInactiveBorder","Border color of the inactive radio option.")),dt=(0,n.x1)("radio.inactiveHoverBackground",Pe,s.kg("radioHoverBackground","Background color of inactive active radio option when hovering.")),ht=(0,n.x1)("checkbox.background",Ke,s.kg("checkbox.background","Background color of checkbox widget.")),ut=((0,n.x1)("checkbox.selectBackground",C,s.kg("checkbox.select.background","Background color of checkbox widget when the element it's in is selected.")),(0,n.x1)("checkbox.foreground",Ge,s.kg("checkbox.foreground","Foreground color of checkbox widget."))),gt=(0,n.x1)("checkbox.border",Qe,s.kg("checkbox.border","Border color of checkbox widget.")),pt=((0,n.x1)("checkbox.selectBorder",a,s.kg("checkbox.select.border","Border color of checkbox widget when the element it's in is selected.")),(0,n.x1)("keybindingLabel.background",{dark:new o.Q1(new o.bU(128,128,128,.17)),light:new o.Q1(new o.bU(221,221,221,.4)),hcDark:o.Q1.transparent,hcLight:o.Q1.transparent},s.kg("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut."))),ft=(0,n.x1)("keybindingLabel.foreground",{dark:o.Q1.fromHex("#CCCCCC"),light:o.Q1.fromHex("#555555"),hcDark:o.Q1.white,hcLight:r},s.kg("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),mt=(0,n.x1)("keybindingLabel.border",{dark:new o.Q1(new o.bU(51,51,51,.6)),light:new o.Q1(new o.bU(204,204,204,.4)),hcDark:new o.Q1(new o.bU(111,195,223)),hcLight:c},s.kg("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),_t=(0,n.x1)("keybindingLabel.bottomBorder",{dark:new o.Q1(new o.bU(68,68,68,.6)),light:new o.Q1(new o.bU(187,187,187,.4)),hcDark:new o.Q1(new o.bU(111,195,223)),hcLight:r},s.kg("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),vt=(0,n.x1)("list.focusBackground",null,s.kg("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.")),bt=(0,n.x1)("list.focusForeground",null,s.kg("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.")),wt=(0,n.x1)("list.focusOutline",{dark:l,light:l,hcDark:d,hcLight:d},s.kg("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ct=(0,n.x1)("list.focusAndSelectionOutline",null,s.kg("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),yt=(0,n.x1)("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg("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.")),St=(0,n.x1)("list.activeSelectionForeground",{dark:o.Q1.white,light:o.Q1.white,hcDark:null,hcLight:null},s.kg("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.")),kt=(0,n.x1)("list.activeSelectionIconForeground",null,s.kg("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),xt=(0,n.x1)("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg("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.")),Lt=(0,n.x1)("list.inactiveSelectionForeground",null,s.kg("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.")),Dt=(0,n.x1)("list.inactiveSelectionIconForeground",null,s.kg("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Et=(0,n.x1)("list.inactiveFocusBackground",null,s.kg("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.")),Nt=(0,n.x1)("list.inactiveFocusOutline",null,s.kg("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),It=(0,n.x1)("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:o.Q1.white.transparent(.1),hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg("listHoverBackground","List/Tree background when hovering over items using the mouse.")),Mt=(0,n.x1)("list.hoverForeground",null,s.kg("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),Tt=(0,n.x1)("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},s.kg("listDropBackground","List/Tree drag and drop background when moving items over other items when using the mouse.")),Rt=(0,n.x1)("list.dropBetweenBackground",{dark:a,light:a,hcDark:null,hcLight:null},s.kg("listDropBetweenBackground","List/Tree drag and drop border color when moving items between items when using the mouse.")),Pt=(0,n.x1)("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:l,hcLight:l},s.kg("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),At=(0,n.x1)("list.focusHighlightForeground",{dark:Pt,light:(0,n.Hz)(yt,Pt,"#BBE7FF"),hcDark:Pt,hcLight:Pt},s.kg("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),Ot=((0,n.x1)("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},s.kg("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),(0,n.x1)("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},s.kg("listErrorForeground","Foreground color of list items containing errors.")),(0,n.x1)("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},s.kg("listWarningForeground","Foreground color of list items containing warnings.")),(0,n.x1)("listFilterWidget.background",{light:(0,n.e$)(C,0),dark:(0,n.a)(C,0),hcDark:C,hcLight:C},s.kg("listFilterWidgetBackground","Background color of the type filter widget in lists and trees."))),Ft=(0,n.x1)("listFilterWidget.outline",{dark:o.Q1.transparent,light:o.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},s.kg("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Bt=(0,n.x1)("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:c,hcLight:c},s.kg("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Wt=(0,n.x1)("listFilterWidget.shadow",ne,s.kg("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees.")),Ht=((0,n.x1)("list.filterMatchBackground",{dark:B,light:B,hcDark:null,hcLight:null},s.kg("listFilterMatchHighlight","Background color of the filtered match.")),(0,n.x1)("list.filterMatchBorder",{dark:H,light:H,hcDark:c,hcLight:d},s.kg("listFilterMatchHighlightBorder","Border color of the filtered match.")),(0,n.x1)("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},s.kg("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized.")),(0,n.x1)("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},s.kg("treeIndentGuidesStroke","Tree stroke color for the indentation guides."))),Vt=(0,n.x1)("tree.inactiveIndentGuidesStroke",(0,n.JO)(Ht,.4),s.kg("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active.")),zt=(0,n.x1)("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},s.kg("tableColumnsBorder","Table border color between columns.")),Ut=(0,n.x1)("tree.tableOddRowsBackground",{dark:(0,n.JO)(r,.04),light:(0,n.JO)(r,.04),hcDark:null,hcLight:null},s.kg("tableOddRowsBackgroundColor","Background color for odd table rows.")),jt=((0,n.x1)("editorActionList.background",C,s.kg("editorActionListBackground","Action List background color.")),(0,n.x1)("editorActionList.foreground",y,s.kg("editorActionListForeground","Action List foreground color.")),(0,n.x1)("editorActionList.focusForeground",St,s.kg("editorActionListFocusForeground","Action List foreground color for the focused item.")),(0,n.x1)("editorActionList.focusBackground",yt,s.kg("editorActionListFocusBackground","Action List background color for the focused item.")),(0,n.x1)("menu.border",{dark:null,light:null,hcDark:c,hcLight:c},s.kg("menuBorder","Border color of menus."))),qt=(0,n.x1)("menu.foreground",Ge,s.kg("menuForeground","Foreground color of menu items.")),Kt=(0,n.x1)("menu.background",Ke,s.kg("menuBackground","Background color of menu items.")),$t=(0,n.x1)("menu.selectionForeground",St,s.kg("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Gt=(0,n.x1)("menu.selectionBackground",yt,s.kg("menuSelectionBackground","Background color of the selected menu item in menus.")),Qt=(0,n.x1)("menu.selectionBorder",{dark:null,light:null,hcDark:d,hcLight:d},s.kg("menuSelectionBorder","Border color of the selected menu item in menus.")),Yt=(0,n.x1)("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:c,hcLight:c},s.kg("menuSeparatorBackground","Color of a separator menu item in menus.")),Zt=(0,n.x1)("quickInput.background",C,s.kg("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),Xt=(0,n.x1)("quickInput.foreground",y,s.kg("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Jt=(0,n.x1)("quickInputTitle.background",{dark:new o.Q1(new o.bU(255,255,255,.105)),light:new o.Q1(new o.bU(0,0,0,.06)),hcDark:"#000000",hcLight:o.Q1.white},s.kg("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),ei=(0,n.x1)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:o.Q1.white,hcLight:"#0F4A85"},s.kg("pickerGroupForeground","Quick picker color for grouping labels.")),ti=(0,n.x1)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:o.Q1.white,hcLight:"#0F4A85"},s.kg("pickerGroupBorder","Quick picker color for grouping borders.")),ii=(0,n.x1)("quickInput.list.focusBackground",null,"",void 0,s.kg("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),ni=(0,n.x1)("quickInputList.focusForeground",St,s.kg("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),si=(0,n.x1)("quickInputList.focusIconForeground",kt,s.kg("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),oi=(0,n.x1)("quickInputList.focusBackground",{dark:(0,n.yL)(ii,yt),light:(0,n.yL)(ii,yt),hcDark:null,hcLight:null},s.kg("quickInput.listFocusBackground","Quick picker background color for the focused item."));(0,n.x1)("search.resultsInfoForeground",{light:r,dark:(0,n.JO)(r,.65),hcDark:r,hcLight:r},s.kg("search.resultsInfoForeground","Color of the text in the search viewlet's completion message.")),(0,n.x1)("searchEditor.findMatchBackground",{light:(0,n.JO)(B,.66),dark:(0,n.JO)(B,.66),hcDark:B,hcLight:B},s.kg("searchEditor.queryMatch","Color of the Search Editor query matches.")),(0,n.x1)("searchEditor.findMatchBorder",{light:(0,n.JO)(H,.66),dark:(0,n.JO)(H,.66),hcDark:H,hcLight:H},s.kg("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."))},8552:function(e,t,i){"use strict";i.d(t,{Bb:function(){return d},Fd:function(){return g},Gu:function(){return h},HP:function(){return u},Hz:function(){return w},JO:function(){return v},a:function(){return _},e$:function(){return m},oG:function(){return C},x1:function(){return f},yL:function(){return b}});var n=i(93066),s=i(90890),o=i(59321),r=i(80670),a=i(97248),l=i(56419),c=i(14374);function d(e){return`--vscode-${e.replace(/\./g,"-")}`}function h(e){return`var(${d(e)})`}function u(e,t){return`var(${d(e)}, ${t})`}const g={ColorContribution:"base.contributions.colors"},p=new class{constructor(){this._onDidChangeSchema=new r.vl,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,s){const o={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=o;const r={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(r.deprecationMessage=s),n&&(r.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",r.patternErrorMessage=c.kg("transparecyRequired","This color must be transparent or it will obscure content")),this.colorSchema.properties[e]={description:i,oneOf:[r,{type:"string",const:"default",description:c.kg("useDefault","Use the default color.")}]},this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i?.defaults)return y(null!==(n=i.defaults)&&"object"==typeof n&&"light"in n&&"dark"in n?i.defaults[t.type]:i.defaults,t);var n}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function f(e,t,i,n,s){return p.registerColor(e,t,i,n,s)}function m(e,t){return{op:0,value:e,factor:t}}function _(e,t){return{op:1,value:e,factor:t}}function v(e,t){return{op:2,value:e,factor:t}}function b(...e){return{op:4,values:e}}function w(e,t,i){return{op:6,if:e,then:t,else:i}}function C(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function y(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?o.Q1.fromHex(e):t.getColor(e):e instanceof o.Q1?e:"object"==typeof e?function(e,t){switch(e.op){case 0:return y(e.value,t)?.darken(e.factor);case 1:return y(e.value,t)?.lighten(e.factor);case 2:return y(e.value,t)?.transparent(e.factor);case 3:{const i=y(e.background,t);return i?y(e.value,t)?.makeOpaque(i):y(e.value,t)}case 4:for(const i of e.values){const e=y(i,t);if(e)return e}return;case 6:return y(t.defines(e.if)?e.then:e.else,t);case 5:{const i=y(e.value,t);if(!i)return;const n=y(e.background,t);return n?i.isDarkerThan(n)?o.Q1.getLighterColor(i,n,e.factor).transparent(e.transparency):o.Q1.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw(0,n.xb)(e)}}(e,t):void 0}l.O.add(g.ColorContribution,p);const S="vscode://schemas/workbench-colors",k=l.O.as(a.F.JSONContribution);k.registerSchema(S,p.getColorSchema());const x=new s.uC((()=>k.notifySchemaChanged(S)),200);p.onDidChangeSchema((()=>{x.isScheduled()||x.schedule()}))},51310:function(e,t,i){"use strict";i.d(t,{$_:function(){return C},HT:function(){return _},pU:function(){return m}});var n,s,o=i(90890),r=i(93231),a=i(81040),l=i(56613),c=i(80670),d=i(24219),h=i(54244),u=i(14374),g=i(97248),p=i(56419);!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;l.L.isThemeIcon(i);){const e=f.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(n||(n={})),function(e){e.toJSONObject=function(e){return{weight:e.weight,style:e.style,src:e.src.map((e=>({format:e.format,location:e.location.toString()})))}},e.fromJSONObject=function(e){const t=e=>(0,d.Kg)(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>(0,d.Kg)(e.format)&&(0,d.Kg)(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:h.r.parse(e.location)})))}}}(s||(s={}));const f=new class{constructor(){this._onDidChange=new c.vl,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,u.kg)("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,u.kg)("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${l.L.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return s}const o={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=o;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;l.L.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const s of n.filter((e=>!!e.description)).sort(e))i.push(`||${s.id}|${l.L.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter((e=>!l.L.isThemeIcon(e.defaults))).sort(e))i.push(`||${s.id}|`);return i.join("\n")}};function m(e,t,i,n){return f.registerIcon(e,t,i,n)}function _(){return f}p.O.add("base.contributions.icons",f),function(){const e=(0,a.J)();for(const t in e){const i="\\"+e[t].toString(16);f.registerIcon(t,{fontCharacter:i})}}();const v="vscode://schemas/icons",b=p.O.as(g.F.JSONContribution);b.registerSchema(v,f.getIconSchema());const w=new o.uC((()=>b.notifySchemaChanged(v)),200);f.onDidChange((()=>{w.isScheduled()||w.schedule()}));const C=m("widget-close",r.W.close,(0,u.kg)("widgetClose","Icon for the close action in widgets."));m("goto-previous-location",r.W.arrowUp,(0,u.kg)("previousChangeIcon","Icon for goto previous editor location.")),m("goto-next-location",r.W.arrowDown,(0,u.kg)("nextChangeIcon","Icon for goto next editor location.")),l.L.modify(r.W.sync,"spin"),l.L.modify(r.W.loading,"spin")},39679:function(e,t,i){"use strict";var n;function s(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function o(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{Bb:function(){return s},HD:function(){return o},zM:function(){return n}}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(n||(n={}))},40616:function(e,t,i){"use strict";i.d(t,{Fd:function(){return h},Gy:function(){return l},Pz:function(){return d},Yf:function(){return c},lR:function(){return p},zy:function(){return g}});var n=i(80670),s=i(35114),o=i(63619),r=i(56419),a=i(39679);const l=(0,o.u1)("themeService");function c(e){return{id:e}}function d(e){switch(e){case a.zM.DARK:return"vs-dark";case a.zM.HIGH_CONTRAST_DARK:return"hc-black";case a.zM.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const h={ThemingContribution:"base.contributions.theming"},u=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new n.vl}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,s.s)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function g(e){return u.onColorThemeChange(e)}r.O.add(h.ThemingContribution,u);class p extends s.jG{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},79911:function(e,t,i){"use strict";i.d(t,{$D:function(){return n},I_:function(){return o},To:function(){return s},Ym:function(){return r}});const n=(0,i(63619).u1)("undoRedoService");class s{constructor(e,t){this.resource=e,this.elements=t}}class o{static{this._ID=0}constructor(){this.id=o._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new o}}class r{static{this._ID=0}constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new r}}},1255:function(e,t,i){"use strict";i.d(t,{A7:function(){return l},Q_:function(){return h},VR:function(){return r},cn:function(){return p},ct:function(){return f},jB:function(){return a},kF:function(){return g},mX:function(){return u}});var n=i(14374),s=i(68847),o=(i(80945),i(54244));const r=(0,i(63619).u1)("contextService");function a(e){const t=e;return"string"==typeof t?.id&&o.r.isUri(t.uri)}function l(e){const t=e;return"string"==typeof t?.id&&!a(e)&&!function(e){const t=e;return"string"==typeof t?.id&&o.r.isUri(t.configPath)}(e)}const c={id:"ext-dev"},d={id:"empty-window"};function h(e,t){if("string"==typeof e||void 0===e)return"string"==typeof e?{id:(0,s.P8)(e)}:t?c:d;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}class u{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const g="code-workspace",p=((0,n.kg)("codeWorkspace","Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");function f(e){return e.id===p}},35477:function(e,t,i){"use strict";i.d(t,{L:function(){return n}});const n=(0,i(63619).u1)("workspaceTrustManagementService")},43251:function(e){var t=String,i=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=i(),e.exports.createColors=i},17640:function(e,t,i){"use strict";let n=i(26637);class s extends n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=s,s.default=s,n.registerAtRule(s)},39167:function(e,t,i){"use strict";let n=i(56876);class s extends n{constructor(e){super(e),this.type="comment"}}e.exports=s,s.default=s},26637:function(e,t,i){"use strict";let n,s,o,r,{isClean:a,my:l}=i(6115),c=i(25130),d=i(39167),h=i(56876);function u(e){return e.map((e=>(e.nodes&&(e.nodes=u(e.nodes)),delete e.source,e)))}function g(e){if(e[a]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)g(t)}class p extends h{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,i,n=this.getIterator();for(;this.indexes[n]e[t](...i.map((e=>"function"==typeof e?(t,i)=>e(t.toProxy(),i):e))):"every"===t||"some"===t?i=>e[t](((e,...t)=>i(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let i,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)i=this.indexes[e],n(e[l]||p.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[a]&&g(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,i))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,i)=>{let n;try{n=e(t,i)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("atrule"===i.type&&e.test(i.name))return t(i,n)})):this.walk(((i,n)=>{if("atrule"===i.type&&i.name===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("atrule"===e.type)return t(e,i)})))}walkComments(e){return this.walk(((t,i)=>{if("comment"===t.type)return e(t,i)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("decl"===i.type&&e.test(i.prop))return t(i,n)})):this.walk(((i,n)=>{if("decl"===i.type&&i.prop===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("decl"===e.type)return t(e,i)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((i,n)=>{if("rule"===i.type&&e.test(i.selector))return t(i,n)})):this.walk(((i,n)=>{if("rule"===i.type&&i.selector===e)return t(i,n)})):(t=e,this.walk(((e,i)=>{if("rule"===e.type)return t(e,i)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}p.registerParse=e=>{n=e},p.registerRule=e=>{s=e},p.registerAtRule=e=>{o=e},p.registerRoot=e=>{r=e},e.exports=p,p.default=p,p.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,s.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,d.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[l]=!0,e.nodes&&e.nodes.forEach((e=>{p.rebuild(e)}))}},52378:function(e,t,i){"use strict";let n=i(43251),s=i(30078);class o extends Error{constructor(e,t,i,n,s,r){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),r&&(this.plugin=r),void 0!==t&&void 0!==i&&("number"==typeof t?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,o)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=n.isColorSupported),s&&e&&(t=s(t));let i,o,r=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,r.length),c=String(l).length;if(e){let{bold:e,gray:t,red:s}=n.createColors(!0);i=t=>e(s(t)),o=e=>t(e)}else i=o=e=>e;return r.slice(a,l).map(((e,t)=>{let n=a+1+t,s=" "+(" "+n).slice(-c)+" | ";if(n===this.line){let t=o(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+o(s)+e+"\n "+t+i("^")}return" "+o(s)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=o,o.default=o},25130:function(e,t,i){"use strict";let n=i(56876);class s extends n{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=s,s.default=s},2037:function(e,t,i){"use strict";let n,s,o=i(26637);class r extends o{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new s,this,e).stringify()}}r.registerLazyResult=e=>{n=e},r.registerProcessor=e=>{s=e},e.exports=r,r.default=r},3346:function(e,t,i){"use strict";let n=i(25130),s=i(56274),o=i(39167),r=i(17640),a=i(83022),l=i(49056),c=i(39026);function d(e,t){if(Array.isArray(e))return e.map((e=>d(e)));let{inputs:i,...h}=e;if(i){t=[];for(let e of i){let i={...e,__proto__:a.prototype};i.map&&(i.map={...i.map,__proto__:s.prototype}),t.push(i)}}if(h.nodes&&(h.nodes=e.nodes.map((e=>d(e,t)))),h.source){let{inputId:e,...i}=h.source;h.source=i,null!=e&&(h.source.input=t[e])}if("root"===h.type)return new l(h);if("decl"===h.type)return new n(h);if("rule"===h.type)return new c(h);if("comment"===h.type)return new o(h);if("atrule"===h.type)return new r(h);throw new Error("Unknown node type: "+e.type)}e.exports=d,d.default=d},83022:function(e,t,i){"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(85598),{fileURLToPath:o,pathToFileURL:r}=i(58119),{isAbsolute:a,resolve:l}=i(85833),{nanoid:c}=i(80953),d=i(30078),h=i(52378),u=i(56274),g=Symbol("fromOffsetCache"),p=Boolean(n&&s),f=Boolean(l&&a);class m{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||a(t.from)?this.file=t.from:this.file=l(t.from)),f&&p){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,i,n={}){let s,o,a;if(t&&"object"==typeof t){let e=t,n=i;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,i=n.col}else t=e.line,i=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);o=e.line,a=e.col}else o=n.line,a=n.column}else if(!i){let e=this.fromOffset(t);t=e.line,i=e.col}let l=this.origin(t,i,o,a);return s=l?new h(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,n.plugin):new h(e,void 0===o?t:{column:i,line:t},void 0===o?i:{column:a,line:o},this.css,this.file,n.plugin),s.input={column:i,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(r&&(s.input.url=r(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,i;if(this[g])i=this[g];else{let e=this.css.split("\n");i=new Array(e.length);let t=0;for(let n=0,s=e.length;n=t)n=i.length-1;else{let t,s=i.length-2;for(;n>1),e=i[t+1])){n=t;break}n=t+1}}return{col:e-i[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:l(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,n){if(!this.map)return!1;let s,l,c=this.map.consumer(),d=c.originalPositionFor({column:t,line:e});if(!d.source)return!1;"number"==typeof i&&(s=c.originalPositionFor({column:n,line:i})),l=a(d.source)?r(d.source):new URL(d.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let h={column:d.column,endColumn:s&&s.column,endLine:s&&s.line,line:d.line,url:l.toString()};if("file:"===l.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");h.file=o(l)}let u=c.sourceContentFor(d.source);return u&&(h.source=u),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=m,m.default=m,d&&d.registerInput&&d.registerInput(m)},14554:function(e,t,i){"use strict";let{isClean:n,my:s}=i(6115),o=i(32792),r=i(44491),a=i(26637),l=i(2037),c=(i(1568),i(48737)),d=i(22549),h=i(49056);const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},g={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},p={Once:!0,postcssPlugin:!0,prepare:!0};function f(e){return"object"==typeof e&&"function"==typeof e.then}function m(e){let t=!1,i=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[i,i+"-"+t,0,i+"Exit",i+"Exit-"+t]:t?[i,i+"-"+t,i+"Exit",i+"Exit-"+t]:e.append?[i,0,i+"Exit"]:[i,i+"Exit"]}function _(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:m(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function v(e){return e[n]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let b={};class w{constructor(e,t,i){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof w||t instanceof c)n=v(t.root),t.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let e=d;i.syntax&&(e=i.syntax.parse),i.parser&&(e=i.parser),e.parse&&(e=e.parse);try{n=e(t,i)}catch(e){this.processed=!0,this.error=e}n&&!n[s]&&a.rebuild(n)}else n=v(t);this.result=new c(e,n,i),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?i.postcssVersion:(e.plugin=i.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,i)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,i])};for(let t of this.plugins)if("object"==typeof t)for(let i in t){if(!g[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[i])if("object"==typeof t[i])for(let n in t[i])e(t,"*"===n?i:i+"-"+n.toLowerCase(),t[i][n]);else"function"==typeof t[i]&&e(t,i,t[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(f(e))try{await e}catch(e){let i=t[t.length-1].node;throw this.handleError(e,i)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>i(e,this.helpers)));await Promise.all(t)}else await i(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return f(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new o(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(f(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];)e[n]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,n]of e){let e;this.result.lastPlugin=i;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(f(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:s}=t;if("root"!==i.type&&"document"!==i.type&&!i.parent)return void e.pop();if(s.length>0&&t.visitorIndex{e[n]||this.walkSync(e)}));else{let t=this.listeners[i];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}w.registerPostcss=e=>{b=e},e.exports=w,w.default=w,h.registerLazyResult(w),l.registerLazyResult(w)},13764:function(e){"use strict";let t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(e,t,i){let n=[],s="",o=!1,r=0,a=!1,l="",c=!1;for(let i of e)c?c=!1:"\\"===i?c=!0:a?i===l&&(a=!1):'"'===i||"'"===i?(a=!0,l=i):"("===i?r+=1:")"===i?r>0&&(r-=1):0===r&&t.includes(i)&&(o=!0),o?(""!==s&&n.push(s.trim()),s="",o=!1):s+=i;return(i||""!==s)&&n.push(s.trim()),n}};e.exports=t,t.default=t},32792:function(e,t,i){"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(85598),{dirname:o,relative:r,resolve:a,sep:l}=i(85833),{pathToFileURL:c}=i(58119),d=i(83022),h=Boolean(n&&s),u=Boolean(o&&a&&r&&l);e.exports=class{constructor(e,t,i,n){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,i=this.toUrl(this.path(e.file)),s=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new n(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,i,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=s.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,i=1,n=1,o="",r={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,l)=>{if(this.css+=s,a&&"end"!==l&&(r.generated.line=i,r.generated.column=n-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=o,r.original.line=1,r.original.column=0,this.map.addMapping(r))),e=s.match(/\n/g),e?(i+=e.length,t=s.lastIndexOf("\n"),n=s.length-t):n+=s.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=i,r.generated.column=n-2,this.map.addMapping(r)):(r.source=o,r.original.line=1,r.original.column=0,r.generated.line=i,r.generated.column=n-1,this.map.addMapping(r)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?o(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=o(a(i,this.mapOpts.annotation)));let n=r(i,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new d(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===l&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}}},10527:function(e,t,i){"use strict";let n=i(32792),s=i(44491),o=(i(1568),i(22549));const r=i(48737);class a{constructor(e,t,i){let o;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let a=s;this.result=new r(this._processor,o,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let c=new n(a,o,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=o;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=a,a.default=a},56876:function(e,t,i){"use strict";let{isClean:n,my:s}=i(6115),o=i(52378),r=i(9152),a=i(44491);function l(e,t){let i=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],o=typeof s;"parent"===n&&"object"===o?t&&(i[n]=t):"source"===n?i[n]=s:Array.isArray(s)?i[n]=s.map((e=>l(e,i))):("object"===o&&null!==s&&(s=l(s)),i[n]=s)}return i}class c{constructor(e={}){this.raws={},this[n]=!1,this[s]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let i of e[t])"function"==typeof i.clone?this.append(i.clone()):this.append(i)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=l(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},t)}return new o(e)}getProxyProcessor(){return{get(e,t){return"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]},set(e,t,i){return e[t]===i||(e[t]=i,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}markDirty(){if(this[n]){this[n]=!1;let e=this;for(;e=e.parent;)e[n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let i=this.source.start;if(e.index)i=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(i=this.positionInside(n,t))}return i}positionInside(e,t){let i=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)i[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=s,t.set(n.input,s),s++),i[e]={end:n.end,inputId:o,start:n.start}}else i[e]=n}return n&&(i.inputs=[...t.keys()].map((e=>e.toJSON()))),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=a){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,i){let n={node:this};for(let e in i)n[e]=i[e];return e.warn(t,n)}get proxyOf(){return this}}e.exports=c,c.default=c},22549:function(e,t,i){"use strict";let n=i(26637),s=i(61367),o=i(83022);function r(e,t){let i=new o(e,t),n=new s(i);try{n.parse()}catch(e){throw e}return n.root}e.exports=r,r.default=r,n.registerParse(r)},61367:function(e,t,i){"use strict";let n=i(25130),s=i(10185),o=i(39167),r=i(17640),a=i(49056),l=i(39026);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,i,n,s=new r;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,i=l[n];i&&"space"===i[0];)i=l[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(s.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(s,"params",l),o&&(e=l[l.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let i,n=0;for(let s=t-1;s>=0&&(i=e[s],"space"===i[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===i[0]?i[3]+1:i[2])}colon(e){let t,i,n,s=0;for(let[o,r]of e.entries()){if(t=r,i=t[0],"("===i&&(s+=1),")"===i&&(s-=1),0===s&&":"===i){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(t)}n=t}return!1}comment(e){let t=new o;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let e=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(e,t){let i=new n;this.init(i,e[0][2]);let s,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let i=e[t],n=i[3]||i[2];if(n)return n}}(e)),i.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;i.prop+=e.shift()[1]}for(i.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){i.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let r,a=[];for(;e.length&&(r=e[0][0],"space"===r||"comment"===r);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){i.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(i.raws.important=n);break}if("important"===s[1].toLowerCase()){let n=e.slice(0),s="";for(let e=t;e>0;e--){let t=n[e][0];if(0===s.trim().indexOf("!")&&"space"!==t)break;s=n.pop()[1]+s}0===s.trim().indexOf("!")&&(i.important=!0,i.raws.important=s,e=n)}if("space"!==s[0]&&"comment"!==s[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(i.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(i,"value",a.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,i=null,n=!1,s=null,o=[],r=e[1].startsWith("--"),a=[],l=e;for(;l;){if(i=l[0],a.push(l),"("===i||"["===i)s||(s=l),o.push("("===i?")":"]");else if(r&&n&&"{"===i)s||(s=l),o.push("}");else if(0===o.length){if(";"===i){if(n)return void this.decl(a,r);break}if("{"===i)return void this.rule(a);if("}"===i){this.tokenizer.back(a.pop()),t=!0;break}":"===i&&(n=!0)}else i===o[o.length-1]&&(o.pop(),0===o.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&n){if(!r)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,r)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,n){let s,o,r,a,l=i.length,d="",h=!0;for(let e=0;ee+t[1]),"");e.raws[t]={raw:n,value:d}}e[t]=d}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let n=t;nnew u(e),C.atRule=e=>new g(e),C.decl=e=>new s(e),C.rule=e=>new v(e),C.root=e=>new b(e),C.document=e=>new d(e),C.CssSyntaxError=n,C.Declaration=s,C.Container=r,C.Processor=a,C.Document=d,C.Comment=u,C.Warning=h,C.AtRule=g,C.Result=p,C.Input=f,C.Rule=v,C.Root=b,C.Node=w,o.registerPostcss(C),e.exports=C,C.default=C},56274:function(e,t,i){"use strict";let{SourceMapConsumer:n,SourceMapGenerator:s}=i(85598),{existsSync:o,readFileSync:r}=i(21917),{dirname:a,join:l}=i(85833);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,n=this.loadMap(t.from,i);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=a(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let i=e.lastIndexOf(t.pop()),n=e.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,n)))}loadFile(e){if(this.root=a(e),o(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return s.fromSourceMap(t).toString();if(t instanceof s)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let i=t(e);if(i){let e=this.loadFile(i);if(!e)throw new Error("Unable to load previous source map: "+i.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(a(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},97274:function(e,t,i){"use strict";let n=i(10527),s=i(14554),o=i(2037),r=i(49056);class a{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"==typeof i&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if("object"==typeof i&&i.postcssPlugin)t.push(i);else if("function"==typeof i)t.push(i);else if("object"!=typeof i||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new s(this,e,t):new n(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=a,a.default=a,r.registerProcessor(a),o.registerProcessor(a)},48737:function(e,t,i){"use strict";let n=i(70378);class s{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let i=new n(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=s,s.default=s},49056:function(e,t,i){"use strict";let n,s,o=i(26637);class r extends o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let n=super.normalize(e);if(t)if("prepend"===i)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let i=this.index(e);return!t&&0===i&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new n(new s,this,e).stringify()}}r.registerLazyResult=e=>{n=e},r.registerProcessor=e=>{s=e},e.exports=r,r.default=r,o.registerRoot(r)},39026:function(e,t,i){"use strict";let n=i(26637),s=i(13764);class o extends n{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return s.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}}e.exports=o,o.default=o,n.registerRule(o)},9152:function(e){"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class i{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(i+n+s,e)}}beforeAfter(e,t){let i;i="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(i.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let i=this.raw(e,"semicolon");for(let n=0;n{if(s=e.raws[i],void 0!==s)return!1}))}var a;return void 0===s&&(s=t[n]),r.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let i;return e.walkComments((e=>{if(void 0!==e.raws.before)return i=e.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1})),void 0===i?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls((e=>{if(void 0!==e.raws.before)return i=e.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1})),void 0===i?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&void 0!==i.raws.before)return t=i.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==i.raws.before){let e=i.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let i=e[t],n=e.raws[t];return n&&n.value===i?n.raw:i}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=i,i.default=i},44491:function(e,t,i){"use strict";let n=i(9152);function s(e,t){new n(t).stringify(e)}e.exports=s,s.default=s},6115:function(e){"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},10185:function(e){"use strict";const t="'".charCodeAt(0),i='"'.charCodeAt(0),n="\\".charCodeAt(0),s="/".charCodeAt(0),o="\n".charCodeAt(0),r=" ".charCodeAt(0),a="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),d="[".charCodeAt(0),h="]".charCodeAt(0),u="(".charCodeAt(0),g=")".charCodeAt(0),p="{".charCodeAt(0),f="}".charCodeAt(0),m=";".charCodeAt(0),_="*".charCodeAt(0),v=":".charCodeAt(0),b="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,S=/[\da-f]/i;e.exports=function(e,k={}){let x,L,D,E,N,I,M,T,R,P,A=e.css.valueOf(),O=k.ignoreErrors,F=A.length,B=0,W=[],H=[];function V(t){throw e.error("Unclosed "+t,B)}return{back:function(e){H.push(e)},endOfFile:function(){return 0===H.length&&B>=F},nextToken:function(e){if(H.length)return H.pop();if(B>=F)return;let k=!!e&&e.ignoreUnclosed;switch(x=A.charCodeAt(B),x){case o:case r:case l:case c:case a:L=B;do{L+=1,x=A.charCodeAt(L)}while(x===r||x===o||x===l||x===c||x===a);P=["space",A.slice(B,L)],B=L-1;break;case d:case h:case p:case f:case v:case m:case g:{let e=String.fromCharCode(x);P=[e,e,B];break}case u:if(T=W.length?W.pop()[1]:"",R=A.charCodeAt(B+1),"url"===T&&R!==t&&R!==i&&R!==r&&R!==o&&R!==l&&R!==a&&R!==c){L=B;do{if(I=!1,L=A.indexOf(")",L+1),-1===L){if(O||k){L=B;break}V("bracket")}for(M=L;A.charCodeAt(M-1)===n;)M-=1,I=!I}while(I);P=["brackets",A.slice(B,L+1),B,L],B=L}else L=A.indexOf(")",B+1),E=A.slice(B,L+1),-1===L||y.test(E)?P=["(","(",B]:(P=["brackets",E,B,L],B=L);break;case t:case i:D=x===t?"'":'"',L=B;do{if(I=!1,L=A.indexOf(D,L+1),-1===L){if(O||k){L=B+1;break}V("string")}for(M=L;A.charCodeAt(M-1)===n;)M-=1,I=!I}while(I);P=["string",A.slice(B,L+1),B,L],B=L;break;case b:w.lastIndex=B+1,w.test(A),L=0===w.lastIndex?A.length-1:w.lastIndex-2,P=["at-word",A.slice(B,L+1),B,L],B=L;break;case n:for(L=B,N=!0;A.charCodeAt(L+1)===n;)L+=1,N=!N;if(x=A.charCodeAt(L+1),N&&x!==s&&x!==r&&x!==o&&x!==l&&x!==c&&x!==a&&(L+=1,S.test(A.charAt(L)))){for(;S.test(A.charAt(L+1));)L+=1;A.charCodeAt(L+1)===r&&(L+=1)}P=["word",A.slice(B,L+1),B,L],B=L;break;default:x===s&&A.charCodeAt(B+1)===_?(L=A.indexOf("*/",B+2)+1,0===L&&(O||k?L=A.length:V("comment")),P=["comment",A.slice(B,L+1),B,L],B=L):(C.lastIndex=B+1,C.test(A),L=0===C.lastIndex?A.length-1:C.lastIndex-2,P=["word",A.slice(B,L+1),B,L],W.push(P),B=L)}return B++,P},position:function(){return B}}}},1568:function(e){"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},70378:function(e){"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},21727:function(e,t,i){"use strict";var n=i(23556),s=i(58101),o=i(96049);function r(e){var t="https://react.dev/errors/"+e;if(1)":-1--s||l[n]!==c[s]){var d="\n"+l[n].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}}while(1<=n&&0<=s);break}}}finally{T=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?M(i):""}function P(e){switch(e.tag){case 26:case 27:case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 15:return R(e.type,!1);case 11:return R(e.type.render,!1);case 1:return R(e.type,!0);default:return""}}function A(e){try{var t="";do{t+=P(e),e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function O(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(i=t.return),e=t.return}while(e)}return 3===t.tag?i:null}function F(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function B(e){if(O(e)!==e)throw Error(r(188))}function W(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=W(e)))return t;e=e.sibling}return null}var H=Array.isArray,V=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},U=[],j=-1;function q(e){return{current:e}}function K(e){0>j||(e.current=U[j],U[j]=null,j--)}function $(e,t){j++,U[j]=e.current,e.current=t}var G=q(null),Q=q(null),Y=q(null),Z=q(null);function X(e,t){switch($(Y,t),$(Q,e),$(G,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Qd(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Yd(e=Qd(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}K(G),$(G,t)}function J(){K(G),K(Q),K(Y)}function ee(e){null!==e.memoizedState&&$(Z,e);var t=G.current,i=Yd(t,e.type);t!==i&&($(Q,e),$(G,i))}function te(e){Q.current===e&&(K(G),K(Q)),Z.current===e&&(K(Z),Ah._currentValue=z)}var ie=Object.prototype.hasOwnProperty,ne=n.unstable_scheduleCallback,se=n.unstable_cancelCallback,oe=n.unstable_shouldYield,re=n.unstable_requestPaint,ae=n.unstable_now,le=n.unstable_getCurrentPriorityLevel,ce=n.unstable_ImmediatePriority,de=n.unstable_UserBlockingPriority,he=n.unstable_NormalPriority,ue=n.unstable_LowPriority,ge=n.unstable_IdlePriority,pe=n.log,fe=n.unstable_setDisableYieldValue,me=null,_e=null;function ve(e){if("function"==typeof pe&&fe(e),_e&&"function"==typeof _e.setStrictMode)try{_e.setStrictMode(me,e)}catch(e){}}var be=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(we(e)/Ce|0)|0},we=Math.log,Ce=Math.LN2,ye=128,Se=4194304;function ke(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function xe(e,t){var i=e.pendingLanes;if(0===i)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,r=e.warmLanes;e=0!==e.finishedLanes;var a=134217727&i;return 0!==a?0!=(i=a&~s)?n=ke(i):0!=(o&=a)?n=ke(o):e||0!=(r=a&~r)&&(n=ke(r)):0!=(a=i&~s)?n=ke(a):0!==o?n=ke(o):e||0!=(r=i&~r)&&(n=ke(r)),0===n?0:0===t||t===n||t&s||!((s=n&-n)>=(r=t&-t)||32===s&&4194176&r)?n:t}function Le(e,t){return!(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function De(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ee(){var e=ye;return!(4194176&(ye<<=1))&&(ye=128),e}function Ne(){var e=Se;return!(62914560&(Se<<=1))&&(Se=4194304),e}function Ie(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Me(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Te(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-be(t);e.entangledLanes|=t,e.entanglements[n]=1073741824|e.entanglements[n]|4194218&i}function Re(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var n=31-be(i),s=1<=wi),Si=String.fromCharCode(32),ki=!1;function xi(e,t){switch(e){case"keyup":return-1!==vi.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Li(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Di=!1,Ei={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ni(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ei[e.type]:"textarea"===t}function Ii(e,t,i,n){Mt?Tt?Tt.push(n):Tt=[n]:Mt=n,0<(t=Ad(t,"onChange")).length&&(i=new Zt("onChange","change",null,i,n),e.push({event:i,listeners:t}))}var Mi=null,Ti=null;function Ri(e){Dd(e,0)}function Pi(e){if(ht(Ge(e)))return e}function Ai(e,t){if("change"===e)return t}var Oi=!1;if(tt){var Fi;if(tt){var Bi="oninput"in document;if(!Bi){var Wi=document.createElement("div");Wi.setAttribute("oninput","return;"),Bi="function"==typeof Wi.oninput}Fi=Bi}else Fi=!1;Oi=Fi&&(!document.documentMode||9=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gi(n)}}function Yi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Yi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Zi(e){for(var t=ut((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var i="string"==typeof t.contentWindow.location.href}catch(e){i=!1}if(!i)break;t=ut((e=t.contentWindow).document)}return t}function Xi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Ji(e,t){var i=Zi(t);t=e.focusedElem;var n=e.selectionRange;if(i!==t&&t&&t.ownerDocument&&Yi(t.ownerDocument.documentElement,t)){if(null!==n&&Xi(t))if(e=n.start,void 0===(i=n.end)&&(i=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(i,t.value.length);else if((i=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){i=i.getSelection();var s=t.textContent.length,o=Math.min(n.start,s);n=void 0===n.end?o:Math.min(n.end,s),!i.extend&&o>n&&(s=n,n=o,o=s),s=Qi(t,o);var r=Qi(t,n);s&&r&&(1!==i.rangeCount||i.anchorNode!==s.node||i.anchorOffset!==s.offset||i.focusNode!==r.node||i.focusOffset!==r.offset)&&((e=e.createRange()).setStart(s.node,s.offset),i.removeAllRanges(),o>n?(i.addRange(e),i.extend(r.node,r.offset)):(e.setEnd(r.node,r.offset),i.addRange(e)))}for(e=[],i=t;i=i.parentNode;)1===i.nodeType&&e.push({element:i,left:i.scrollLeft,top:i.scrollTop});for("function"==typeof t.focus&&t.focus(),t=0;t=document.documentMode,tn=null,nn=null,sn=null,on=!1;function rn(e,t,i){var n=i.window===i?i.document:9===i.nodeType?i:i.ownerDocument;on||null==tn||tn!==ut(n)||(n="selectionStart"in(n=tn)&&Xi(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},sn&&$i(sn,n)||(sn=n,0<(n=Ad(nn,"onSelect")).length&&(t=new Zt("onSelect","select",null,t,i),e.push({event:t,listeners:n}),t.target=tn)))}function an(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ln={animationend:an("Animation","AnimationEnd"),animationiteration:an("Animation","AnimationIteration"),animationstart:an("Animation","AnimationStart"),transitionrun:an("Transition","TransitionRun"),transitionstart:an("Transition","TransitionStart"),transitioncancel:an("Transition","TransitionCancel"),transitionend:an("Transition","TransitionEnd")},cn={},dn={};function hn(e){if(cn[e])return cn[e];if(!ln[e])return e;var t,i=ln[e];for(t in i)if(i.hasOwnProperty(t)&&t in dn)return cn[e]=i[t];return e}tt&&(dn=document.createElement("div").style,"AnimationEvent"in window||(delete ln.animationend.animation,delete ln.animationiteration.animation,delete ln.animationstart.animation),"TransitionEvent"in window||delete ln.transitionend.transition);var un=hn("animationend"),gn=hn("animationiteration"),pn=hn("animationstart"),fn=hn("transitionrun"),mn=hn("transitionstart"),_n=hn("transitioncancel"),vn=hn("transitionend"),bn=new Map,wn="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function Cn(e,t){bn.set(e,t),Je(t,[e])}var yn=[],Sn=0,kn=0;function xn(){for(var e=Sn,t=kn=Sn=0;t>=r,s-=r,Vn=1<<32-be(t)+s|i<u?(g=h,h=null):g=h.sibling;var p=_(s,h,a[u],l);if(null===p){null===h&&(h=g);break}e&&h&&null===p.alternate&&t(s,h),r=o(p,r,u),null===d?c=p:d.sibling=p,d=p,h=g}if(u===a.length)return i(s,h),Qn&&Un(s,u),c;if(null===h){for(;ug?(p=u,u=null):p=u.sibling;var b=_(s,u,f.value,c);if(null===b){null===u&&(u=p);break}e&&u&&null===b.alternate&&t(s,u),a=o(b,a,g),null===h?d=b:h.sibling=b,h=b,u=p}if(f.done)return i(s,u),Qn&&Un(s,g),d;if(null===u){for(;!f.done;g++,f=l.next())null!==(f=m(s,f.value,c))&&(a=o(f,a,g),null===h?d=f:h.sibling=f,h=f);return Qn&&Un(s,g),d}for(u=n(u);!f.done;g++,f=l.next())null!==(f=v(u,s,g,f.value,c))&&(e&&null!==f.alternate&&u.delete(null===f.key?g:f.key),a=o(f,a,g),null===h?d=f:h.sibling=f,h=f);return e&&u.forEach((function(e){return t(s,e)})),Qn&&Un(s,g),d}(h,u,g=C.call(g),p)}if("function"==typeof g.then)return b(h,u,fs(g),p);if(g.$$typeof===f)return b(h,u,xa(h,g),p);_s(h,g)}return"string"==typeof g&&""!==g||"number"==typeof g||"bigint"==typeof g?(g=""+g,null!==u&&6===u.tag?(i(h,u.sibling),(p=s(u,g)).return=h,h=p):(i(h,u),(p=Vl(g,h.mode,p)).return=h,h=p),a(h)):i(h,u)}return function(e,t,i,n){try{ps=0;var s=b(e,t,i,n);return gs=null,s}catch(t){if(t===os)throw t;var o=Pl(29,t,null,e.mode);return o.lanes=n,o.return=e,o}}}var ws=bs(!0),Cs=bs(!1),ys=q(null),Ss=q(0);function ks(e,t){$(Ss,e=lc),$(ys,t),lc=e|t.baseLanes}function xs(){$(Ss,lc),$(ys,ys.current)}function Ls(){lc=Ss.current,K(ys),K(Ss)}var Ds=q(null),Es=null;function Ns(e){var t=e.alternate;$(Rs,1&Rs.current),$(Ds,e),null===Es&&(null===t||null!==ys.current||null!==t.memoizedState)&&(Es=e)}function Is(e){if(22===e.tag){if($(Rs,Rs.current),$(Ds,e),null===Es){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Es=e)}}else Ms()}function Ms(){$(Rs,Rs.current),$(Ds,Ds.current)}function Ts(e){K(Ds),Es===e&&(Es=null),K(Rs)}var Rs=q(0);function Ps(e){for(var t=e;null!==t;){if(13===t.tag){var i=t.memoizedState;if(null!==i&&(null===(i=i.dehydrated)||"$?"===i.data||"$!"===i.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var As="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},Os=n.unstable_scheduleCallback,Fs=n.unstable_NormalPriority,Bs={$$typeof:f,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ws(){return{controller:new As,data:new Map,refCount:0}}function Hs(e){e.refCount--,0===e.refCount&&Os(Fs,(function(){e.controller.abort()}))}var Vs=null,zs=0,Us=0,js=null;function qs(){if(0==--zs&&null!==Vs){null!==js&&(js.status="fulfilled");var e=Vs;Vs=null,Us=0,js=null;for(var t=0;to?o:8;var r,a,l,c=N.T,d={};N.T=d,wr(e,!1,t,i);try{var h=s(),u=N.S;null!==u&&u(d,h),null!==h&&"object"==typeof h&&"function"==typeof h.then?br(e,t,(r=n,a=[],l={status:"pending",value:null,reason:null,then:function(e){a.push(e)}},h.then((function(){l.status="fulfilled",l.value=r;for(var e=0;e title"))),qd(o,n,i),o[Fe]=e,Ye(o),n=o;break e;case"link":var a=Lh("link","href",s).get(n+(i.href||""));if(a)for(var l=0;l<\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof n.is?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e="string"==typeof n.is?s.createElement(i,{is:n.is}):s.createElement(i)}}e[Fe]=t,e[Be]=n;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)e.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=e;e:switch(qd(e,i,n),i){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ul(t)}}return $l(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==n&&Ul(t);else{if("string"!=typeof n&&null===t.stateNode)throw Error(r(166));if(e=Y.current,is(t)){if(e=t.stateNode,i=t.memoizedProps,n=null,null!==(s=$n))switch(s.tag){case 27:case 5:n=s.memoizedProps}e[Fe]=t,(e=!!(e.nodeValue===i||null!==n&&!0===n.suppressHydrationWarning||Vd(e.nodeValue,i)))||Jn(t)}else(e=Gd(e).createTextNode(n))[Fe]=t,t.stateNode=e}return $l(t),null;case 13:if(n=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(s=is(t),null!==n&&null!==n.dehydrated){if(null===e){if(!s)throw Error(r(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(r(317));s[Fe]=t}else ns(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;$l(t),s=!1}else null!==Yn&&(Rc(Yn),Yn=null),s=!0;if(!s)return 256&t.flags?(Ts(t),t):(Ts(t),null)}if(Ts(t),128&t.flags)return t.lanes=i,t;if(i=null!==n,e=null!==e&&null!==e.memoizedState,i){s=null,null!==(n=t.child).alternate&&null!==n.alternate.memoizedState&&null!==n.alternate.memoizedState.cachePool&&(s=n.alternate.memoizedState.cachePool.pool);var o=null;null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(o=n.memoizedState.cachePool.pool),o!==s&&(n.flags|=2048)}return i!==e&&i&&(t.child.flags|=8192),ql(t,t.updateQueue),$l(t),null;case 4:return J(),null===e&&Md(t.stateNode.containerInfo),$l(t),null;case 10:return va(t.type),$l(t),null;case 19:if(K(Rs),null===(s=t.memoizedState))return $l(t),null;if(n=!!(128&t.flags),null===(o=s.rendering))if(n)Kl(s,!1);else{if(0!==cc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Ps(e))){for(t.flags|=128,Kl(s,!1),e=o.updateQueue,t.updateQueue=e,ql(t,e),t.subtreeFlags=0,e=i,i=t.child;null!==i;)Fl(i,e),i=i.sibling;return $(Rs,1&Rs.current|2),t.child}e=e.sibling}null!==s.tail&&ae()>bc&&(t.flags|=128,n=!0,Kl(s,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=Ps(o))){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ql(t,e),Kl(s,!0),null===s.tail&&"hidden"===s.tailMode&&!o.alternate&&!Qn)return $l(t),null}else 2*ae()-s.renderingStartTime>bc&&536870912!==i&&(t.flags|=128,n=!0,Kl(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=s.last)?e.sibling=o:t.child=o,s.last=o)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ae(),t.sibling=null,e=Rs.current,$(Rs,n?1&e|2:1&e),t):($l(t),null);case 22:case 23:return Ts(t),Ls(),n=null!==t.memoizedState,null!==e?null!==e.memoizedState!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?!!(536870912&i)&&!(128&t.flags)&&($l(t),6&t.subtreeFlags&&(t.flags|=8192)):$l(t),null!==(i=t.updateQueue)&&ql(t,i.retryQueue),i=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(i=e.memoizedState.cachePool.pool),n=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(n=t.memoizedState.cachePool.pool),n!==i&&(t.flags|=2048),null!==e&&K($s),null;case 24:return i=null,null!==e&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),va(Bs),$l(t),null;case 25:return null}throw Error(r(156,t.tag))}function Ql(e,t){switch(Kn(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return va(Bs),J(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return te(t),null;case 13:if(Ts(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(r(340));ns()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return K(Rs),null;case 4:return J(),null;case 10:return va(t.type),null;case 22:case 23:return Ts(t),Ls(),null!==e&&K($s),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return va(Bs),null;default:return null}}function Yl(e,t){switch(Kn(t),t.tag){case 3:va(Bs),J();break;case 26:case 27:case 5:te(t);break;case 4:J();break;case 13:Ts(t);break;case 19:K(Rs);break;case 10:va(t.type);break;case 22:case 23:Ts(t),Ls(),null!==e&&K($s);break;case 24:va(Bs)}}var Zl={getCacheForType:function(e){var t=ka(Bs),i=t.data.get(e);return void 0===i&&(i=e(),t.data.set(e,i)),i}},Xl="function"==typeof WeakMap?WeakMap:Map,Jl=0,ec=null,tc=null,ic=0,nc=0,sc=null,oc=!1,rc=!1,ac=!1,lc=0,cc=0,dc=0,hc=0,uc=0,gc=0,pc=0,fc=null,mc=null,_c=!1,vc=0,bc=1/0,wc=null,Cc=null,yc=!1,Sc=null,kc=0,xc=0,Lc=null,Dc=0,Ec=null;function Nc(){return 2&Jl&&0!==ic?ic&-ic:null!==N.T?0!==Us?Us:wd():Ae()}function Ic(){0===gc&&(gc=536870912&ic&&!Qn?536870912:Ee());var e=Ds.current;return null!==e&&(e.flags|=32),gc}function Mc(e,t,i){(e===ec&&2===nc||null!==e.cancelPendingCommit)&&(Wc(e,0),Oc(e,ic,gc,!1)),Me(e,i),2&Jl&&e===ec||(e===ec&&(!(2&Jl)&&(hc|=i),4===cc&&Oc(e,ic,gc,!1)),pd(e))}function Tc(e,t,i){if(6&Jl)throw Error(r(327));for(var n=!i&&!(60&t)&&!(t&e.expiredLanes)||Le(e,t),s=n?function(e,t){var i=Jl;Jl|=2;var n=Vc(),s=zc();ec!==e||ic!==t?(wc=null,bc=ae()+500,Wc(e,t)):rc=Le(e,t);e:for(;;)try{if(0!==nc&&null!==tc){t=tc;var o=sc;t:switch(nc){case 1:nc=0,sc=null,Qc(e,t,o,1);break;case 2:if(ls(o)){nc=0,sc=null,Gc(t);break}t=function(){2===nc&&ec===e&&(nc=7),pd(e)},o.then(t,t);break e;case 3:nc=7;break e;case 4:nc=5;break e;case 7:ls(o)?(nc=0,sc=null,Gc(t)):(nc=0,sc=null,Qc(e,t,o,7));break;case 5:var a=null;switch(tc.tag){case 26:a=tc.memoizedState;case 5:case 27:var l=tc;if(!a||Eh(a)){nc=0,sc=null;var c=l.sibling;if(null!==c)tc=c;else{var d=l.return;null!==d?(tc=d,Yc(d)):tc=null}break t}}nc=0,sc=null,Qc(e,t,o,5);break;case 6:nc=0,sc=null,Qc(e,t,o,6);break;case 8:Bc(),cc=6;break e;default:throw Error(r(462))}}Kc();break}catch(t){Hc(e,t)}return ma=fa=null,N.H=n,N.A=s,Jl=i,null!==tc?0:(ec=null,ic=0,xn(),cc)}(e,t):jc(e,t,!0),o=n;;){if(0===s){rc&&!n&&Oc(e,t,0,!1);break}if(6===s)Oc(e,t,0,!oc);else{if(i=e.current.alternate,o&&!Ac(i)){s=jc(e,t,!1),o=!1;continue}if(2===s){if(o=t,e.errorRecoveryDisabledLanes&o)var a=0;else a=0!=(a=-536870913&e.pendingLanes)?a:536870912&a?536870912:0;if(0!==a){t=a;e:{var l=e;s=fc;var c=l.current.memoizedState.isDehydrated;if(c&&(Wc(l,a).flags|=256),2!==(a=jc(l,a,!1))){if(ac&&!c){l.errorRecoveryDisabledLanes|=o,hc|=o,s=4;break e}o=mc,mc=s,null!==o&&Rc(o)}s=a}if(o=!1,2!==s)continue}}if(1===s){Wc(e,0),Oc(e,t,0,!0);break}e:{switch(n=e,s){case 0:case 1:throw Error(r(345));case 4:if((4194176&t)===t){Oc(n,t,gc,!oc);break e}break;case 2:mc=null;break;case 3:case 5:break;default:throw Error(r(329))}if(n.finishedWork=i,n.finishedLanes=t,(62914560&t)===t&&10<(o=vc+300-ae())){if(Oc(n,t,gc,!oc),0!==xe(n,0))break e;n.timeoutHandle=Jd(Pc.bind(null,n,i,mc,wc,_c,t,gc,hc,pc,oc,2,-0,0),o)}else Pc(n,i,mc,wc,_c,t,gc,hc,pc,oc,0,-0,0)}}break}pd(e)}function Rc(e){null===mc?mc=e:mc.push.apply(mc,e)}function Pc(e,t,i,n,s,o,a,l,c,d,h,u,g){var p=t.subtreeFlags;if((8192&p||!(16785408&~p))&&(Nh={stylesheets:null,count:0,unsuspend:Ih},Dl(t),null!==(t=function(){if(null===Nh)throw Error(r(475));var e=Nh;return e.stylesheets&&0===e.count&&Rh(e,e.stylesheets),0i?32:i,N.T=null,null===Sc)var o=!1;else{i=Lc,Lc=null;var a=Sc,l=kc;if(Sc=null,kc=0,6&Jl)throw Error(r(331));var c=Jl;if(Jl|=4,Il(a.current),yl(a,a.current,l,i),Jl=c,fd(0,!1),_e&&"function"==typeof _e.onPostCommitFiberRoot)try{_e.onPostCommitFiberRoot(me,a)}catch(e){}o=!0}return o}finally{V.p=s,N.T=n,Jc(e,t)}}return!1}function td(e,t,i){t=Rn(i,t),null!==(e=Ma(e,t=Wr(e.stateNode,t,2),2))&&(Me(e,2),pd(e))}function id(e,t,i){if(3===e.tag)td(e,e,i);else for(;null!==t;){if(3===t.tag){td(t,e,i);break}if(1===t.tag){var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===Cc||!Cc.has(n))){e=Rn(i,e),null!==(n=Ma(t,i=Hr(2),2))&&(Vr(i,n,t,e),Me(n,2),pd(n));break}}t=t.return}}function nd(e,t,i){var n=e.pingCache;if(null===n){n=e.pingCache=new Xl;var s=new Set;n.set(t,s)}else void 0===(s=n.get(t))&&(s=new Set,n.set(t,s));s.has(i)||(ac=!0,s.add(i),e=sd.bind(null,e,t,i),t.then(e,e))}function sd(e,t,i){var n=e.pingCache;null!==n&&n.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ec===e&&(ic&i)===i&&(4===cc||3===cc&&(62914560&ic)===ic&&300>ae()-vc?!(2&Jl)&&Wc(e,0):uc|=i,pc===ic&&(pc=0)),pd(e)}function od(e,t){0===t&&(t=Ne()),null!==(e=En(e,t))&&(Me(e,t),pd(e))}function rd(e){var t=e.memoizedState,i=0;null!==t&&(i=t.retryLane),od(e,i)}function ad(e,t){var i=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;null!==s&&(i=s.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}null!==n&&n.delete(t),od(e,i)}var ld=null,cd=null,dd=!1,hd=!1,ud=!1,gd=0;function pd(e){var t;e!==cd&&null===e.next&&(null===cd?ld=cd=e:cd=cd.next=e),hd=!0,dd||(dd=!0,t=md,ih((function(){6&Jl?ne(ce,t):t()})))}function fd(e,t){if(!ud&&hd){ud=!0;do{for(var i=!1,n=ld;null!==n;){if(!t)if(0!==e){var s=n.pendingLanes;if(0===s)var o=0;else{var r=n.suspendedLanes,a=n.pingedLanes;o=(1<<31-be(42|e)+1)-1,o=201326677&(o&=s&~(r&~a))?201326677&o|1:o?2|o:0}0!==o&&(i=!0,bd(n,o))}else o=ic,!(3&(o=xe(n,n===ec?o:0)))||Le(n,o)||(i=!0,bd(n,o));n=n.next}}while(i);ud=!1}}function md(){hd=dd=!1;var e,t=0;0!==gd&&(((e=window.event)&&"popstate"===e.type?e!==Xd&&(Xd=e,!0):(Xd=null,!1))&&(t=gd),gd=0);for(var i=ae(),n=null,s=ld;null!==s;){var o=s.next,r=_d(s,i);0===r?(s.next=null,null===n?ld=o:n.next=o,null===o&&(cd=n)):(n=s,(0!==t||3&r)&&(hd=!0)),s=o}fd(t,!1)}function _d(e,t){for(var i=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=-62914561&e.pendingLanes;0 title"):null)}function Eh(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var Nh=null;function Ih(){}function Mh(){if(this.count--,0===this.count)if(this.stylesheets)Rh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Th=null;function Rh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Th=new Map,t.forEach(Ph,e),Th=null,Mh.call(e))}function Ph(e,t){if(!(4&t.state.loading)){var i=Th.get(e);if(i)var n=i.get(null);else{i=new Map,Th.set(e,i);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oe.priority-t.priority))}e.exports.configure=(e={},t=[],i={})=>{const r={...s,...e};return r.stringMap=function(e){if(!Array.isArray(e))return;let t=!1,i=!1;for(const n of e){if(t&&i)break;"left-right"===n.name?t=!0:"ltr-rtl"===n.name&&(i=!0)}return t||e.push({name:"left-right",priority:100,exclusive:!1,search:["left","Left","LEFT"],replace:["right","Right","RIGHT"],options:{scope:"*",ignoreCase:!1}}),i||e.push({name:"ltr-rtl",priority:100,exclusive:!1,search:["ltr","Ltr","LTR"],replace:["rtl","Rtl","RTL"],options:{scope:"*",ignoreCase:!1}}),o(e)}(r.stringMap),r.plugins=function(e){const t=[];return e&&e.some((e=>"rtlcss"===e.name))||t.push(n),o([...t,...e])}(t),r.hooks=function(e){const t={pre(){},post(){}};return"function"==typeof e.pre&&(t.pre=e.pre),"function"==typeof e.post&&(t.post=e.post),t}(i),r}},52517:function(e){"use strict";e.exports=e=>{const t=e.text.match(/^\s*!?\s*rtl:/);if(!t)return;let i=e.text.slice(t[0].length),n=i.indexOf(":");const s={source:e,name:"",param:"",begin:!0,end:!0,blacklist:!1,preserve:!1};return-1!==n?(s.name=i.slice(0,n),s.begin="end"!==s.name,s.end="begin"!==s.name,"begin"===s.name||"end"===s.name?(i=i.slice(s.name.length+1),n=i.indexOf(":"),-1!==n?(s.name=i.slice(0,n),s.param=i.slice(n+1)):s.name=i):s.param=i.slice(n+1)):s.name=i,s}},38685:function(module,__unused_webpack_exports,__webpack_require__){"use strict";const config=__webpack_require__(72740),util=__webpack_require__(35946);module.exports={name:"rtlcss",priority:100,directives:{control:{ignore:{expect:{atrule:!0,comment:!0,decl:!0,rule:!0},endNode:null,begin(e,t,i){if(null===this.endNode&&t.begin&&t.end){let t=e;for(;t&&t.nodes;)t=t.nodes[t.nodes.length-1];this.endNode=t}return"comment"!==e.type||!/^\s*!?\s*rtl:end:ignore/.test(e.text)},end(e,t,i){return!!(t.begin!==t.end&&"comment"===e.type||t.begin&&t.end&&e===this.endNode)&&(this.endNode=null,!0)}},rename:{expect:{rule:!0},begin(e,t,i){return e.selector=i.util.applyStringMap(e.selector,!1),!1},end(e,t){return!0}},raw:{expect:{self:!0},begin(e,t,i){const n=i.postcss.parse(t.param,{from:e.source.input.from});return n.walk((e=>{e[i.symbol]=!0})),e.parent.insertBefore(e,n),!0},end(e,t){return!0}},remove:{expect:{atrule:!0,rule:!0,decl:!0},begin(e,t,i){let n=!1;switch(e.type){case"atrule":case"rule":case"decl":n=!0,e.remove()}return n},end(e,t,i){return!0}},options:{expect:{self:!0},stack:[],begin(e,t,i){let n;this.stack.push(util.extend({},i.config));try{n=JSON.parse(t.param)}catch(t){throw e.error("Invalid options object",{details:t})}return i.config=config.configure(n,i.config.plugins),i.util=util.configure(i.config),!0},end(e,t,i){const n=this.stack.pop();return n&&!t.begin&&(i.config=n,i.util=util.configure(i.config)),!0}},config:{expect:{self:!0},stack:[],begin(node,metadata,context){let configuration;this.stack.push(util.extend({},context.config));try{configuration=eval(`(${metadata.param})`)}catch(e){throw node.error("Invalid config object",{details:e})}return context.config=config.configure(configuration.options,configuration.plugins),context.util=util.configure(context.config),!0},end(e,t,i){const n=this.stack.pop();return n&&!t.begin&&(i.config=n,i.util=util.configure(i.config)),!0}}},value:[{name:"ignore",action(e,t,i){return!0}},{name:"prepend",action(e,t,i){let n="";const s=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${s?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>{n+=t})),e.value=s?e.raws.value.raw=n+e.raws.value.raw:n+e.value,!0}},{name:"append",action(e,t,i){let n="";const s=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${s?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>{n=t+n})),e.value=s?e.raws.value.raw+=n:e.value+n,!0}},{name:"insert",action(e,t,i){const n=e.raws.value&&e.raws.value.raw,s=`${e.raws.between.substr(1).trim()}${n?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>t+e));return e.value=n?e.raws.value.raw=s:s,!0}},{name:"",action(e,t,i){const n=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${n?e.raws.value.raw:""}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((t,i)=>{e.value=n?e.raws.value.raw=i+t:i})),!0}}]},processors:[{name:"variable",expr:/^--/im,action(e,t){return{prop:e,value:t}}},{name:"direction",expr:/direction/im,action(e,t,i){return{prop:e,value:i.util.swapLtrRtl(t)}}},{name:"left",expr:/left/im,action(e,t,i){return{prop:e.replace(this.expr,"right"),value:t}}},{name:"right",expr:/right/im,action(e,t,i){return{prop:e.replace(this.expr,"left"),value:t}}},{name:"four-value syntax",expr:/^(margin|padding|border-(color|style|width))$/gi,cache:null,action(e,t,i){null===this.cache&&(this.cache={match:/[^\s\uFFFD]+/g});const n=i.util.guardFunctions(t),s=n.value.match(this.cache.match);if(s&&4===s.length&&(n.store.length>0||s[1]!==s[3])){let e=0;n.value=n.value.replace(this.cache.match,(()=>s[(4-e++)%4]))}return{prop:e,value:i.util.unguardFunctions(n)}}},{name:"border radius",expr:/border-radius/gi,cache:null,flip(e){const t=e.match(this.cache.match);if(!t)return e;let i;switch(t.length){case 2:i=1,t[0]!==t[1]&&(e=e.replace(this.cache.match,(()=>t[i--])));break;case 3:e=e.replace(this.cache.white,(e=>`${e+t[1]} `));break;case 4:i=0,t[0]===t[1]&&t[2]===t[3]||(e=e.replace(this.cache.match,(()=>t[(5-i++)%4])))}return e},action(e,t,i){null===this.cache&&(this.cache={match:/[^\s\uFFFD]+/g,slash:/[^/]+/g,white:/(^\s*)/});const n=i.util.guardFunctions(t);return n.value=n.value.replace(this.cache.slash,(e=>this.flip(e))),{prop:e,value:i.util.unguardFunctions(n)}}},{name:"shadow",expr:/shadow/gi,cache:null,action(e,t,i){null===this.cache&&(this.cache={replace:/[^,]+/g});const n=i.util.guardHexColors(t),s=i.util.guardFunctions(n.value);return s.value=s.value.replace(this.cache.replace,(e=>i.util.negate(e))),n.value=i.util.unguardFunctions(s),{prop:e,value:i.util.unguardHexColors(n)}}},{name:"transform and perspective origin",expr:/(?:transform|perspective)-origin/gi,cache:null,flip(e,t){return"0"===e?e="100%":e.match(this.cache.percent)?e=t.util.complement(e):e.match(this.cache.length)&&(e=t.util.flipLength(e)),e},action(e,t,i){if(null===this.cache&&(this.cache={match:i.util.regex(["func","percent","length"],"g"),percent:i.util.regex(["func","percent"],"i"),length:i.util.regex(["length"],"gi"),xKeyword:/(left|right|center)/i}),t.match(this.cache.xKeyword))t=i.util.swapLeftRight(t);else{const e=i.util.guardFunctions(t),n=e.value.match(this.cache.match);n&&n.length>0&&(n[0]=this.flip(n[0],i),e.value=e.value.replace(this.cache.match,(()=>n.shift())),t=i.util.unguardFunctions(e))}return{prop:e,value:t}}},{name:"transform",expr:/^(?!text-).*?transform$/gi,cache:null,flip(e,t,i){let n=0;return e.replace(this.cache.unit,(e=>t(++n,e)))},flipMatrix(e,t){return this.flip(e,((e,i)=>2===e||3===e||5===e?t.util.negate(i):i),t)},flipMatrix3D(e,t){return this.flip(e,((e,i)=>2===e||4===e||5===e||13===e?t.util.negate(i):i),t)},flipRotate3D(e,t){return this.flip(e,((e,i)=>1===e||4===e?t.util.negate(i):i),t)},action(e,t,i){null===this.cache&&(this.cache={negatable:/((translate)(x|3d)?|rotate(z|y)?)$/gi,unit:i.util.regex(["func","number"],"g"),matrix:/matrix$/i,matrix3D:/matrix3d$/i,skewXY:/skew(x|y)?$/i,rotate3D:/rotate3d$/i});const n=i.util.guardFunctions(t);return{prop:e,value:i.util.unguardFunctions(n,((e,t)=>(0===t.length||(t.match(this.cache.matrix3D)?e=this.flipMatrix3D(e,i):t.match(this.cache.matrix)?e=this.flipMatrix(e,i):t.match(this.cache.rotate3D)?e=this.flipRotate3D(e,i):t.match(this.cache.skewXY)?e=i.util.negateAll(e):t.match(this.cache.negatable)&&(e=i.util.negate(e))),e)))}}},{name:"transition",expr:/transition(-property)?$/i,action(e,t,i){return{prop:e,value:i.util.swapLeftRight(t)}}},{name:"background",expr:/(background|object)(-position(-x)?|-image)?$/i,cache:null,flip(e,t,i){const n=util.saveTokens(e,!0),s=n.value.match(this.cache.match);if(!s||0===s.length)return util.restoreTokens(n);const o=(n.value.match(this.cache.position)||"").length;return s.length>=3||2===o?n.value=util.swapLeftRight(n.value):("0"===s[0]?s[0]="100%":s[0].match(this.cache.percent)?s[0]=t.util.complement(s[0]):s[0].match(this.cache.length)?i?s[0]=t.util.flipLength(s[0]):1===s.length?s[0]=`right ${s[0]} top 50%`:o||2!==s.length||(s[0]=`right ${s[0]}`,s[1]=`top ${s[1]}`):s[0]=t.util.swapLeftRight(s[0]),n.value=n.value.replace(this.cache.match,(()=>s.shift()))),util.restoreTokens(n)},update(e,t,i){return i.match(this.cache.gradient)?(t=e.util.swapLeftRight(t)).match(this.cache.angle)&&(t=e.util.negate(t)):!0!==e.config.processUrls&&!0!==e.config.processUrls.decl||!i.match(this.cache.url)||(t=e.util.applyStringMap(t,!0)),t},action(e,t,i){null===this.cache&&(this.cache={match:i.util.regex(["position","percent","length","calc"],"ig"),percent:i.util.regex(["func","percent"],"i"),position:i.util.regex(["position"],"g"),length:i.util.regex(["length"],"gi"),gradient:/gradient$/i,angle:/\d+(deg|g?rad|turn)/i,url:/^url/i});const n=i.util.guardHexColors(t),s=i.util.guardFunctions(n.value),o=s.value.split(","),r=e.toLowerCase();if("background-image"!==r)for(let e=0;ee.replace(t,t.replace(this.cache.e,"*").replace(this.cache.w,"e").replace(this.cache.star,"w"))))},action(e,t,i){null===this.cache&&(this.cache={replace:/\b(ne|nw|se|sw|nesw|nwse)-resize/gi,url:/^url/i,e:/e/i,w:/w/i,star:/\*/i});const n=i.util.guardFunctions(t);return n.value=n.value.split(",").map((e=>this.flip(e))).join(","),{prop:e,value:i.util.unguardFunctions(n,this.update.bind(this,i))}}}]}},32535:function(e,t,i){"use strict";const n=i(15571),s=i(94817),o=i(72740),r=i(35946);e.exports=(e,t,i)=>{const a=Symbol("processed"),l=o.configure(e,t,i),c={postcss:n,config:l,util:r.configure(l),symbol:a};let d=0;const h={};function u(e,t){if(e[a])return!1;let i=!1;return s.walk((t=>{!t.metadata.blacklist&&t.directive.expect[e.type]&&(t.directive.begin(e,t.metadata,c)&&(i=!0),t.metadata.end&&t.directive.end(e,t.metadata,c)&&s.pop(t))})),e[a]=!0,!i}return{postcssPlugin:"rtlcss",Once(e){c.config.hooks.pre(e,n),u(e)},Rule(e){u(e)&&(d=0)},AtRule(e){!u(e)||!0!==c.config.processUrls&&!0!==c.config.processUrls.atrule||(e.params=c.util.applyStringMap(e.params,!0))},Comment(e,{result:t}){u(e)&&s.parse(e,t,(i=>{let n=!0;return null===i.directive&&(i.preserve=!c.config.clean,c.util.each(c.config.plugins,(e=>{const s=c.config.blacklist[e.name];return s&&!0===s[i.metadata.name]?(i.metadata.blacklist=!0,i.metadata.end&&(n=!1),i.metadata.begin&&t.warn(`directive "${e.name}.${i.metadata.name}" is blacklisted.`,{node:i.source}),!1):(i.directive=e.directives.control[i.metadata.name],!i.directive&&void 0)}))),i.directive?!i.metadata.begin&&i.metadata.end?(i.directive.end(e,i.metadata,c)&&s.pop(i),n=!1):i.directive.expect.self&&i.directive.begin(e,i.metadata,c)&&i.metadata.end&&i.directive.end(e,i.metadata,c)&&(n=!1):i.metadata.blacklist||(n=!1,t.warn(`unsupported directive "${i.metadata.name}".`,{node:i.source})),n}))},Declaration(e,{result:t}){if(!u(e))return;if(!c.util.each(c.config.plugins,(t=>c.util.each(t.directives.value,(t=>{const i=e.raws.value&&e.raws.value.raw,n=c.util.regexDirective(t.name);if(n.test(`${e.raws.between}${i?e.raws.value.raw:e.value}${e.important&&e.raws.important?e.raws.important:""}`)&&(n.lastIndex=0,t.action(e,n,c)))return c.config.clean&&(e.raws.between=c.util.trimDirective(e.raws.between),e.important&&e.raws.important&&(e.raws.important=c.util.trimDirective(e.raws.important)),e.value=i?e.raws.value.raw=c.util.trimDirective(e.raws.value.raw):c.util.trimDirective(e.value)),d++,!1})))))return;if(c.util.each(c.config.plugins,(t=>c.util.each(t.processors,(t=>{const i=c.config.aliases[e.prop];if((i||e.prop).match(t.expr)){const n=e.raws.value&&e.raws.value.raw?e.raws.value.raw:e.value,s=c.util.saveComments(n);c.config.processEnv&&(s.value=c.util.swap(s.value,"safe-area-inset-left","safe-area-inset-right",{ignoreCase:!1}));const o=t.action(e.prop,s.value,c);return s.value=o.value,o.value=c.util.restoreComments(s),(!i&&o.prop!==e.prop||o.value!==n)&&(d++,e.prop=o.prop,e.value=o.value),!1}})))),!c.config.autoRename||d||"rule"!==e.parent.type||!c.util.isLastOfType(e))return;const i=c.util.applyStringMap(e.parent.selector);if(!0===c.config.autoRenameStrict){const t=h[i];t?(t.selector=e.parent.selector,e.parent.selector=i):h[e.parent.selector]=e.parent}else e.parent.selector=i},OnceExit(e,{result:t}){s.walk((e=>{t.warn(`unclosed directive "${e.metadata.name}".`,{node:e.source})}));for(const e of Object.values(h))t.warn("renaming skipped due to lack of a matching pair.",{node:e});c.config.hooks.post(e,n)}}},e.exports.postcss=!0,e.exports.process=function(e,t,i,s){return n([this(t,i,s)]).process(e).css},e.exports.configure=function(e={}){return n([this(e.options,e.plugins,e.hooks)])}},94817:function(e,t,i){"use strict";const n=i(52517);e.exports={stack:[],pop(e){const t=this.stack.indexOf(e);-1!==t&&this.stack.splice(t,1),e.preserve||e.source.remove()},parse(e,t,i){const s=n(e);if(!s)return;let o;!s.begin&&s.end?this.walk((t=>{if(s.name===t.metadata.name)return this.pop(t),o={metadata:s,directive:t.directive,source:e,preserve:t.preserve},!1})):o={metadata:s,directive:null,source:e,preserve:null},void 0===o?t.warn(`found end "${s.name}" without a matching begin.`,{node:e}):i(o)?this.stack.push(o):o.preserve||o.source.remove()},walk(e){let t=this.stack.length;for(;--t>-1&&e(this.stack[t]););}}},35946:function(e){"use strict";let t,i=0;const n=new RegExp("�","ig"),s=new RegExp("¤","ig"),o="\\-?(\\d*?\\.\\d+|\\d+)",r="(calc¤)|("+o+")(?!d\\()",a="«\\d+:\\d+»",l=/\/\*[^]*?\*\//gim,c=/\/\*\s*!?\s*rtl:[^]*?\*\//gim,d=/[.*+?^${}()|[\]\\]/g,h=/\([^()]+\)/i,u=/#[a-f0-9]{3,8}/gi,g=/calc/,p=new RegExp(a,"ig"),f=new RegExp("\\w*?«\\d+:\\d+»","ig"),m=new RegExp(r,"i"),_=new RegExp(r,"ig"),v=new RegExp(r,"i"),b={scope:"*",ignoreCase:!0};function w(e){return e.replace(d,"\\$&")}e.exports={extend(e,t){void 0!==e&&"object"==typeof e||(e={});for(const i in t)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=t[i]);return e},swap(e,i,n,s=b){let o=`${w(i)}|${w(n)}`;(Object.prototype.hasOwnProperty.call(s,"greedy")?s.greedy:t.greedy)||(o=`\\b(${o})\\b`);const r=s.ignoreCase?"img":"mg";return e.replace(new RegExp(o,r),(e=>{return t=e,o=i,(s.ignoreCase?t.toLowerCase()===o.toLowerCase():t===o)?n:i;var t,o}))},swapLeftRight(e){return this.swap(e,"left","right")},swapLtrRtl(e){return this.swap(e,"ltr","rtl")},applyStringMap(e,i){let n=e;for(const e of t.stringMap){const t=this.extend(e.options,b);if("*"===t.scope||i&&"url"===t.scope||!i&&"selector"===t.scope){if(Array.isArray(e.search)&&Array.isArray(e.replace))for(let i=0;is.test(e)?e.replace(s,(e=>"(-1*"+e+")")):-1*Number.parseFloat(e))),this.restoreTokens(t)},negateAll(e){const t=this.saveTokens(e);return t.value=t.value.replace(_,(e=>s.test(e)?e.replace(s,(e=>"(-1*"+e+")")):-1*Number.parseFloat(e))),this.restoreTokens(t)},complement(e){const t=this.saveTokens(e);return t.value=t.value.replace(m,(e=>s.test(e)?e.replace(s,(e=>"(100% - "+e+")")):100-Number.parseFloat(e))),this.restoreTokens(t)},flipLength(e){return t.useCalc?`calc(100% - ${e})`:e},save(e,t,i,n,s){const o={value:t,store:[],replacement:i,restorer:n};return o.value=o.value.replace(e,(e=>s&&s.test(e)?e:(o.store.push(e),o.replacement))),o},restore(e){let t=0;const i=e.value.replace(e.restorer,(()=>e.store[t++]));return e.store.length=0,i},saveComments(e){return this.save(l,e,"�",n)},restoreComments(e){return this.restore(e)},saveTokens(e,t){return!0===t?this.save(f,e,"¤",s,g):this.save(p,e,"¤",s)},restoreTokens(e){return this.restore(e)},guard(e,t){const n={value:t,store:[],offset:i++,token:"«"+i};for(;e.test(n.value);)n.value=n.value.replace(e,(e=>(n.store.push(e),`${n.token}:${n.store.length}»`)));return n},unguard(e,t){const i=new RegExp("(\\w*?)"+e.token+":(\\d+)»","i");for(;i.test(e.value);)e.value=e.value.replace(i,((i,n,s)=>{const o=e.store[s-1];return"function"==typeof t?n+t(o,n):n+o}));return e.value},guardHexColors(e){return this.guard(u,e)},unguardHexColors(e,t){return this.unguard(e,t)},guardFunctions(e){return this.guard(h,e)},unguardFunctions(e,t){return this.unguard(e,t)},trimDirective(e){return e.replace(c,"")},regexCache:{},regexDirective(e){return this.regexCache[e]=this.regexCache[e]||new RegExp("(?:\\/\\*\\s*(?:!)?\\s*rtl:"+(e?w(e)+"(?::)?":"")+")([^]*?)(?:\\*\\/)","img"),this.regexCache[e]},regex(e,t){let i="";for(const t of e)switch(t){case"percent":i+=`|(${o}%)`;break;case"length":i+=`|(${o})(?:ex|ch|r?em|vh|vw|vmin|vmax|px|mm|cm|in|pt|pc)?`;break;case"number":i+=`|(${o})`;break;case"position":i+="|(left|center|right|top|bottom)";break;case"calc":i+=`|(calc${a})`;break;case"func":i+=`|(\\w+${a})`}return new RegExp(i.slice(1),t)},isLastOfType(e){let t=!0,i=e.next();for(;i;){if(i.type===e.type){t=!1;break}i=i.next()}return t},each(e,t){return!e.some((e=>!1===t(e)))}},e.exports.configure=function(e){return t=e,this}},42231:function(e,t){"use strict";function i(e,t){var i=e.length;e.push(t);e:for(;0>>1,s=e[n];if(!(0>>1;no(l,i))co(d,l)?(e[n]=d,e[c]=i,n=c):(e[n]=l,e[a]=i,n=a);else{if(!(co(d,i)))break e;e[n]=d,e[c]=i,n=c}}}return t}function o(e,t){var i=e.sortIndex-t.sortIndex;return 0!==i?i:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var r=performance;t.unstable_now=function(){return r.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],d=[],h=1,u=null,g=3,p=!1,f=!1,m=!1,_="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=n(d);null!==t;){if(null===t.callback)s(d);else{if(!(t.startTime<=e))break;s(d),t.sortIndex=t.expirationTime,i(c,t)}t=n(d)}}function C(e){if(m=!1,w(e),!f)if(null!==n(c))f=!0,M();else{var t=n(d);null!==t&&T(C,t.startTime-e)}}var y,S=!1,k=-1,x=5,L=-1;function D(){return!(t.unstable_now()-Le&&D());){var r=u.callback;if("function"==typeof r){u.callback=null,g=u.priorityLevel;var a=r(u.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof a){u.callback=a,w(e),i=!0;break t}u===n(c)&&s(c),w(e)}else s(c);u=n(c)}if(null!==u)i=!0;else{var l=n(d);null!==l&&T(C,l.startTime-e),i=!1}}break e}finally{u=null,g=o,p=!1}i=void 0}}finally{i?y():S=!1}}}if("function"==typeof b)y=function(){b(E)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,I=N.port2;N.port1.onmessage=E,y=function(){I.postMessage(null)}}else y=function(){_(E,0)};function M(){S||(S=!0,y())}function T(e,i){k=_((function(){e(t.unstable_now())}),i)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||p||(f=!0,M())},t.unstable_forceFrameRate=function(e){0>e||125r?(e.sortIndex=o,i(d,e),null===n(c)&&e===n(d)&&(m?(v(k),k=-1):m=!0,T(C,o-r))):(e.sortIndex=a,i(c,e),f||p||(f=!0,M())),e},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(e){var t=g;return function(){var i=g;g=t;try{return e.apply(this,arguments)}finally{g=i}}}},23556:function(e,t,i){"use strict";e.exports=i(42231)},30078:function(){},21917:function(){},85833:function(){},85598:function(){},58119:function(){},97500:function(e,t){var i;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e="",t=0;t{let t="",i=0|e;for(;i--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(i=t)=>{let n="",s=0|i;for(;s--;)n+=e[Math.random()*e.length|0];return n}}}},__webpack_module_cache__={},inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](i,i.exports,__webpack_require__),i.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(t,i){return __webpack_require__.f[i](e,t),t}),[]))},__webpack_require__.u=function(e){return"scripts/"+e+".index.js"},__webpack_require__.miniCssF=function(e){},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},inProgress={},dataWebpackPrefix="postcss-rtlcss-playground:",__webpack_require__.l=function(e,t,i,n){if(inProgress[e])inProgress[e].push(t);else{var s,o;if(void 0!==i)for(var r=document.getElementsByTagName("script"),a=0;a-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e+"../"}(),function(){var e={8792:0};__webpack_require__.f.j=function(t,i){var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var s=new Promise((function(i,s){n=e[t]=[i,s]}));i.push(n[2]=s);var o=__webpack_require__.p+__webpack_require__.u(t),r=new Error;__webpack_require__.l(o,(function(i){if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var s=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;r.message="Loading chunk "+t+" failed.\n("+s+": "+o+")",r.name="ChunkLoadError",r.type=s,r.request=o,n[1](r)}}),"chunk-"+t,t)}};var t=function(t,i){var n,s,o=i[0],r=i[1],a=i[2],l=0;if(o.some((function(t){return 0!==e[t]}))){for(n in r)__webpack_require__.o(r,n)&&(__webpack_require__.m[n]=r[n]);a&&a(__webpack_require__)}for(t&&t(i);l{const t={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}};if(e){const i=Object.entries(e).map((e=>{let[t,i]=e;return`${t}=${encodeURIComponent(i)}`})).join("&");t.body=i}return new Promise(((e,i)=>{fetch("https://xprimiendo.com/snippet",t).then((t=>{t.ok?t.json().then((t=>e(t))):t.text().then((e=>i(e)))})).catch((()=>{i(null)}))}))},n=()=>{const e=window.innerHeight,t=window.innerWidth,i=t<576;return{windowHeight:e,windowWidth:t,panelHeight:i?(e-150)/2:e-120,panelWidth:i?t-10:Math.floor((t-30)/2),isSmallScreen:i}},s={},o=n(),r=(0,e.createContext)({}),a=t=>{let a;const[l,c]=(0,e.useState)(null),[d,h]=(0,e.useState)(s),[u,g]=(0,e.useState)(o),[p,f]=(0,e.useState)(!1),{canShare:m,ready:_,token:v,fetchCode:b,fetchOptions:w,share:C}=(()=>{const[t,n]=(0,e.useState)(null),[s,o]=(0,e.useState)(null),[r,a]=(0,e.useState)(null),[l,c]=(0,e.useState)(null),[d,h]=(0,e.useState)(!1),u=(0,e.useMemo)((()=>{const e="undefined",t="function";return typeof window!==e&&typeof window.fetch===t&&typeof window.location!==e&&typeof window.history!==e&&typeof navigator!==e&&typeof navigator.clipboard!==e&&typeof navigator.clipboard.writeText===t}),[]),g=(0,e.useCallback)(((e,t)=>{s&&((e,t,n)=>new Promise(((s,o)=>{i({code:e,options:t,token:n}).then((e=>{e.success&&e.id?s(e.id):o()})).catch((()=>{console.log("Error sharing code")}))})))(e,t,s).then((e=>{history.replaceState("","",`#${e}`),navigator.clipboard&&navigator.clipboard.writeText(window.location.href)})).catch((()=>{o(null)}))}),[s]);return(0,e.useEffect)((()=>{s?"undefined"!=typeof window&&window.location&&window.location.hash?n(window.location.hash.slice(1)):h(!0):new Promise(((e,t)=>{i().then((i=>{i.success&&i.token?e(i.token):t()})).catch((()=>t()))})).then((e=>{o(e)})).catch((()=>h(!0)))}),[s]),(0,e.useEffect)((()=>{t&&s&&i({id:t,token:s}).then((e=>{if(e.success&&e.code&&(a(e.code),e.options))try{const t=JSON.parse(e.options);c(t)}catch{console.error("Wrong options retrieved")}h(!0)})).catch((()=>h(!0)))}),[t,s]),{canShare:u,token:s,fetchCode:r,fetchOptions:l,ready:d,share:g}})();(0,e.useEffect)((()=>(window.removeEventListener("resize",y),window.addEventListener("resize",y),()=>{window.removeEventListener("resize",y)})),[]);const y=()=>{a&&window.clearTimeout(a),a=window.setTimeout((()=>{const e=n();g(e)}),100)},S={canShare:m,ready:_,token:v,fetchCode:b,fetchOptions:w,code:l,options:d,optionsOpen:p,setCode:c,share:C,setOptions:h,setOptionsOpen:f,changeOptionsMode:e=>h({...d,mode:e}),changeOptionsSource:e=>h({...d,source:e}),changeOptionsSafeBothPrefix:e=>h({...d,safeBothPrefix:e}),changeOptionsIgnorePrefixedRules:e=>h({...d,ignorePrefixedRules:e}),changeOptionsProcessUrls:e=>h({...d,processUrls:e}),changeOptionsProcessRuleNames:e=>h({...d,processRuleNames:e}),changeOptionsProcessKeyframes:e=>h({...d,processKeyFrames:e}),changeOptionsProcessEnv:e=>h({...d,processEnv:e}),changeOptionsUseCalc:e=>h({...d,useCalc:e}),changeOptionsGreedy:e=>h({...d,greedy:e}),windowSizes:u};return e.createElement(r.Provider,{value:S},t.children)},l=()=>(0,e.useContext)(r),c=()=>{const{optionsOpen:t,setOptionsOpen:i}=l();return e.createElement("div",{className:"MKhy6uqH0Of5Tc0IZMDN","data-opened":t},e.createElement("div",{className:"kB1goqcZZcf_dhFwJA51",onClick:()=>i(!t)},e.createElement("div",{className:"QVnHeWJl_G9LJ7iBTK4y"})))},d=t=>{const{color:i="#FFF",size:n=30}=t;return e.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 30 30",height:n,width:n},e.createElement("path",{fill:i,d:"M24.6,0c-3,0-5.4,2.4-5.4,5.4c0,0.1,0,0.3,0,0.4l-10,4.7C8.2,9.6,6.9,9,5.4,9C2.4,9,0,11.4,0,14.4c0,3,2.4,5.4,5.4,5.4 c0.9,0,1.8-0.2,2.6-0.7l4.3,3.7c-0.2,0.6-0.3,1.1-0.3,1.8c0,3,2.4,5.4,5.4,5.4c3,0,5.4-2.4,5.4-5.4s-2.4-5.4-5.4-5.4 c-0.9,0-1.8,0.2-2.6,0.7l-4.3-3.7c0.2-0.6,0.3-1.1,0.3-1.8c0-0.1,0-0.2,0-0.4l10-4.7c1,0.9,2.3,1.5,3.7,1.5c3,0,5.4-2.4,5.4-5.4 S27.6,0,24.6,0z"}))},h='.test1, .test2 {\n background: url("/folder/subfolder/icons/ltr/chevron-left.png");\n background-color: #FFF;\n background-position: 10px 20px;\n border-radius: 0 2px 0 8px;\n color: #666;\n padding-right: 20px;\n text-align: left;\n transform: translate(-50%, 50%);\n width: 100%;\n}\n\n.test3:hover,\n.test4:active {\n font-family: Arial, Helvetica /*rtl:prepend:"Droid Arabic Kufi", */;\n font-size: 20px /*rtl:30px*/;\n color: \'#FFF\' /*rtl:#000*/;\n transform: translateY(10px) /*rtl:append:scaleX(-1)*/;\n padding: 10px /*rtl:insert:20px*/;\n}\n\n/*rtl:begin:ignore*/\n#test5, #test6 {\n left: 10px;\n position: relative;\n text-align: right;\n}\n\n.test7 .test8 span {\n border-left-color: #777;\n margin: 10px 20px 30px 40px;\n transform: translate(100%, 10%);\n}\n/*rtl:end:ignore*/\n\n.test9 {\n animation: 5s flip 1s ease-in-out,\n 3s my-animation 6s ease-in-out;\n font-size: 10px;\n padding: 10px 20px 40px 10px;\n}\n\n@keyframes flip {\n from {\n transform: translateX(100px);\n }\n to {\n transform: translateX(0);\n }\n}\n\n@keyframes my-animation {\n from {\n left: 0%;\n }\n to {\n left: 100%;\n }\n}\n\n.test10-ltr {\n color: #000;\n width: 100%;\n}\n\n.test11-left::before {\n background-image: url("/icons/icon-l.png");\n}\n\n.test11-right::before {\n background-image: url("/icons/icon-r.png");\n}\n\n.testleft12 {\n content: "\\f007";\n}\n\n.testright12 {\n content: "\\f010";\n}\n\n.testltr13 {\n content: "keyboard_arrow_left";\n}\n\n.testrtl13 {\n content: "keyboard_arrow_right";\n}\n\n.test14 {\n .test14-ltr {\n content: "left content";\n }\n .test14-rtl {\n content: "right content";\n }\n}\n\n.test15 {\n color: #EFEFEF;\n left: 10px;\n /*rtl:raw:\n height: 50px;\n width: 100px;*/\n}\n \n/*rtl:raw:.test16 {\n color: #EFEFEF;\n left: 10px;\n width: 100%; \n}\n \n.test17 {\n transform: translate(10px, 20px);\n}\n*/\n\n.test18 {\n left: 10px;\n &.test19 {\n color: black;\n margin-left: 20px;\n }\n &.test20 {\n padding: 5px;\n span {\n text-align: left;\n }\n }\n}\n\n/*rtl:source:rtl*/\n.test19 {\n left: 10px;\n text-align: left;\n width: 50%;\n}\n\n.test20[dir="ltr"] {\n text-align: left;\n}\n\n.test20[dir="rtl"] {\n text-align: right;\n}\n\n.test21 {\n padding:\n env(safe-area-inset-top, 10px)\n env(safe-area-inset-right, 20px)\n env(safe-area-inset-bottom, 30px)\n env(safe-area-inset-left, 40px)\n ;\n}\n\n.test22 {\n /*rtl:urls*/\n background: url("/folder/icons/icon-ltr.png");\n margin-right: env(safe-area-inset-right, 10px);\n margin-left: env(safe-area-inset-left, 20px);\n}\n',u=()=>{const{canShare:t,token:i,share:n,code:s,options:o}=l(),r=(0,e.useCallback)((()=>{const e=JSON.stringify(o);n(s,e)}),[n,s,o]),a=t&&i&&s&&s!==h;return e.createElement("header",{className:"S898CJNNo9cb_xQn4FBI"},e.createElement("div",{className:"AQj0qjGusBKgpXIQViBm"},e.createElement("span",null,"{"," "),e.createElement("h1",{className:"X77jCI7sgjXhRwLBzrnp"},"PostCSS-RTLCSS online"),e.createElement("span",null," ","}")),e.createElement("div",{className:"dryWkrIcVdcnYq0GDkpH"},a&&e.createElement("button",{className:"IecoVAa_Qe9dqaN_PYMF",onClick:r},e.createElement(d,{size:20}))))};var g,p,f;function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{labels:i,checkbox:n=!0,attributes:s={},onChange:o}=t,{checked:r,...a}=s,[l,c]=(0,e.useState)(!!r),d="string"==typeof i?i:l?i[1]:i[0];return(0,e.useEffect)((()=>{c(!!r)}),[r]),e.createElement("label",{className:"zeQpT5nNQMf0kYt2lzbr"},e.createElement("input",m({type:n?"checkbox":"radio",className:"t3qyo0zGhoQ5RB_jPHeS",checked:l,onChange:e=>{const t=e.currentTarget.checked;c(t),o&&o(t)},"aria-checked":l},a)),e.createElement("div",{className:"GGyqZ8P4uPCx1FpPyNAN","data-checked":l}),e.createElement("span",{className:"D0Oh8xQ8a0cfpmDAHJpy"},d))};var v=__webpack_require__(97500),b=__webpack_require__.n(v);function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{label:i,name:n,values:s,horizontal:o=!0,attributes:r={},active:a,onChange:l}=t,[c,d]=(0,e.useState)(s[0]);(0,e.useEffect)((()=>{a&&d(a)}),[a]);const h=e=>{const t=e.currentTarget.value;d(t),l&&l(t)};return e.createElement("div",{className:"eVPAZqC4UdLE8mRba0fK"},e.createElement("span",{className:"RaSPIpBxqh2TgPf7jz5e"},i),e.createElement("div",{className:b()("iitlcU1_uTWihXnHWTdq",!o&&"dxpfGhcCsrV4Hqe58aCc")},s.map((t=>{const i=t===c;return e.createElement("div",{key:t,className:b()("DmjZFD2uQPpsnMQ8V8Vx",i&&"_IF0tYvKUzNJVB0X_ybI")},e.createElement("input",w({id:t,type:"radio",name:n,value:t,checked:i,onChange:h},r)),e.createElement("label",{htmlFor:t},t))}))))},y=e=>"boolean"==typeof e;var S="SPTLFg5XT6cLQ90JDCvW";const k=()=>{const{setOptions:t,optionsOpen:i,changeOptionsMode:n,changeOptionsSource:s,changeOptionsSafeBothPrefix:o,changeOptionsIgnorePrefixedRules:r,changeOptionsProcessUrls:a,changeOptionsProcessRuleNames:c,changeOptionsProcessKeyframes:d,changeOptionsProcessEnv:h,changeOptionsUseCalc:u,changeOptionsGreedy:f,fetchOptions:m}=l();return(0,e.useEffect)((()=>{m&&t(m)}),[m]),e.createElement("div",{className:"vBA5t8Ic4h9Y4UVUvt9n","data-opened":i},e.createElement("div",{className:"ZhutTa37RqfOGMsLQJxO"},"Options"),e.createElement("div",{className:"EGp4ZY1m59c2fBaAtoAp"},e.createElement("div",{className:S},e.createElement(C,{label:"Mode",name:"mode",values:["combined","override","diff"],onChange:e=>{n("combined"===e?g.combined:"override"===e?g.override:g.diff)},active:m?.mode||"combined"})),e.createElement("div",{className:S},e.createElement(_,{labels:["source: ltr","source: rtl"],onChange:e=>s(e?p.rtl:p.ltr),attributes:{checked:"rtl"===m?.source}})),e.createElement("div",{className:S},e.createElement(_,{labels:["safeBothPrefix: false","safeBothPrefix: true"],onChange:e=>o(e),attributes:{checked:!!m?.safeBothPrefix}})),e.createElement("div",{className:S},e.createElement(_,{labels:["ignorePrefixedRules: false","ignorePrefixedRules: true"],onChange:e=>r(e),attributes:{checked:!(y(m?.ignorePrefixedRules)&&!m.ignorePrefixedRules)}})),e.createElement("div",{className:S},e.createElement(_,{labels:["processUrls: false","processUrls: true"],onChange:e=>a(e),attributes:{checked:!!m?.processUrls}})),e.createElement("div",{className:S},e.createElement(_,{labels:["processRuleNames: false","processRuleNames: true"],onChange:e=>c(e),attributes:{checked:!!m?.processRuleNames}})),e.createElement("div",{className:S},e.createElement(_,{labels:["processKeyFrames: false","processKeyFrames: true"],onChange:e=>d(e),attributes:{checked:!!m?.processKeyFrames}})),e.createElement("div",{className:S},e.createElement(_,{labels:["processEnv: false","processEnv: true"],onChange:e=>h(e),attributes:{checked:!(y(m?.processEnv)&&!m.processEnv)}})),e.createElement("div",{className:S},e.createElement(_,{labels:["useCalc: false","useCalc: true"],onChange:e=>u(e),attributes:{checked:!!m?.useCalc}})),e.createElement("div",{className:S},e.createElement(_,{labels:["greedy: false","greedy: true"],onChange:e=>f(e),attributes:{checked:!!m?.greedy}}))))};var x=__webpack_require__(15571),L=x;x.stringify,x.fromJSON,x.plugin,x.parse,x.list,x.document,x.comment,x.atRule,x.rule,x.decl,x.root,x.CssSyntaxError,x.Declaration,x.Container,x.Processor,x.Document,x.Comment,x.Warning,x.AtRule,x.Result,x.Input,x.Rule,x.Root,x.Node;var D,E,N=__webpack_require__(32535),I=function(){return I=Object.assign||function(e){for(var t,i=1,n=arguments.length;i=0})),K=m[A]?Ue(m[A],k):Ue(A,k),$=!!c&&(m[A]?!!Fe[m[A]]:!!Fe[A]),G=fe(x,i),Q=!G||G===l||a===D.diff;if(pe(x,P.FREEZE)||n)a===D.combined&&(Ve(t,b),k.push(A),v.push(t));else if((R!==V||O!==U||q||K||$||H)&&!(S[t.prop].ignore&&!$||function(e,t,i,n){var s=e.index(t),o=n[t.prop],r=Object.keys(o.indexes).map(Number).sort();if(1===r.length)return!1;var a=r.filter((function(e){return e>s}));if(a.length){if(z.test(t.prop)){if(n[i.prop]){var l=n[i.prop],c=Object.keys(l.indexes).map(Number).sort().slice(-1)[0],d=a.slice(-1)[0];return o.indexes[d].value===l.indexes[c].value&&(o.ignore=!0,l.ignore=!0),!0}return!1}return!0}return!1}(e,t,T,S)))if(H)if(R!==V||O!==U||0!==de.keyframes.length&&de.keyframesRegExp.test(O)){var Y=t.value.replace(de.keyframesRegExp,(function(e,t,i,n){return t+de.keyframesStringMap[i].name+n})),Z=t.value.replace(de.keyframesRegExp,(function(e,t,i,n){return t+de.keyframesStringMap[i].nameFlipped+n})),X=t.clone();a===D.combined?((J=t.clone()).value=Y,X.value=Z,Q?(b.append(J),w.append(X)):(b.append(X),w.append(J)),v.push(t)):(t.value=Y,X.value=Z,Q?b.append(X):w.append(X),c&&a!==D.diff&&(Ve(t,y),v.push(t)))}else c&&!ze(t)&&(a===D.diff?Ve(t,b):Ve(t,y),v.push(t));else{if(R===V&&O===U)return void((q||$||K)&&!ze(t)&&(a===D.diff?Ve(t,b):Ve(t,q||K?C:y),v.push(t)));if(function(e,t,i){return!!i[t.prop]&&Object.entries(i[t.prop].indexes).some((function(n){return n[1].value===t.value.trim()&&!function(e,t,i){var n=e.index(t),s=Object.keys(i[t.prop].indexes).map(Number);return 1!==s.length&&s.some((function(e){return e>n}))}(e,n[1].decl,i)}))}(e,T,S))return E=!0,void($&&!ze(t)&&(a===D.diff?Ve(t,b):Ve(t,y),v.push(t)));var J;a===D.combined?(Q?(Ve(t,b),w.append(T)):(Ve(t,w),b.append(T)),v.push(t)):(z.test(t.prop)&&!S[T.prop]&&e.index(t)===W[0]&&((J=t.clone()).value=Be[t.prop]||"unset",Q?b.append(J):w.append(J)),$&&!ze(t)&&a!==D.diff&&(Ve(t,y),v.push(t)),Q?b.append(T):w.append(T)),k.push(A)}}})),v.length&&v.forEach((function(e){return e.remove()})),b.nodes.length||w.nodes.length||C.nodes.length||y.nodes.length?t?xe(e,b,w,C,y):ke(e,b,w,C,y):Z(e)&&(h||s)&&!E?de.unmodifiedRules.push({rule:e,hasParentRule:t}):a===D.diff&&de.containersToRemove.push(e)}};function qe(e){return void 0===e&&(e={}),{postcssPlugin:"postcss-rtlcss",Once:function(t){(function(e){de.options=function(e){var t,i=I({},ce());return e.mode&&oe.includes(e.mode)&&(i.mode=e.mode),e.source&&re.includes(e.source)&&(i.source=e.source),X(e.ignorePrefixedRules)&&(i.ignorePrefixedRules=e.ignorePrefixedRules),X(e.greedy)&&(i.greedy=e.greedy),ae(e.ltrPrefix)||(i.ltrPrefix=e.ltrPrefix),ae(e.rtlPrefix)||(i.rtlPrefix=e.rtlPrefix),ae(e.bothPrefix)||(i.bothPrefix=e.bothPrefix),J(e.prefixSelectorTransformer)&&(i.prefixSelectorTransformer=e.prefixSelectorTransformer),X(e.safeBothPrefix)&&(i.safeBothPrefix=e.safeBothPrefix),X(e.processUrls)&&(i.processUrls=e.processUrls),X(e.processRuleNames)&&(i.processRuleNames=e.processRuleNames),X(e.processKeyFrames)&&(i.processKeyFrames=e.processKeyFrames),X(e.processEnv)&&(i.processEnv=e.processEnv),X(e.useCalc)&&(i.useCalc=e.useCalc),function(e){return!Array.isArray(e)||e.some((function(e){return typeof e.search!=typeof e.replace||ae(e.search)||ae(e.replace)||Array.isArray(e.search)&&Array.isArray(e.replace)&&e.search.length!==e.replace.length}))}(e.stringMap)||se(e.stringMap).forEach((function(e){e.name===ie[0].name?i.stringMap.splice(0,1,e):e.name===ie[1].name?i.stringMap.splice(1,1,e):i.stringMap.push(e)})),function(e){return Array.isArray(e)&&e.every((function(e){return ee(e.name)&&typeof e.priority===R.NUMBER&&Array.isArray(e.processors)&&e.processors.every((function(e){return e.expr instanceof RegExp&&J(e.action)}))}))}(e.processDeclarationPlugins)&&(i.plugins=e.processDeclarationPlugins.map((function(e){return I(I({},e),{directives:{control:{},value:[]}})}))),e.aliases&&(t=e.aliases,!Object.entries(t).some((function(e){return!ee(e[1])})))&&(i.aliases=e.aliases),i}(e),de.keyframes=[],de.keyframesToRemove=[],de.keyframesStringMap={},de.keyframesRegExp=te,de.rules=[],de.containersToRemove=[],de.rulesPrefixRegExp=function(e){var t=e.ltrPrefix,i=e.rtlPrefix,n=e.bothPrefix;if(!e.ignorePrefixedRules)return te;var s=[];return s=le(s,t),s=le(s,i),s=(s=le(s,n)).map((function(e){var t=e.replace(K,"\\$&");return $.test(e)?"".concat(t,"(?:\\W|$)"):t})),new RegExp("(".concat(s.join("|"),")"))}(de.options),de.unmodifiedRules=[]})(e),Te(t),be(je,t),Ie(je,t),function(){if(de.unmodifiedRules.length){var e=de.options.stringMap.reduce((function(e,t){var i=ee(t.search)?[t.search]:t.search,n=ee(t.replace)?[t.replace]:t.replace;return i.forEach((function(t,i){e[t]=n[i],e[n[i]]=t})),e}),{}),t=Object.keys(e).join("|"),i=de.options.greedy?new RegExp("(".concat(t,")"),"g"):new RegExp("\\b(".concat(t,")\\b"),"g"),n={},s=[];de.unmodifiedRules.forEach((function(e){var t=!1;e.rule.selectors.forEach((function(s){i.test(s)&&(n[s]=e.rule.clone(),t=!0),i.lastIndex=0})),t?s.push(e):de.options.mode===D.diff&&de.containersToRemove.push(e.rule)})),s.forEach((function(t){for(var s=t.rule,o=t.hasParentRule,r=s.clone(),a=s.clone().removeAll(),l=void 0,c=0,d=s.selectors;c__webpack_require__.e(336).then(__webpack_require__.bind(__webpack_require__,40336))}),(0,$e.K)({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>__webpack_require__.e(4764).then(__webpack_require__.bind(__webpack_require__,94764))}),(0,$e.K)({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>__webpack_require__.e(7690).then(__webpack_require__.bind(__webpack_require__,7690))}),(0,$e.K)({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>__webpack_require__.e(8378).then(__webpack_require__.bind(__webpack_require__,58378))}),(0,$e.K)({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>__webpack_require__.e(6842).then(__webpack_require__.bind(__webpack_require__,96842))}),(0,$e.K)({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>__webpack_require__.e(9746).then(__webpack_require__.bind(__webpack_require__,49746))}),(0,$e.K)({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>__webpack_require__.e(2834).then(__webpack_require__.bind(__webpack_require__,72834))}),(0,$e.K)({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>__webpack_require__.e(4316).then(__webpack_require__.bind(__webpack_require__,24316))}),(0,$e.K)({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>__webpack_require__.e(2102).then(__webpack_require__.bind(__webpack_require__,22102))}),(0,$e.K)({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>__webpack_require__.e(2102).then(__webpack_require__.bind(__webpack_require__,22102))}),(0,$e.K)({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>__webpack_require__.e(9490).then(__webpack_require__.bind(__webpack_require__,69490))}),(0,$e.K)({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>__webpack_require__.e(3386).then(__webpack_require__.bind(__webpack_require__,13386))}),__webpack_require__(55172),(0,$e.K)({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>__webpack_require__.e(930).then(__webpack_require__.bind(__webpack_require__,70930))}),(0,$e.K)({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>__webpack_require__.e(3178).then(__webpack_require__.bind(__webpack_require__,93178))}),(0,$e.K)({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>__webpack_require__.e(1320).then(__webpack_require__.bind(__webpack_require__,21320))}),(0,$e.K)({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>__webpack_require__.e(3194).then(__webpack_require__.bind(__webpack_require__,33194))}),(0,$e.K)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>__webpack_require__.e(194).then(__webpack_require__.bind(__webpack_require__,194))}),(0,$e.K)({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>__webpack_require__.e(1186).then(__webpack_require__.bind(__webpack_require__,21186))}),(0,$e.K)({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>__webpack_require__.e(7752).then(__webpack_require__.bind(__webpack_require__,47752))}),(0,$e.K)({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAutoInterpolationDollar))}),(0,$e.K)({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAngleInterpolationDollar))}),(0,$e.K)({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagBracketInterpolationDollar))}),(0,$e.K)({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAngleInterpolationBracket))}),(0,$e.K)({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagBracketInterpolationBracket))}),(0,$e.K)({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAutoInterpolationDollar))}),(0,$e.K)({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>__webpack_require__.e(9730).then(__webpack_require__.bind(__webpack_require__,79730)).then((e=>e.TagAutoInterpolationBracket))}),(0,$e.K)({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>__webpack_require__.e(7896).then(__webpack_require__.bind(__webpack_require__,37896))}),(0,$e.K)({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>__webpack_require__.e(266).then(__webpack_require__.bind(__webpack_require__,70266))}),(0,$e.K)({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>__webpack_require__.e(848).then(__webpack_require__.bind(__webpack_require__,40848))}),(0,$e.K)({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>__webpack_require__.e(8578).then(__webpack_require__.bind(__webpack_require__,58578))}),(0,$e.K)({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>__webpack_require__.e(8374).then(__webpack_require__.bind(__webpack_require__,88374))}),(0,$e.K)({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>__webpack_require__.e(322).then(__webpack_require__.bind(__webpack_require__,70322))}),(0,$e.K)({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>__webpack_require__.e(1684).then(__webpack_require__.bind(__webpack_require__,1684))}),(0,$e.K)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>__webpack_require__.e(1682).then(__webpack_require__.bind(__webpack_require__,41682))}),(0,$e.K)({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>__webpack_require__.e(918).then(__webpack_require__.bind(__webpack_require__,30918))}),(0,$e.K)({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>__webpack_require__.e(9818).then(__webpack_require__.bind(__webpack_require__,59818))}),(0,$e.K)({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>__webpack_require__.e(5561).then(__webpack_require__.bind(__webpack_require__,77942))}),(0,$e.K)({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>__webpack_require__.e(5230).then(__webpack_require__.bind(__webpack_require__,75230))}),(0,$e.K)({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>__webpack_require__.e(9046).then(__webpack_require__.bind(__webpack_require__,79046))}),(0,$e.K)({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>__webpack_require__.e(1004).then(__webpack_require__.bind(__webpack_require__,11004))}),(0,$e.K)({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>__webpack_require__.e(1164).then(__webpack_require__.bind(__webpack_require__,21164))}),(0,$e.K)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>__webpack_require__.e(2914).then(__webpack_require__.bind(__webpack_require__,72914))}),(0,$e.K)({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>__webpack_require__.e(8434).then(__webpack_require__.bind(__webpack_require__,8434))}),(0,$e.K)({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>__webpack_require__.e(162).then(__webpack_require__.bind(__webpack_require__,20162))}),(0,$e.K)({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>__webpack_require__.e(3374).then(__webpack_require__.bind(__webpack_require__,73374))}),(0,$e.K)({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>__webpack_require__.e(7006).then(__webpack_require__.bind(__webpack_require__,97006))}),(0,$e.K)({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>__webpack_require__.e(658).then(__webpack_require__.bind(__webpack_require__,40658))}),(0,$e.K)({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>__webpack_require__.e(2e3).then(__webpack_require__.bind(__webpack_require__,2e3))}),(0,$e.K)({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>__webpack_require__.e(9066).then(__webpack_require__.bind(__webpack_require__,89066))}),(0,$e.K)({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>__webpack_require__.e(1058).then(__webpack_require__.bind(__webpack_require__,11058))}),(0,$e.K)({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>__webpack_require__.e(1394).then(__webpack_require__.bind(__webpack_require__,1394))}),(0,$e.K)({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>__webpack_require__.e(1762).then(__webpack_require__.bind(__webpack_require__,71762))}),(0,$e.K)({id:"pla",extensions:[".pla"],loader:()=>__webpack_require__.e(2122).then(__webpack_require__.bind(__webpack_require__,32122))}),(0,$e.K)({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>__webpack_require__.e(5309).then(__webpack_require__.bind(__webpack_require__,47690))}),(0,$e.K)({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>__webpack_require__.e(4194).then(__webpack_require__.bind(__webpack_require__,74194))}),(0,$e.K)({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>__webpack_require__.e(2718).then(__webpack_require__.bind(__webpack_require__,92718))}),(0,$e.K)({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>__webpack_require__.e(1330).then(__webpack_require__.bind(__webpack_require__,11330))}),(0,$e.K)({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>__webpack_require__.e(2766).then(__webpack_require__.bind(__webpack_require__,82766))}),(0,$e.K)({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>__webpack_require__.e(256).then(__webpack_require__.bind(__webpack_require__,20256))}),(0,$e.K)({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>__webpack_require__.e(3830).then(__webpack_require__.bind(__webpack_require__,13830))}),(0,$e.K)({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>__webpack_require__.e(2014).then(__webpack_require__.bind(__webpack_require__,42014))}),(0,$e.K)({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>__webpack_require__.e(7942).then(__webpack_require__.bind(__webpack_require__,67942))}),(0,$e.K)({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>__webpack_require__.e(8034).then(__webpack_require__.bind(__webpack_require__,98034))}),(0,$e.K)({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>__webpack_require__.e(9810).then(__webpack_require__.bind(__webpack_require__,69810))}),(0,$e.K)({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>__webpack_require__.e(6114).then(__webpack_require__.bind(__webpack_require__,16114))}),(0,$e.K)({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>__webpack_require__.e(4796).then(__webpack_require__.bind(__webpack_require__,4796))}),(0,$e.K)({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>__webpack_require__.e(9292).then(__webpack_require__.bind(__webpack_require__,79292))}),(0,$e.K)({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>__webpack_require__.e(310).then(__webpack_require__.bind(__webpack_require__,20310))}),(0,$e.K)({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>__webpack_require__.e(4402).then(__webpack_require__.bind(__webpack_require__,4402))}),(0,$e.K)({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>__webpack_require__.e(4946).then(__webpack_require__.bind(__webpack_require__,44946))}),(0,$e.K)({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>__webpack_require__.e(1636).then(__webpack_require__.bind(__webpack_require__,1636))}),(0,$e.K)({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>__webpack_require__.e(350).then(__webpack_require__.bind(__webpack_require__,70350))}),(0,$e.K)({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>__webpack_require__.e(8038).then(__webpack_require__.bind(__webpack_require__,18038))}),(0,$e.K)({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>__webpack_require__.e(1504).then(__webpack_require__.bind(__webpack_require__,31504))}),(0,$e.K)({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>__webpack_require__.e(118).then(__webpack_require__.bind(__webpack_require__,60118))}),(0,$e.K)({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>__webpack_require__.e(4670).then(__webpack_require__.bind(__webpack_require__,54670))}),(0,$e.K)({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>__webpack_require__.e(3794).then(__webpack_require__.bind(__webpack_require__,93794))}),(0,$e.K)({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>__webpack_require__.e(1882).then(__webpack_require__.bind(__webpack_require__,81882))}),(0,$e.K)({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>__webpack_require__.e(1458).then(__webpack_require__.bind(__webpack_require__,91458))}),(0,$e.K)({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>__webpack_require__.e(1458).then(__webpack_require__.bind(__webpack_require__,91458))}),(0,$e.K)({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>__webpack_require__.e(8386).then(__webpack_require__.bind(__webpack_require__,98386))}),(0,$e.K)({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>__webpack_require__.e(3454).then(__webpack_require__.bind(__webpack_require__,73454))}),(0,$e.K)({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>__webpack_require__.e(1650).then(__webpack_require__.bind(__webpack_require__,71650))}),(0,$e.K)({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>__webpack_require__.e(9970).then(__webpack_require__.bind(__webpack_require__,39970))}),(0,$e.K)({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>__webpack_require__.e(1840).then(__webpack_require__.bind(__webpack_require__,81840))}),(0,$e.K)({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>__webpack_require__.e(2922).then(__webpack_require__.bind(__webpack_require__,42922))}),(0,$e.K)({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\__webpack_require__.e(4466).then(__webpack_require__.bind(__webpack_require__,44466))}),(0,$e.K)({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>__webpack_require__.e(8114).then(__webpack_require__.bind(__webpack_require__,8114))}),__webpack_require__(95380);var Ge=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ye=Object.getOwnPropertyNames,Ze=Object.prototype.hasOwnProperty,Xe=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of Ye(t))Ze.call(e,s)||s===i||Ge(e,s,{get:()=>t[s],enumerable:!(n=Qe(t,s))||n.enumerable});return e},Je={};Xe(Je,Ke,"default");var et=class{constructor(e,t,i){this._onDidChange=new Je.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},tt={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function it(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===nt,documentFormattingEdits:e===nt,documentRangeFormattingEdits:e===nt}}var nt="html",st="handlebars",ot="razor",rt=ut(nt,tt,it(nt)),at=rt.defaults,lt=ut(st,tt,it(st)),ct=lt.defaults,dt=ut(ot,tt,it(ot)),ht=dt.defaults;function ut(e,t=tt,i=it(e)){const n=new et(e,t,i);let s;const o=Je.languages.onLanguage(e,(async()=>{s=(await __webpack_require__.e(7857).then(__webpack_require__.bind(__webpack_require__,37857))).setupMode(n)}));return{defaults:n,dispose(){o.dispose(),s?.dispose(),s=void 0}}}Je.languages.html={htmlDefaults:at,razorDefaults:ht,handlebarDefaults:ct,htmlLanguageService:rt,handlebarLanguageService:lt,razorLanguageService:dt,registerHTMLLanguageService:ut};var gt=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,ft=Object.getOwnPropertyNames,mt=Object.prototype.hasOwnProperty,_t=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of ft(t))mt.call(e,s)||s===i||gt(e,s,{get:()=>t[s],enumerable:!(n=pt(t,s))||n.enumerable});return e},vt={};((e,t)=>{_t(e,t,"default")})(vt,Ke);var bt,wt=new class{constructor(e,t,i){this._onDidChange=new vt.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function Ct(){return __webpack_require__.e(9867).then(__webpack_require__.bind(__webpack_require__,39867))}vt.languages.json={jsonDefaults:wt,getWorker:()=>Ct().then((e=>e.getWorker()))},vt.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),vt.languages.onLanguage("json",(()=>{Ct().then((e=>e.setupMode(wt)))})),__webpack_require__(13028),__webpack_require__(47025),self.MonacoEnvironment=(bt={editorWorkerService:"editor.worker.js",css:"css.worker.js",less:"css.worker.js",scss:"css.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var i=__webpack_require__.p,n=(i?i.replace(/\/$/,"")+"/":"")+bt[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(n)){var s=String(window.location),o=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(n.substring(0,o.length)!==o){/^(\/\/)/.test(n)&&(n=window.location.protocol+n);var r=new Blob(["/*"+t+'*/importScripts("'+n+'");'],{type:"application/javascript"});return URL.createObjectURL(r)}}return n}});const yt=t=>{const{title:i,height:n,width:s,lines:o="",readOnly:r=!1,isMobile:a=!1,onChange:l}=t,c=(0,e.useRef)(null),d=(0,e.useRef)(null);return(0,e.useEffect)((()=>{Ke.languages.css.cssDefaults.setModeConfiguration({colors:!1}),c.current=Ke.editor.create(d.current,{value:o,minimap:{enabled:!1},readOnly:r,scrollbar:{alwaysConsumeMouseWheel:!0},theme:"vs-dark",contextmenu:!a,selectionHighlight:!a,stickyScroll:{enabled:!1},hover:{enabled:!1},scrollBeyondLastLine:!1,language:"scss"}),c.current.onDidChangeModelContent((()=>{l&&l(c.current.getValue())}))}),[]),(0,e.useEffect)((()=>{n&&c.current&&c.current.layout({height:n,width:s})}),[n,s,c]),(0,e.useEffect)((()=>{c.current&&c.current.setValue(o)}),[o,c]),e.createElement("div",{className:"qACNvsTy_KdDyPtLyGJk"},e.createElement("div",{className:"ug_NesGzRw8WJcgFV3UI"},i),e.createElement("div",{className:"vsX2Z6j6SQhCKuMjpHae",ref:d}))};function St(){return St=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{ready:t,fetchCode:i,setCode:n,options:s,windowSizes:o}=l(),{isSmallScreen:r,panelHeight:a,panelWidth:c}=o,[d,u]=(0,e.useState)(h),[g,p]=(0,e.useState)("");(0,e.useEffect)((()=>{(function(e){return L([qe(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})]).process(e)})(d,s).then((e=>{p(e.css)})).catch((e=>{p(`/* ${e.name}: ${e.message} */`)})),n(d)}),[d,s]);const f={isMobile:r,height:a,width:c};return e.createElement("div",{className:"BKPY2vLMNuO0LfNJoooe"},e.createElement(yt,St({title:"css input",lines:t?i||h:"",readOnly:r,onChange:e=>{u(e)}},f)),e.createElement(yt,St({title:"css output",lines:g,readOnly:!0},f)))};class xt extends e.PureComponent{constructor(t){super(t),this.$=e.createRef(),this._=e.createRef()}render(){return e.createElement("span",{ref:this.$},e.createElement("a",{...this.props,ref:this._},this.props.children))}componentDidMount(){this.paint()}getSnapshotBeforeUpdate(){return this.reset(),null}componentDidUpdate(){this.paint()}componentWillUnmount(){this.reset()}paint(){const e=this.$.current.appendChild(document.createElement("span"));Promise.resolve().then(__webpack_require__.bind(__webpack_require__,76793)).then((({render:t})=>{null!=this._.current&&t(e.appendChild(this._.current),(function(t){try{e.parentNode.replaceChild(t,e)}catch(e){}}))}))}reset(){this.$.current.replaceChild(this._.current,this.$.current.lastChild)}}var Lt=xt;const Dt=t=>{const{href:i,children:n}=t;return e.createElement("a",{className:"bnulRprlvqQD_NUXOpgc",href:i,target:"_blank",rel:"noopener noreferrer"},n)};var Et="G2ehhaF_DOM3PMmkFH9S";const Nt=()=>e.createElement("footer",{className:"OXEahmEOMbEHWGJs6uwj"},e.createElement("div",{className:Et},e.createElement(Lt,{href:"https://github.com/elchininet/postcss-rtlcss/fork","data-size":"small","aria-label":"Fork elchininet/postcss-rtlcss on GitHub","data-color-scheme":"no-preference: dark; light: dark; dark: dark;"},"Fork me on Github")),e.createElement("div",{className:b()(Et,"Vqh3m1RGv8ssQXlWiddZ")},e.createElement("span",null,"Playground powered by ",e.createElement(Dt,{href:"https://microsoft.github.io/monaco-editor/"},"Monaco Editor")))),It=()=>e.createElement(a,null,e.createElement("div",{className:"vhn2SJWlxSMhnHtIJaLb"},e.createElement(u,null),e.createElement(kt,null),e.createElement(Nt,null)),e.createElement(k,null),e.createElement(c,null)),Mt=document.getElementById("app");(0,t.createRoot)(Mt).render(e.createElement(It,null))}()})(); \ No newline at end of file diff --git a/package.json b/package.json index 2cb89cb6..9a8640d5 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ ], "scripts": { "test": "jest --clearCache && jest --verbose", - "lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\"", + "lint": "eslint \"src/**/*.ts\" \"playground/src/**/*.tsx\" \"tests/**/*.ts\"", "clean": "./scripts/clean.sh", "copy": "./scripts/copy.sh", "modify-dts": "replace-in-file --configFile=config.replace.json", diff --git a/playground/src/components/App/App.tsx b/playground/src/components/App/App.tsx index 543d6f2d..f63afff7 100644 --- a/playground/src/components/App/App.tsx +++ b/playground/src/components/App/App.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { JSX } from 'react'; import { AppProvider } from '@components/AppProvider'; import { Burger } from '@components/Burger'; import { Header } from '@components/Header'; @@ -11,13 +11,13 @@ export const App = (): JSX.Element => { return ( -
    +
    -
    +
    - + ); }; \ No newline at end of file diff --git a/playground/src/components/AppProvider/AppProvider.tsx b/playground/src/components/AppProvider/AppProvider.tsx index 4d56fdc2..599310f2 100644 --- a/playground/src/components/AppProvider/AppProvider.tsx +++ b/playground/src/components/AppProvider/AppProvider.tsx @@ -1,4 +1,11 @@ -import React, { PropsWithChildren, createContext, useContext, useState, useEffect } from 'react'; +import React, { + JSX, + ReactNode, + createContext, + useContext, + useState, + useEffect +} from 'react'; import { Mode, Source } from 'postcss-rtlcss/options'; import { PluginOptions, FetchOptions } from '@types'; import { breakpointSizes } from '@constants'; @@ -64,7 +71,7 @@ const windowSizes = getWindowSizes(); export const AppContext = createContext({} as AppProviderContext); -export const AppProvider = (props: PropsWithChildren<{}>): JSX.Element => { +export const AppProvider = (props: { children?: ReactNode }): JSX.Element => { let delay: number; const [ code, setCode ] = useState(null); @@ -83,9 +90,9 @@ export const AppProvider = (props: PropsWithChildren<{}>): JSX.Element => { const resize = (): void => { if (delay) window.clearTimeout(delay); - delay = window.setTimeout((): void => { + delay = window.setTimeout((): void => { const windowSizes = getWindowSizes(); - setSizes(windowSizes); + setSizes(windowSizes); }, 100); }; @@ -123,7 +130,7 @@ export const AppProvider = (props: PropsWithChildren<{}>): JSX.Element => { changeOptionsProcessEnv, changeOptionsUseCalc, changeOptionsGreedy, - windowSizes: sizes + windowSizes: sizes }; return ( diff --git a/playground/src/components/Burger/Burger.tsx b/playground/src/components/Burger/Burger.tsx index 15d5af20..994d1f77 100644 --- a/playground/src/components/Burger/Burger.tsx +++ b/playground/src/components/Burger/Burger.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { JSX } from 'react'; import { useAppContext } from '@components/AppProvider'; import * as styles from './Burger.module.scss'; diff --git a/playground/src/components/CSSPanel/CSSPanel.tsx b/playground/src/components/CSSPanel/CSSPanel.tsx index 9946a450..11000b96 100644 --- a/playground/src/components/CSSPanel/CSSPanel.tsx +++ b/playground/src/components/CSSPanel/CSSPanel.tsx @@ -1,4 +1,8 @@ -import React, {useEffect, useRef} from 'react'; +import React, { + useEffect, + useRef, + JSX +} from 'react'; import { editor, languages } from 'monaco-editor'; import * as styles from './CSSPanel.module.scss'; @@ -36,6 +40,9 @@ export const CSSPanel = (props: CSSPanelProps): JSX.Element => { theme: 'vs-dark', contextmenu: !isMobile, selectionHighlight: !isMobile, + stickyScroll: { + enabled: false + }, hover: { enabled: false }, diff --git a/playground/src/components/Footer/Footer.tsx b/playground/src/components/Footer/Footer.tsx index dc2087b0..b544931d 100644 --- a/playground/src/components/Footer/Footer.tsx +++ b/playground/src/components/Footer/Footer.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { JSX } from 'react'; import GitHubButton from 'react-github-btn'; import classnames from 'classnames'; import { Link } from '@components/Link'; diff --git a/playground/src/components/Header/Header.tsx b/playground/src/components/Header/Header.tsx index b64e3c93..8f3fd47e 100644 --- a/playground/src/components/Header/Header.tsx +++ b/playground/src/components/Header/Header.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import React, { useCallback, JSX } from 'react'; import { Share } from '@icons/Share'; import { useAppContext } from '@components/AppProvider'; import { cssLines } from '@components/Playground/css'; diff --git a/playground/src/components/Link/Link.tsx b/playground/src/components/Link/Link.tsx index 037428a6..be8e39d2 100644 --- a/playground/src/components/Link/Link.tsx +++ b/playground/src/components/Link/Link.tsx @@ -1,4 +1,4 @@ -import React, { PropsWithChildren } from 'react'; +import React, { PropsWithChildren, JSX } from 'react'; import * as styles from './Link.module.scss'; export interface LinkProps { diff --git a/playground/src/components/Options/Options.tsx b/playground/src/components/Options/Options.tsx index a0476181..88f3340e 100644 --- a/playground/src/components/Options/Options.tsx +++ b/playground/src/components/Options/Options.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import React, { useEffect, JSX } from 'react'; import { Mode, Source } from 'postcss-rtlcss/options'; import { useAppContext } from '@components/AppProvider'; import { Switch } from '@components/Switch'; @@ -96,7 +96,7 @@ export const Options = (): JSX.Element => { ? fetchOptions.ignorePrefixedRules : true ) - }} + }} />
    { /* processUrls */ } @@ -122,7 +122,7 @@ export const Options = (): JSX.Element => { { /* processKeyFrames */ }
    { - return postcss([postcssRTLCSS(options)]).process(lines); + return postcss([postcssRTLCSS(options)]).process(lines); }; export const Playground = (): JSX.Element => { @@ -21,14 +25,14 @@ export const Playground = (): JSX.Element => { useEffect((): void => { flipLines(lines, options).then((result: Result): void => { setLinesFlipped(result.css); - }).catch((error): void => { + }).catch((error): void => { setLinesFlipped(`/* ${error.name}: ${error.message} */`); }); setCode(lines); }, [ lines, options ]); const onChangeCode = (code: string): void => { - setLines(code); + setLines(code); }; const comonProps = { diff --git a/playground/src/components/Switch/Switch.tsx b/playground/src/components/Switch/Switch.tsx index e7cc7c8c..32faf14c 100644 --- a/playground/src/components/Switch/Switch.tsx +++ b/playground/src/components/Switch/Switch.tsx @@ -1,4 +1,9 @@ -import React, { useState, useEffect, ChangeEvent } from 'react'; +import React, { + JSX, + useState, + useEffect, + ChangeEvent +} from 'react'; import * as styles from './Switch.module.scss'; interface Attributes { diff --git a/playground/src/components/SwitchGroup/SwitchGroup.tsx b/playground/src/components/SwitchGroup/SwitchGroup.tsx index cf0ec7a2..21745eb4 100644 --- a/playground/src/components/SwitchGroup/SwitchGroup.tsx +++ b/playground/src/components/SwitchGroup/SwitchGroup.tsx @@ -1,4 +1,9 @@ -import React, { useState, useEffect, ChangeEvent } from 'react'; +import React, { + JSX, + useState, + useEffect, + ChangeEvent +} from 'react'; import classnames from 'classnames'; import * as styles from './SwitchGroup.module.scss'; @@ -38,7 +43,9 @@ export const SwitchGroup = (props: SwitchGroupProps): JSX.Element => { const currentTarget = event.currentTarget; const value = currentTarget.value; setSelected(value); - onChange && onChange(value); + if (onChange) { + onChange(value); + } }; return (
    @@ -68,7 +75,7 @@ export const SwitchGroup = (props: SwitchGroupProps): JSX.Element => { ); }) } -
    +
    ); }; \ No newline at end of file diff --git a/playground/src/hooks/useApi.tsx b/playground/src/hooks/useApi.tsx index b640291a..d373645c 100644 --- a/playground/src/hooks/useApi.tsx +++ b/playground/src/hooks/useApi.tsx @@ -1,4 +1,9 @@ -import { useState, useEffect, useCallback, useMemo } from 'react'; +import { + useState, + useEffect, + useCallback, + useMemo +} from 'react'; import { FetchOptions } from '@types'; interface UseApiProps { @@ -122,7 +127,7 @@ export const useApi = (): UseApiProps => { history.replaceState('', '', `#${id}`); if (navigator.clipboard) { navigator.clipboard.writeText(window.location.href); - } + } }) .catch(() => { setToken(null); @@ -147,7 +152,7 @@ export const useApi = (): UseApiProps => { setToken(newToken); }) .catch(() => setReady(true)); - } + } }, [token]); useEffect(() => { diff --git a/playground/src/icons/Share.tsx b/playground/src/icons/Share.tsx index ea5e7fd1..284444ca 100644 --- a/playground/src/icons/Share.tsx +++ b/playground/src/icons/Share.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { JSX } from 'react'; interface ShareProps { color?: string; @@ -6,21 +6,24 @@ interface ShareProps { } export const Share = (props: ShareProps): JSX.Element => { - const { color = '#FFF', size = 30 } = props; - return ( - - - - ); + const { color = '#FFF', size = 30 } = props; + return ( + + + + ); };