factoriomod-debug 2.0.7 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  import {createRequire} from 'module'
3
3
  const require = createRequire(import.meta.url)
4
4
 
5
- import{E as Ea,F as Ma,H as cn,I as Pr,J as Rr,K as Oa,L as Aa,b as Yn,g as ft,h as Pe,i as an,j as Tr,k as L,l as Ia,n as kr,o as Ld,p as Ud,q as Kd}from"./chunk-RGWVOEC5.js";import{a as I,c as F,e as br}from"./chunk-ZLQDNPPN.js";var Ka=F((kp,Ua)=>{"use strict";function St(s,e){var t,n;if(typeof e=="function")n=e(s),n!==void 0&&(s=n);else if(Array.isArray(e))for(t=0;t<e.length;t++)n=e[t](s),n!==void 0&&(s=n);return s}function Nd(s,e){return s[0]==="-"&&Array.isArray(e)&&/^-\d+$/.test(s)?e.length+parseInt(s,10):s}function Hd(s){return/^\d+$/.test(s)}function Zn(s){return Object.prototype.toString.call(s)==="[object Object]"}function dn(s){return Object(s)===s}function ei(s){return Object.keys(s).length===0}var $d=["__proto__","prototype","constructor"],Wd=function(s){return $d.indexOf(s)===-1};function ti(s,e){s.indexOf("[")>=0&&(s=s.replace(/\[/g,e).replace(/]/g,""));var t=s.split(e),n=t.filter(Wd);if(n.length!==t.length)throw Error("Refusing to update blacklisted property "+s);return t}var La=Object.prototype.hasOwnProperty;function $(s,e,t,n){if(!(this instanceof $))return new $(s,e,t,n);typeof e>"u"&&(e=!1),typeof t>"u"&&(t=!0),typeof n>"u"&&(n=!0),this.separator=s||".",this.override=e,this.useArray=t,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var Ut=new $(".",!1,!0,!0);function Ne(s){return function(){return Ut[s].apply(Ut,arguments)}}$.prototype._fill=function(s,e,t,n){var i=s.shift();if(s.length>0){if(e[i]=e[i]||(this.useArray&&Hd(s[0])?[]:{}),!dn(e[i]))if(this.override)e[i]={};else{if(!(dn(t)&&ei(t)))throw new Error("Trying to redefine `"+i+"` which is a "+typeof e[i]);return}this._fill(s,e[i],t,n)}else{if(!this.override&&dn(e[i])&&!ei(e[i])){if(!(dn(t)&&ei(t)))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}e[i]=St(t,n)}};$.prototype.object=function(s,e){var t=this;return Object.keys(s).forEach(function(n){var i=e===void 0?null:e[n],r=ti(n,t.separator).join(t.separator);r.indexOf(t.separator)!==-1?(t._fill(r.split(t.separator),s,s[n],i),delete s[n]):s[n]=St(s[n],i)}),s};$.prototype.str=function(s,e,t,n){var i=ti(s,this.separator).join(this.separator);return s.indexOf(this.separator)!==-1?this._fill(i.split(this.separator),t,e,n):t[s]=St(e,n),t};$.prototype.pick=function(s,e,t,n){var i,r,a,c,u;for(r=ti(s,this.separator),i=0;i<r.length;i++)if(c=Nd(r[i],e),e&&typeof e=="object"&&c in e){if(i===r.length-1)return t?(a=e[c],n&&Array.isArray(e)?e.splice(c,1):delete e[c],Array.isArray(e)&&(u=r.slice(0,-1).join("."),this.cleanup.indexOf(u)===-1&&this.cleanup.push(u)),a):e[c];e=e[c]}else return;return t&&Array.isArray(e)&&(e=e.filter(function(l){return l!==void 0})),e};$.prototype.delete=function(s,e){return this.remove(s,e,!0)};$.prototype.remove=function(s,e,t){var n;if(this.cleanup=[],Array.isArray(s)){for(n=0;n<s.length;n++)this.pick(s[n],e,!0,t);return t||this._cleanup(e),e}else return this.pick(s,e,!0,t)};$.prototype._cleanup=function(s){var e,t,n,i;if(this.cleanup.length){for(t=0;t<this.cleanup.length;t++)n=this.cleanup[t].split("."),i=n.splice(0,-1).join("."),e=i?this.pick(i,s):s,e=e[n[0]].filter(function(r){return r!==void 0}),this.set(this.cleanup[t],e,s);this.cleanup=[]}};$.prototype.del=$.prototype.remove;$.prototype.move=function(s,e,t,n,i){return typeof n=="function"||Array.isArray(n)?this.set(e,St(this.pick(s,t,!0),n),t,i):(i=n,this.set(e,this.pick(s,t,!0),t,i)),t};$.prototype.transfer=function(s,e,t,n,i,r){return typeof i=="function"||Array.isArray(i)?this.set(e,St(this.pick(s,t,!0),i),n,r):(r=i,this.set(e,this.pick(s,t,!0),n,r)),n};$.prototype.copy=function(s,e,t,n,i,r){return typeof i=="function"||Array.isArray(i)?this.set(e,St(JSON.parse(JSON.stringify(this.pick(s,t,!1))),i),n,r):(r=i,this.set(e,this.pick(s,t,!1),n,r)),n};$.prototype.set=function(s,e,t,n){var i,r,a,c;if(typeof e>"u")return t;for(a=ti(s,this.separator),i=0;i<a.length;i++){if(c=a[i],i===a.length-1)if(n&&Zn(e)&&Zn(t[c]))for(r in e)La.call(e,r)&&(t[c][r]=e[r]);else if(n&&Array.isArray(t[c])&&Array.isArray(e))for(var u=0;u<e.length;u++)t[a[i]].push(e[u]);else t[c]=e;else(!La.call(t,c)||!Zn(t[c])&&!Array.isArray(t[c]))&&(/^\d+$/.test(a[i+1])?t[c]=[]:t[c]={});t=t[c]}return t};$.prototype.transform=function(s,e,t){return e=e||{},t=t||{},Object.keys(s).forEach(function(n){this.set(s[n],this.pick(n,e),t)}.bind(this)),t};$.prototype.dot=function(s,e,t){e=e||{},t=t||[];var n=Array.isArray(s);return Object.keys(s).forEach(function(i){var r=n&&this.useBrackets?"["+i+"]":i;if(dn(s[i])&&(Zn(s[i])&&!ei(s[i])||Array.isArray(s[i])&&!this.keepArray&&s[i].length!==0))if(n&&this.useBrackets){var a=t[t.length-1]||"";return this.dot(s[i],e,t.slice(0,-1).concat(a+r))}else return this.dot(s[i],e,t.concat(r));else n&&this.useBrackets?e[t.join(this.separator).concat("["+i+"]")]=s[i]:e[t.concat(r).join(this.separator)]=s[i]}.bind(this)),e};$.pick=Ne("pick");$.move=Ne("move");$.transfer=Ne("transfer");$.transform=Ne("transform");$.copy=Ne("copy");$.object=Ne("object");$.str=Ne("str");$.set=Ne("set");$.delete=Ne("delete");$.del=$.remove=Ne("remove");$.dot=Ne("dot");["override","overwrite"].forEach(function(s){Object.defineProperty($,s,{get:function(){return Ut.override},set:function(e){Ut.override=!!e}})});["useArray","keepArray","useBrackets"].forEach(function(s){Object.defineProperty($,s,{get:function(){return Ut[s]},set:function(e){Ut[s]=e}})});$._process=St;Ua.exports=$});var Ee=F(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.asPromise=oe.thenable=oe.typedArray=oe.stringArray=oe.array=oe.func=oe.error=oe.number=oe.string=oe.boolean=void 0;function Gd(s){return s===!0||s===!1}oe.boolean=Gd;function Va(s){return typeof s=="string"||s instanceof String}oe.string=Va;function Yd(s){return typeof s=="number"||s instanceof Number}oe.number=Yd;function Xd(s){return s instanceof Error}oe.error=Xd;function Ba(s){return typeof s=="function"}oe.func=Ba;function Ja(s){return Array.isArray(s)}oe.array=Ja;function Zd(s){return Ja(s)&&s.every(e=>Va(e))}oe.stringArray=Zd;function eu(s,e){return Array.isArray(s)&&s.every(e)}oe.typedArray=eu;function Qa(s){return s&&Ba(s.then)}oe.thenable=Qa;function tu(s){return s instanceof Promise?s:Qa(s)?new Promise((e,t)=>{s.then(n=>e(n),n=>t(n))}):Promise.resolve(s)}oe.asPromise=tu});var ui=F(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.forEach=Ce.mapAsync=Ce.map=Ce.clearTestMode=Ce.setTestMode=Ce.Semaphore=Ce.Delayer=void 0;var ln=L(),Kr=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(n=>{this.onSuccess=n}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;var n=this.task();return this.task=void 0,n})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,ln.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){this.timeout!==void 0&&(this.timeout.dispose(),this.timeout=void 0)}};Ce.Delayer=Kr;var Nr=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ln.RAL)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(n=>{this._active--,e.resolve(n),this.runNext()},n=>{this._active--,e.reject(n),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Ce.Semaphore=Nr;var Hr=!1;function nu(){Hr=!0}Ce.setTestMode=nu;function iu(){Hr=!1}Ce.clearTestMode=iu;var Ga=15,un=class{constructor(e=Ga){this.yieldAfter=Hr===!0?Math.max(e,2):Math.max(e,Ga),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){let e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=this.total*2;break}}return!1}};async function ru(s,e,t,n){if(s.length===0)return[];let i=new Array(s.length),r=new un(n?.yieldAfter);function a(u){r.start();for(let l=u;l<s.length;l++)if(i[l]=e(s[l]),r.shouldYield())return n?.yieldCallback&&n.yieldCallback(),l+1;return-1}let c=a(0);for(;c!==-1&&!(t!==void 0&&t.isCancellationRequested);)c=await new Promise(u=>{(0,ln.RAL)().timer.setImmediate(()=>{u(a(c))})});return i}Ce.map=ru;async function su(s,e,t,n){if(s.length===0)return[];let i=new Array(s.length),r=new un(n?.yieldAfter);async function a(u){r.start();for(let l=u;l<s.length;l++)if(i[l]=await e(s[l],t),r.shouldYield())return n?.yieldCallback&&n.yieldCallback(),l+1;return-1}let c=await a(0);for(;c!==-1&&!(t!==void 0&&t.isCancellationRequested);)c=await new Promise(u=>{(0,ln.RAL)().timer.setImmediate(()=>{u(a(c))})});return i}Ce.mapAsync=su;async function ou(s,e,t,n){if(s.length===0)return;let i=new un(n?.yieldAfter);function r(c){i.start();for(let u=c;u<s.length;u++)if(e(s[u]),i.shouldYield())return n?.yieldCallback&&n.yieldCallback(),u+1;return-1}let a=r(0);for(;a!==-1&&!(t!==void 0&&t.isCancellationRequested);)a=await new Promise(c=>{(0,ln.RAL)().timer.setImmediate(()=>{c(r(a))})})}Ce.forEach=ou});var jr=F(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});var au=I("vscode"),$r=class extends au.CompletionItem{constructor(e){super(e)}};Wr.default=$r});var Br=F(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});var cu=I("vscode"),zr=class extends cu.CodeLens{constructor(e){super(e)}};Vr.default=zr});var Gr=F(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});var du=I("vscode"),Jr=class extends du.DocumentLink{constructor(e,t){super(e,t)}};Qr.default=Jr});var Zr=F(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});var uu=I("vscode"),Yr=class extends uu.CodeAction{constructor(e,t){super(e),this.data=t}};Xr.default=Yr});var ns=F($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.ProtocolDiagnostic=$t.DiagnosticCode=void 0;var lu=I("vscode"),es=Ee(),Ya;(function(s){function e(t){let n=t;return n!=null&&(es.number(n.value)||es.string(n.value))&&es.string(n.target)}s.is=e})(Ya||($t.DiagnosticCode=Ya={}));var ts=class extends lu.Diagnostic{constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}};$t.ProtocolDiagnostic=ts});var ss=F(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var pu=I("vscode"),is=class extends pu.CallHierarchyItem{constructor(e,t,n,i,r,a,c){super(e,t,n,i,r,a),c!==void 0&&(this.data=c)}};rs.default=is});var cs=F(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var fu=I("vscode"),os=class extends fu.TypeHierarchyItem{constructor(e,t,n,i,r,a,c){super(e,t,n,i,r,a),c!==void 0&&(this.data=c)}};as.default=os});var ls=F(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var li=I("vscode"),ds=class extends li.SymbolInformation{constructor(e,t,n,i,r){let a=!(i instanceof li.Uri);super(e,t,n,a?i:new li.Location(i,new li.Range(0,0,0,0))),this.hasRange=a,r!==void 0&&(this.data=r)}};us.default=ds});var hs=F(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var hu=I("vscode"),ps=class extends hu.InlayHint{constructor(e,t,n){super(e,t,n)}};fs.default=ps});var tc=F(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.createConverter=void 0;var de=I("vscode"),A=L(),bt=Ee(),Xa=ui(),gu=jr(),mu=Br(),vu=Gr(),Za=Zr(),ec=ns(),yu=ss(),Cu=cs(),wu=ls(),Du=hs(),gs;(function(s){function e(t){let n=t;return n&&!!n.inserting&&!!n.replacing}s.is=e})(gs||(gs={}));function Su(s){let t=s||(d=>d.toString());function n(d){return t(d)}function i(d){return{uri:t(d.uri)}}function r(d){return{uri:t(d.uri),languageId:d.languageId,version:d.version,text:d.getText()}}function a(d){return{uri:t(d.uri),version:d.version}}function c(d){return{textDocument:r(d)}}function u(d){let w=d;return!!w.document&&!!w.contentChanges}function l(d){let w=d;return!!w.uri&&!!w.version}function g(d,w,R){if(l(d))return{textDocument:{uri:t(d.uri),version:d.version},contentChanges:[{text:d.getText()}]};if(u(d)){let B=w,G=R;return{textDocument:{uri:t(B),version:G},contentChanges:d.contentChanges.map(ke=>{let ze=ke.range;return{range:{start:{line:ze.start.line,character:ze.start.character},end:{line:ze.end.line,character:ze.end.character}},rangeLength:ke.rangeLength,text:ke.text}})}}else throw Error("Unsupported text document change parameter")}function h(d){return{textDocument:i(d)}}function f(d,w=!1){let R={textDocument:i(d)};return w&&(R.text=d.getText()),R}function v(d){switch(d){case de.TextDocumentSaveReason.Manual:return A.TextDocumentSaveReason.Manual;case de.TextDocumentSaveReason.AfterDelay:return A.TextDocumentSaveReason.AfterDelay;case de.TextDocumentSaveReason.FocusOut:return A.TextDocumentSaveReason.FocusOut}return A.TextDocumentSaveReason.Manual}function p(d){return{textDocument:i(d.document),reason:v(d.reason)}}function C(d){return{files:d.files.map(w=>({uri:t(w)}))}}function y(d){return{files:d.files.map(w=>({oldUri:t(w.oldUri),newUri:t(w.newUri)}))}}function b(d){return{files:d.files.map(w=>({uri:t(w)}))}}function T(d){return{files:d.files.map(w=>({uri:t(w)}))}}function P(d){return{files:d.files.map(w=>({oldUri:t(w.oldUri),newUri:t(w.newUri)}))}}function q(d){return{files:d.files.map(w=>({uri:t(w)}))}}function ce(d,w){return{textDocument:i(d),position:dt(w)}}function V(d){switch(d){case de.CompletionTriggerKind.TriggerCharacter:return A.CompletionTriggerKind.TriggerCharacter;case de.CompletionTriggerKind.TriggerForIncompleteCompletions:return A.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return A.CompletionTriggerKind.Invoked}}function Z(d,w,R){return{textDocument:i(d),position:dt(w),context:{triggerKind:V(R.triggerKind),triggerCharacter:R.triggerCharacter}}}function Ye(d){switch(d){case de.SignatureHelpTriggerKind.Invoke:return A.SignatureHelpTriggerKind.Invoked;case de.SignatureHelpTriggerKind.TriggerCharacter:return A.SignatureHelpTriggerKind.TriggerCharacter;case de.SignatureHelpTriggerKind.ContentChange:return A.SignatureHelpTriggerKind.ContentChange}}function ot(d){return{label:d.label}}function Xe(d){return d.map(ot)}function at(d){return{label:d.label,parameters:Xe(d.parameters)}}function Et(d){return d.map(at)}function Mt(d){return d===void 0?d:{signatures:Et(d.signatures),activeSignature:d.activeSignature,activeParameter:d.activeParameter}}function ct(d,w,R){return{textDocument:i(d),position:dt(w),context:{isRetrigger:R.isRetrigger,triggerCharacter:R.triggerCharacter,triggerKind:Ye(R.triggerKind),activeSignatureHelp:Mt(R.activeSignatureHelp)}}}function dt(d){return{line:d.line,character:d.character}}function Ue(d){return d==null?d:{line:d.line>A.uinteger.MAX_VALUE?A.uinteger.MAX_VALUE:d.line,character:d.character>A.uinteger.MAX_VALUE?A.uinteger.MAX_VALUE:d.character}}function cr(d,w){return Xa.map(d,Ue,w)}function Mn(d){return d.map(Ue)}function pe(d){return d==null?d:{start:Ue(d.start),end:Ue(d.end)}}function On(d){return d.map(pe)}function ut(d){return d==null?d:A.Location.create(n(d.uri),pe(d.range))}function Ze(d){switch(d){case de.DiagnosticSeverity.Error:return A.DiagnosticSeverity.Error;case de.DiagnosticSeverity.Warning:return A.DiagnosticSeverity.Warning;case de.DiagnosticSeverity.Information:return A.DiagnosticSeverity.Information;case de.DiagnosticSeverity.Hint:return A.DiagnosticSeverity.Hint}}function dr(d){if(!d)return;let w=[];for(let R of d){let B=An(R);B!==void 0&&w.push(B)}return w.length>0?w:void 0}function An(d){switch(d){case de.DiagnosticTag.Unnecessary:return A.DiagnosticTag.Unnecessary;case de.DiagnosticTag.Deprecated:return A.DiagnosticTag.Deprecated;default:return}}function Ln(d){return{message:d.message,location:ut(d.location)}}function Un(d){return d.map(Ln)}function ur(d){if(d!=null)return bt.number(d)||bt.string(d)?d:{value:d.value,target:n(d.target)}}function en(d){let w=A.Diagnostic.create(pe(d.range),d.message),R=d instanceof ec.ProtocolDiagnostic?d:void 0;R!==void 0&&R.data!==void 0&&(w.data=R.data);let B=ur(d.code);return ec.DiagnosticCode.is(B)?R!==void 0&&R.hasDiagnosticCode?w.code=B:(w.code=B.value,w.codeDescription={href:B.target}):w.code=B,bt.number(d.severity)&&(w.severity=Ze(d.severity)),Array.isArray(d.tags)&&(w.tags=dr(d.tags)),d.relatedInformation&&(w.relatedInformation=Un(d.relatedInformation)),d.source&&(w.source=d.source),w}function Ot(d,w){return d==null?d:Xa.map(d,en,w)}function At(d){return d==null?d:d.map(en)}function lr(d,w){switch(d){case"$string":return w;case A.MarkupKind.PlainText:return{kind:d,value:w};case A.MarkupKind.Markdown:return{kind:d,value:w.value};default:return`Unsupported Markup content received. Kind is: ${d}`}}function lt(d){switch(d){case de.CompletionItemTag.Deprecated:return A.CompletionItemTag.Deprecated}}function Kn(d){if(d===void 0)return d;let w=[];for(let R of d){let B=lt(R);B!==void 0&&w.push(B)}return w}function Lt(d,w){return w!==void 0?w:d+1}function Nn(d,w=!1){let R,B;bt.string(d.label)?R=d.label:(R=d.label.label,w&&(d.label.detail!==void 0||d.label.description!==void 0)&&(B={detail:d.label.detail,description:d.label.description}));let G={label:R};B!==void 0&&(G.labelDetails=B);let fe=d instanceof gu.default?d:void 0;d.detail&&(G.detail=d.detail),d.documentation&&(!fe||fe.documentationFormat==="$string"?G.documentation=d.documentation:G.documentation=lr(fe.documentationFormat,d.documentation)),d.filterText&&(G.filterText=d.filterText),pr(G,d),bt.number(d.kind)&&(G.kind=Lt(d.kind,fe&&fe.originalItemKind)),d.sortText&&(G.sortText=d.sortText),d.additionalTextEdits&&(G.additionalTextEdits=Ke(d.additionalTextEdits)),d.commitCharacters&&(G.commitCharacters=d.commitCharacters.slice()),d.command&&(G.command=et(d.command)),(d.preselect===!0||d.preselect===!1)&&(G.preselect=d.preselect);let ke=Kn(d.tags);if(fe){if(fe.data!==void 0&&(G.data=fe.data),fe.deprecated===!0||fe.deprecated===!1){if(fe.deprecated===!0&&ke!==void 0&&ke.length>0){let ze=ke.indexOf(de.CompletionItemTag.Deprecated);ze!==-1&&ke.splice(ze,1)}G.deprecated=fe.deprecated}fe.insertTextMode!==void 0&&(G.insertTextMode=fe.insertTextMode)}return ke!==void 0&&ke.length>0&&(G.tags=ke),G.insertTextMode===void 0&&d.keepWhitespace===!0&&(G.insertTextMode=A.InsertTextMode.adjustIndentation),G}function pr(d,w){let R=A.InsertTextFormat.PlainText,B,G;w.textEdit?(B=w.textEdit.newText,G=w.textEdit.range):w.insertText instanceof de.SnippetString?(R=A.InsertTextFormat.Snippet,B=w.insertText.value):B=w.insertText,w.range&&(G=w.range),d.insertTextFormat=R,w.fromEdit&&B!==void 0&&G!==void 0?d.textEdit=tn(B,G):d.insertText=B}function tn(d,w){return gs.is(w)?A.InsertReplaceEdit.create(d,pe(w.inserting),pe(w.replacing)):{newText:d,range:pe(w)}}function nn(d){return{range:pe(d.range),newText:d.newText}}function Ke(d){return d==null?d:d.map(nn)}function Dt(d){return d<=de.SymbolKind.TypeParameter?d+1:A.SymbolKind.Property}function Ie(d){return d}function pt(d){return d.map(Ie)}function fr(d,w,R){return{textDocument:i(d),position:dt(w),context:{includeDeclaration:R.includeDeclaration}}}async function Hn(d,w){let R=A.CodeAction.create(d.title);if(d instanceof Za.default&&d.data!==void 0&&(R.data=d.data),d.kind!==void 0&&(R.kind=Wn(d.kind)),d.diagnostics!==void 0&&(R.diagnostics=await Ot(d.diagnostics,w)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(R.command=et(d.command)),d.isPreferred!==void 0&&(R.isPreferred=d.isPreferred),d.disabled!==void 0&&(R.disabled={reason:d.disabled.reason}),R}function hr(d){let w=A.CodeAction.create(d.title);if(d instanceof Za.default&&d.data!==void 0&&(w.data=d.data),d.kind!==void 0&&(w.kind=Wn(d.kind)),d.diagnostics!==void 0&&(w.diagnostics=At(d.diagnostics)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(w.command=et(d.command)),d.isPreferred!==void 0&&(w.isPreferred=d.isPreferred),d.disabled!==void 0&&(w.disabled={reason:d.disabled.reason}),w}async function $n(d,w){if(d==null)return d;let R;return d.only&&bt.string(d.only.value)&&(R=[d.only.value]),A.CodeActionContext.create(await Ot(d.diagnostics,w),R,rn(d.triggerKind))}function gr(d){if(d==null)return d;let w;return d.only&&bt.string(d.only.value)&&(w=[d.only.value]),A.CodeActionContext.create(At(d.diagnostics),w,rn(d.triggerKind))}function rn(d){switch(d){case de.CodeActionTriggerKind.Invoke:return A.CodeActionTriggerKind.Invoked;case de.CodeActionTriggerKind.Automatic:return A.CodeActionTriggerKind.Automatic;default:return}}function Wn(d){if(d!=null)return d.value}function jn(d){return d==null?d:A.InlineValueContext.create(d.frameId,pe(d.stoppedLocation))}function mr(d,w,R){return{context:A.InlineCompletionContext.create(R.triggerKind,R.selectedCompletionInfo),textDocument:i(d),position:Ue(w)}}function et(d){let w=A.Command.create(d.title,d.command);return d.arguments&&(w.arguments=d.arguments),w}function zn(d){let w=A.CodeLens.create(pe(d.range));return d.command&&(w.command=et(d.command)),d instanceof mu.default&&d.data&&(w.data=d.data),w}function vr(d,w){let R={tabSize:d.tabSize,insertSpaces:d.insertSpaces};return w.trimTrailingWhitespace&&(R.trimTrailingWhitespace=!0),w.trimFinalNewlines&&(R.trimFinalNewlines=!0),w.insertFinalNewline&&(R.insertFinalNewline=!0),R}function Vn(d){return{textDocument:i(d)}}function yr(d){return{textDocument:i(d)}}function Bn(d){let w=A.DocumentLink.create(pe(d.range));d.target&&(w.target=n(d.target)),d.tooltip!==void 0&&(w.tooltip=d.tooltip);let R=d instanceof vu.default?d:void 0;return R&&R.data&&(w.data=R.data),w}function Jn(d){return{textDocument:i(d)}}function Cr(d){let w={name:d.name,kind:Dt(d.kind),uri:n(d.uri),range:pe(d.range),selectionRange:pe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(w.detail=d.detail),d.tags!==void 0&&(w.tags=pt(d.tags)),d instanceof yu.default&&d.data!==void 0&&(w.data=d.data),w}function sn(d){let w={name:d.name,kind:Dt(d.kind),uri:n(d.uri),range:pe(d.range),selectionRange:pe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(w.detail=d.detail),d.tags!==void 0&&(w.tags=pt(d.tags)),d instanceof Cu.default&&d.data!==void 0&&(w.data=d.data),w}function wr(d){let w=d instanceof wu.default?{name:d.name,kind:Dt(d.kind),location:d.hasRange?ut(d.location):{uri:t(d.location.uri)},data:d.data}:{name:d.name,kind:Dt(d.kind),location:ut(d.location)};return d.tags!==void 0&&(w.tags=pt(d.tags)),d.containerName!==""&&(w.containerName=d.containerName),w}function Qn(d){let w=typeof d.label=="string"?d.label:d.label.map(Dr),R=A.InlayHint.create(Ue(d.position),w);return d.kind!==void 0&&(R.kind=d.kind),d.textEdits!==void 0&&(R.textEdits=Ke(d.textEdits)),d.tooltip!==void 0&&(R.tooltip=on(d.tooltip)),d.paddingLeft!==void 0&&(R.paddingLeft=d.paddingLeft),d.paddingRight!==void 0&&(R.paddingRight=d.paddingRight),d instanceof Du.default&&d.data!==void 0&&(R.data=d.data),R}function Dr(d){let w=A.InlayHintLabelPart.create(d.value);return d.location!==void 0&&(w.location=ut(d.location)),d.command!==void 0&&(w.command=et(d.command)),d.tooltip!==void 0&&(w.tooltip=on(d.tooltip)),w}function on(d){return typeof d=="string"?d:{kind:A.MarkupKind.Markdown,value:d.value}}return{asUri:n,asTextDocumentIdentifier:i,asTextDocumentItem:r,asVersionedTextDocumentIdentifier:a,asOpenTextDocumentParams:c,asChangeTextDocumentParams:g,asCloseTextDocumentParams:h,asSaveTextDocumentParams:f,asWillSaveTextDocumentParams:p,asDidCreateFilesParams:C,asDidRenameFilesParams:y,asDidDeleteFilesParams:b,asWillCreateFilesParams:T,asWillRenameFilesParams:P,asWillDeleteFilesParams:q,asTextDocumentPositionParams:ce,asCompletionParams:Z,asSignatureHelpParams:ct,asWorkerPosition:dt,asRange:pe,asRanges:On,asPosition:Ue,asPositions:cr,asPositionsSync:Mn,asLocation:ut,asDiagnosticSeverity:Ze,asDiagnosticTag:An,asDiagnostic:en,asDiagnostics:Ot,asDiagnosticsSync:At,asCompletionItem:Nn,asTextEdit:nn,asSymbolKind:Dt,asSymbolTag:Ie,asSymbolTags:pt,asReferenceParams:fr,asCodeAction:Hn,asCodeActionSync:hr,asCodeActionContext:$n,asCodeActionContextSync:gr,asInlineValueContext:jn,asCommand:et,asCodeLens:zn,asFormattingOptions:vr,asDocumentSymbolParams:Vn,asCodeLensParams:yr,asDocumentLink:Bn,asDocumentLinkParams:Jn,asCallHierarchyItem:Cr,asTypeHierarchyItem:sn,asInlayHint:Qn,asWorkspaceSymbol:wr,asInlineCompletionParams:mr}}pi.createConverter=Su});var rc=F(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.createConverter=void 0;var k=I("vscode"),M=L(),Me=Ee(),j=ui(),_u=jr(),bu=Br(),Tu=Gr(),ku=Zr(),nc=ns(),Pu=ss(),Ru=cs(),xu=ls(),Fu=hs(),ic=L(),fi;(function(s){function e(t){let n=t;return n&&Me.string(n.language)&&Me.string(n.value)}s.is=e})(fi||(fi={}));function qu(s,e,t){let i=s||(o=>k.Uri.parse(o));function r(o){return i(o)}function a(o){let m=[];for(let D of o)if(typeof D=="string")m.push(D);else if(ic.NotebookCellTextDocumentFilter.is(D))if(typeof D.notebook=="string")m.push({notebookType:D.notebook,language:D.language});else{let x=D.notebook.notebookType??"*";m.push({notebookType:x,scheme:D.notebook.scheme,pattern:D.notebook.pattern,language:D.language})}else ic.TextDocumentFilter.is(D)&&m.push({language:D.language,scheme:D.scheme,pattern:D.pattern});return m}async function c(o,m){return j.map(o,l,m)}function u(o){let m=new Array(o.length);for(let D=0;D<o.length;D++)m[D]=l(o[D]);return m}function l(o){let m=new nc.ProtocolDiagnostic(p(o.range),o.message,y(o.severity),o.data);if(o.code!==void 0){if(typeof o.code=="string"||typeof o.code=="number")M.CodeDescription.is(o.codeDescription)?m.code={value:o.code,target:r(o.codeDescription.href)}:m.code=o.code;else if(nc.DiagnosticCode.is(o.code)){m.hasDiagnosticCode=!0;let D=o.code;m.code={value:D.value,target:r(D.target)}}}return o.source&&(m.source=o.source),o.relatedInformation&&(m.relatedInformation=g(o.relatedInformation)),Array.isArray(o.tags)&&(m.tags=h(o.tags)),m}function g(o){let m=new Array(o.length);for(let D=0;D<o.length;D++){let x=o[D];m[D]=new k.DiagnosticRelatedInformation(Ze(x.location),x.message)}return m}function h(o){if(!o)return;let m=[];for(let D of o){let x=f(D);x!==void 0&&m.push(x)}return m.length>0?m:void 0}function f(o){switch(o){case M.DiagnosticTag.Unnecessary:return k.DiagnosticTag.Unnecessary;case M.DiagnosticTag.Deprecated:return k.DiagnosticTag.Deprecated;default:return}}function v(o){return o?new k.Position(o.line,o.character):void 0}function p(o){return o?new k.Range(o.start.line,o.start.character,o.end.line,o.end.character):void 0}async function C(o,m){return j.map(o,D=>new k.Range(D.start.line,D.start.character,D.end.line,D.end.character),m)}function y(o){if(o==null)return k.DiagnosticSeverity.Error;switch(o){case M.DiagnosticSeverity.Error:return k.DiagnosticSeverity.Error;case M.DiagnosticSeverity.Warning:return k.DiagnosticSeverity.Warning;case M.DiagnosticSeverity.Information:return k.DiagnosticSeverity.Information;case M.DiagnosticSeverity.Hint:return k.DiagnosticSeverity.Hint}return k.DiagnosticSeverity.Error}function b(o){if(Me.string(o))return P(o);if(fi.is(o))return P().appendCodeblock(o.value,o.language);if(Array.isArray(o)){let m=[];for(let D of o){let x=P();fi.is(D)?x.appendCodeblock(D.value,D.language):x.appendMarkdown(D),m.push(x)}return m}else return P(o)}function T(o){if(Me.string(o))return o;switch(o.kind){case M.MarkupKind.Markdown:return P(o.value);case M.MarkupKind.PlainText:return o.value;default:return`Unsupported Markup content received. Kind is: ${o.kind}`}}function P(o){let m;if(o===void 0||typeof o=="string")m=new k.MarkdownString(o);else switch(o.kind){case M.MarkupKind.Markdown:m=new k.MarkdownString(o.value);break;case M.MarkupKind.PlainText:m=new k.MarkdownString,m.appendText(o.value);break;default:m=new k.MarkdownString,m.appendText(`Unsupported Markup content received. Kind is: ${o.kind}`);break}return m.isTrusted=e,m.supportHtml=t,m}function q(o){if(o)return new k.Hover(b(o.contents),p(o.range))}async function ce(o,m,D){if(!o)return;if(Array.isArray(o))return j.map(o,Ve=>Xe(Ve,m),D);let x=o,{defaultRange:he,commitCharacters:ye}=V(x,m),Q=await j.map(x.items,Ve=>Xe(Ve,ye,he,x.itemDefaults?.insertTextMode,x.itemDefaults?.insertTextFormat,x.itemDefaults?.data),D);return new k.CompletionList(Q,x.isIncomplete)}function V(o,m){let D=o.itemDefaults?.editRange,x=o.itemDefaults?.commitCharacters??m;return M.Range.is(D)?{defaultRange:p(D),commitCharacters:x}:D!==void 0?{defaultRange:{inserting:p(D.insert),replacing:p(D.replace)},commitCharacters:x}:{defaultRange:void 0,commitCharacters:x}}function Z(o){return M.CompletionItemKind.Text<=o&&o<=M.CompletionItemKind.TypeParameter?[o-1,void 0]:[k.CompletionItemKind.Text,o]}function Ye(o){switch(o){case M.CompletionItemTag.Deprecated:return k.CompletionItemTag.Deprecated}}function ot(o){if(o==null)return[];let m=[];for(let D of o){let x=Ye(D);x!==void 0&&m.push(x)}return m}function Xe(o,m,D,x,he,ye){let Q=ot(o.tags),Ve=at(o),Y=new _u.default(Ve);o.detail&&(Y.detail=o.detail),o.documentation&&(Y.documentation=T(o.documentation),Y.documentationFormat=Me.string(o.documentation)?"$string":o.documentation.kind),o.filterText&&(Y.filterText=o.filterText);let Gn=Et(o,D,he);if(Gn&&(Y.insertText=Gn.text,Y.range=Gn.range,Y.fromEdit=Gn.fromEdit),Me.number(o.kind)){let[Ad,qa]=Z(o.kind);Y.kind=Ad,qa&&(Y.originalItemKind=qa)}o.sortText&&(Y.sortText=o.sortText),o.additionalTextEdits&&(Y.additionalTextEdits=Ue(o.additionalTextEdits));let xa=o.commitCharacters!==void 0?Me.stringArray(o.commitCharacters)?o.commitCharacters:void 0:m;xa&&(Y.commitCharacters=xa.slice()),o.command&&(Y.command=Ke(o.command)),(o.deprecated===!0||o.deprecated===!1)&&(Y.deprecated=o.deprecated,o.deprecated===!0&&Q.push(k.CompletionItemTag.Deprecated)),(o.preselect===!0||o.preselect===!1)&&(Y.preselect=o.preselect);let Fa=o.data??ye;Fa!==void 0&&(Y.data=Fa),Q.length>0&&(Y.tags=Q);let _r=o.insertTextMode??x;return _r!==void 0&&(Y.insertTextMode=_r,_r===M.InsertTextMode.asIs&&(Y.keepWhitespace=!0)),Y}function at(o){return M.CompletionItemLabelDetails.is(o.labelDetails)?{label:o.label,detail:o.labelDetails.detail,description:o.labelDetails.description}:o.label}function Et(o,m,D){let x=o.insertTextFormat??D;if(o.textEdit!==void 0||m!==void 0){let[he,ye]=o.textEdit!==void 0?Mt(o.textEdit):[m,o.textEditText??o.label];return x===M.InsertTextFormat.Snippet?{text:new k.SnippetString(ye),range:he,fromEdit:!0}:{text:ye,range:he,fromEdit:!0}}else return o.insertText?x===M.InsertTextFormat.Snippet?{text:new k.SnippetString(o.insertText),fromEdit:!1}:{text:o.insertText,fromEdit:!1}:void 0}function Mt(o){return M.InsertReplaceEdit.is(o)?[{inserting:p(o.insert),replacing:p(o.replace)},o.newText]:[p(o.range),o.newText]}function ct(o){if(o)return new k.TextEdit(p(o.range),o.newText)}async function dt(o,m){if(o)return j.map(o,ct,m)}function Ue(o){if(!o)return;let m=new Array(o.length);for(let D=0;D<o.length;D++)m[D]=ct(o[D]);return m}async function cr(o,m){if(!o)return;let D=new k.SignatureHelp;return Me.number(o.activeSignature)?D.activeSignature=o.activeSignature:D.activeSignature=0,Me.number(o.activeParameter)?D.activeParameter=o.activeParameter:D.activeParameter=0,o.signatures&&(D.signatures=await Mn(o.signatures,m)),D}async function Mn(o,m){return j.mapAsync(o,pe,m)}async function pe(o,m){let D=new k.SignatureInformation(o.label);return o.documentation!==void 0&&(D.documentation=T(o.documentation)),o.parameters!==void 0&&(D.parameters=await On(o.parameters,m)),o.activeParameter!==void 0&&(D.activeParameter=o.activeParameter),D}function On(o,m){return j.map(o,ut,m)}function ut(o){let m=new k.ParameterInformation(o.label);return o.documentation&&(m.documentation=T(o.documentation)),m}function Ze(o){return o?new k.Location(i(o.uri),p(o.range)):void 0}async function dr(o,m){if(o)return Un(o,m)}async function An(o,m){if(o)return Un(o,m)}function Ln(o){if(!o)return;let m={targetUri:i(o.targetUri),targetRange:p(o.targetRange),originSelectionRange:p(o.originSelectionRange),targetSelectionRange:p(o.targetSelectionRange)};if(!m.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return m}async function Un(o,m){if(o)if(Me.array(o)){if(o.length===0)return[];if(M.LocationLink.is(o[0])){let D=o;return j.map(D,Ln,m)}else{let D=o;return j.map(D,Ze,m)}}else return M.LocationLink.is(o)?[Ln(o)]:Ze(o)}async function ur(o,m){if(o)return j.map(o,Ze,m)}async function en(o,m){if(o)return j.map(o,Ot,m)}function Ot(o){let m=new k.DocumentHighlight(p(o.range));return Me.number(o.kind)&&(m.kind=At(o.kind)),m}function At(o){switch(o){case M.DocumentHighlightKind.Text:return k.DocumentHighlightKind.Text;case M.DocumentHighlightKind.Read:return k.DocumentHighlightKind.Read;case M.DocumentHighlightKind.Write:return k.DocumentHighlightKind.Write}return k.DocumentHighlightKind.Text}async function lr(o,m){if(o)return j.map(o,Nn,m)}function lt(o){return o<=M.SymbolKind.TypeParameter?o-1:k.SymbolKind.Property}function Kn(o){switch(o){case M.SymbolTag.Deprecated:return k.SymbolTag.Deprecated;default:return}}function Lt(o){if(o==null)return;let m=[];for(let D of o){let x=Kn(D);x!==void 0&&m.push(x)}return m.length===0?void 0:m}function Nn(o){let m=o.data,D=o.location,x=D.range===void 0||m!==void 0?new xu.default(o.name,lt(o.kind),o.containerName??"",D.range===void 0?i(D.uri):new k.Location(i(o.location.uri),p(D.range)),m):new k.SymbolInformation(o.name,lt(o.kind),o.containerName??"",new k.Location(i(o.location.uri),p(D.range)));return nn(x,o),x}async function pr(o,m){if(o!=null)return j.map(o,tn,m)}function tn(o){let m=new k.DocumentSymbol(o.name,o.detail||"",lt(o.kind),p(o.range),p(o.selectionRange));if(nn(m,o),o.children!==void 0&&o.children.length>0){let D=[];for(let x of o.children)D.push(tn(x));m.children=D}return m}function nn(o,m){o.tags=Lt(m.tags),m.deprecated&&(o.tags?o.tags.includes(k.SymbolTag.Deprecated)||(o.tags=o.tags.concat(k.SymbolTag.Deprecated)):o.tags=[k.SymbolTag.Deprecated])}function Ke(o){let m={title:o.title,command:o.command};return o.arguments&&(m.arguments=o.arguments),m}async function Dt(o,m){if(o)return j.map(o,Ke,m)}let Ie=new Map;Ie.set(M.CodeActionKind.Empty,k.CodeActionKind.Empty),Ie.set(M.CodeActionKind.QuickFix,k.CodeActionKind.QuickFix),Ie.set(M.CodeActionKind.Refactor,k.CodeActionKind.Refactor),Ie.set(M.CodeActionKind.RefactorExtract,k.CodeActionKind.RefactorExtract),Ie.set(M.CodeActionKind.RefactorInline,k.CodeActionKind.RefactorInline),Ie.set(M.CodeActionKind.RefactorRewrite,k.CodeActionKind.RefactorRewrite),Ie.set(M.CodeActionKind.Source,k.CodeActionKind.Source),Ie.set(M.CodeActionKind.SourceOrganizeImports,k.CodeActionKind.SourceOrganizeImports);function pt(o){if(o==null)return;let m=Ie.get(o);if(m)return m;let D=o.split(".");m=k.CodeActionKind.Empty;for(let x of D)m=m.append(x);return m}function fr(o){if(o!=null)return o.map(m=>pt(m))}async function Hn(o,m){if(o==null)return;let D=new ku.default(o.title,o.data);return o.kind!==void 0&&(D.kind=pt(o.kind)),o.diagnostics!==void 0&&(D.diagnostics=u(o.diagnostics)),o.edit!==void 0&&(D.edit=await rn(o.edit,m)),o.command!==void 0&&(D.command=Ke(o.command)),o.isPreferred!==void 0&&(D.isPreferred=o.isPreferred),o.disabled!==void 0&&(D.disabled={reason:o.disabled.reason}),D}function hr(o,m){return j.mapAsync(o,async D=>M.Command.is(D)?Ke(D):Hn(D,m),m)}function $n(o){if(!o)return;let m=new bu.default(p(o.range));return o.command&&(m.command=Ke(o.command)),o.data!==void 0&&o.data!==null&&(m.data=o.data),m}async function gr(o,m){if(o)return j.map(o,$n,m)}async function rn(o,m){if(!o)return;let D=new Map;if(o.changeAnnotations!==void 0){let ye=o.changeAnnotations;await j.forEach(Object.keys(ye),Q=>{let Ve=Wn(ye[Q]);D.set(Q,Ve)},m)}let x=ye=>{if(ye!==void 0)return D.get(ye)},he=new k.WorkspaceEdit;if(o.documentChanges){let ye=o.documentChanges;await j.forEach(ye,Q=>{if(M.CreateFile.is(Q))he.createFile(i(Q.uri),Q.options,x(Q.annotationId));else if(M.RenameFile.is(Q))he.renameFile(i(Q.oldUri),i(Q.newUri),Q.options,x(Q.annotationId));else if(M.DeleteFile.is(Q))he.deleteFile(i(Q.uri),Q.options,x(Q.annotationId));else if(M.TextDocumentEdit.is(Q)){let Ve=i(Q.textDocument.uri);for(let Y of Q.edits)M.AnnotatedTextEdit.is(Y)?he.replace(Ve,p(Y.range),Y.newText,x(Y.annotationId)):he.replace(Ve,p(Y.range),Y.newText)}else throw new Error(`Unknown workspace edit change received:
5
+ import{E as Ea,F as Ma,H as cn,I as Pr,J as Rr,K as Oa,L as Aa,b as Yn,g as ft,h as Pe,i as an,j as Tr,k as L,l as Ia,n as kr,o as Ld,p as Ud,q as Kd}from"./chunk-USWMQ2GW.js";import{a as I,c as F,e as br}from"./chunk-ZLQDNPPN.js";var Ka=F((kp,Ua)=>{"use strict";function St(s,e){var t,n;if(typeof e=="function")n=e(s),n!==void 0&&(s=n);else if(Array.isArray(e))for(t=0;t<e.length;t++)n=e[t](s),n!==void 0&&(s=n);return s}function Nd(s,e){return s[0]==="-"&&Array.isArray(e)&&/^-\d+$/.test(s)?e.length+parseInt(s,10):s}function Hd(s){return/^\d+$/.test(s)}function Zn(s){return Object.prototype.toString.call(s)==="[object Object]"}function dn(s){return Object(s)===s}function ei(s){return Object.keys(s).length===0}var $d=["__proto__","prototype","constructor"],Wd=function(s){return $d.indexOf(s)===-1};function ti(s,e){s.indexOf("[")>=0&&(s=s.replace(/\[/g,e).replace(/]/g,""));var t=s.split(e),n=t.filter(Wd);if(n.length!==t.length)throw Error("Refusing to update blacklisted property "+s);return t}var La=Object.prototype.hasOwnProperty;function $(s,e,t,n){if(!(this instanceof $))return new $(s,e,t,n);typeof e>"u"&&(e=!1),typeof t>"u"&&(t=!0),typeof n>"u"&&(n=!0),this.separator=s||".",this.override=e,this.useArray=t,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var Ut=new $(".",!1,!0,!0);function Ne(s){return function(){return Ut[s].apply(Ut,arguments)}}$.prototype._fill=function(s,e,t,n){var i=s.shift();if(s.length>0){if(e[i]=e[i]||(this.useArray&&Hd(s[0])?[]:{}),!dn(e[i]))if(this.override)e[i]={};else{if(!(dn(t)&&ei(t)))throw new Error("Trying to redefine `"+i+"` which is a "+typeof e[i]);return}this._fill(s,e[i],t,n)}else{if(!this.override&&dn(e[i])&&!ei(e[i])){if(!(dn(t)&&ei(t)))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}e[i]=St(t,n)}};$.prototype.object=function(s,e){var t=this;return Object.keys(s).forEach(function(n){var i=e===void 0?null:e[n],r=ti(n,t.separator).join(t.separator);r.indexOf(t.separator)!==-1?(t._fill(r.split(t.separator),s,s[n],i),delete s[n]):s[n]=St(s[n],i)}),s};$.prototype.str=function(s,e,t,n){var i=ti(s,this.separator).join(this.separator);return s.indexOf(this.separator)!==-1?this._fill(i.split(this.separator),t,e,n):t[s]=St(e,n),t};$.prototype.pick=function(s,e,t,n){var i,r,a,c,u;for(r=ti(s,this.separator),i=0;i<r.length;i++)if(c=Nd(r[i],e),e&&typeof e=="object"&&c in e){if(i===r.length-1)return t?(a=e[c],n&&Array.isArray(e)?e.splice(c,1):delete e[c],Array.isArray(e)&&(u=r.slice(0,-1).join("."),this.cleanup.indexOf(u)===-1&&this.cleanup.push(u)),a):e[c];e=e[c]}else return;return t&&Array.isArray(e)&&(e=e.filter(function(l){return l!==void 0})),e};$.prototype.delete=function(s,e){return this.remove(s,e,!0)};$.prototype.remove=function(s,e,t){var n;if(this.cleanup=[],Array.isArray(s)){for(n=0;n<s.length;n++)this.pick(s[n],e,!0,t);return t||this._cleanup(e),e}else return this.pick(s,e,!0,t)};$.prototype._cleanup=function(s){var e,t,n,i;if(this.cleanup.length){for(t=0;t<this.cleanup.length;t++)n=this.cleanup[t].split("."),i=n.splice(0,-1).join("."),e=i?this.pick(i,s):s,e=e[n[0]].filter(function(r){return r!==void 0}),this.set(this.cleanup[t],e,s);this.cleanup=[]}};$.prototype.del=$.prototype.remove;$.prototype.move=function(s,e,t,n,i){return typeof n=="function"||Array.isArray(n)?this.set(e,St(this.pick(s,t,!0),n),t,i):(i=n,this.set(e,this.pick(s,t,!0),t,i)),t};$.prototype.transfer=function(s,e,t,n,i,r){return typeof i=="function"||Array.isArray(i)?this.set(e,St(this.pick(s,t,!0),i),n,r):(r=i,this.set(e,this.pick(s,t,!0),n,r)),n};$.prototype.copy=function(s,e,t,n,i,r){return typeof i=="function"||Array.isArray(i)?this.set(e,St(JSON.parse(JSON.stringify(this.pick(s,t,!1))),i),n,r):(r=i,this.set(e,this.pick(s,t,!1),n,r)),n};$.prototype.set=function(s,e,t,n){var i,r,a,c;if(typeof e>"u")return t;for(a=ti(s,this.separator),i=0;i<a.length;i++){if(c=a[i],i===a.length-1)if(n&&Zn(e)&&Zn(t[c]))for(r in e)La.call(e,r)&&(t[c][r]=e[r]);else if(n&&Array.isArray(t[c])&&Array.isArray(e))for(var u=0;u<e.length;u++)t[a[i]].push(e[u]);else t[c]=e;else(!La.call(t,c)||!Zn(t[c])&&!Array.isArray(t[c]))&&(/^\d+$/.test(a[i+1])?t[c]=[]:t[c]={});t=t[c]}return t};$.prototype.transform=function(s,e,t){return e=e||{},t=t||{},Object.keys(s).forEach(function(n){this.set(s[n],this.pick(n,e),t)}.bind(this)),t};$.prototype.dot=function(s,e,t){e=e||{},t=t||[];var n=Array.isArray(s);return Object.keys(s).forEach(function(i){var r=n&&this.useBrackets?"["+i+"]":i;if(dn(s[i])&&(Zn(s[i])&&!ei(s[i])||Array.isArray(s[i])&&!this.keepArray&&s[i].length!==0))if(n&&this.useBrackets){var a=t[t.length-1]||"";return this.dot(s[i],e,t.slice(0,-1).concat(a+r))}else return this.dot(s[i],e,t.concat(r));else n&&this.useBrackets?e[t.join(this.separator).concat("["+i+"]")]=s[i]:e[t.concat(r).join(this.separator)]=s[i]}.bind(this)),e};$.pick=Ne("pick");$.move=Ne("move");$.transfer=Ne("transfer");$.transform=Ne("transform");$.copy=Ne("copy");$.object=Ne("object");$.str=Ne("str");$.set=Ne("set");$.delete=Ne("delete");$.del=$.remove=Ne("remove");$.dot=Ne("dot");["override","overwrite"].forEach(function(s){Object.defineProperty($,s,{get:function(){return Ut.override},set:function(e){Ut.override=!!e}})});["useArray","keepArray","useBrackets"].forEach(function(s){Object.defineProperty($,s,{get:function(){return Ut[s]},set:function(e){Ut[s]=e}})});$._process=St;Ua.exports=$});var Ee=F(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.asPromise=oe.thenable=oe.typedArray=oe.stringArray=oe.array=oe.func=oe.error=oe.number=oe.string=oe.boolean=void 0;function Gd(s){return s===!0||s===!1}oe.boolean=Gd;function Va(s){return typeof s=="string"||s instanceof String}oe.string=Va;function Yd(s){return typeof s=="number"||s instanceof Number}oe.number=Yd;function Xd(s){return s instanceof Error}oe.error=Xd;function Ba(s){return typeof s=="function"}oe.func=Ba;function Ja(s){return Array.isArray(s)}oe.array=Ja;function Zd(s){return Ja(s)&&s.every(e=>Va(e))}oe.stringArray=Zd;function eu(s,e){return Array.isArray(s)&&s.every(e)}oe.typedArray=eu;function Qa(s){return s&&Ba(s.then)}oe.thenable=Qa;function tu(s){return s instanceof Promise?s:Qa(s)?new Promise((e,t)=>{s.then(n=>e(n),n=>t(n))}):Promise.resolve(s)}oe.asPromise=tu});var ui=F(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.forEach=Ce.mapAsync=Ce.map=Ce.clearTestMode=Ce.setTestMode=Ce.Semaphore=Ce.Delayer=void 0;var ln=L(),Kr=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(n=>{this.onSuccess=n}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;var n=this.task();return this.task=void 0,n})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,ln.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){this.timeout!==void 0&&(this.timeout.dispose(),this.timeout=void 0)}};Ce.Delayer=Kr;var Nr=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ln.RAL)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(n=>{this._active--,e.resolve(n),this.runNext()},n=>{this._active--,e.reject(n),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Ce.Semaphore=Nr;var Hr=!1;function nu(){Hr=!0}Ce.setTestMode=nu;function iu(){Hr=!1}Ce.clearTestMode=iu;var Ga=15,un=class{constructor(e=Ga){this.yieldAfter=Hr===!0?Math.max(e,2):Math.max(e,Ga),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){let e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=this.total*2;break}}return!1}};async function ru(s,e,t,n){if(s.length===0)return[];let i=new Array(s.length),r=new un(n?.yieldAfter);function a(u){r.start();for(let l=u;l<s.length;l++)if(i[l]=e(s[l]),r.shouldYield())return n?.yieldCallback&&n.yieldCallback(),l+1;return-1}let c=a(0);for(;c!==-1&&!(t!==void 0&&t.isCancellationRequested);)c=await new Promise(u=>{(0,ln.RAL)().timer.setImmediate(()=>{u(a(c))})});return i}Ce.map=ru;async function su(s,e,t,n){if(s.length===0)return[];let i=new Array(s.length),r=new un(n?.yieldAfter);async function a(u){r.start();for(let l=u;l<s.length;l++)if(i[l]=await e(s[l],t),r.shouldYield())return n?.yieldCallback&&n.yieldCallback(),l+1;return-1}let c=await a(0);for(;c!==-1&&!(t!==void 0&&t.isCancellationRequested);)c=await new Promise(u=>{(0,ln.RAL)().timer.setImmediate(()=>{u(a(c))})});return i}Ce.mapAsync=su;async function ou(s,e,t,n){if(s.length===0)return;let i=new un(n?.yieldAfter);function r(c){i.start();for(let u=c;u<s.length;u++)if(e(s[u]),i.shouldYield())return n?.yieldCallback&&n.yieldCallback(),u+1;return-1}let a=r(0);for(;a!==-1&&!(t!==void 0&&t.isCancellationRequested);)a=await new Promise(c=>{(0,ln.RAL)().timer.setImmediate(()=>{c(r(a))})})}Ce.forEach=ou});var jr=F(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});var au=I("vscode"),$r=class extends au.CompletionItem{constructor(e){super(e)}};Wr.default=$r});var Br=F(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});var cu=I("vscode"),zr=class extends cu.CodeLens{constructor(e){super(e)}};Vr.default=zr});var Gr=F(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});var du=I("vscode"),Jr=class extends du.DocumentLink{constructor(e,t){super(e,t)}};Qr.default=Jr});var Zr=F(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});var uu=I("vscode"),Yr=class extends uu.CodeAction{constructor(e,t){super(e),this.data=t}};Xr.default=Yr});var ns=F($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.ProtocolDiagnostic=$t.DiagnosticCode=void 0;var lu=I("vscode"),es=Ee(),Ya;(function(s){function e(t){let n=t;return n!=null&&(es.number(n.value)||es.string(n.value))&&es.string(n.target)}s.is=e})(Ya||($t.DiagnosticCode=Ya={}));var ts=class extends lu.Diagnostic{constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}};$t.ProtocolDiagnostic=ts});var ss=F(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var pu=I("vscode"),is=class extends pu.CallHierarchyItem{constructor(e,t,n,i,r,a,c){super(e,t,n,i,r,a),c!==void 0&&(this.data=c)}};rs.default=is});var cs=F(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var fu=I("vscode"),os=class extends fu.TypeHierarchyItem{constructor(e,t,n,i,r,a,c){super(e,t,n,i,r,a),c!==void 0&&(this.data=c)}};as.default=os});var ls=F(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var li=I("vscode"),ds=class extends li.SymbolInformation{constructor(e,t,n,i,r){let a=!(i instanceof li.Uri);super(e,t,n,a?i:new li.Location(i,new li.Range(0,0,0,0))),this.hasRange=a,r!==void 0&&(this.data=r)}};us.default=ds});var hs=F(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var hu=I("vscode"),ps=class extends hu.InlayHint{constructor(e,t,n){super(e,t,n)}};fs.default=ps});var tc=F(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.createConverter=void 0;var de=I("vscode"),A=L(),bt=Ee(),Xa=ui(),gu=jr(),mu=Br(),vu=Gr(),Za=Zr(),ec=ns(),yu=ss(),Cu=cs(),wu=ls(),Du=hs(),gs;(function(s){function e(t){let n=t;return n&&!!n.inserting&&!!n.replacing}s.is=e})(gs||(gs={}));function Su(s){let t=s||(d=>d.toString());function n(d){return t(d)}function i(d){return{uri:t(d.uri)}}function r(d){return{uri:t(d.uri),languageId:d.languageId,version:d.version,text:d.getText()}}function a(d){return{uri:t(d.uri),version:d.version}}function c(d){return{textDocument:r(d)}}function u(d){let w=d;return!!w.document&&!!w.contentChanges}function l(d){let w=d;return!!w.uri&&!!w.version}function g(d,w,R){if(l(d))return{textDocument:{uri:t(d.uri),version:d.version},contentChanges:[{text:d.getText()}]};if(u(d)){let B=w,G=R;return{textDocument:{uri:t(B),version:G},contentChanges:d.contentChanges.map(ke=>{let ze=ke.range;return{range:{start:{line:ze.start.line,character:ze.start.character},end:{line:ze.end.line,character:ze.end.character}},rangeLength:ke.rangeLength,text:ke.text}})}}else throw Error("Unsupported text document change parameter")}function h(d){return{textDocument:i(d)}}function f(d,w=!1){let R={textDocument:i(d)};return w&&(R.text=d.getText()),R}function v(d){switch(d){case de.TextDocumentSaveReason.Manual:return A.TextDocumentSaveReason.Manual;case de.TextDocumentSaveReason.AfterDelay:return A.TextDocumentSaveReason.AfterDelay;case de.TextDocumentSaveReason.FocusOut:return A.TextDocumentSaveReason.FocusOut}return A.TextDocumentSaveReason.Manual}function p(d){return{textDocument:i(d.document),reason:v(d.reason)}}function C(d){return{files:d.files.map(w=>({uri:t(w)}))}}function y(d){return{files:d.files.map(w=>({oldUri:t(w.oldUri),newUri:t(w.newUri)}))}}function b(d){return{files:d.files.map(w=>({uri:t(w)}))}}function T(d){return{files:d.files.map(w=>({uri:t(w)}))}}function P(d){return{files:d.files.map(w=>({oldUri:t(w.oldUri),newUri:t(w.newUri)}))}}function q(d){return{files:d.files.map(w=>({uri:t(w)}))}}function ce(d,w){return{textDocument:i(d),position:dt(w)}}function V(d){switch(d){case de.CompletionTriggerKind.TriggerCharacter:return A.CompletionTriggerKind.TriggerCharacter;case de.CompletionTriggerKind.TriggerForIncompleteCompletions:return A.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return A.CompletionTriggerKind.Invoked}}function Z(d,w,R){return{textDocument:i(d),position:dt(w),context:{triggerKind:V(R.triggerKind),triggerCharacter:R.triggerCharacter}}}function Ye(d){switch(d){case de.SignatureHelpTriggerKind.Invoke:return A.SignatureHelpTriggerKind.Invoked;case de.SignatureHelpTriggerKind.TriggerCharacter:return A.SignatureHelpTriggerKind.TriggerCharacter;case de.SignatureHelpTriggerKind.ContentChange:return A.SignatureHelpTriggerKind.ContentChange}}function ot(d){return{label:d.label}}function Xe(d){return d.map(ot)}function at(d){return{label:d.label,parameters:Xe(d.parameters)}}function Et(d){return d.map(at)}function Mt(d){return d===void 0?d:{signatures:Et(d.signatures),activeSignature:d.activeSignature,activeParameter:d.activeParameter}}function ct(d,w,R){return{textDocument:i(d),position:dt(w),context:{isRetrigger:R.isRetrigger,triggerCharacter:R.triggerCharacter,triggerKind:Ye(R.triggerKind),activeSignatureHelp:Mt(R.activeSignatureHelp)}}}function dt(d){return{line:d.line,character:d.character}}function Ue(d){return d==null?d:{line:d.line>A.uinteger.MAX_VALUE?A.uinteger.MAX_VALUE:d.line,character:d.character>A.uinteger.MAX_VALUE?A.uinteger.MAX_VALUE:d.character}}function cr(d,w){return Xa.map(d,Ue,w)}function Mn(d){return d.map(Ue)}function pe(d){return d==null?d:{start:Ue(d.start),end:Ue(d.end)}}function On(d){return d.map(pe)}function ut(d){return d==null?d:A.Location.create(n(d.uri),pe(d.range))}function Ze(d){switch(d){case de.DiagnosticSeverity.Error:return A.DiagnosticSeverity.Error;case de.DiagnosticSeverity.Warning:return A.DiagnosticSeverity.Warning;case de.DiagnosticSeverity.Information:return A.DiagnosticSeverity.Information;case de.DiagnosticSeverity.Hint:return A.DiagnosticSeverity.Hint}}function dr(d){if(!d)return;let w=[];for(let R of d){let B=An(R);B!==void 0&&w.push(B)}return w.length>0?w:void 0}function An(d){switch(d){case de.DiagnosticTag.Unnecessary:return A.DiagnosticTag.Unnecessary;case de.DiagnosticTag.Deprecated:return A.DiagnosticTag.Deprecated;default:return}}function Ln(d){return{message:d.message,location:ut(d.location)}}function Un(d){return d.map(Ln)}function ur(d){if(d!=null)return bt.number(d)||bt.string(d)?d:{value:d.value,target:n(d.target)}}function en(d){let w=A.Diagnostic.create(pe(d.range),d.message),R=d instanceof ec.ProtocolDiagnostic?d:void 0;R!==void 0&&R.data!==void 0&&(w.data=R.data);let B=ur(d.code);return ec.DiagnosticCode.is(B)?R!==void 0&&R.hasDiagnosticCode?w.code=B:(w.code=B.value,w.codeDescription={href:B.target}):w.code=B,bt.number(d.severity)&&(w.severity=Ze(d.severity)),Array.isArray(d.tags)&&(w.tags=dr(d.tags)),d.relatedInformation&&(w.relatedInformation=Un(d.relatedInformation)),d.source&&(w.source=d.source),w}function Ot(d,w){return d==null?d:Xa.map(d,en,w)}function At(d){return d==null?d:d.map(en)}function lr(d,w){switch(d){case"$string":return w;case A.MarkupKind.PlainText:return{kind:d,value:w};case A.MarkupKind.Markdown:return{kind:d,value:w.value};default:return`Unsupported Markup content received. Kind is: ${d}`}}function lt(d){switch(d){case de.CompletionItemTag.Deprecated:return A.CompletionItemTag.Deprecated}}function Kn(d){if(d===void 0)return d;let w=[];for(let R of d){let B=lt(R);B!==void 0&&w.push(B)}return w}function Lt(d,w){return w!==void 0?w:d+1}function Nn(d,w=!1){let R,B;bt.string(d.label)?R=d.label:(R=d.label.label,w&&(d.label.detail!==void 0||d.label.description!==void 0)&&(B={detail:d.label.detail,description:d.label.description}));let G={label:R};B!==void 0&&(G.labelDetails=B);let fe=d instanceof gu.default?d:void 0;d.detail&&(G.detail=d.detail),d.documentation&&(!fe||fe.documentationFormat==="$string"?G.documentation=d.documentation:G.documentation=lr(fe.documentationFormat,d.documentation)),d.filterText&&(G.filterText=d.filterText),pr(G,d),bt.number(d.kind)&&(G.kind=Lt(d.kind,fe&&fe.originalItemKind)),d.sortText&&(G.sortText=d.sortText),d.additionalTextEdits&&(G.additionalTextEdits=Ke(d.additionalTextEdits)),d.commitCharacters&&(G.commitCharacters=d.commitCharacters.slice()),d.command&&(G.command=et(d.command)),(d.preselect===!0||d.preselect===!1)&&(G.preselect=d.preselect);let ke=Kn(d.tags);if(fe){if(fe.data!==void 0&&(G.data=fe.data),fe.deprecated===!0||fe.deprecated===!1){if(fe.deprecated===!0&&ke!==void 0&&ke.length>0){let ze=ke.indexOf(de.CompletionItemTag.Deprecated);ze!==-1&&ke.splice(ze,1)}G.deprecated=fe.deprecated}fe.insertTextMode!==void 0&&(G.insertTextMode=fe.insertTextMode)}return ke!==void 0&&ke.length>0&&(G.tags=ke),G.insertTextMode===void 0&&d.keepWhitespace===!0&&(G.insertTextMode=A.InsertTextMode.adjustIndentation),G}function pr(d,w){let R=A.InsertTextFormat.PlainText,B,G;w.textEdit?(B=w.textEdit.newText,G=w.textEdit.range):w.insertText instanceof de.SnippetString?(R=A.InsertTextFormat.Snippet,B=w.insertText.value):B=w.insertText,w.range&&(G=w.range),d.insertTextFormat=R,w.fromEdit&&B!==void 0&&G!==void 0?d.textEdit=tn(B,G):d.insertText=B}function tn(d,w){return gs.is(w)?A.InsertReplaceEdit.create(d,pe(w.inserting),pe(w.replacing)):{newText:d,range:pe(w)}}function nn(d){return{range:pe(d.range),newText:d.newText}}function Ke(d){return d==null?d:d.map(nn)}function Dt(d){return d<=de.SymbolKind.TypeParameter?d+1:A.SymbolKind.Property}function Ie(d){return d}function pt(d){return d.map(Ie)}function fr(d,w,R){return{textDocument:i(d),position:dt(w),context:{includeDeclaration:R.includeDeclaration}}}async function Hn(d,w){let R=A.CodeAction.create(d.title);if(d instanceof Za.default&&d.data!==void 0&&(R.data=d.data),d.kind!==void 0&&(R.kind=Wn(d.kind)),d.diagnostics!==void 0&&(R.diagnostics=await Ot(d.diagnostics,w)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(R.command=et(d.command)),d.isPreferred!==void 0&&(R.isPreferred=d.isPreferred),d.disabled!==void 0&&(R.disabled={reason:d.disabled.reason}),R}function hr(d){let w=A.CodeAction.create(d.title);if(d instanceof Za.default&&d.data!==void 0&&(w.data=d.data),d.kind!==void 0&&(w.kind=Wn(d.kind)),d.diagnostics!==void 0&&(w.diagnostics=At(d.diagnostics)),d.edit!==void 0)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return d.command!==void 0&&(w.command=et(d.command)),d.isPreferred!==void 0&&(w.isPreferred=d.isPreferred),d.disabled!==void 0&&(w.disabled={reason:d.disabled.reason}),w}async function $n(d,w){if(d==null)return d;let R;return d.only&&bt.string(d.only.value)&&(R=[d.only.value]),A.CodeActionContext.create(await Ot(d.diagnostics,w),R,rn(d.triggerKind))}function gr(d){if(d==null)return d;let w;return d.only&&bt.string(d.only.value)&&(w=[d.only.value]),A.CodeActionContext.create(At(d.diagnostics),w,rn(d.triggerKind))}function rn(d){switch(d){case de.CodeActionTriggerKind.Invoke:return A.CodeActionTriggerKind.Invoked;case de.CodeActionTriggerKind.Automatic:return A.CodeActionTriggerKind.Automatic;default:return}}function Wn(d){if(d!=null)return d.value}function jn(d){return d==null?d:A.InlineValueContext.create(d.frameId,pe(d.stoppedLocation))}function mr(d,w,R){return{context:A.InlineCompletionContext.create(R.triggerKind,R.selectedCompletionInfo),textDocument:i(d),position:Ue(w)}}function et(d){let w=A.Command.create(d.title,d.command);return d.arguments&&(w.arguments=d.arguments),w}function zn(d){let w=A.CodeLens.create(pe(d.range));return d.command&&(w.command=et(d.command)),d instanceof mu.default&&d.data&&(w.data=d.data),w}function vr(d,w){let R={tabSize:d.tabSize,insertSpaces:d.insertSpaces};return w.trimTrailingWhitespace&&(R.trimTrailingWhitespace=!0),w.trimFinalNewlines&&(R.trimFinalNewlines=!0),w.insertFinalNewline&&(R.insertFinalNewline=!0),R}function Vn(d){return{textDocument:i(d)}}function yr(d){return{textDocument:i(d)}}function Bn(d){let w=A.DocumentLink.create(pe(d.range));d.target&&(w.target=n(d.target)),d.tooltip!==void 0&&(w.tooltip=d.tooltip);let R=d instanceof vu.default?d:void 0;return R&&R.data&&(w.data=R.data),w}function Jn(d){return{textDocument:i(d)}}function Cr(d){let w={name:d.name,kind:Dt(d.kind),uri:n(d.uri),range:pe(d.range),selectionRange:pe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(w.detail=d.detail),d.tags!==void 0&&(w.tags=pt(d.tags)),d instanceof yu.default&&d.data!==void 0&&(w.data=d.data),w}function sn(d){let w={name:d.name,kind:Dt(d.kind),uri:n(d.uri),range:pe(d.range),selectionRange:pe(d.selectionRange)};return d.detail!==void 0&&d.detail.length>0&&(w.detail=d.detail),d.tags!==void 0&&(w.tags=pt(d.tags)),d instanceof Cu.default&&d.data!==void 0&&(w.data=d.data),w}function wr(d){let w=d instanceof wu.default?{name:d.name,kind:Dt(d.kind),location:d.hasRange?ut(d.location):{uri:t(d.location.uri)},data:d.data}:{name:d.name,kind:Dt(d.kind),location:ut(d.location)};return d.tags!==void 0&&(w.tags=pt(d.tags)),d.containerName!==""&&(w.containerName=d.containerName),w}function Qn(d){let w=typeof d.label=="string"?d.label:d.label.map(Dr),R=A.InlayHint.create(Ue(d.position),w);return d.kind!==void 0&&(R.kind=d.kind),d.textEdits!==void 0&&(R.textEdits=Ke(d.textEdits)),d.tooltip!==void 0&&(R.tooltip=on(d.tooltip)),d.paddingLeft!==void 0&&(R.paddingLeft=d.paddingLeft),d.paddingRight!==void 0&&(R.paddingRight=d.paddingRight),d instanceof Du.default&&d.data!==void 0&&(R.data=d.data),R}function Dr(d){let w=A.InlayHintLabelPart.create(d.value);return d.location!==void 0&&(w.location=ut(d.location)),d.command!==void 0&&(w.command=et(d.command)),d.tooltip!==void 0&&(w.tooltip=on(d.tooltip)),w}function on(d){return typeof d=="string"?d:{kind:A.MarkupKind.Markdown,value:d.value}}return{asUri:n,asTextDocumentIdentifier:i,asTextDocumentItem:r,asVersionedTextDocumentIdentifier:a,asOpenTextDocumentParams:c,asChangeTextDocumentParams:g,asCloseTextDocumentParams:h,asSaveTextDocumentParams:f,asWillSaveTextDocumentParams:p,asDidCreateFilesParams:C,asDidRenameFilesParams:y,asDidDeleteFilesParams:b,asWillCreateFilesParams:T,asWillRenameFilesParams:P,asWillDeleteFilesParams:q,asTextDocumentPositionParams:ce,asCompletionParams:Z,asSignatureHelpParams:ct,asWorkerPosition:dt,asRange:pe,asRanges:On,asPosition:Ue,asPositions:cr,asPositionsSync:Mn,asLocation:ut,asDiagnosticSeverity:Ze,asDiagnosticTag:An,asDiagnostic:en,asDiagnostics:Ot,asDiagnosticsSync:At,asCompletionItem:Nn,asTextEdit:nn,asSymbolKind:Dt,asSymbolTag:Ie,asSymbolTags:pt,asReferenceParams:fr,asCodeAction:Hn,asCodeActionSync:hr,asCodeActionContext:$n,asCodeActionContextSync:gr,asInlineValueContext:jn,asCommand:et,asCodeLens:zn,asFormattingOptions:vr,asDocumentSymbolParams:Vn,asCodeLensParams:yr,asDocumentLink:Bn,asDocumentLinkParams:Jn,asCallHierarchyItem:Cr,asTypeHierarchyItem:sn,asInlayHint:Qn,asWorkspaceSymbol:wr,asInlineCompletionParams:mr}}pi.createConverter=Su});var rc=F(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.createConverter=void 0;var k=I("vscode"),M=L(),Me=Ee(),j=ui(),_u=jr(),bu=Br(),Tu=Gr(),ku=Zr(),nc=ns(),Pu=ss(),Ru=cs(),xu=ls(),Fu=hs(),ic=L(),fi;(function(s){function e(t){let n=t;return n&&Me.string(n.language)&&Me.string(n.value)}s.is=e})(fi||(fi={}));function qu(s,e,t){let i=s||(o=>k.Uri.parse(o));function r(o){return i(o)}function a(o){let m=[];for(let D of o)if(typeof D=="string")m.push(D);else if(ic.NotebookCellTextDocumentFilter.is(D))if(typeof D.notebook=="string")m.push({notebookType:D.notebook,language:D.language});else{let x=D.notebook.notebookType??"*";m.push({notebookType:x,scheme:D.notebook.scheme,pattern:D.notebook.pattern,language:D.language})}else ic.TextDocumentFilter.is(D)&&m.push({language:D.language,scheme:D.scheme,pattern:D.pattern});return m}async function c(o,m){return j.map(o,l,m)}function u(o){let m=new Array(o.length);for(let D=0;D<o.length;D++)m[D]=l(o[D]);return m}function l(o){let m=new nc.ProtocolDiagnostic(p(o.range),o.message,y(o.severity),o.data);if(o.code!==void 0){if(typeof o.code=="string"||typeof o.code=="number")M.CodeDescription.is(o.codeDescription)?m.code={value:o.code,target:r(o.codeDescription.href)}:m.code=o.code;else if(nc.DiagnosticCode.is(o.code)){m.hasDiagnosticCode=!0;let D=o.code;m.code={value:D.value,target:r(D.target)}}}return o.source&&(m.source=o.source),o.relatedInformation&&(m.relatedInformation=g(o.relatedInformation)),Array.isArray(o.tags)&&(m.tags=h(o.tags)),m}function g(o){let m=new Array(o.length);for(let D=0;D<o.length;D++){let x=o[D];m[D]=new k.DiagnosticRelatedInformation(Ze(x.location),x.message)}return m}function h(o){if(!o)return;let m=[];for(let D of o){let x=f(D);x!==void 0&&m.push(x)}return m.length>0?m:void 0}function f(o){switch(o){case M.DiagnosticTag.Unnecessary:return k.DiagnosticTag.Unnecessary;case M.DiagnosticTag.Deprecated:return k.DiagnosticTag.Deprecated;default:return}}function v(o){return o?new k.Position(o.line,o.character):void 0}function p(o){return o?new k.Range(o.start.line,o.start.character,o.end.line,o.end.character):void 0}async function C(o,m){return j.map(o,D=>new k.Range(D.start.line,D.start.character,D.end.line,D.end.character),m)}function y(o){if(o==null)return k.DiagnosticSeverity.Error;switch(o){case M.DiagnosticSeverity.Error:return k.DiagnosticSeverity.Error;case M.DiagnosticSeverity.Warning:return k.DiagnosticSeverity.Warning;case M.DiagnosticSeverity.Information:return k.DiagnosticSeverity.Information;case M.DiagnosticSeverity.Hint:return k.DiagnosticSeverity.Hint}return k.DiagnosticSeverity.Error}function b(o){if(Me.string(o))return P(o);if(fi.is(o))return P().appendCodeblock(o.value,o.language);if(Array.isArray(o)){let m=[];for(let D of o){let x=P();fi.is(D)?x.appendCodeblock(D.value,D.language):x.appendMarkdown(D),m.push(x)}return m}else return P(o)}function T(o){if(Me.string(o))return o;switch(o.kind){case M.MarkupKind.Markdown:return P(o.value);case M.MarkupKind.PlainText:return o.value;default:return`Unsupported Markup content received. Kind is: ${o.kind}`}}function P(o){let m;if(o===void 0||typeof o=="string")m=new k.MarkdownString(o);else switch(o.kind){case M.MarkupKind.Markdown:m=new k.MarkdownString(o.value);break;case M.MarkupKind.PlainText:m=new k.MarkdownString,m.appendText(o.value);break;default:m=new k.MarkdownString,m.appendText(`Unsupported Markup content received. Kind is: ${o.kind}`);break}return m.isTrusted=e,m.supportHtml=t,m}function q(o){if(o)return new k.Hover(b(o.contents),p(o.range))}async function ce(o,m,D){if(!o)return;if(Array.isArray(o))return j.map(o,Ve=>Xe(Ve,m),D);let x=o,{defaultRange:he,commitCharacters:ye}=V(x,m),Q=await j.map(x.items,Ve=>Xe(Ve,ye,he,x.itemDefaults?.insertTextMode,x.itemDefaults?.insertTextFormat,x.itemDefaults?.data),D);return new k.CompletionList(Q,x.isIncomplete)}function V(o,m){let D=o.itemDefaults?.editRange,x=o.itemDefaults?.commitCharacters??m;return M.Range.is(D)?{defaultRange:p(D),commitCharacters:x}:D!==void 0?{defaultRange:{inserting:p(D.insert),replacing:p(D.replace)},commitCharacters:x}:{defaultRange:void 0,commitCharacters:x}}function Z(o){return M.CompletionItemKind.Text<=o&&o<=M.CompletionItemKind.TypeParameter?[o-1,void 0]:[k.CompletionItemKind.Text,o]}function Ye(o){switch(o){case M.CompletionItemTag.Deprecated:return k.CompletionItemTag.Deprecated}}function ot(o){if(o==null)return[];let m=[];for(let D of o){let x=Ye(D);x!==void 0&&m.push(x)}return m}function Xe(o,m,D,x,he,ye){let Q=ot(o.tags),Ve=at(o),Y=new _u.default(Ve);o.detail&&(Y.detail=o.detail),o.documentation&&(Y.documentation=T(o.documentation),Y.documentationFormat=Me.string(o.documentation)?"$string":o.documentation.kind),o.filterText&&(Y.filterText=o.filterText);let Gn=Et(o,D,he);if(Gn&&(Y.insertText=Gn.text,Y.range=Gn.range,Y.fromEdit=Gn.fromEdit),Me.number(o.kind)){let[Ad,qa]=Z(o.kind);Y.kind=Ad,qa&&(Y.originalItemKind=qa)}o.sortText&&(Y.sortText=o.sortText),o.additionalTextEdits&&(Y.additionalTextEdits=Ue(o.additionalTextEdits));let xa=o.commitCharacters!==void 0?Me.stringArray(o.commitCharacters)?o.commitCharacters:void 0:m;xa&&(Y.commitCharacters=xa.slice()),o.command&&(Y.command=Ke(o.command)),(o.deprecated===!0||o.deprecated===!1)&&(Y.deprecated=o.deprecated,o.deprecated===!0&&Q.push(k.CompletionItemTag.Deprecated)),(o.preselect===!0||o.preselect===!1)&&(Y.preselect=o.preselect);let Fa=o.data??ye;Fa!==void 0&&(Y.data=Fa),Q.length>0&&(Y.tags=Q);let _r=o.insertTextMode??x;return _r!==void 0&&(Y.insertTextMode=_r,_r===M.InsertTextMode.asIs&&(Y.keepWhitespace=!0)),Y}function at(o){return M.CompletionItemLabelDetails.is(o.labelDetails)?{label:o.label,detail:o.labelDetails.detail,description:o.labelDetails.description}:o.label}function Et(o,m,D){let x=o.insertTextFormat??D;if(o.textEdit!==void 0||m!==void 0){let[he,ye]=o.textEdit!==void 0?Mt(o.textEdit):[m,o.textEditText??o.label];return x===M.InsertTextFormat.Snippet?{text:new k.SnippetString(ye),range:he,fromEdit:!0}:{text:ye,range:he,fromEdit:!0}}else return o.insertText?x===M.InsertTextFormat.Snippet?{text:new k.SnippetString(o.insertText),fromEdit:!1}:{text:o.insertText,fromEdit:!1}:void 0}function Mt(o){return M.InsertReplaceEdit.is(o)?[{inserting:p(o.insert),replacing:p(o.replace)},o.newText]:[p(o.range),o.newText]}function ct(o){if(o)return new k.TextEdit(p(o.range),o.newText)}async function dt(o,m){if(o)return j.map(o,ct,m)}function Ue(o){if(!o)return;let m=new Array(o.length);for(let D=0;D<o.length;D++)m[D]=ct(o[D]);return m}async function cr(o,m){if(!o)return;let D=new k.SignatureHelp;return Me.number(o.activeSignature)?D.activeSignature=o.activeSignature:D.activeSignature=0,Me.number(o.activeParameter)?D.activeParameter=o.activeParameter:D.activeParameter=0,o.signatures&&(D.signatures=await Mn(o.signatures,m)),D}async function Mn(o,m){return j.mapAsync(o,pe,m)}async function pe(o,m){let D=new k.SignatureInformation(o.label);return o.documentation!==void 0&&(D.documentation=T(o.documentation)),o.parameters!==void 0&&(D.parameters=await On(o.parameters,m)),o.activeParameter!==void 0&&(D.activeParameter=o.activeParameter),D}function On(o,m){return j.map(o,ut,m)}function ut(o){let m=new k.ParameterInformation(o.label);return o.documentation&&(m.documentation=T(o.documentation)),m}function Ze(o){return o?new k.Location(i(o.uri),p(o.range)):void 0}async function dr(o,m){if(o)return Un(o,m)}async function An(o,m){if(o)return Un(o,m)}function Ln(o){if(!o)return;let m={targetUri:i(o.targetUri),targetRange:p(o.targetRange),originSelectionRange:p(o.originSelectionRange),targetSelectionRange:p(o.targetSelectionRange)};if(!m.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return m}async function Un(o,m){if(o)if(Me.array(o)){if(o.length===0)return[];if(M.LocationLink.is(o[0])){let D=o;return j.map(D,Ln,m)}else{let D=o;return j.map(D,Ze,m)}}else return M.LocationLink.is(o)?[Ln(o)]:Ze(o)}async function ur(o,m){if(o)return j.map(o,Ze,m)}async function en(o,m){if(o)return j.map(o,Ot,m)}function Ot(o){let m=new k.DocumentHighlight(p(o.range));return Me.number(o.kind)&&(m.kind=At(o.kind)),m}function At(o){switch(o){case M.DocumentHighlightKind.Text:return k.DocumentHighlightKind.Text;case M.DocumentHighlightKind.Read:return k.DocumentHighlightKind.Read;case M.DocumentHighlightKind.Write:return k.DocumentHighlightKind.Write}return k.DocumentHighlightKind.Text}async function lr(o,m){if(o)return j.map(o,Nn,m)}function lt(o){return o<=M.SymbolKind.TypeParameter?o-1:k.SymbolKind.Property}function Kn(o){switch(o){case M.SymbolTag.Deprecated:return k.SymbolTag.Deprecated;default:return}}function Lt(o){if(o==null)return;let m=[];for(let D of o){let x=Kn(D);x!==void 0&&m.push(x)}return m.length===0?void 0:m}function Nn(o){let m=o.data,D=o.location,x=D.range===void 0||m!==void 0?new xu.default(o.name,lt(o.kind),o.containerName??"",D.range===void 0?i(D.uri):new k.Location(i(o.location.uri),p(D.range)),m):new k.SymbolInformation(o.name,lt(o.kind),o.containerName??"",new k.Location(i(o.location.uri),p(D.range)));return nn(x,o),x}async function pr(o,m){if(o!=null)return j.map(o,tn,m)}function tn(o){let m=new k.DocumentSymbol(o.name,o.detail||"",lt(o.kind),p(o.range),p(o.selectionRange));if(nn(m,o),o.children!==void 0&&o.children.length>0){let D=[];for(let x of o.children)D.push(tn(x));m.children=D}return m}function nn(o,m){o.tags=Lt(m.tags),m.deprecated&&(o.tags?o.tags.includes(k.SymbolTag.Deprecated)||(o.tags=o.tags.concat(k.SymbolTag.Deprecated)):o.tags=[k.SymbolTag.Deprecated])}function Ke(o){let m={title:o.title,command:o.command};return o.arguments&&(m.arguments=o.arguments),m}async function Dt(o,m){if(o)return j.map(o,Ke,m)}let Ie=new Map;Ie.set(M.CodeActionKind.Empty,k.CodeActionKind.Empty),Ie.set(M.CodeActionKind.QuickFix,k.CodeActionKind.QuickFix),Ie.set(M.CodeActionKind.Refactor,k.CodeActionKind.Refactor),Ie.set(M.CodeActionKind.RefactorExtract,k.CodeActionKind.RefactorExtract),Ie.set(M.CodeActionKind.RefactorInline,k.CodeActionKind.RefactorInline),Ie.set(M.CodeActionKind.RefactorRewrite,k.CodeActionKind.RefactorRewrite),Ie.set(M.CodeActionKind.Source,k.CodeActionKind.Source),Ie.set(M.CodeActionKind.SourceOrganizeImports,k.CodeActionKind.SourceOrganizeImports);function pt(o){if(o==null)return;let m=Ie.get(o);if(m)return m;let D=o.split(".");m=k.CodeActionKind.Empty;for(let x of D)m=m.append(x);return m}function fr(o){if(o!=null)return o.map(m=>pt(m))}async function Hn(o,m){if(o==null)return;let D=new ku.default(o.title,o.data);return o.kind!==void 0&&(D.kind=pt(o.kind)),o.diagnostics!==void 0&&(D.diagnostics=u(o.diagnostics)),o.edit!==void 0&&(D.edit=await rn(o.edit,m)),o.command!==void 0&&(D.command=Ke(o.command)),o.isPreferred!==void 0&&(D.isPreferred=o.isPreferred),o.disabled!==void 0&&(D.disabled={reason:o.disabled.reason}),D}function hr(o,m){return j.mapAsync(o,async D=>M.Command.is(D)?Ke(D):Hn(D,m),m)}function $n(o){if(!o)return;let m=new bu.default(p(o.range));return o.command&&(m.command=Ke(o.command)),o.data!==void 0&&o.data!==null&&(m.data=o.data),m}async function gr(o,m){if(o)return j.map(o,$n,m)}async function rn(o,m){if(!o)return;let D=new Map;if(o.changeAnnotations!==void 0){let ye=o.changeAnnotations;await j.forEach(Object.keys(ye),Q=>{let Ve=Wn(ye[Q]);D.set(Q,Ve)},m)}let x=ye=>{if(ye!==void 0)return D.get(ye)},he=new k.WorkspaceEdit;if(o.documentChanges){let ye=o.documentChanges;await j.forEach(ye,Q=>{if(M.CreateFile.is(Q))he.createFile(i(Q.uri),Q.options,x(Q.annotationId));else if(M.RenameFile.is(Q))he.renameFile(i(Q.oldUri),i(Q.newUri),Q.options,x(Q.annotationId));else if(M.DeleteFile.is(Q))he.deleteFile(i(Q.uri),Q.options,x(Q.annotationId));else if(M.TextDocumentEdit.is(Q)){let Ve=i(Q.textDocument.uri);for(let Y of Q.edits)M.AnnotatedTextEdit.is(Y)?he.replace(Ve,p(Y.range),Y.newText,x(Y.annotationId)):he.replace(Ve,p(Y.range),Y.newText)}else throw new Error(`Unknown workspace edit change received:
6
6
  ${JSON.stringify(Q,void 0,4)}`)},m)}else if(o.changes){let ye=o.changes;await j.forEach(Object.keys(ye),Q=>{he.set(i(Q),Ue(ye[Q]))},m)}return he}function Wn(o){if(o!==void 0)return{label:o.label,needsConfirmation:!!o.needsConfirmation,description:o.description}}function jn(o){let m=p(o.range),D=o.target?r(o.target):void 0,x=new Tu.default(m,D);return o.tooltip!==void 0&&(x.tooltip=o.tooltip),o.data!==void 0&&o.data!==null&&(x.data=o.data),x}async function mr(o,m){if(o)return j.map(o,jn,m)}function et(o){return new k.Color(o.red,o.green,o.blue,o.alpha)}function zn(o){return new k.ColorInformation(p(o.range),et(o.color))}async function vr(o,m){if(o)return j.map(o,zn,m)}function Vn(o){let m=new k.ColorPresentation(o.label);return m.additionalTextEdits=Ue(o.additionalTextEdits),o.textEdit&&(m.textEdit=ct(o.textEdit)),m}async function yr(o,m){if(o)return j.map(o,Vn,m)}function Bn(o){if(o)switch(o){case M.FoldingRangeKind.Comment:return k.FoldingRangeKind.Comment;case M.FoldingRangeKind.Imports:return k.FoldingRangeKind.Imports;case M.FoldingRangeKind.Region:return k.FoldingRangeKind.Region}}function Jn(o){return new k.FoldingRange(o.startLine,o.endLine,Bn(o.kind))}async function Cr(o,m){if(o)return j.map(o,Jn,m)}function sn(o){return new k.SelectionRange(p(o.range),o.parent?sn(o.parent):void 0)}async function wr(o,m){return Array.isArray(o)?j.map(o,sn,m):[]}function Qn(o){return M.InlineValueText.is(o)?new k.InlineValueText(p(o.range),o.text):M.InlineValueVariableLookup.is(o)?new k.InlineValueVariableLookup(p(o.range),o.variableName,o.caseSensitiveLookup):new k.InlineValueEvaluatableExpression(p(o.range),o.expression)}async function Dr(o,m){return Array.isArray(o)?j.map(o,Qn,m):[]}async function on(o,m){let D=typeof o.label=="string"?o.label:await j.map(o.label,d,m),x=new Fu.default(v(o.position),D);return o.kind!==void 0&&(x.kind=o.kind),o.textEdits!==void 0&&(x.textEdits=await dt(o.textEdits,m)),o.tooltip!==void 0&&(x.tooltip=w(o.tooltip)),o.paddingLeft!==void 0&&(x.paddingLeft=o.paddingLeft),o.paddingRight!==void 0&&(x.paddingRight=o.paddingRight),o.data!==void 0&&(x.data=o.data),x}function d(o){let m=new k.InlayHintLabelPart(o.value);return o.location!==void 0&&(m.location=Ze(o.location)),o.tooltip!==void 0&&(m.tooltip=w(o.tooltip)),o.command!==void 0&&(m.command=Ke(o.command)),m}function w(o){return typeof o=="string"?o:P(o)}async function R(o,m){if(Array.isArray(o))return j.mapAsync(o,on,m)}function B(o){if(o===null)return;let m=new Pu.default(lt(o.kind),o.name,o.detail||"",r(o.uri),p(o.range),p(o.selectionRange),o.data);return o.tags!==void 0&&(m.tags=Lt(o.tags)),m}async function G(o,m){if(o!==null)return j.map(o,B,m)}async function fe(o,m){return new k.CallHierarchyIncomingCall(B(o.from),await C(o.fromRanges,m))}async function ke(o,m){if(o!==null)return j.mapAsync(o,fe,m)}async function ze(o,m){return new k.CallHierarchyOutgoingCall(B(o.to),await C(o.fromRanges,m))}async function Pd(o,m){if(o!==null)return j.mapAsync(o,ze,m)}async function Rd(o,m){if(o!=null)return new k.SemanticTokens(new Uint32Array(o.data),o.resultId)}function Pa(o){return new k.SemanticTokensEdit(o.start,o.deleteCount,o.data!==void 0?new Uint32Array(o.data):void 0)}async function xd(o,m){if(o!=null)return new k.SemanticTokensEdits(o.edits.map(Pa),o.resultId)}function Fd(o){return o}async function qd(o,m){if(o!=null)return new k.LinkedEditingRanges(await C(o.ranges,m),Id(o.wordPattern))}function Id(o){if(o!=null)return new RegExp(o)}function Ra(o){if(o===null)return;let m=new Ru.default(lt(o.kind),o.name,o.detail||"",r(o.uri),p(o.range),p(o.selectionRange),o.data);return o.tags!==void 0&&(m.tags=Lt(o.tags)),m}async function Ed(o,m){if(o!==null)return j.map(o,Ra,m)}function Md(o){if(Me.string(o))return o;if(M.RelativePattern.is(o)){if(M.URI.is(o.baseUri))return new k.RelativePattern(r(o.baseUri),o.pattern);if(M.WorkspaceFolder.is(o.baseUri)){let m=k.workspace.getWorkspaceFolder(r(o.baseUri.uri));return m!==void 0?new k.RelativePattern(m,o.pattern):void 0}}}async function Od(o,m){if(!o)return;if(Array.isArray(o))return j.map(o,he=>Sr(he),m);let D=o,x=await j.map(D.items,he=>Sr(he),m);return new k.InlineCompletionList(x)}function Sr(o){let m;typeof o.insertText=="string"?m=o.insertText:m=new k.SnippetString(o.insertText.value);let D;o.command&&(D=Ke(o.command));let x=new k.InlineCompletionItem(m,p(o.range),D);return o.filterText&&(x.filterText=o.filterText),x}return{asUri:r,asDocumentSelector:a,asDiagnostics:c,asDiagnostic:l,asRange:p,asRanges:C,asPosition:v,asDiagnosticSeverity:y,asDiagnosticTag:f,asHover:q,asCompletionResult:ce,asCompletionItem:Xe,asTextEdit:ct,asTextEdits:dt,asSignatureHelp:cr,asSignatureInformations:Mn,asSignatureInformation:pe,asParameterInformations:On,asParameterInformation:ut,asDeclarationResult:dr,asDefinitionResult:An,asLocation:Ze,asReferences:ur,asDocumentHighlights:en,asDocumentHighlight:Ot,asDocumentHighlightKind:At,asSymbolKind:lt,asSymbolTag:Kn,asSymbolTags:Lt,asSymbolInformations:lr,asSymbolInformation:Nn,asDocumentSymbols:pr,asDocumentSymbol:tn,asCommand:Ke,asCommands:Dt,asCodeAction:Hn,asCodeActionKind:pt,asCodeActionKinds:fr,asCodeActionResult:hr,asCodeLens:$n,asCodeLenses:gr,asWorkspaceEdit:rn,asDocumentLink:jn,asDocumentLinks:mr,asFoldingRangeKind:Bn,asFoldingRange:Jn,asFoldingRanges:Cr,asColor:et,asColorInformation:zn,asColorInformations:vr,asColorPresentation:Vn,asColorPresentations:yr,asSelectionRange:sn,asSelectionRanges:wr,asInlineValue:Qn,asInlineValues:Dr,asInlayHint:on,asInlayHints:R,asSemanticTokensLegend:Fd,asSemanticTokens:Rd,asSemanticTokensEdit:Pa,asSemanticTokensEdits:xd,asCallHierarchyItem:B,asCallHierarchyItems:G,asCallHierarchyIncomingCall:fe,asCallHierarchyIncomingCalls:ke,asCallHierarchyOutgoingCall:ze,asCallHierarchyOutgoingCalls:Pd,asLinkedEditingRanges:qd,asTypeHierarchyItem:Ra,asTypeHierarchyItems:Ed,asGlobPattern:Md,asInlineCompletionResult:Od,asInlineCompletionItem:Sr}}hi.createConverter=qu});var te=F(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.generateUuid=Oe.parse=Oe.isUUID=Oe.v4=Oe.empty=void 0;var pn=class{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},fn=class s extends pn{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return s._oneOf(s._chars)}constructor(){super([s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),"-",s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),"-","4",s._randomHex(),s._randomHex(),s._randomHex(),"-",s._oneOf(s._timeHighBits),s._randomHex(),s._randomHex(),s._randomHex(),"-",s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex()].join(""))}};fn._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];fn._timeHighBits=["8","9","a","b"];Oe.empty=new pn("00000000-0000-0000-0000-000000000000");function sc(){return new fn}Oe.v4=sc;var Iu=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function oc(s){return Iu.test(s)}Oe.isUUID=oc;function Eu(s){if(!oc(s))throw new Error("invalid uuid");return new pn(s)}Oe.parse=Eu;function Mu(){return sc().asHex()}Oe.generateUuid=Mu});var vs=F(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.ProgressPart=void 0;var ac=I("vscode"),cc=L(),dc=Ee(),ms=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(cc.WorkDoneProgress.type,this._token,i=>{switch(i.kind){case"begin":this.begin(i);break;case"report":this.report(i);break;case"end":this.done(),n&&n(this);break}})}begin(e){this._infinite=e.percentage===void 0,this._lspProgressDisposable!==void 0&&ac.window.withProgress({location:ac.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},async(t,n)=>{if(this._lspProgressDisposable!==void 0)return this._progress=t,this._cancellationToken=n,this._tokenDisposable=this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(cc.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((i,r)=>{this._resolve=i,this._reject=r})})}report(e){if(this._infinite&&dc.string(e.message))this._progress!==void 0&&this._progress.report({message:e.message});else if(dc.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._reported+=n,this._progress!==void 0&&this._progress.report({message:e.message,increment:n})}}cancel(){this.cleanup(),this._reject!==void 0&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),this._resolve!==void 0&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){this._lspProgressDisposable!==void 0&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),this._tokenDisposable!==void 0&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}};gi.ProgressPart=ms});var W=F(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.WorkspaceFeature=ge.TextDocumentLanguageFeature=ge.TextDocumentEventFeature=ge.DynamicDocumentFeature=ge.DynamicFeature=ge.StaticFeature=ge.ensure=ge.LSPCancellationError=void 0;var Tt=I("vscode"),ys=L(),Se=Ee(),uc=te(),Cs=class extends Tt.CancellationError{constructor(e){super(),this.data=e}};ge.LSPCancellationError=Cs;function Ou(s,e){return s[e]===void 0&&(s[e]={}),s[e]}ge.ensure=Ou;var lc;(function(s){function e(t){let n=t;return n!=null&&Se.func(n.fillClientCapabilities)&&Se.func(n.initialize)&&Se.func(n.getState)&&Se.func(n.clear)&&(n.fillInitializeParams===void 0||Se.func(n.fillInitializeParams))}s.is=e})(lc||(ge.StaticFeature=lc={}));var pc;(function(s){function e(t){let n=t;return n!=null&&Se.func(n.fillClientCapabilities)&&Se.func(n.initialize)&&Se.func(n.getState)&&Se.func(n.clear)&&(n.fillInitializeParams===void 0||Se.func(n.fillInitializeParams))&&Se.func(n.register)&&Se.func(n.unregister)&&n.registrationType!==void 0}s.is=e})(pc||(ge.DynamicFeature=pc={}));var hn=class{constructor(e){this._client=e}getState(){let e=this.getDocumentSelectors(),t=0;for(let i of e){t++;for(let r of Tt.workspace.textDocuments)if(Tt.languages.match(i,r)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}let n=t>0;return{kind:"document",id:this.registrationType.method,registrations:n,matches:!1}}};ge.DynamicDocumentFeature=hn;var ws=class extends hn{static textDocumentFilter(e,t){for(let n of e)if(Tt.languages.match(n,t)>0)return!0;return!1}constructor(e,t,n,i,r,a,c){super(e),this._event=t,this._type=n,this._middleware=i,this._createParams=r,this._textDocument=a,this._selectorFilter=c,this._selectors=new Map,this._onNotificationSent=new Tt.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(t=>{this.callback(t).catch(n=>{this._client.error(`Sending document notification ${this._type.method} failed.`,n)})})),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){let t=async n=>{let i=this._createParams(n);await this._client.sendNotification(this._type,i),this.notificationSent(this.getTextDocument(n),this._type,i)};if(this.matches(e)){let n=this._middleware();return n?n(e,i=>t(i)):t(e)}}matches(e){return this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))?!1:!this._selectorFilter||this._selectorFilter(this._selectors.values(),e)}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._selectors.values())if(Tt.languages.match(t,e)>0)return{send:n=>this.callback(n)}}};ge.TextDocumentEventFeature=ws;var Ds=class extends hn{constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(let e of this._registrations.values()){let t=e.data.registerOptions.documentSelector;t!==null&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&t.disposable.dispose()}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(t){if(ys.TextDocumentRegistrationOptions.is(t)){let n=ys.StaticRegistrationOptions.hasId(t)?t.id:uc.generateUuid(),i=t.documentSelector??e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(Se.boolean(t)&&t===!0||ys.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let n=Se.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[uc.generateUuid(),n]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,t){if(!(!e||!t))return Se.boolean(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(let t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(n!==null&&Tt.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(n),e)>0)return t.provider}}getAllProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};ge.TextDocumentLanguageFeature=Ds;var Ss=class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){let e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);t!==void 0&&t.disposable.dispose()}clear(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}};ge.WorkspaceFeature=Ss});var Fs=F(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.DiagnosticFeature=gt.DiagnosticPullMode=gt.vsdiag=void 0;var Au=kr(),N=I("vscode"),ae=L(),Lu=te(),_s=W();function mi(s,e){return s[e]===void 0&&(s[e]={}),s[e]}var Ae;(function(s){let e;(function(t){t.full="full",t.unChanged="unChanged"})(e=s.DocumentDiagnosticReportKind||(s.DocumentDiagnosticReportKind={}))})(Ae||(gt.vsdiag=Ae={}));var vi;(function(s){s.onType="onType",s.onSave="onSave"})(vi||(gt.DiagnosticPullMode=vi={}));var we;(function(s){s.active="open",s.reschedule="reschedule",s.outDated="drop"})(we||(we={}));var bs=class s{constructor(){this.open=new Set,this._onOpen=new N.EventEmitter,this._onClose=new N.EventEmitter,s.fillTabResources(this.open);let e=t=>{if(t.closed.length===0&&t.opened.length===0)return;let n=this.open,i=new Set;s.fillTabResources(i);let r=new Set,a=new Set(i);for(let c of n.values())i.has(c)?a.delete(c):r.add(c);if(this.open=i,r.size>0){let c=new Set;for(let u of r)c.add(N.Uri.parse(u));this._onClose.fire(c)}if(a.size>0){let c=new Set;for(let u of a)c.add(N.Uri.parse(u));this._onOpen.fire(c)}};N.window.tabGroups.onDidChangeTabs!==void 0?this.disposable=N.window.tabGroups.onDidChangeTabs(e):this.disposable={dispose:()=>{}}}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposable.dispose()}isActive(e){return e instanceof N.Uri?N.window.activeTextEditor?.document.uri===e:N.window.activeTextEditor?.document===e}isVisible(e){let t=e instanceof N.Uri?e:e.uri;return this.open.has(t.toString())}getTabResources(){let e=new Set;return s.fillTabResources(new Set,e),e}static fillTabResources(e,t){let n=e??new Set;for(let i of N.window.tabGroups.all)for(let r of i.tabs){let a=r.input,c;a instanceof N.TabInputText?c=a.uri:a instanceof N.TabInputTextDiff?c=a.modified:a instanceof N.TabInputCustom&&(c=a.uri),c!==void 0&&!n.has(c.toString())&&(n.add(c.toString()),t!==void 0&&t.add(c))}}},le;(function(s){s[s.document=1]="document",s[s.workspace=2]="workspace"})(le||(le={}));var tt;(function(s){function e(t){return t instanceof N.Uri?t.toString():t.uri.toString()}s.asKey=e})(tt||(tt={}));var Ts=class{constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,n){let i=e===le.document?this.documentPullStates:this.workspacePullStates,[r,a,c]=t instanceof N.Uri?[t.toString(),t,n]:[t.uri.toString(),t.uri,t.version],u=i.get(r);return u===void 0&&(u={document:a,pulledVersion:c,resultId:void 0},i.set(r,u)),u}update(e,t,n,i){let r=e===le.document?this.documentPullStates:this.workspacePullStates,[a,c,u,l]=t instanceof N.Uri?[t.toString(),t,n,i]:[t.uri.toString(),t.uri,t.version,n],g=r.get(a);g===void 0?(g={document:c,pulledVersion:u,resultId:l},r.set(a,g)):(g.pulledVersion=u,g.resultId=l)}unTrack(e,t){let n=tt.asKey(t);(e===le.document?this.documentPullStates:this.workspacePullStates).delete(n)}tracks(e,t){let n=tt.asKey(t);return(e===le.document?this.documentPullStates:this.workspacePullStates).has(n)}getResultId(e,t){let n=tt.asKey(t);return(e===le.document?this.documentPullStates:this.workspacePullStates).get(n)?.resultId}getAllResultIds(){let e=[];for(let[t,n]of this.workspacePullStates)this.documentPullStates.has(t)&&(n=this.documentPullStates.get(t)),n.resultId!==void 0&&e.push({uri:t,value:n.resultId});return e}},ks=class{constructor(e,t,n){this.client=e,this.tabs=t,this.options=n,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new N.EventEmitter,this.provider=this.createProvider(),this.diagnostics=N.languages.createDiagnosticCollection(n.identifier),this.openRequests=new Map,this.documentStates=new Ts,this.workspaceErrorCounter=0}knows(e,t){let n=t instanceof N.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(n.toString())}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;let n=e instanceof N.Uri?e:e.uri;this.pullAsync(e).then(()=>{t&&t()},i=>{this.client.error(`Document pull failed for text document ${n.toString()}`,i,!1)})}async pullAsync(e,t){if(this.isDisposed)return;let n=e instanceof N.Uri,i=n?e:e.uri,r=i.toString();t=n?t:e.version;let a=this.openRequests.get(r),c=n?this.documentStates.track(le.document,e,t):this.documentStates.track(le.document,e);if(a===void 0){let u=new N.CancellationTokenSource;this.openRequests.set(r,{state:we.active,document:e,version:t,tokenSource:u});let l,g;try{l=await this.provider.provideDiagnostics(e,c.resultId,u.token)??{kind:Ae.DocumentDiagnosticReportKind.full,items:[]}}catch(h){if(h instanceof _s.LSPCancellationError&&ae.DiagnosticServerCancellationData.is(h.data)&&h.data.retriggerRequest===!1&&(g={state:we.outDated,document:e}),g===void 0&&h instanceof N.CancellationError)g={state:we.reschedule,document:e};else throw h}if(g=g??this.openRequests.get(r),g===void 0){this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${r}`),this.diagnostics.delete(i);return}if(this.openRequests.delete(r),!this.tabs.isVisible(e)){this.documentStates.unTrack(le.document,e);return}if(g.state===we.outDated)return;l!==void 0&&(l.kind===Ae.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,l.items),c.pulledVersion=t,c.resultId=l.resultId),g.state===we.reschedule&&this.pull(e)}else a.state===we.active?(a.tokenSource.cancel(),this.openRequests.set(r,{state:we.reschedule,document:a.document})):a.state===we.outDated&&this.openRequests.set(r,{state:we.reschedule,document:a.document})}forgetDocument(e){let t=e instanceof N.Uri?e:e.uri,n=t.toString(),i=this.openRequests.get(n);this.options.workspaceDiagnostics?i!==void 0?this.openRequests.set(n,{state:we.reschedule,document:e}):this.pull(e,()=>{this.forget(le.document,e)}):(i!==void 0&&(i.state===we.active&&i.tokenSource.cancel(),this.openRequests.set(n,{state:we.outDated,document:e})),this.diagnostics.delete(t),this.forget(le.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then(()=>{this.workspaceTimeout=(0,ae.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3)},e=>{!(e instanceof _s.LSPCancellationError)&&!ae.DiagnosticServerCancellationData.is(e.data)&&(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,ae.RAL)().timer.setTimeout(()=>{this.pullWorkspace()},2e3))})}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;this.workspaceCancellation!==void 0&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new N.CancellationTokenSource;let e=this.documentStates.getAllResultIds().map(t=>({uri:this.client.protocol2CodeConverter.asUri(t.uri),value:t.value}));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,t=>{if(!(!t||this.isDisposed))for(let n of t.items)n.kind===Ae.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(le.document,n.uri)||this.diagnostics.set(n.uri,n.items)),this.documentStates.update(le.workspace,n.uri,n.version??void 0,n.resultId)})}createProvider(){let e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(t,n,i)=>{let r=(c,u,l)=>{let g={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(c instanceof N.Uri?c:c.uri)},previousResultId:u};return this.isDisposed===!0||!this.client.isRunning()?{kind:Ae.DocumentDiagnosticReportKind.full,items:[]}:this.client.sendRequest(ae.DocumentDiagnosticRequest.type,g,l).then(async h=>h==null||this.isDisposed||l.isCancellationRequested?{kind:Ae.DocumentDiagnosticReportKind.full,items:[]}:h.kind===ae.DocumentDiagnosticReportKind.Full?{kind:Ae.DocumentDiagnosticReportKind.full,resultId:h.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(h.items,l)}:{kind:Ae.DocumentDiagnosticReportKind.unChanged,resultId:h.resultId},h=>this.client.handleFailedRequest(ae.DocumentDiagnosticRequest.type,l,h,{kind:Ae.DocumentDiagnosticReportKind.full,items:[]}))},a=this.client.middleware;return a.provideDiagnostics?a.provideDiagnostics(t,n,i,r):r(t,n,i)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(t,n,i)=>{let r=async l=>l.kind===ae.DocumentDiagnosticReportKind.Full?{kind:Ae.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version,items:await this.client.protocol2CodeConverter.asDiagnostics(l.items,n)}:{kind:Ae.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(l.uri),resultId:l.resultId,version:l.version},a=l=>{let g=[];for(let h of l)g.push({uri:this.client.code2ProtocolConverter.asUri(h.uri),value:h.value});return g},c=(l,g)=>{let h=(0,Lu.generateUuid)(),f=this.client.onProgress(ae.WorkspaceDiagnosticRequest.partialResult,h,async p=>{if(p==null){i(null);return}let C={items:[]};for(let y of p.items)try{C.items.push(await r(y))}catch(b){this.client.error("Converting workspace diagnostics failed.",b)}i(C)}),v={identifier:this.options.identifier,previousResultIds:a(l),partialResultToken:h};return this.isDisposed===!0||!this.client.isRunning()?{items:[]}:this.client.sendRequest(ae.WorkspaceDiagnosticRequest.type,v,g).then(async p=>{if(g.isCancellationRequested)return{items:[]};let C={items:[]};for(let y of p.items)C.items.push(await r(y));return f.dispose(),i(C),{items:[]}},p=>(f.dispose(),this.client.handleFailedRequest(ae.DocumentDiagnosticRequest.type,g,p,{items:[]})))},u=this.client.middleware;return u.provideWorkspaceDiagnostics?u.provideWorkspaceDiagnostics(t,n,i,c):c(t,n,i)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(let[e,t]of this.openRequests)t.state===we.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:we.outDated,document:t.document});this.diagnostics.dispose()}},Ps=class{constructor(e){this.diagnosticRequestor=e,this.documents=new ae.LinkedMap,this.isDisposed=!1}add(e){if(this.isDisposed===!0)return;let t=tt.asKey(e);this.documents.has(t)||(this.documents.set(t,e,ae.Touch.Last),this.trigger())}remove(e){let t=tt.asKey(e);this.documents.delete(t),this.documents.size===0?this.stop():t===this.endDocumentKey()&&(this.endDocument=this.documents.last)}trigger(){if(this.isDisposed!==!0){if(this.intervalHandle!==void 0){this.endDocument=this.documents.last;return}this.endDocument=this.documents.last,this.intervalHandle=(0,ae.RAL)().timer.setInterval(()=>{let e=this.documents.first;if(e!==void 0){let t=tt.asKey(e);this.diagnosticRequestor.pull(e),this.documents.set(t,e,ae.Touch.Last),t===this.endDocumentKey()&&this.stop()}},200)}}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear()}stop(){this.intervalHandle?.dispose(),this.intervalHandle=void 0,this.endDocument=void 0}endDocumentKey(){return this.endDocument!==void 0?tt.asKey(this.endDocument):void 0}},Rs=class{constructor(e,t,n){let i=e.clientOptions.diagnosticPullOptions??{onChange:!0,onSave:!1},r=e.protocol2CodeConverter.asDocumentSelector(n.documentSelector),a=[],c=p=>{let C=n.documentSelector;if(i.match!==void 0)return i.match(C,p);for(let y of C)if(ae.TextDocumentFilter.is(y)){if(typeof y=="string"||y.language!==void 0&&y.language!=="*"||y.scheme!==void 0&&y.scheme!=="*"&&y.scheme!==p.scheme)return!1;if(y.pattern!==void 0){let b=new Au.Minimatch(y.pattern,{noext:!0});if(!b.makeRe()||!b.match(p.fsPath))return!1}}return!0},u=p=>p instanceof N.Uri?c(p):N.languages.match(r,p)>0&&t.isVisible(p),l=p=>p instanceof N.Uri?this.activeTextDocument?.uri.toString()===p.toString():this.activeTextDocument===p;this.diagnosticRequestor=new ks(e,t,n),this.backgroundScheduler=new Ps(this.diagnosticRequestor);let g=p=>{!u(p)||!n.interFileDependencies||l(p)||this.backgroundScheduler.add(p)};this.activeTextDocument=N.window.activeTextEditor?.document,N.window.onDidChangeActiveTextEditor(p=>{let C=this.activeTextDocument;this.activeTextDocument=p?.document,C!==void 0&&g(C),this.activeTextDocument!==void 0&&this.backgroundScheduler.remove(this.activeTextDocument)});let h=e.getFeature(ae.DidOpenTextDocumentNotification.method);a.push(h.onNotificationSent(p=>{let C=p.textDocument;this.diagnosticRequestor.knows(le.document,C)||u(C)&&this.diagnosticRequestor.pull(C,()=>{g(C)})})),a.push(t.onOpen(p=>{for(let C of p){if(this.diagnosticRequestor.knows(le.document,C))continue;let y=C.toString(),b;for(let T of N.workspace.textDocuments)if(y===T.uri.toString()){b=T;break}b!==void 0&&u(b)&&this.diagnosticRequestor.pull(b,()=>{g(b)})}}));let f=new Set;for(let p of N.workspace.textDocuments)u(p)&&(this.diagnosticRequestor.pull(p,()=>{g(p)}),f.add(p.uri.toString()));if(i.onTabs===!0)for(let p of t.getTabResources())!f.has(p.toString())&&u(p)&&this.diagnosticRequestor.pull(p,()=>{g(p)});if(i.onChange===!0){let p=e.getFeature(ae.DidChangeTextDocumentNotification.method);a.push(p.onNotificationSent(async C=>{let y=C.textDocument;(i.filter===void 0||!i.filter(y,vi.onType))&&this.diagnosticRequestor.knows(le.document,y)&&this.diagnosticRequestor.pull(y,()=>{this.backgroundScheduler.trigger()})}))}if(i.onSave===!0){let p=e.getFeature(ae.DidSaveTextDocumentNotification.method);a.push(p.onNotificationSent(C=>{let y=C.textDocument;(i.filter===void 0||!i.filter(y,vi.onSave))&&this.diagnosticRequestor.knows(le.document,y)&&this.diagnosticRequestor.pull(C.textDocument,()=>{this.backgroundScheduler.trigger()})}))}let v=e.getFeature(ae.DidCloseTextDocumentNotification.method);a.push(v.onNotificationSent(p=>{this.cleanUpDocument(p.textDocument)})),t.onClose(p=>{for(let C of p)this.cleanUpDocument(C)}),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event(()=>{for(let p of N.workspace.textDocuments)u(p)&&this.diagnosticRequestor.pull(p)}),n.workspaceDiagnostics===!0&&n.identifier!=="da348dc5-c30a-4515-9d98-31ff3be38d14"&&this.diagnosticRequestor.pullWorkspace(),this.disposable=N.Disposable.from(...a,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}cleanUpDocument(e){this.diagnosticRequestor.knows(le.document,e)&&(this.diagnosticRequestor.forgetDocument(e),this.backgroundScheduler.remove(e))}},xs=class extends _s.TextDocumentLanguageFeature{constructor(e){super(e,ae.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=mi(mi(e,"textDocument"),"diagnostic");t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,mi(mi(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(ae.DiagnosticRefreshRequest.type,async()=>{for(let a of this.getAllProviders())a.onDidChangeDiagnosticsEmitter.fire()});let[i,r]=this.getRegistration(t,e.diagnosticProvider);!i||!r||this.register({id:i,registerOptions:r})}clear(){this.tabs!==void 0&&(this.tabs.dispose(),this.tabs=void 0),super.clear()}registerLanguageProvider(e){this.tabs===void 0&&(this.tabs=new bs);let t=new Rs(this._client,this.tabs,e);return[t.disposable,t]}};gt.DiagnosticFeature=xs});var gc=F(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.NotebookDocumentSyncFeature=void 0;var De=I("vscode"),Uu=kr(),nt=L(),Ku=te(),fc=Ee();function hc(s,e){return s[e]===void 0&&(s[e]={}),s[e]}var Wt;(function(s){let e;(function(t){function n(f,v){return{version:f.version,uri:v.asUri(f.uri)}}t.asVersionedNotebookDocumentIdentifier=n;function i(f,v,p){let C=nt.NotebookDocument.create(p.asUri(f.uri),f.notebookType,f.version,r(v,p));return Object.keys(f.metadata).length>0&&(C.metadata=a(f.metadata)),C}t.asNotebookDocument=i;function r(f,v){return f.map(p=>c(p,v))}t.asNotebookCells=r;function a(f){return l(new Set,f)}t.asMetadata=a;function c(f,v){let p=nt.NotebookCell.create(u(f.kind),v.asUri(f.document.uri));return Object.keys(f.metadata).length>0&&(p.metadata=a(f.metadata)),f.executionSummary!==void 0&&fc.number(f.executionSummary.executionOrder)&&fc.boolean(f.executionSummary.success)&&(p.executionSummary={executionOrder:f.executionSummary.executionOrder,success:f.executionSummary.success}),p}t.asNotebookCell=c;function u(f){switch(f){case De.NotebookCellKind.Markup:return nt.NotebookCellKind.Markup;case De.NotebookCellKind.Code:return nt.NotebookCellKind.Code}}function l(f,v){if(f.has(v))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(v)){let p=[];for(let C of v)if(C!==null&&typeof C=="object"||Array.isArray(C))p.push(l(f,C));else{if(C instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");p.push(C)}return p}else{let p=Object.keys(v),C=Object.create(null);for(let y of p){let b=v[y];if(b!==null&&typeof b=="object"||Array.isArray(b))C[y]=l(f,b);else{if(b instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");C[y]=b}}return C}}function g(f,v){let p=v.asChangeTextDocumentParams(f,f.document.uri,f.document.version);return{document:p.textDocument,changes:p.contentChanges}}t.asTextContentChange=g;function h(f,v){let p=Object.create(null);if(f.metadata&&(p.metadata=s.c2p.asMetadata(f.metadata)),f.cells!==void 0){let C=Object.create(null),y=f.cells;y.structure&&(C.structure={array:{start:y.structure.array.start,deleteCount:y.structure.array.deleteCount,cells:y.structure.array.cells!==void 0?y.structure.array.cells.map(b=>s.c2p.asNotebookCell(b,v)):void 0},didOpen:y.structure.didOpen!==void 0?y.structure.didOpen.map(b=>v.asOpenTextDocumentParams(b.document).textDocument):void 0,didClose:y.structure.didClose!==void 0?y.structure.didClose.map(b=>v.asCloseTextDocumentParams(b.document).textDocument):void 0}),y.data!==void 0&&(C.data=y.data.map(b=>s.c2p.asNotebookCell(b,v))),y.textContent!==void 0&&(C.textContent=y.textContent.map(b=>s.c2p.asTextContentChange(b,v))),Object.keys(C).length>0&&(p.cells=C)}return p}t.asNotebookDocumentChangeEvent=h})(e=s.c2p||(s.c2p={}))})(Wt||(Wt={}));var qs;(function(s){function e(c,u,l){let g=c.length,h=u.length,f=0;for(;f<h&&f<g&&t(c[f],u[f],l);)f++;if(f<h&&f<g){let v=g-1,p=h-1;for(;v>=0&&p>=0&&t(c[v],u[p],l);)v--,p--;let C=v+1-f,y=f===p+1?void 0:u.slice(f,p+1);return y!==void 0?{start:f,deleteCount:C,cells:y}:{start:f,deleteCount:C}}else return f<h?{start:f,deleteCount:0,cells:u.slice(f)}:f<g?{start:f,deleteCount:g-f}:void 0}s.computeDiff=e;function t(c,u,l=!0){return c.kind!==u.kind||c.document.uri.toString()!==u.document.uri.toString()||c.document.languageId!==u.document.languageId||!n(c.executionSummary,u.executionSummary)?!1:!l||l&&r(c.metadata,u.metadata)}function n(c,u){return c===u?!0:c===void 0||u===void 0?!1:c.executionOrder===u.executionOrder&&c.success===u.success&&i(c.timing,u.timing)}function i(c,u){return c===u?!0:c===void 0||u===void 0?!1:c.startTime===u.startTime&&c.endTime===u.endTime}function r(c,u){if(c===u)return!0;if(c==null||u===null||u===void 0||typeof c!=typeof u||typeof c!="object")return!1;let l=Array.isArray(c),g=Array.isArray(u);if(l!==g)return!1;if(l&&g){if(c.length!==u.length)return!1;for(let h=0;h<c.length;h++)if(!r(c[h],u[h]))return!1}if(a(c)&&a(u)){let h=Object.keys(c),f=Object.keys(u);if(h.length!==f.length||(h.sort(),f.sort(),!r(h,f)))return!1;for(let v=0;v<h.length;v++){let p=h[v];if(!r(c[p],u[p]))return!1}return!0}return!1}function a(c){return c!==null&&typeof c=="object"}s.isObjectLiteral=a})(qs||(qs={}));var Is;(function(s){function e(t,n){if(typeof t=="string")return t==="*"||n.notebookType===t;if(t.notebookType!==void 0&&t.notebookType!=="*"&&n.notebookType!==t.notebookType)return!1;let i=n.uri;if(t.scheme!==void 0&&t.scheme!=="*"&&i.scheme!==t.scheme)return!1;if(t.pattern!==void 0){let r=new Uu.Minimatch(t.pattern,{noext:!0});if(!r.makeRe()||!r.match(i.fsPath))return!1}return!0}s.matchNotebook=e})(Is||(Is={}));var yi;(function(s){function e(n){let i=n.notebookSelector,r=[];for(let a of i){let c=(typeof a.notebook=="string"?a.notebook:a.notebook?.notebookType)??"*",u=typeof a.notebook=="string"?void 0:a.notebook?.scheme,l=typeof a.notebook=="string"?void 0:a.notebook?.pattern;if(a.cells!==void 0)for(let g of a.cells)r.push(t(c,u,l,g.language));else r.push(t(c,u,l,void 0))}return r}s.asDocumentSelector=e;function t(n,i,r,a){return i===void 0&&r===void 0?{notebook:n,language:a}:{notebook:{notebookType:n,scheme:i,pattern:r},language:a}}})(yi||(yi={}));var Ci;(function(s){function e(t){return{cells:t,uris:new Set(t.map(n=>n.document.uri.toString()))}}s.create=e})(Ci||(Ci={}));var jt=class{constructor(e,t){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(yi.asDocumentSelector(t)),De.workspace.onDidOpenNotebookDocument(n=>{this.notebookDidOpen.add(n.uri.toString()),this.didOpen(n)},void 0,this.disposables);for(let n of De.workspace.notebookDocuments)this.notebookDidOpen.add(n.uri.toString()),this.didOpen(n);De.workspace.onDidChangeNotebookDocument(n=>this.didChangeNotebookDocument(n),void 0,this.disposables),this.options.save===!0&&De.workspace.onDidSaveNotebookDocument(n=>this.didSave(n),void 0,this.disposables),De.workspace.onDidCloseNotebookDocument(n=>{this.didClose(n),this.notebookDidOpen.delete(n.uri.toString())},void 0,this.disposables)}getState(){for(let e of De.workspace.notebookDocuments)if(this.getMatchingCells(e)!==void 0)return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){return De.languages.match(this.selector,e)>0}didOpenNotebookCellTextDocument(e,t){if(De.languages.match(this.selector,t.document)===0||!this.notebookDidOpen.has(e.uri.toString()))return;let n=this.notebookSyncInfo.get(e.uri.toString()),i=this.cellMatches(e,t);if(n!==void 0){let r=n.uris.has(t.document.uri.toString());if(i&&r||!i&&!r)return;if(i){let a=this.getMatchingCells(e);if(a!==void 0){let c=this.asNotebookDocumentChangeEvent(e,void 0,n,a);c!==void 0&&this.doSendChange(c,a).catch(()=>{})}}}else i&&this.doSendOpen(e,[t]).catch(()=>{})}didChangeNotebookCellTextDocument(e,t){De.languages.match(this.selector,t.document)!==0&&this.doSendChange({notebook:e,cells:{textContent:[t]}},void 0).catch(()=>{})}didCloseNotebookCellTextDocument(e,t){let n=this.notebookSyncInfo.get(e.uri.toString());if(n===void 0)return;let i=t.document.uri,r=n.cells.findIndex(a=>a.document.uri.toString()===i.toString());if(r!==-1)if(r===0&&n.cells.length===1)this.doSendClose(e,n.cells).catch(()=>{});else{let a=n.cells.slice(),c=a.splice(r,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:r,deleteCount:1},didClose:c}}},a).catch(()=>{})}}dispose(){for(let e of this.disposables)e.dispose()}didOpen(e,t=this.getMatchingCells(e),n=this.notebookSyncInfo.get(e.uri.toString())){if(n!==void 0)if(t!==void 0){let i=this.asNotebookDocumentChangeEvent(e,void 0,n,t);i!==void 0&&this.doSendChange(i,t).catch(()=>{})}else this.doSendClose(e,[]).catch(()=>{});else{if(t===void 0)return;this.doSendOpen(e,t).catch(()=>{})}}didChangeNotebookDocument(e){let t=e.notebook,n=this.notebookSyncInfo.get(t.uri.toString());if(n===void 0){if(e.contentChanges.length===0)return;let i=this.getMatchingCells(t);if(i===void 0)return;this.didOpen(t,i,n)}else{let i=this.getMatchingCells(t);if(i===void 0){this.didClose(t,n);return}let r=this.asNotebookDocumentChangeEvent(e.notebook,e,n,i);r!==void 0&&this.doSendChange(r,i).catch(()=>{})}}didSave(e){this.notebookSyncInfo.get(e.uri.toString())!==void 0&&this.doSendSave(e).catch(()=>{})}didClose(e,t=this.notebookSyncInfo.get(e.uri.toString())){if(t===void 0)return;let n=e.getCells().filter(i=>t.uris.has(i.document.uri.toString()));this.doSendClose(e,n).catch(()=>{})}async sendDidOpenNotebookDocument(e){let t=this.getMatchingCells(e);if(t!==void 0)return this.doSendOpen(e,t)}async doSendOpen(e,t){let n=async(r,a)=>{let c=Wt.c2p.asNotebookDocument(r,a,this.client.code2ProtocolConverter),u=a.map(l=>this.client.code2ProtocolConverter.asTextDocumentItem(l.document));try{await this.client.sendNotification(nt.DidOpenNotebookDocumentNotification.type,{notebookDocument:c,cellTextDocuments:u})}catch(l){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",l),l}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),Ci.create(t)),i?.didOpen!==void 0?i.didOpen(e,t,n):n(e,t)}async sendDidChangeNotebookDocument(e){return this.doSendChange(e,void 0)}async doSendChange(e,t=this.getMatchingCells(e.notebook)){let n=async r=>{try{await this.client.sendNotification(nt.DidChangeNotebookDocumentNotification.type,{notebookDocument:Wt.c2p.asVersionedNotebookDocumentIdentifier(r.notebook,this.client.code2ProtocolConverter),change:Wt.c2p.asNotebookDocumentChangeEvent(r,this.client.code2ProtocolConverter)})}catch(a){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",a),a}},i=this.client.middleware?.notebooks;return e.cells?.structure!==void 0&&this.notebookSyncInfo.set(e.notebook.uri.toString(),Ci.create(t??[])),i?.didChange!==void 0?i?.didChange(e,n):n(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){let t=async i=>{try{await this.client.sendNotification(nt.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(i.uri)}})}catch(r){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",r),r}},n=this.client.middleware?.notebooks;return n?.didSave!==void 0?n.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){return this.doSendClose(e,this.getMatchingCells(e)??[])}async doSendClose(e,t){let n=async(r,a)=>{try{await this.client.sendNotification(nt.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(r.uri)},cellTextDocuments:a.map(c=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(c.document))})}catch(c){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",c),c}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),i?.didClose!==void 0?i.didClose(e,t,n):n(e,t)}asNotebookDocumentChangeEvent(e,t,n,i){if(t!==void 0&&t.notebook!==e)throw new Error("Notebook must be identical");let r={notebook:e};t?.metadata!==void 0&&(r.metadata=Wt.c2p.asMetadata(t.metadata));let a;if(t?.cellChanges!==void 0&&t.cellChanges.length>0){let c=[];a=new Set(i.map(u=>u.document.uri.toString()));for(let u of t.cellChanges)a.has(u.cell.document.uri.toString())&&(u.executionSummary!==void 0||u.metadata!==void 0)&&c.push(u.cell);c.length>0&&(r.cells=r.cells??{},r.cells.data=c)}if((t?.contentChanges!==void 0&&t.contentChanges.length>0||t===void 0)&&n!==void 0&&i!==void 0){let c=n.cells,u=i,l=qs.computeDiff(c,u,!1),g,h;if(l!==void 0){g=l.cells===void 0?new Map:new Map(l.cells.map(p=>[p.document.uri.toString(),p])),h=l.deleteCount===0?new Map:new Map(c.slice(l.start,l.start+l.deleteCount).map(p=>[p.document.uri.toString(),p]));for(let p of Array.from(h.keys()))g.has(p)&&(h.delete(p),g.delete(p));r.cells=r.cells??{};let f=[],v=[];if(g.size>0||h.size>0){for(let p of g.values())f.push(p);for(let p of h.values())v.push(p)}r.cells.structure={array:l,didOpen:f,didClose:v}}}return Object.keys(r).length>1?r:void 0}getMatchingCells(e,t=e.getCells()){if(this.options.notebookSelector!==void 0){for(let n of this.options.notebookSelector)if(n.notebook===void 0||Is.matchNotebook(n.notebook,e)){let i=this.filterCells(e,t,n.cells);return i.length===0?void 0:i}}}cellMatches(e,t){let n=this.getMatchingCells(e,[t]);return n!==void 0&&n[0]===t}filterCells(e,t,n){let i=n!==void 0?t.filter(r=>{let a=r.document.languageId;return n.some(c=>c.language==="*"||a===c.language)}):t;return typeof this.client.clientOptions.notebookDocumentOptions?.filterCells=="function"?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}},wi=class s{constructor(e){this.client=e,this.registrations=new Map,this.registrationType=nt.NotebookDocumentSyncRegistrationType.type,De.workspace.onDidOpenTextDocument(t=>{if(t.uri.scheme!==s.CellScheme)return;let[n,i]=this.findNotebookDocumentAndCell(t);if(!(n===void 0||i===void 0))for(let r of this.registrations.values())r instanceof jt&&r.didOpenNotebookCellTextDocument(n,i)}),De.workspace.onDidChangeTextDocument(t=>{if(t.contentChanges.length===0)return;let n=t.document;if(n.uri.scheme!==s.CellScheme)return;let[i]=this.findNotebookDocumentAndCell(n);if(i!==void 0)for(let r of this.registrations.values())r instanceof jt&&r.didChangeNotebookCellTextDocument(i,t)}),De.workspace.onDidCloseTextDocument(t=>{if(t.uri.scheme!==s.CellScheme)return;let[n,i]=this.findNotebookDocumentAndCell(t);if(!(n===void 0||i===void 0))for(let r of this.registrations.values())r instanceof jt&&r.didCloseNotebookCellTextDocument(n,i)})}getState(){if(this.registrations.size===0)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(let e of this.registrations.values()){let t=e.getState();if(t.kind==="document"&&t.registrations===!0&&t.matches===!0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}fillClientCapabilities(e){let t=hc(hc(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){let t=e.notebookDocumentSync;t!==void 0&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(yi.asDocumentSelector(t)))}initialize(e){let t=e.notebookDocumentSync;if(t===void 0)return;let n=t.id??Ku.generateUuid();this.register({id:n,registerOptions:t})}register(e){let t=new jt(this.client,e.registerOptions);this.registrations.set(e.id,t)}unregister(e){let t=this.registrations.get(e);t&&t.dispose()}clear(){for(let e of this.registrations.values())e.dispose();this.registrations.clear()}handles(e){if(e.uri.scheme!==s.CellScheme)return!1;if(this.dedicatedChannel!==void 0&&De.languages.match(this.dedicatedChannel,e)>0)return!0;for(let t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(let t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){let t=e.uri.toString();for(let n of De.workspace.notebookDocuments)for(let i of n.getCells())if(i.document.uri.toString()===t)return[n,i];return[void 0,void 0]}};Di.NotebookDocumentSyncFeature=wi;wi.CellScheme="vscode-notebook-cell"});var vc=F(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.SyncConfigurationFeature=mt.toJSONObject=mt.ConfigurationFeature=void 0;var zt=I("vscode"),gn=L(),Nu=Ee(),Hu=te(),mc=W(),Es=class{constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(gn.ConfigurationRequest.type,(t,n)=>{let i=a=>{let c=[];for(let u of a.items){let l=u.scopeUri!==void 0&&u.scopeUri!==null?this._client.protocol2CodeConverter.asUri(u.scopeUri):void 0;c.push(this.getConfiguration(l,u.section!==null?u.section:void 0))}return c},r=e.middleware.workspace;return r&&r.configuration?r.configuration(t,n,i):i(t,n)})}getConfiguration(e,t){let n=null;if(t){let i=t.lastIndexOf(".");if(i===-1)n=kt(zt.workspace.getConfiguration(void 0,e).get(t));else{let r=zt.workspace.getConfiguration(t.substr(0,i),e);r&&(n=kt(r.get(t.substr(i+1))))}}else{let i=zt.workspace.getConfiguration(void 0,e);n={};for(let r of Object.keys(i))i.has(r)&&(n[r]=kt(i.get(r)))}return n===void 0&&(n=null),n}clear(){}};mt.ConfigurationFeature=Es;function kt(s){if(s){if(Array.isArray(s))return s.map(kt);if(typeof s=="object"){let e=Object.create(null);for(let t in s)Object.prototype.hasOwnProperty.call(s,t)&&(e[t]=kt(s[t]));return e}}return s}mt.toJSONObject=kt;var Ms=class{constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return gn.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,mc.ensure)((0,mc.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;e!==void 0&&this.register({id:Hu.generateUuid(),registerOptions:{section:e}})}register(e){let t=zt.workspace.onDidChangeConfiguration(n=>{this.onDidChangeConfiguration(e.registerOptions.section,n)});this._listeners.set(e.id,t),e.registerOptions.section!==void 0&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let n;if(Nu.string(e)?n=[e]:n=e,n!==void 0&&t!==void 0&&!n.some(c=>t.affectsConfiguration(c)))return;let i=async a=>a===void 0?this._client.sendNotification(gn.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(gn.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(a)}),r=this._client.middleware.workspace?.didChangeConfiguration;(r?r(n,i):i(n)).catch(a=>{this._client.error(`Sending notification ${gn.DidChangeConfigurationNotification.type.method} failed`,a)})}extractSettingsInformation(e){function t(r,a){let c=r;for(let u=0;u<a.length-1;u++){let l=c[a[u]];l||(l=Object.create(null),c[a[u]]=l),c=l}return c}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let r=0;r<e.length;r++){let a=e[r],c=a.indexOf("."),u=null;if(c>=0?u=zt.workspace.getConfiguration(a.substr(0,c),n).get(a.substr(c+1)):u=zt.workspace.getConfiguration(void 0,n).get(a),u){let l=e[r].split(".");t(i,l)[l[l.length-1]]=kt(u)}}return i}};mt.SyncConfigurationFeature=Ms});var yc=F(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.DidSaveTextDocumentFeature=_e.WillSaveWaitUntilFeature=_e.WillSaveFeature=_e.DidChangeTextDocumentFeature=_e.DidCloseTextDocumentFeature=_e.DidOpenTextDocumentFeature=void 0;var Re=I("vscode"),X=L(),ie=W(),Vt=te(),Os=class extends ie.TextDocumentEventFeature{constructor(e,t){super(e,Re.workspace.onDidOpenTextDocument,X.DidOpenTextDocumentNotification.type,()=>e.middleware.didOpen,n=>e.code2ProtocolConverter.asOpenTextDocumentParams(n),n=>n,ie.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,ie.ensure)((0,ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:Vt.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return X.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);Re.workspace.textDocuments.forEach(n=>{let i=n.uri.toString();if(!this._syncedDocuments.has(i)&&Re.languages.match(t,n)>0&&!this._client.hasDedicatedTextSynchronizationFeature(n)){let r=this._client.middleware,a=c=>this._client.sendNotification(this._type,this._createParams(c));(r.didOpen?r.didOpen(n,a):a(n)).catch(c=>{this._client.error(`Sending document notification ${this._type.method} failed`,c)}),this._syncedDocuments.set(i,n)}})}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,n)}};_e.DidOpenTextDocumentFeature=Os;var As=class extends ie.TextDocumentEventFeature{constructor(e,t,n){super(e,Re.workspace.onDidCloseTextDocument,X.DidCloseTextDocumentNotification.type,()=>e.middleware.didClose,i=>e.code2ProtocolConverter.asCloseTextDocumentParams(i),i=>i,ie.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=n}get registrationType(){return X.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,ie.ensure)((0,ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:Vt.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,n)}unregister(e){let t=this._selectors.get(e);super.unregister(e);let n=this._selectors.values();this._syncedDocuments.forEach(i=>{if(Re.languages.match(t,i)>0&&!this._selectorFilter(n,i)&&!this._client.hasDedicatedTextSynchronizationFeature(i)){let r=this._client.middleware,a=c=>this._client.sendNotification(this._type,this._createParams(c));this._syncedDocuments.delete(i.uri.toString()),(r.didClose?r.didClose(i,a):a(i)).catch(c=>{this._client.error(`Sending document notification ${this._type.method} failed`,c)})}})}};_e.DidCloseTextDocumentFeature=As;var Ls=class extends ie.DynamicDocumentFeature{constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new Re.EventEmitter,this._onPendingChangeAdded=new Re.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=X.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return X.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,ie.ensure)((0,ie.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.change!==void 0&&n.change!==X.TextDocumentSyncKind.None&&this.register({id:Vt.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Re.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(let e of this._changeData.values())yield e.documentSelector}async callback(e){if(e.contentChanges.length===0)return;let t=e.document.uri,n=e.document.version,i=[];for(let r of this._changeData.values())if(Re.languages.match(r.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let a=this._client.middleware;if(r.syncKind===X.TextDocumentSyncKind.Incremental){let c=async u=>{let l=this._client.code2ProtocolConverter.asChangeTextDocumentParams(u,t,n);await this._client.sendNotification(X.DidChangeTextDocumentNotification.type,l),this.notificationSent(u.document,X.DidChangeTextDocumentNotification.type,l)};i.push(a.didChange?a.didChange(e,u=>c(u)):c(e))}else if(r.syncKind===X.TextDocumentSyncKind.Full){let c=async u=>{let l=u.document.uri.toString();this._pendingTextDocumentChanges.set(l,u.document),this._onPendingChangeAdded.fire()};i.push(a.didChange?a.didChange(e,u=>c(u)):c(e))}}return Promise.all(i).then(void 0,r=>{throw this._client.error(`Sending document notification ${X.DidChangeTextDocumentNotification.type.method} failed`,r),r})}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){if(this._changeData.delete(e),this._changeData.size===0)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=X.TextDocumentSyncKind.None;else{this._syncKind=X.TextDocumentSyncKind.None;for(let t of this._changeData.values())if(this.updateSyncKind(t.syncKind),this._syncKind===X.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=X.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(this._pendingTextDocumentChanges.size===0)return[];let t;if(e.size===0)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(let n of this._pendingTextDocumentChanges)e.has(n[0])||(t.push(n[1]),this._pendingTextDocumentChanges.delete(n[0]))}return t}getProvider(e){for(let t of this._changeData.values())if(Re.languages.match(t.documentSelector,e)>0)return{send:n=>this.callback(n)}}updateSyncKind(e){if(this._syncKind!==X.TextDocumentSyncKind.Full)switch(e){case X.TextDocumentSyncKind.Full:this._syncKind=e;break;case X.TextDocumentSyncKind.Incremental:this._syncKind===X.TextDocumentSyncKind.None&&(this._syncKind=X.TextDocumentSyncKind.Incremental);break}}};_e.DidChangeTextDocumentFeature=Ls;var Us=class extends ie.TextDocumentEventFeature{constructor(e){super(e,Re.workspace.onWillSaveTextDocument,X.WillSaveTextDocumentNotification.type,()=>e.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),t=>t.document,(t,n)=>ie.TextDocumentEventFeature.textDocumentFilter(t,n.document))}get registrationType(){return X.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let t=(0,ie.ensure)((0,ie.ensure)(e,"textDocument"),"synchronization");t.willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:Vt.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}};_e.WillSaveFeature=Us;var Ks=class extends ie.DynamicDocumentFeature{constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return X.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let t=(0,ie.ensure)((0,ie.ensure)(e,"textDocument"),"synchronization");t.willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:Vt.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=Re.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(ie.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,n=i=>this._client.sendRequest(X.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(i)).then(async r=>{let a=await this._client.protocol2CodeConverter.asTextEdits(r);return a===void 0?[]:a});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}};_e.WillSaveWaitUntilFeature=Ks;var Ns=class extends ie.TextDocumentEventFeature{constructor(e){super(e,Re.workspace.onDidSaveTextDocument,X.DidSaveTextDocumentNotification.type,()=>e.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),t=>t,ie.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return X.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,ie.ensure)((0,ie.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;if(t&&n&&n.save){let i=typeof n.save=="boolean"?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:Vt.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},i)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}};_e.DidSaveTextDocumentFeature=Ns});var Cc=F(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.CompletionItemFeature=void 0;var $u=I("vscode"),H=L(),Hs=W(),Wu=te(),ju=[H.CompletionItemKind.Text,H.CompletionItemKind.Method,H.CompletionItemKind.Function,H.CompletionItemKind.Constructor,H.CompletionItemKind.Field,H.CompletionItemKind.Variable,H.CompletionItemKind.Class,H.CompletionItemKind.Interface,H.CompletionItemKind.Module,H.CompletionItemKind.Property,H.CompletionItemKind.Unit,H.CompletionItemKind.Value,H.CompletionItemKind.Enum,H.CompletionItemKind.Keyword,H.CompletionItemKind.Snippet,H.CompletionItemKind.Color,H.CompletionItemKind.File,H.CompletionItemKind.Reference,H.CompletionItemKind.Folder,H.CompletionItemKind.EnumMember,H.CompletionItemKind.Constant,H.CompletionItemKind.Struct,H.CompletionItemKind.Event,H.CompletionItemKind.Operator,H.CompletionItemKind.TypeParameter],$s=class extends Hs.TextDocumentLanguageFeature{constructor(e){super(e,H.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let t=(0,Hs.ensure)((0,Hs.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[H.MarkupKind.Markdown,H.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[H.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[H.InsertTextMode.asIs,H.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=H.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:ju},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]}}initialize(e,t){let n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:Wu.generateUuid(),registerOptions:n})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);let n=e.triggerCharacters??[],i=e.allCommitCharacters,r=e.documentSelector,a={provideCompletionItems:(c,u,l,g)=>{let h=this._client,f=this._client.middleware,v=(p,C,y,b)=>h.sendRequest(H.CompletionRequest.type,h.code2ProtocolConverter.asCompletionParams(p,C,y),b).then(T=>b.isCancellationRequested?null:h.protocol2CodeConverter.asCompletionResult(T,i,b),T=>h.handleFailedRequest(H.CompletionRequest.type,b,T,null));return f.provideCompletionItem?f.provideCompletionItem(c,u,g,l,v):v(c,u,g,l)},resolveCompletionItem:e.resolveProvider?(c,u)=>{let l=this._client,g=this._client.middleware,h=(f,v)=>l.sendRequest(H.CompletionResolveRequest.type,l.code2ProtocolConverter.asCompletionItem(f,!!this.labelDetailsSupport.get(t)),v).then(p=>v.isCancellationRequested?null:l.protocol2CodeConverter.asCompletionItem(p),p=>l.handleFailedRequest(H.CompletionResolveRequest.type,v,p,f));return g.resolveCompletionItem?g.resolveCompletionItem(c,u,h):h(c,u)}:void 0};return[$u.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(r),a,...n),a]}};Si.CompletionItemFeature=$s});var wc=F(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.HoverFeature=void 0;var zu=I("vscode"),mn=L(),Ws=W(),Vu=te(),js=class extends Ws.TextDocumentLanguageFeature{constructor(e){super(e,mn.HoverRequest.type)}fillClientCapabilities(e){let t=(0,Ws.ensure)((0,Ws.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[mn.MarkupKind.Markdown,mn.MarkupKind.PlainText]}initialize(e,t){let n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:Vu.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideHover:(i,r,a)=>{let c=this._client,u=(g,h,f)=>c.sendRequest(mn.HoverRequest.type,c.code2ProtocolConverter.asTextDocumentPositionParams(g,h),f).then(v=>f.isCancellationRequested?null:c.protocol2CodeConverter.asHover(v),v=>c.handleFailedRequest(mn.HoverRequest.type,f,v,null)),l=c.middleware;return l.provideHover?l.provideHover(i,r,a,u):u(i,r,a)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return zu.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};_i.HoverFeature=js});var Dc=F(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.DefinitionFeature=void 0;var Bu=I("vscode"),zs=L(),Vs=W(),Ju=te(),Bs=class extends Vs.TextDocumentLanguageFeature{constructor(e){super(e,zs.DefinitionRequest.type)}fillClientCapabilities(e){let t=(0,Vs.ensure)((0,Vs.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:Ju.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideDefinition:(i,r,a)=>{let c=this._client,u=(g,h,f)=>c.sendRequest(zs.DefinitionRequest.type,c.code2ProtocolConverter.asTextDocumentPositionParams(g,h),f).then(v=>f.isCancellationRequested?null:c.protocol2CodeConverter.asDefinitionResult(v,f),v=>c.handleFailedRequest(zs.DefinitionRequest.type,f,v,null)),l=c.middleware;return l.provideDefinition?l.provideDefinition(i,r,a,u):u(i,r,a)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return Bu.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};bi.DefinitionFeature=Bs});var _c=F(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.SignatureHelpFeature=void 0;var Sc=I("vscode"),vn=L(),Js=W(),Qu=te(),Qs=class extends Js.TextDocumentLanguageFeature{constructor(e){super(e,vn.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=(0,Js.ensure)((0,Js.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[vn.MarkupKind.Markdown,vn.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:Qu.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t={provideSignatureHelp:(n,i,r,a)=>{let c=this._client,u=(g,h,f,v)=>c.sendRequest(vn.SignatureHelpRequest.type,c.code2ProtocolConverter.asSignatureHelpParams(g,h,f),v).then(p=>v.isCancellationRequested?null:c.protocol2CodeConverter.asSignatureHelp(p,v),p=>c.handleFailedRequest(vn.SignatureHelpRequest.type,v,p,null)),l=c.middleware;return l.provideSignatureHelp?l.provideSignatureHelp(n,i,a,r,u):u(n,i,a,r)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){let n=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(e.retriggerCharacters===void 0){let i=e.triggerCharacters||[];return Sc.languages.registerSignatureHelpProvider(n,t,...i)}else{let i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return Sc.languages.registerSignatureHelpProvider(n,t,i)}}};Ti.SignatureHelpFeature=Qs});var bc=F(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.DocumentHighlightFeature=void 0;var Gu=I("vscode"),Gs=L(),Ys=W(),Yu=te(),Xs=class extends Ys.TextDocumentLanguageFeature{constructor(e){super(e,Gs.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,Ys.ensure)((0,Ys.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:Yu.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideDocumentHighlights:(i,r,a)=>{let c=this._client,u=(g,h,f)=>c.sendRequest(Gs.DocumentHighlightRequest.type,c.code2ProtocolConverter.asTextDocumentPositionParams(g,h),f).then(v=>f.isCancellationRequested?null:c.protocol2CodeConverter.asDocumentHighlights(v,f),v=>c.handleFailedRequest(Gs.DocumentHighlightRequest.type,f,v,null)),l=c.middleware;return l.provideDocumentHighlights?l.provideDocumentHighlights(i,r,a,u):u(i,r,a)}};return[Gu.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}};ki.DocumentHighlightFeature=Xs});var to=F(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.DocumentSymbolFeature=Ge.SupportedSymbolTags=Ge.SupportedSymbolKinds=void 0;var Xu=I("vscode"),z=L(),Zs=W(),Zu=te();Ge.SupportedSymbolKinds=[z.SymbolKind.File,z.SymbolKind.Module,z.SymbolKind.Namespace,z.SymbolKind.Package,z.SymbolKind.Class,z.SymbolKind.Method,z.SymbolKind.Property,z.SymbolKind.Field,z.SymbolKind.Constructor,z.SymbolKind.Enum,z.SymbolKind.Interface,z.SymbolKind.Function,z.SymbolKind.Variable,z.SymbolKind.Constant,z.SymbolKind.String,z.SymbolKind.Number,z.SymbolKind.Boolean,z.SymbolKind.Array,z.SymbolKind.Object,z.SymbolKind.Key,z.SymbolKind.Null,z.SymbolKind.EnumMember,z.SymbolKind.Struct,z.SymbolKind.Event,z.SymbolKind.Operator,z.SymbolKind.TypeParameter];Ge.SupportedSymbolTags=[z.SymbolTag.Deprecated];var eo=class extends Zs.TextDocumentLanguageFeature{constructor(e){super(e,z.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=(0,Zs.ensure)((0,Zs.ensure)(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:Ge.SupportedSymbolKinds},t.hierarchicalDocumentSymbolSupport=!0,t.tagSupport={valueSet:Ge.SupportedSymbolTags},t.labelSupport=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:Zu.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideDocumentSymbols:(r,a)=>{let c=this._client,u=async(g,h)=>{try{let f=await c.sendRequest(z.DocumentSymbolRequest.type,c.code2ProtocolConverter.asDocumentSymbolParams(g),h);if(h.isCancellationRequested||f===void 0||f===null)return null;if(f.length===0)return[];{let v=f[0];return z.DocumentSymbol.is(v)?await c.protocol2CodeConverter.asDocumentSymbols(f,h):await c.protocol2CodeConverter.asSymbolInformations(f,h)}}catch(f){return c.handleFailedRequest(z.DocumentSymbolRequest.type,h,f,null)}},l=c.middleware;return l.provideDocumentSymbols?l.provideDocumentSymbols(r,a,u):u(r,a)}},i=e.label!==void 0?{label:e.label}:void 0;return[Xu.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,i),n]}};Ge.DocumentSymbolFeature=eo});var kc=F(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.WorkspaceSymbolFeature=void 0;var el=I("vscode"),yn=L(),no=W(),Tc=to(),tl=te(),io=class extends no.WorkspaceFeature{constructor(e){super(e,yn.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=(0,no.ensure)((0,no.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:Tc.SupportedSymbolKinds},t.tagSupport={valueSet:Tc.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:tl.generateUuid(),registerOptions:e.workspaceSymbolProvider===!0?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){let t={provideWorkspaceSymbols:(n,i)=>{let r=this._client,a=(u,l)=>r.sendRequest(yn.WorkspaceSymbolRequest.type,{query:u},l).then(g=>l.isCancellationRequested?null:r.protocol2CodeConverter.asSymbolInformations(g,l),g=>r.handleFailedRequest(yn.WorkspaceSymbolRequest.type,l,g,null)),c=r.middleware;return c.provideWorkspaceSymbols?c.provideWorkspaceSymbols(n,i,a):a(n,i)},resolveWorkspaceSymbol:e.resolveProvider===!0?(n,i)=>{let r=this._client,a=(u,l)=>r.sendRequest(yn.WorkspaceSymbolResolveRequest.type,r.code2ProtocolConverter.asWorkspaceSymbol(u),l).then(g=>l.isCancellationRequested?null:r.protocol2CodeConverter.asSymbolInformation(g),g=>r.handleFailedRequest(yn.WorkspaceSymbolResolveRequest.type,l,g,null)),c=r.middleware;return c.resolveWorkspaceSymbol?c.resolveWorkspaceSymbol(n,i,a):a(n,i)}:void 0};return[el.languages.registerWorkspaceSymbolProvider(t),t]}};Pi.WorkspaceSymbolFeature=io});var Pc=F(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.ReferencesFeature=void 0;var nl=I("vscode"),ro=L(),so=W(),il=te(),oo=class extends so.TextDocumentLanguageFeature{constructor(e){super(e,ro.ReferencesRequest.type)}fillClientCapabilities(e){(0,so.ensure)((0,so.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:il.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideReferences:(i,r,a,c)=>{let u=this._client,l=(h,f,v,p)=>u.sendRequest(ro.ReferencesRequest.type,u.code2ProtocolConverter.asReferenceParams(h,f,v),p).then(C=>p.isCancellationRequested?null:u.protocol2CodeConverter.asReferences(C,p),C=>u.handleFailedRequest(ro.ReferencesRequest.type,p,C,null)),g=u.middleware;return g.provideReferences?g.provideReferences(i,r,a,c,l):l(i,r,a,c)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return nl.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Ri.ReferencesFeature=oo});var Rc=F(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.CodeActionFeature=void 0;var rl=I("vscode"),xe=L(),sl=te(),ao=W(),co=class extends ao.TextDocumentLanguageFeature{constructor(e){super(e,xe.CodeActionRequest.type)}fillClientCapabilities(e){let t=(0,ao.ensure)((0,ao.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[xe.CodeActionKind.Empty,xe.CodeActionKind.QuickFix,xe.CodeActionKind.Refactor,xe.CodeActionKind.RefactorExtract,xe.CodeActionKind.RefactorInline,xe.CodeActionKind.RefactorRewrite,xe.CodeActionKind.Source,xe.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:sl.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideCodeActions:(i,r,a,c)=>{let u=this._client,l=async(h,f,v,p)=>{let C={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),range:u.code2ProtocolConverter.asRange(f),context:u.code2ProtocolConverter.asCodeActionContextSync(v)};return u.sendRequest(xe.CodeActionRequest.type,C,p).then(y=>p.isCancellationRequested||y===null||y===void 0?null:u.protocol2CodeConverter.asCodeActionResult(y,p),y=>u.handleFailedRequest(xe.CodeActionRequest.type,p,y,null))},g=u.middleware;return g.provideCodeActions?g.provideCodeActions(i,r,a,c,l):l(i,r,a,c)},resolveCodeAction:e.resolveProvider?(i,r)=>{let a=this._client,c=this._client.middleware,u=async(l,g)=>a.sendRequest(xe.CodeActionResolveRequest.type,a.code2ProtocolConverter.asCodeActionSync(l),g).then(h=>g.isCancellationRequested?l:a.protocol2CodeConverter.asCodeAction(h,g),h=>a.handleFailedRequest(xe.CodeActionResolveRequest.type,g,h,l));return c.resolveCodeAction?c.resolveCodeAction(i,r,u):u(i,r)}:void 0};return[rl.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),n]}};xi.CodeActionFeature=co});var Fc=F(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.CodeLensFeature=void 0;var xc=I("vscode"),Bt=L(),ol=te(),Cn=W(),uo=class extends Cn.TextDocumentLanguageFeature{constructor(e){super(e,Bt.CodeLensRequest.type)}fillClientCapabilities(e){(0,Cn.ensure)((0,Cn.ensure)(e,"textDocument"),"codeLens").dynamicRegistration=!0,(0,Cn.ensure)((0,Cn.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(Bt.CodeLensRefreshRequest.type,async()=>{for(let r of this.getAllProviders())r.onDidChangeCodeLensEmitter.fire()});let i=this.getRegistrationOptions(t,e.codeLensProvider);i&&this.register({id:ol.generateUuid(),registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n=new xc.EventEmitter,i={onDidChangeCodeLenses:n.event,provideCodeLenses:(r,a)=>{let c=this._client,u=(g,h)=>c.sendRequest(Bt.CodeLensRequest.type,c.code2ProtocolConverter.asCodeLensParams(g),h).then(f=>h.isCancellationRequested?null:c.protocol2CodeConverter.asCodeLenses(f,h),f=>c.handleFailedRequest(Bt.CodeLensRequest.type,h,f,null)),l=c.middleware;return l.provideCodeLenses?l.provideCodeLenses(r,a,u):u(r,a)},resolveCodeLens:e.resolveProvider?(r,a)=>{let c=this._client,u=(g,h)=>c.sendRequest(Bt.CodeLensResolveRequest.type,c.code2ProtocolConverter.asCodeLens(g),h).then(f=>h.isCancellationRequested?g:c.protocol2CodeConverter.asCodeLens(f),f=>c.handleFailedRequest(Bt.CodeLensResolveRequest.type,h,f,g)),l=c.middleware;return l.resolveCodeLens?l.resolveCodeLens(r,a,u):u(r,a)}:void 0};return[xc.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeCodeLensEmitter:n}]}};Fi.CodeLensFeature=uo});var qc=F(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.DocumentOnTypeFormattingFeature=vt.DocumentRangeFormattingFeature=vt.DocumentFormattingFeature=void 0;var qi=I("vscode"),$e=L(),ho=te(),it=W(),Jt;(function(s){function e(t){let n=qi.workspace.getConfiguration("files",t);return{trimTrailingWhitespace:n.get("trimTrailingWhitespace"),trimFinalNewlines:n.get("trimFinalNewlines"),insertFinalNewline:n.get("insertFinalNewline")}}s.fromConfiguration=e})(Jt||(Jt={}));var lo=class extends it.TextDocumentLanguageFeature{constructor(e){super(e,$e.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,it.ensure)((0,it.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:ho.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideDocumentFormattingEdits:(i,r,a)=>{let c=this._client,u=(g,h,f)=>{let v={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(g),options:c.code2ProtocolConverter.asFormattingOptions(h,Jt.fromConfiguration(g))};return c.sendRequest($e.DocumentFormattingRequest.type,v,f).then(p=>f.isCancellationRequested?null:c.protocol2CodeConverter.asTextEdits(p,f),p=>c.handleFailedRequest($e.DocumentFormattingRequest.type,f,p,null))},l=c.middleware;return l.provideDocumentFormattingEdits?l.provideDocumentFormattingEdits(i,r,a,u):u(i,r,a)}};return[qi.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}};vt.DocumentFormattingFeature=lo;var po=class extends it.TextDocumentLanguageFeature{constructor(e){super(e,$e.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){let t=(0,it.ensure)((0,it.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:ho.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideDocumentRangeFormattingEdits:(i,r,a,c)=>{let u=this._client,l=(h,f,v,p)=>{let C={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),range:u.code2ProtocolConverter.asRange(f),options:u.code2ProtocolConverter.asFormattingOptions(v,Jt.fromConfiguration(h))};return u.sendRequest($e.DocumentRangeFormattingRequest.type,C,p).then(y=>p.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(y,p),y=>u.handleFailedRequest($e.DocumentRangeFormattingRequest.type,p,y,null))},g=u.middleware;return g.provideDocumentRangeFormattingEdits?g.provideDocumentRangeFormattingEdits(i,r,a,c,l):l(i,r,a,c)}};return e.rangesSupport&&(n.provideDocumentRangesFormattingEdits=(i,r,a,c)=>{let u=this._client,l=(h,f,v,p)=>{let C={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),ranges:u.code2ProtocolConverter.asRanges(f),options:u.code2ProtocolConverter.asFormattingOptions(v,Jt.fromConfiguration(h))};return u.sendRequest($e.DocumentRangesFormattingRequest.type,C,p).then(y=>p.isCancellationRequested?null:u.protocol2CodeConverter.asTextEdits(y,p),y=>u.handleFailedRequest($e.DocumentRangesFormattingRequest.type,p,y,null))},g=u.middleware;return g.provideDocumentRangesFormattingEdits?g.provideDocumentRangesFormattingEdits(i,r,a,c,l):l(i,r,a,c)}),[qi.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}};vt.DocumentRangeFormattingFeature=po;var fo=class extends it.TextDocumentLanguageFeature{constructor(e){super(e,$e.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,it.ensure)((0,it.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:ho.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideOnTypeFormattingEdits:(r,a,c,u,l)=>{let g=this._client,h=(v,p,C,y,b)=>{let T={textDocument:g.code2ProtocolConverter.asTextDocumentIdentifier(v),position:g.code2ProtocolConverter.asPosition(p),ch:C,options:g.code2ProtocolConverter.asFormattingOptions(y,Jt.fromConfiguration(v))};return g.sendRequest($e.DocumentOnTypeFormattingRequest.type,T,b).then(P=>b.isCancellationRequested?null:g.protocol2CodeConverter.asTextEdits(P,b),P=>g.handleFailedRequest($e.DocumentOnTypeFormattingRequest.type,b,P,null))},f=g.middleware;return f.provideOnTypeFormattingEdits?f.provideOnTypeFormattingEdits(r,a,c,u,l,h):h(r,a,c,u,l)}},i=e.moreTriggerCharacter||[];return[qi.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.firstTriggerCharacter,...i),n]}};vt.DocumentOnTypeFormattingFeature=fo});var Ec=F(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.RenameFeature=void 0;var al=I("vscode"),Pt=L(),cl=te(),Ic=Ee(),go=W(),mo=class extends go.TextDocumentLanguageFeature{constructor(e){super(e,Pt.RenameRequest.type)}fillClientCapabilities(e){let t=(0,go.ensure)((0,go.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=Pt.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.renameProvider);n&&(Ic.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:cl.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){let t=e.documentSelector,n={provideRenameEdits:(i,r,a,c)=>{let u=this._client,l=(h,f,v,p)=>{let C={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),position:u.code2ProtocolConverter.asPosition(f),newName:v};return u.sendRequest(Pt.RenameRequest.type,C,p).then(y=>p.isCancellationRequested?null:u.protocol2CodeConverter.asWorkspaceEdit(y,p),y=>u.handleFailedRequest(Pt.RenameRequest.type,p,y,null,!1))},g=u.middleware;return g.provideRenameEdits?g.provideRenameEdits(i,r,a,c,l):l(i,r,a,c)},prepareRename:e.prepareProvider?(i,r,a)=>{let c=this._client,u=(g,h,f)=>{let v={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(g),position:c.code2ProtocolConverter.asPosition(h)};return c.sendRequest(Pt.PrepareRenameRequest.type,v,f).then(p=>f.isCancellationRequested?null:Pt.Range.is(p)?c.protocol2CodeConverter.asRange(p):this.isDefaultBehavior(p)?p.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):p&&Pt.Range.is(p.range)?{range:c.protocol2CodeConverter.asRange(p.range),placeholder:p.placeholder}:Promise.reject(new Error("The element can't be renamed.")),p=>{throw typeof p.message=="string"?new Error(p.message):new Error("The element can't be renamed.")})},l=c.middleware;return l.prepareRename?l.prepareRename(i,r,a,u):u(i,r,a)}:void 0};return[this.registerProvider(t,n),n]}registerProvider(e,t){return al.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){let t=e;return t&&Ic.boolean(t.defaultBehavior)}};Ii.RenameFeature=mo});var Mc=F(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.DocumentLinkFeature=void 0;var dl=I("vscode"),wn=L(),vo=W(),ul=te(),yo=class extends vo.TextDocumentLanguageFeature{constructor(e){super(e,wn.DocumentLinkRequest.type)}fillClientCapabilities(e){let t=(0,vo.ensure)((0,vo.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:ul.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideDocumentLinks:(i,r)=>{let a=this._client,c=(l,g)=>a.sendRequest(wn.DocumentLinkRequest.type,a.code2ProtocolConverter.asDocumentLinkParams(l),g).then(h=>g.isCancellationRequested?null:a.protocol2CodeConverter.asDocumentLinks(h,g),h=>a.handleFailedRequest(wn.DocumentLinkRequest.type,g,h,null)),u=a.middleware;return u.provideDocumentLinks?u.provideDocumentLinks(i,r,c):c(i,r)},resolveDocumentLink:e.resolveProvider?(i,r)=>{let a=this._client,c=(l,g)=>a.sendRequest(wn.DocumentLinkResolveRequest.type,a.code2ProtocolConverter.asDocumentLink(l),g).then(h=>g.isCancellationRequested?l:a.protocol2CodeConverter.asDocumentLink(h),h=>a.handleFailedRequest(wn.DocumentLinkResolveRequest.type,g,h,l)),u=a.middleware;return u.resolveDocumentLink?u.resolveDocumentLink(i,r,c):c(i,r)}:void 0};return[dl.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}};Ei.DocumentLinkFeature=yo});var Ac=F(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.ExecuteCommandFeature=void 0;var ll=I("vscode"),Co=L(),pl=te(),Oc=W(),wo=class{constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return Co.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,Oc.ensure)((0,Oc.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:pl.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let t=this._client,n=t.middleware,i=(r,a)=>{let c={command:r,arguments:a};return t.sendRequest(Co.ExecuteCommandRequest.type,c).then(void 0,u=>t.handleFailedRequest(Co.ExecuteCommandRequest.type,void 0,u,void 0))};if(e.registerOptions.commands){let r=[];for(let a of e.registerOptions.commands)r.push(ll.commands.registerCommand(a,(...c)=>n.executeCommand?n.executeCommand(a,c,i):i(a,c)));this._commands.set(e.id,r)}}unregister(e){let t=this._commands.get(e);t&&t.forEach(n=>n.dispose())}clear(){this._commands.forEach(e=>{e.forEach(t=>t.dispose())}),this._commands.clear()}};Mi.ExecuteCommandFeature=wo});var Lc=F(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.FileSystemWatcherFeature=void 0;var fl=I("vscode"),Rt=L(),Oi=W(),Do=class{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return Rt.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,Oi.ensure)((0,Oi.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,Oi.ensure)((0,Oi.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let n of e.registerOptions.watchers){let i=this._client.protocol2CodeConverter.asGlobPattern(n.globPattern);if(i===void 0)continue;let r=!0,a=!0,c=!0;n.kind!==void 0&&n.kind!==null&&(r=(n.kind&Rt.WatchKind.Create)!==0,a=(n.kind&Rt.WatchKind.Change)!==0,c=(n.kind&Rt.WatchKind.Delete)!==0);let u=fl.workspace.createFileSystemWatcher(i,!r,!a,!c);this.hookListeners(u,r,a,c,t),t.push(u)}this._watchers.set(e.id,t)}registerRaw(e,t){let n=[];for(let i of t)this.hookListeners(i,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,i,r){t&&e.onDidCreate(a=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(a),type:Rt.FileChangeType.Created}),null,r),n&&e.onDidChange(a=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(a),type:Rt.FileChangeType.Changed}),null,r),i&&e.onDidDelete(a=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(a),type:Rt.FileChangeType.Deleted}),null,r)}unregister(e){let t=this._watchers.get(e);if(t)for(let n of t)n.dispose()}clear(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}};Ai.FileSystemWatcherFeature=Do});var Uc=F(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.ColorProviderFeature=void 0;var hl=I("vscode"),Dn=L(),So=W(),_o=class extends So.TextDocumentLanguageFeature{constructor(e){super(e,Dn.DocumentColorRequest.type)}fillClientCapabilities(e){(0,So.ensure)((0,So.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.colorProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n={provideColorPresentations:(i,r,a)=>{let c=this._client,u=(g,h,f)=>{let v={color:g,textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(h.document),range:c.code2ProtocolConverter.asRange(h.range)};return c.sendRequest(Dn.ColorPresentationRequest.type,v,f).then(p=>f.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(p,f),p=>c.handleFailedRequest(Dn.ColorPresentationRequest.type,f,p,null))},l=c.middleware;return l.provideColorPresentations?l.provideColorPresentations(i,r,a,u):u(i,r,a)},provideDocumentColors:(i,r)=>{let a=this._client,c=(l,g)=>{let h={textDocument:a.code2ProtocolConverter.asTextDocumentIdentifier(l)};return a.sendRequest(Dn.DocumentColorRequest.type,h,g).then(f=>g.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(f,g),f=>a.handleFailedRequest(Dn.DocumentColorRequest.type,g,f,null))},u=a.middleware;return u.provideDocumentColors?u.provideDocumentColors(i,r,c):c(i,r)}};return[hl.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}};Li.ColorProviderFeature=_o});var Kc=F(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.ImplementationFeature=void 0;var gl=I("vscode"),bo=L(),To=W(),ko=class extends To.TextDocumentLanguageFeature{constructor(e){super(e,bo.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,To.ensure)((0,To.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.implementationProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n={provideImplementation:(i,r,a)=>{let c=this._client,u=(g,h,f)=>c.sendRequest(bo.ImplementationRequest.type,c.code2ProtocolConverter.asTextDocumentPositionParams(g,h),f).then(v=>f.isCancellationRequested?null:c.protocol2CodeConverter.asDefinitionResult(v,f),v=>c.handleFailedRequest(bo.ImplementationRequest.type,f,v,null)),l=c.middleware;return l.provideImplementation?l.provideImplementation(i,r,a,u):u(i,r,a)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return gl.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Ui.ImplementationFeature=ko});var Nc=F(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.TypeDefinitionFeature=void 0;var ml=I("vscode"),Po=L(),Sn=W(),Ro=class extends Sn.TextDocumentLanguageFeature{constructor(e){super(e,Po.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,Sn.ensure)((0,Sn.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,Sn.ensure)((0,Sn.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.typeDefinitionProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n={provideTypeDefinition:(i,r,a)=>{let c=this._client,u=(g,h,f)=>c.sendRequest(Po.TypeDefinitionRequest.type,c.code2ProtocolConverter.asTextDocumentPositionParams(g,h),f).then(v=>f.isCancellationRequested?null:c.protocol2CodeConverter.asDefinitionResult(v,f),v=>c.handleFailedRequest(Po.TypeDefinitionRequest.type,f,v,null)),l=c.middleware;return l.provideTypeDefinition?l.provideTypeDefinition(i,r,a,u):u(i,r,a)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return ml.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Ki.TypeDefinitionFeature=Ro});var Hc=F(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.WorkspaceFoldersFeature=Qt.arrayDiff=void 0;var vl=te(),Ni=I("vscode"),_n=L();function xo(s,e){if(s!=null)return s[e]}function Fo(s,e){return s.filter(t=>e.indexOf(t)<0)}Qt.arrayDiff=Fo;var qo=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return _n.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=Ni.workspace.workspaceFolders;this.initializeWithFolders(t),t===void 0?e.workspaceFolders=null:e.workspaceFolders=t.map(n=>this.asProtocol(n))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(_n.WorkspaceFoldersRequest.type,r=>{let a=()=>{let u=Ni.workspace.workspaceFolders;return u===void 0?null:u.map(g=>this.asProtocol(g))},c=t.middleware.workspace;return c&&c.workspaceFolders?c.workspaceFolders(r,a):a(r)});let n=xo(xo(xo(e,"workspace"),"workspaceFolders"),"changeNotifications"),i;typeof n=="string"?i=n:n===!0&&(i=vl.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){let n=Fo(this._initialFolders,e),i=Fo(e,this._initialFolders);(i.length>0||n.length>0)&&(t=this.doSendEvent(i,n))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));t!==void 0&&t.catch(n=>{this._client.error(`Sending notification ${_n.DidChangeWorkspaceFoldersNotification.type.method} failed`,n)})}doSendEvent(e,t){let n={event:{added:e.map(i=>this.asProtocol(i)),removed:t.map(i=>this.asProtocol(i))}};return this._client.sendNotification(_n.DidChangeWorkspaceFoldersNotification.type,n)}register(e){let t=e.id,n=this._client,i=Ni.workspace.onDidChangeWorkspaceFolders(r=>{let a=l=>this.doSendEvent(l.added,l.removed),c=n.middleware.workspace;(c&&c.didChangeWorkspaceFolders?c.didChangeWorkspaceFolders(r,a):a(r)).catch(l=>{this._client.error(`Sending notification ${_n.DidChangeWorkspaceFoldersNotification.type.method} failed`,l)})});this._listeners.set(t,i),this.sendInitialEvent(Ni.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);t!==void 0&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return e===void 0?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}};Qt.WorkspaceFoldersFeature=qo});var Wc=F(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.FoldingRangeFeature=void 0;var $c=I("vscode"),xt=L(),bn=W(),Io=class extends bn.TextDocumentLanguageFeature{constructor(e){super(e,xt.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,bn.ensure)((0,bn.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[xt.FoldingRangeKind.Comment,xt.FoldingRangeKind.Imports,xt.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,bn.ensure)((0,bn.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(xt.FoldingRangeRefreshRequest.type,async()=>{for(let r of this.getAllProviders())r.onDidChangeFoldingRange.fire()});let[n,i]=this.getRegistration(t,e.foldingRangeProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n=new $c.EventEmitter,i={onDidChangeFoldingRanges:n.event,provideFoldingRanges:(r,a,c)=>{let u=this._client,l=(h,f,v)=>{let p={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h)};return u.sendRequest(xt.FoldingRangeRequest.type,p,v).then(C=>v.isCancellationRequested?null:u.protocol2CodeConverter.asFoldingRanges(C,v),C=>u.handleFailedRequest(xt.FoldingRangeRequest.type,v,C,null))},g=u.middleware;return g.provideFoldingRanges?g.provideFoldingRanges(r,a,c,l):l(r,a,c)}};return[$c.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeFoldingRange:n}]}};Hi.FoldingRangeFeature=Io});var jc=F($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.DeclarationFeature=void 0;var yl=I("vscode"),Eo=L(),Mo=W(),Oo=class extends Mo.TextDocumentLanguageFeature{constructor(e){super(e,Eo.DeclarationRequest.type)}fillClientCapabilities(e){let t=(0,Mo.ensure)((0,Mo.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.declarationProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n={provideDeclaration:(i,r,a)=>{let c=this._client,u=(g,h,f)=>c.sendRequest(Eo.DeclarationRequest.type,c.code2ProtocolConverter.asTextDocumentPositionParams(g,h),f).then(v=>f.isCancellationRequested?null:c.protocol2CodeConverter.asDeclarationResult(v,f),v=>c.handleFailedRequest(Eo.DeclarationRequest.type,f,v,null)),l=c.middleware;return l.provideDeclaration?l.provideDeclaration(i,r,a,u):u(i,r,a)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return yl.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};$i.DeclarationFeature=Oo});var zc=F(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.SelectionRangeFeature=void 0;var Cl=I("vscode"),Ao=L(),Lo=W(),Uo=class extends Lo.TextDocumentLanguageFeature{constructor(e){super(e,Ao.SelectionRangeRequest.type)}fillClientCapabilities(e){let t=(0,Lo.ensure)((0,Lo.ensure)(e,"textDocument"),"selectionRange");t.dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.selectionRangeProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n={provideSelectionRanges:(i,r,a)=>{let c=this._client,u=async(g,h,f)=>{let v={textDocument:c.code2ProtocolConverter.asTextDocumentIdentifier(g),positions:c.code2ProtocolConverter.asPositionsSync(h,f)};return c.sendRequest(Ao.SelectionRangeRequest.type,v,f).then(p=>f.isCancellationRequested?null:c.protocol2CodeConverter.asSelectionRanges(p,f),p=>c.handleFailedRequest(Ao.SelectionRangeRequest.type,f,p,null))},l=c.middleware;return l.provideSelectionRanges?l.provideSelectionRanges(i,r,a,u):u(i,r,a)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return Cl.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Wi.SelectionRangeFeature=Uo});var Bc=F(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.ProgressFeature=void 0;var Vc=L(),wl=vs();function Dl(s,e){return s[e]===void 0&&(s[e]=Object.create(null)),s[e]}var Ko=class{constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:Vc.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){Dl(e,"window").workDoneProgress=!0}initialize(){let e=this._client,t=i=>{this.activeParts.delete(i)},n=i=>{this.activeParts.add(new wl.ProgressPart(this._client,i.token,t))};e.onRequest(Vc.WorkDoneProgressCreateRequest.type,n)}clear(){for(let e of this.activeParts)e.done();this.activeParts.clear()}};ji.ProgressFeature=Ko});var Jc=F(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.CallHierarchyFeature=void 0;var Sl=I("vscode"),Ft=L(),No=W(),Ho=class{constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,n){let i=this.client,r=this.middleware,a=(c,u,l)=>{let g=i.code2ProtocolConverter.asTextDocumentPositionParams(c,u);return i.sendRequest(Ft.CallHierarchyPrepareRequest.type,g,l).then(h=>l.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(h,l),h=>i.handleFailedRequest(Ft.CallHierarchyPrepareRequest.type,l,h,null))};return r.prepareCallHierarchy?r.prepareCallHierarchy(e,t,n,a):a(e,t,n)}provideCallHierarchyIncomingCalls(e,t){let n=this.client,i=this.middleware,r=(a,c)=>{let u={item:n.code2ProtocolConverter.asCallHierarchyItem(a)};return n.sendRequest(Ft.CallHierarchyIncomingCallsRequest.type,u,c).then(l=>c.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyIncomingCalls(l,c),l=>n.handleFailedRequest(Ft.CallHierarchyIncomingCallsRequest.type,c,l,null))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,r):r(e,t)}provideCallHierarchyOutgoingCalls(e,t){let n=this.client,i=this.middleware,r=(a,c)=>{let u={item:n.code2ProtocolConverter.asCallHierarchyItem(a)};return n.sendRequest(Ft.CallHierarchyOutgoingCallsRequest.type,u,c).then(l=>c.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(l,c),l=>n.handleFailedRequest(Ft.CallHierarchyOutgoingCallsRequest.type,c,l,null))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,r):r(e,t)}},$o=class extends No.TextDocumentLanguageFeature{constructor(e){super(e,Ft.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=e,n=(0,No.ensure)((0,No.ensure)(t,"textDocument"),"callHierarchy");n.dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.callHierarchyProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=this._client,n=new Ho(t);return[Sl.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}};zi.CallHierarchyFeature=$o});var Qc=F(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.SemanticTokensFeature=void 0;var Vi=I("vscode"),U=L(),Tn=W(),_l=Ee(),Wo=class extends Tn.TextDocumentLanguageFeature{constructor(e){super(e,U.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){let t=(0,Tn.ensure)((0,Tn.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[U.SemanticTokenTypes.namespace,U.SemanticTokenTypes.type,U.SemanticTokenTypes.class,U.SemanticTokenTypes.enum,U.SemanticTokenTypes.interface,U.SemanticTokenTypes.struct,U.SemanticTokenTypes.typeParameter,U.SemanticTokenTypes.parameter,U.SemanticTokenTypes.variable,U.SemanticTokenTypes.property,U.SemanticTokenTypes.enumMember,U.SemanticTokenTypes.event,U.SemanticTokenTypes.function,U.SemanticTokenTypes.method,U.SemanticTokenTypes.macro,U.SemanticTokenTypes.keyword,U.SemanticTokenTypes.modifier,U.SemanticTokenTypes.comment,U.SemanticTokenTypes.string,U.SemanticTokenTypes.number,U.SemanticTokenTypes.regexp,U.SemanticTokenTypes.operator,U.SemanticTokenTypes.decorator],t.tokenModifiers=[U.SemanticTokenModifiers.declaration,U.SemanticTokenModifiers.definition,U.SemanticTokenModifiers.readonly,U.SemanticTokenModifiers.static,U.SemanticTokenModifiers.deprecated,U.SemanticTokenModifiers.abstract,U.SemanticTokenModifiers.async,U.SemanticTokenModifiers.modification,U.SemanticTokenModifiers.documentation,U.SemanticTokenModifiers.defaultLibrary],t.formats=[U.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,Tn.ensure)((0,Tn.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(U.SemanticTokensRefreshRequest.type,async()=>{for(let a of this.getAllProviders())a.onDidChangeSemanticTokensEmitter.fire()});let[i,r]=this.getRegistration(t,e.semanticTokensProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t=e.documentSelector,n=_l.boolean(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,r=new Vi.EventEmitter,a=n?{onDidChangeSemanticTokens:r.event,provideDocumentSemanticTokens:(v,p)=>{let C=this._client,y=C.middleware,b=(T,P)=>{let q={textDocument:C.code2ProtocolConverter.asTextDocumentIdentifier(T)};return C.sendRequest(U.SemanticTokensRequest.type,q,P).then(ce=>P.isCancellationRequested?null:C.protocol2CodeConverter.asSemanticTokens(ce,P),ce=>C.handleFailedRequest(U.SemanticTokensRequest.type,P,ce,null))};return y.provideDocumentSemanticTokens?y.provideDocumentSemanticTokens(v,p,b):b(v,p)},provideDocumentSemanticTokensEdits:i?(v,p,C)=>{let y=this._client,b=y.middleware,T=(P,q,ce)=>{let V={textDocument:y.code2ProtocolConverter.asTextDocumentIdentifier(P),previousResultId:q};return y.sendRequest(U.SemanticTokensDeltaRequest.type,V,ce).then(async Z=>ce.isCancellationRequested?null:U.SemanticTokens.is(Z)?await y.protocol2CodeConverter.asSemanticTokens(Z,ce):await y.protocol2CodeConverter.asSemanticTokensEdits(Z,ce),Z=>y.handleFailedRequest(U.SemanticTokensDeltaRequest.type,ce,Z,null))};return b.provideDocumentSemanticTokensEdits?b.provideDocumentSemanticTokensEdits(v,p,C,T):T(v,p,C)}:void 0}:void 0,u=e.range===!0?{provideDocumentRangeSemanticTokens:(v,p,C)=>{let y=this._client,b=y.middleware,T=(P,q,ce)=>{let V={textDocument:y.code2ProtocolConverter.asTextDocumentIdentifier(P),range:y.code2ProtocolConverter.asRange(q)};return y.sendRequest(U.SemanticTokensRangeRequest.type,V,ce).then(Z=>ce.isCancellationRequested?null:y.protocol2CodeConverter.asSemanticTokens(Z,ce),Z=>y.handleFailedRequest(U.SemanticTokensRangeRequest.type,ce,Z,null))};return b.provideDocumentRangeSemanticTokens?b.provideDocumentRangeSemanticTokens(v,p,C,T):T(v,p,C)}}:void 0,l=[],g=this._client,h=g.protocol2CodeConverter.asSemanticTokensLegend(e.legend),f=g.protocol2CodeConverter.asDocumentSelector(t);return a!==void 0&&l.push(Vi.languages.registerDocumentSemanticTokensProvider(f,a,h)),u!==void 0&&l.push(Vi.languages.registerDocumentRangeSemanticTokensProvider(f,u,h)),[new Vi.Disposable(()=>l.forEach(v=>v.dispose())),{range:u,full:a,onDidChangeSemanticTokensEmitter:r}]}};Bi.SemanticTokensFeature=Wo});var Xc=F(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.WillDeleteFilesFeature=be.WillRenameFilesFeature=be.WillCreateFilesFeature=be.DidDeleteFilesFeature=be.DidRenameFilesFeature=be.DidCreateFilesFeature=void 0;var Le=I("vscode"),bl=kr(),rt=L(),Tl=te();function Gc(s,e){return s[e]===void 0&&(s[e]={}),s[e]}function kl(s,e){return s[e]}function Yc(s,e,t){s[e]=t}var kn=class s{constructor(e,t,n,i,r){this._client=e,this._event=t,this._registrationType=n,this._clientCapability=i,this._serverCapability=r,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){let t=Gc(Gc(e,"workspace"),"fileOperations");Yc(t,"dynamicRegistration",!0),Yc(t,this._clientCapability,!0)}initialize(e){let t=e.workspace?.fileOperations,n=t!==void 0?kl(t,this._serverCapability):void 0;if(n?.filters!==void 0)try{this.register({id:Tl.generateUuid(),registerOptions:{filters:n.filters}})}catch(i){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${i}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let t=e.registerOptions.filters.map(n=>{let i=new bl.Minimatch(n.pattern.glob,s.asMinimatchOptions(n.pattern.options));if(!i.makeRe())throw new Error(`Invalid pattern ${n.pattern.glob}!`);return{scheme:n.scheme,matcher:i,kind:n.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),this._filters.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return s.getFileType(e)}async filter(e,t){let n=await Promise.all(e.files.map(async r=>{let a=t(r),c=a.fsPath.replace(/\\/g,"/");for(let u of this._filters.values())for(let l of u)if(!(l.scheme!==void 0&&l.scheme!==a.scheme)){if(l.matcher.match(c)){if(l.kind===void 0)return!0;let g=await this.getFileType(a);if(g===void 0)return this._client.error(`Failed to determine file type for ${a.toString()}.`),!0;if(g===Le.FileType.File&&l.kind===rt.FileOperationPatternKind.file||g===Le.FileType.Directory&&l.kind===rt.FileOperationPatternKind.folder)return!0}else if(l.kind===rt.FileOperationPatternKind.folder&&await s.getFileType(a)===Le.FileType.Directory&&l.matcher.match(`${c}/`))return!0}return!1})),i=e.files.filter((r,a)=>n[a]);return{...e,files:i}}static async getFileType(e){try{return(await Le.workspace.fs.stat(e)).type}catch{return}}static asMinimatchOptions(e){let t={dot:!0};return e?.ignoreCase===!0&&(t.nocase=!0),t}},Ji=class extends kn{constructor(e,t,n,i,r,a,c){super(e,t,n,i,r),this._notificationType=n,this._accessUri=a,this._createParams=c}async send(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let n=async i=>this._client.sendNotification(this._notificationType,this._createParams(i));return this.doSend(t,n)}}},Qi=class extends Ji{constructor(){super(...arguments),this._fsPathFileTypes=new Map}async getFileType(e){let t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);let n=await kn.getFileType(e);return n&&this._fsPathFileTypes.set(t,n),n}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),this.filterSize()===0&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}},jo=class extends Ji{constructor(e){super(e,Le.workspace.onDidCreateFiles,rt.DidCreateFilesNotification.type,"didCreate","didCreate",t=>t,e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){let n=this._client.middleware.workspace;return n?.didCreateFiles?n.didCreateFiles(e,t):t(e)}};be.DidCreateFilesFeature=jo;var zo=class extends Qi{constructor(e){super(e,Le.workspace.onDidRenameFiles,rt.DidRenameFilesNotification.type,"didRename","didRename",t=>t.oldUri,e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=Le.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,t=>t.oldUri))}doSend(e,t){this.clearFileTypeCache();let n=this._client.middleware.workspace;return n?.didRenameFiles?n.didRenameFiles(e,t):t(e)}};be.DidRenameFilesFeature=zo;var Vo=class extends Qi{constructor(e){super(e,Le.workspace.onDidDeleteFiles,rt.DidDeleteFilesNotification.type,"didDelete","didDelete",t=>t,e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=Le.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,t=>t))}doSend(e,t){this.clearFileTypeCache();let n=this._client.middleware.workspace;return n?.didDeleteFiles?n.didDeleteFiles(e,t):t(e)}};be.DidDeleteFilesFeature=Vo;var Pn=class extends kn{constructor(e,t,n,i,r,a,c){super(e,t,n,i,r),this._requestType=n,this._accessUri=a,this._createParams=c}async send(e){let t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let n=i=>this._client.sendRequest(this._requestType,this._createParams(i),i.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,n)}else return}},Bo=class extends Pn{constructor(e){super(e,Le.workspace.onWillCreateFiles,rt.WillCreateFilesRequest.type,"willCreate","willCreate",t=>t,e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){let n=this._client.middleware.workspace;return n?.willCreateFiles?n.willCreateFiles(e,t):t(e)}};be.WillCreateFilesFeature=Bo;var Jo=class extends Pn{constructor(e){super(e,Le.workspace.onWillRenameFiles,rt.WillRenameFilesRequest.type,"willRename","willRename",t=>t.oldUri,e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){let n=this._client.middleware.workspace;return n?.willRenameFiles?n.willRenameFiles(e,t):t(e)}};be.WillRenameFilesFeature=Jo;var Qo=class extends Pn{constructor(e){super(e,Le.workspace.onWillDeleteFiles,rt.WillDeleteFilesRequest.type,"willDelete","willDelete",t=>t,e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){let n=this._client.middleware.workspace;return n?.willDeleteFiles?n.willDeleteFiles(e,t):t(e)}};be.WillDeleteFilesFeature=Qo});var Zc=F(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.LinkedEditingFeature=void 0;var Pl=I("vscode"),Go=L(),Yo=W(),Xo=class extends Yo.TextDocumentLanguageFeature{constructor(e){super(e,Go.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){let t=(0,Yo.ensure)((0,Yo.ensure)(e,"textDocument"),"linkedEditingRange");t.dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.linkedEditingRangeProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n={provideLinkedEditingRanges:(i,r,a)=>{let c=this._client,u=(g,h,f)=>c.sendRequest(Go.LinkedEditingRangeRequest.type,c.code2ProtocolConverter.asTextDocumentPositionParams(g,h),f).then(v=>f.isCancellationRequested?null:c.protocol2CodeConverter.asLinkedEditingRanges(v,f),v=>c.handleFailedRequest(Go.LinkedEditingRangeRequest.type,f,v,null)),l=c.middleware;return l.provideLinkedEditingRange?l.provideLinkedEditingRange(i,r,a,u):u(i,r,a)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return Pl.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Gi.LinkedEditingFeature=Xo});var ed=F(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.TypeHierarchyFeature=void 0;var Rl=I("vscode"),qt=L(),Zo=W(),ea=class{constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,n){let i=this.client,r=this.middleware,a=(c,u,l)=>{let g=i.code2ProtocolConverter.asTextDocumentPositionParams(c,u);return i.sendRequest(qt.TypeHierarchyPrepareRequest.type,g,l).then(h=>l.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(h,l),h=>i.handleFailedRequest(qt.TypeHierarchyPrepareRequest.type,l,h,null))};return r.prepareTypeHierarchy?r.prepareTypeHierarchy(e,t,n,a):a(e,t,n)}provideTypeHierarchySupertypes(e,t){let n=this.client,i=this.middleware,r=(a,c)=>{let u={item:n.code2ProtocolConverter.asTypeHierarchyItem(a)};return n.sendRequest(qt.TypeHierarchySupertypesRequest.type,u,c).then(l=>c.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(l,c),l=>n.handleFailedRequest(qt.TypeHierarchySupertypesRequest.type,c,l,null))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,r):r(e,t)}provideTypeHierarchySubtypes(e,t){let n=this.client,i=this.middleware,r=(a,c)=>{let u={item:n.code2ProtocolConverter.asTypeHierarchyItem(a)};return n.sendRequest(qt.TypeHierarchySubtypesRequest.type,u,c).then(l=>c.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(l,c),l=>n.handleFailedRequest(qt.TypeHierarchySubtypesRequest.type,c,l,null))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,r):r(e,t)}},ta=class extends Zo.TextDocumentLanguageFeature{constructor(e){super(e,qt.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){let t=(0,Zo.ensure)((0,Zo.ensure)(e,"textDocument"),"typeHierarchy");t.dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.typeHierarchyProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=this._client,n=new ea(t);return[Rl.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}};Yi.TypeHierarchyFeature=ta});var nd=F(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.InlineValueFeature=void 0;var td=I("vscode"),Xi=L(),Rn=W(),na=class extends Rn.TextDocumentLanguageFeature{constructor(e){super(e,Xi.InlineValueRequest.type)}fillClientCapabilities(e){(0,Rn.ensure)((0,Rn.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,Rn.ensure)((0,Rn.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(Xi.InlineValueRefreshRequest.type,async()=>{for(let r of this.getAllProviders())r.onDidChangeInlineValues.fire()});let[n,i]=this.getRegistration(t,e.inlineValueProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n=new td.EventEmitter,i={onDidChangeInlineValues:n.event,provideInlineValues:(r,a,c,u)=>{let l=this._client,g=(f,v,p,C)=>{let y={textDocument:l.code2ProtocolConverter.asTextDocumentIdentifier(f),range:l.code2ProtocolConverter.asRange(v),context:l.code2ProtocolConverter.asInlineValueContext(p)};return l.sendRequest(Xi.InlineValueRequest.type,y,C).then(b=>C.isCancellationRequested?null:l.protocol2CodeConverter.asInlineValues(b,C),b=>l.handleFailedRequest(Xi.InlineValueRequest.type,C,b,null))},h=l.middleware;return h.provideInlineValues?h.provideInlineValues(r,a,c,u,g):g(r,a,c,u)}};return[this.registerProvider(t,i),{provider:i,onDidChangeInlineValues:n}]}registerProvider(e,t){return td.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};Zi.InlineValueFeature=na});var rd=F(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.InlayHintsFeature=void 0;var id=I("vscode"),Gt=L(),xn=W(),ia=class extends xn.TextDocumentLanguageFeature{constructor(e){super(e,Gt.InlayHintRequest.type)}fillClientCapabilities(e){let t=(0,xn.ensure)((0,xn.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,xn.ensure)((0,xn.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(Gt.InlayHintRefreshRequest.type,async()=>{for(let r of this.getAllProviders())r.onDidChangeInlayHints.fire()});let[n,i]=this.getRegistration(t,e.inlayHintProvider);!n||!i||this.register({id:n,registerOptions:i})}registerLanguageProvider(e){let t=e.documentSelector,n=new id.EventEmitter,i={onDidChangeInlayHints:n.event,provideInlayHints:(r,a,c)=>{let u=this._client,l=async(h,f,v)=>{let p={textDocument:u.code2ProtocolConverter.asTextDocumentIdentifier(h),range:u.code2ProtocolConverter.asRange(f)};try{let C=await u.sendRequest(Gt.InlayHintRequest.type,p,v);return v.isCancellationRequested?null:u.protocol2CodeConverter.asInlayHints(C,v)}catch(C){return u.handleFailedRequest(Gt.InlayHintRequest.type,v,C,null)}},g=u.middleware;return g.provideInlayHints?g.provideInlayHints(r,a,c,l):l(r,a,c)}};return i.resolveInlayHint=e.resolveProvider===!0?(r,a)=>{let c=this._client,u=async(g,h)=>{try{let f=await c.sendRequest(Gt.InlayHintResolveRequest.type,c.code2ProtocolConverter.asInlayHint(g),h);if(h.isCancellationRequested)return null;let v=c.protocol2CodeConverter.asInlayHint(f,h);return h.isCancellationRequested?null:v}catch(f){return c.handleFailedRequest(Gt.InlayHintResolveRequest.type,h,f,null)}},l=c.middleware;return l.resolveInlayHint?l.resolveInlayHint(r,a,u):u(r,a)}:void 0,[this.registerProvider(t,i),{provider:i,onDidChangeInlayHints:n}]}registerProvider(e,t){return id.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}};er.InlayHintsFeature=ia});var sd=F(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.InlineCompletionItemFeature=void 0;var xl=I("vscode"),ra=L(),sa=W(),Fl=te(),oa=class extends sa.TextDocumentLanguageFeature{constructor(e){super(e,ra.InlineCompletionRequest.type)}fillClientCapabilities(e){let t=(0,sa.ensure)((0,sa.ensure)(e,"textDocument"),"inlineCompletion");t.dynamicRegistration=!0}initialize(e,t){let n=this.getRegistrationOptions(t,e.inlineCompletionProvider);n&&this.register({id:Fl.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=e.documentSelector,n={provideInlineCompletionItems:(i,r,a,c)=>{let u=this._client,l=this._client.middleware,g=(h,f,v,p)=>u.sendRequest(ra.InlineCompletionRequest.type,u.code2ProtocolConverter.asInlineCompletionParams(h,f,v),p).then(C=>p.isCancellationRequested?null:u.protocol2CodeConverter.asInlineCompletionResult(C,p),C=>u.handleFailedRequest(ra.InlineCompletionRequest.type,p,C,null));return l.provideInlineCompletionItems?l.provideInlineCompletionItems(i,r,a,c,g):g(i,r,a,c)}};return[xl.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}};tr.InlineCompletionItemFeature=oa});var pa=F(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.ProposedFeatures=me.BaseLanguageClient=me.MessageTransports=me.SuspendMode=me.State=me.CloseAction=me.ErrorAction=me.RevealOutputChannelOn=void 0;var J=I("vscode"),_=L(),ql=tc(),Il=rc(),je=Ee(),nr=ui(),od=te(),El=vs(),We=W(),Ml=Fs(),ad=gc(),cd=vc(),Yt=yc(),Ol=Cc(),Al=wc(),Ll=Dc(),Ul=_c(),Kl=bc(),Nl=to(),Hl=kc(),$l=Pc(),Wl=Rc(),jl=Fc(),aa=qc(),zl=Ec(),Vl=Mc(),Bl=Ac(),Jl=Lc(),Ql=Uc(),Gl=Kc(),Yl=Nc(),Xl=Hc(),Zl=Wc(),ep=jc(),tp=zc(),np=Bc(),ip=Jc(),rp=Qc(),Xt=Xc(),sp=Zc(),op=ed(),ap=nd(),cp=rd(),dp=sd(),It;(function(s){s[s.Debug=0]="Debug",s[s.Info=1]="Info",s[s.Warn=2]="Warn",s[s.Error=3]="Error",s[s.Never=4]="Never"})(It||(me.RevealOutputChannelOn=It={}));var qn;(function(s){s[s.Continue=1]="Continue",s[s.Shutdown=2]="Shutdown"})(qn||(me.ErrorAction=qn={}));var yt;(function(s){s[s.DoNotRestart=1]="DoNotRestart",s[s.Restart=2]="Restart"})(yt||(me.CloseAction=yt={}));var Fn;(function(s){s[s.Stopped=1]="Stopped",s[s.Starting=3]="Starting",s[s.Running=2]="Running"})(Fn||(me.State=Fn={}));var dd;(function(s){s.off="off",s.on="on"})(dd||(me.SuspendMode=dd={}));var ca;(function(s){function e(t){return t==null?!1:typeof t=="boolean"||typeof t=="object"&&t!==null&&je.stringArray(t.enabledCommands)?t:!1}s.sanitizeIsTrusted=e})(ca||(ca={}));var da=class{constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?{action:qn.Continue}:{action:qn.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:yt.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=3*60*1e3?{action:yt.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:yt.Restart})}},K;(function(s){s.Initial="initial",s.Starting="starting",s.StartFailed="startFailed",s.Running="running",s.Stopping="stopping",s.Stopped="stopped"})(K||(K={}));var ud;(function(s){function e(t){return t&&_.MessageReader.is(t.reader)&&_.MessageWriter.is(t.writer)}s.is=e})(ud||(me.MessageTransports=ud={}));var In=class s{constructor(e,t,n){this._traceFormat=_.TraceFormat.Text,this._diagnosticQueue=new Map,this._diagnosticQueueState={state:"idle"},this._features=[],this._dynamicFeatures=new Map,this.workspaceEditLock=new nr.Semaphore(1),this._id=e,this._name=t,n=n||{};let i={isTrusted:!1,supportHtml:!1};n.markdown!==void 0&&(i.isTrusted=ca.sanitizeIsTrusted(n.markdown.isTrusted),i.supportHtml=n.markdown.supportHtml===!0),this._clientOptions={documentSelector:n.documentSelector??[],synchronize:n.synchronize??{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName??this._name,revealOutputChannelOn:n.revealOutputChannelOn??It.Error,stdioEncoding:n.stdioEncoding??"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler??this.createDefaultErrorHandler(n.connectionOptions?.maxRestartCount),middleware:n.middleware??{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:i,diagnosticPullOptions:n.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:n.notebookDocumentOptions??{}},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=K.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._diagnostics=void 0,this._pendingOpenNotifications=new Set,this._pendingChangeSemaphore=new nr.Semaphore(1),this._pendingChangeDelayer=new nr.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new nr.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new _.Emitter,this._stateChangeEmitter=new _.Emitter,this._trace=_.Trace.Off,this._tracer={log:(r,a)=>{je.string(r)?this.logTrace(r,a):this.logObjectTrace(r)}},this._c2p=ql.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=Il.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=J.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){switch(this.$state){case K.Starting:return Fn.Starting;case K.Running:return Fn.Running;default:return Fn.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===K.StartFailed||this.$state===K.Stopping||this.$state===K.Stopped)return Promise.reject(new _.ResponseError(_.ErrorCodes.ConnectionInactive,"Client is not running"));let n=await this.$start();this._didChangeTextDocumentFeature.syncKind===_.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(n);let i=this._clientOptions.middleware?.sendRequest;if(i!==void 0){let r,a;return t.length===1?_.CancellationToken.is(t[0])?a=t[0]:r=t[0]:t.length===2&&(r=t[0],a=t[1]),i(e,r,a,(c,u,l)=>{let g=[];return u!==void 0&&g.push(u),l!==void 0&&g.push(l),n.sendRequest(c,...g)})}else return n.sendRequest(e,...t)}onRequest(e,t){let n=typeof e=="string"?e:e.method;this._requestHandlers.set(n,t);let i=this.activeConnection(),r;return i!==void 0?(this._requestDisposables.set(n,i.onRequest(e,t)),r={dispose:()=>{let a=this._requestDisposables.get(n);a!==void 0&&(a.dispose(),this._requestDisposables.delete(n))}}):(this._pendingRequestHandlers.set(n,t),r={dispose:()=>{this._pendingRequestHandlers.delete(n);let a=this._requestDisposables.get(n);a!==void 0&&(a.dispose(),this._requestDisposables.delete(n))}}),{dispose:()=>{this._requestHandlers.delete(n),r.dispose()}}}async sendNotification(e,t){if(this.$state===K.StartFailed||this.$state===K.Stopping||this.$state===K.Stopped)return Promise.reject(new _.ResponseError(_.ErrorCodes.ConnectionInactive,"Client is not running"));let n=this._didChangeTextDocumentFeature.syncKind===_.TextDocumentSyncKind.Full,i;n&&typeof e!="string"&&e.method===_.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._pendingOpenNotifications.add(i));let r=await this.$start();n&&await this.sendPendingFullTextDocumentChanges(r),i!==void 0&&this._pendingOpenNotifications.delete(i);let a=this._clientOptions.middleware?.sendNotification;return a?a(e,r.sendNotification.bind(r),t):r.sendNotification(e,t)}onNotification(e,t){let n=typeof e=="string"?e:e.method;this._notificationHandlers.set(n,t);let i=this.activeConnection(),r;return i!==void 0?(this._notificationDisposables.set(n,i.onNotification(e,t)),r={dispose:()=>{let a=this._notificationDisposables.get(n);a!==void 0&&(a.dispose(),this._notificationDisposables.delete(n))}}):(this._pendingNotificationHandlers.set(n,t),r={dispose:()=>{this._pendingNotificationHandlers.delete(n);let a=this._notificationDisposables.get(n);a!==void 0&&(a.dispose(),this._notificationDisposables.delete(n))}}),{dispose:()=>{this._notificationHandlers.delete(n),r.dispose()}}}async sendProgress(e,t,n){if(this.$state===K.StartFailed||this.$state===K.Stopping||this.$state===K.Stopped)return Promise.reject(new _.ResponseError(_.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,n)}catch(i){throw this.error(`Sending progress for token ${t} failed.`,i),i}}onProgress(e,t,n){this._progressHandlers.set(t,{type:e,handler:n});let i=this.activeConnection(),r,a=this._clientOptions.middleware?.handleWorkDoneProgress,c=_.WorkDoneProgress.is(e)&&a!==void 0?u=>{a(t,u,()=>n(u))}:n;return i!==void 0?(this._progressDisposables.set(t,i.onProgress(e,t,c)),r={dispose:()=>{let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:n}),r={dispose:()=>{this._pendingProgressHandlers.delete(t);let u=this._progressDisposables.get(t);u!==void 0&&(u.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),r.dispose()}}}createDefaultErrorHandler(e){if(e!==void 0&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new da(this,e??4)}async setTrace(e){this._trace=e;let t=this.activeConnection();t!==void 0&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof _.ResponseError){let t=e;return` Message: ${t.message}
7
7
  Code: ${t.code} ${t.data?`
8
8
  `+t.data.toString():""}`}return e instanceof Error?je.string(e.stack)?e.stack:e.message:je.string(e)?e:e.toString()}debug(e,t,n=!0){this.logOutputMessage(_.MessageType.Debug,It.Debug,"Debug",e,t,n)}info(e,t,n=!0){this.logOutputMessage(_.MessageType.Info,It.Info,"Info",e,t,n)}warn(e,t,n=!0){this.logOutputMessage(_.MessageType.Warning,It.Warn,"Warn",e,t,n)}error(e,t,n=!0){this.logOutputMessage(_.MessageType.Error,It.Error,"Error",e,t,n)}logOutputMessage(e,t,n,i,r,a){this.outputChannel.appendLine(`[${n.padEnd(5)} - ${new Date().toLocaleTimeString()}] ${i}`),r!=null&&this.outputChannel.appendLine(this.data2String(r)),(a==="force"||a&&this._clientOptions.revealOutputChannelOn<=t)&&this.showNotificationMessage(e,i)}showNotificationMessage(e,t){t=t??"A request has failed. See the output for more information.",(e===_.MessageType.Error?J.window.showErrorMessage:e===_.MessageType.Warning?J.window.showWarningMessage:J.window.showInformationMessage)(t,"Go to output").then(i=>{i!==void 0&&this.outputChannel.show(!0)})}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${new Date().toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${new Date().toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${new Date().toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===K.Initial||this.$state===K.Stopping||this.$state===K.Stopped}needsStop(){return this.$state===K.Starting||this.$state===K.Running}activeConnection(){return this.$state===K.Running&&this._connection!==void 0?this._connection:void 0}isRunning(){return this.$state===K.Running}async start(){if(this._disposed==="disposing"||this._disposed==="disposed")throw new Error("Client got disposed and can't be restarted.");if(this.$state===K.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(this._onStart!==void 0)return this._onStart;let[e,t,n]=this.createOnStartPromise();this._onStart=e,this._diagnostics===void 0&&(this._diagnostics=this._clientOptions.diagnosticCollectionName?J.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):J.languages.createDiagnosticCollection());for(let[i,r]of this._notificationHandlers)this._pendingNotificationHandlers.has(i)||this._pendingNotificationHandlers.set(i,r);for(let[i,r]of this._requestHandlers)this._pendingRequestHandlers.has(i)||this._pendingRequestHandlers.set(i,r);for(let[i,r]of this._progressHandlers)this._pendingProgressHandlers.has(i)||this._pendingProgressHandlers.set(i,r);this.$state=K.Starting;try{let i=await this.createConnection();i.onNotification(_.LogMessageNotification.type,r=>{switch(r.type){case _.MessageType.Error:this.error(r.message,void 0,!1);break;case _.MessageType.Warning:this.warn(r.message,void 0,!1);break;case _.MessageType.Info:this.info(r.message,void 0,!1);break;case _.MessageType.Debug:this.debug(r.message,void 0,!1);break;default:this.outputChannel.appendLine(r.message)}}),i.onNotification(_.ShowMessageNotification.type,r=>{switch(r.type){case _.MessageType.Error:J.window.showErrorMessage(r.message);break;case _.MessageType.Warning:J.window.showWarningMessage(r.message);break;case _.MessageType.Info:J.window.showInformationMessage(r.message);break;default:J.window.showInformationMessage(r.message)}}),i.onRequest(_.ShowMessageRequest.type,r=>{let a;switch(r.type){case _.MessageType.Error:a=J.window.showErrorMessage;break;case _.MessageType.Warning:a=J.window.showWarningMessage;break;case _.MessageType.Info:a=J.window.showInformationMessage;break;default:a=J.window.showInformationMessage}let c=r.actions||[];return a(r.message,...c)}),i.onNotification(_.TelemetryEventNotification.type,r=>{this._telemetryEmitter.fire(r)}),i.onRequest(_.ShowDocumentRequest.type,async r=>{let a=async u=>{let l=this.protocol2CodeConverter.asUri(u.uri);try{if(u.external===!0)return{success:await J.env.openExternal(l)};{let g={};return u.selection!==void 0&&(g.selection=this.protocol2CodeConverter.asRange(u.selection)),u.takeFocus===void 0||u.takeFocus===!1?g.preserveFocus=!0:u.takeFocus===!0&&(g.preserveFocus=!1),await J.window.showTextDocument(l,g),{success:!0}}}catch{return{success:!1}}},c=this._clientOptions.middleware.window?.showDocument;return c!==void 0?c(r,a):a(r)}),i.listen(),await this.initialize(i),t()}catch(i){this.$state=K.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,i,"force"),n(i)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise((i,r)=>{e=i,t=r}),e,t]}async initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,[n,i]=this._clientOptions.workspaceFolder!==void 0?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],r={processId:null,clientInfo:{name:J.env.appName,version:J.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(J.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:je.func(t)?t():t,trace:_.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(r),this._clientOptions.progressOnInitialization){let a=od.generateUuid(),c=new El.ProgressPart(e,a);r.workDoneToken=a;try{let u=await this.doInitialize(e,r);return c.done(),u}catch(u){throw c.cancel(),u}}else return this.doInitialize(e,r)}async doInitialize(e,t){try{let n=await e.initialize(t);if(n.capabilities.positionEncoding!==void 0&&n.capabilities.positionEncoding!==_.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${n.capabilities.positionEncoding}) received from server ${this.name}`);this._initializeResult=n,this.$state=K.Running;let i;je.number(n.capabilities.textDocumentSync)?n.capabilities.textDocumentSync===_.TextDocumentSyncKind.None?i={openClose:!1,change:_.TextDocumentSyncKind.None,save:void 0}:i={openClose:!0,change:n.capabilities.textDocumentSync,save:{includeText:!1}}:n.capabilities.textDocumentSync!==void 0&&n.capabilities.textDocumentSync!==null&&(i=n.capabilities.textDocumentSync),this._capabilities=Object.assign({},n.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(_.PublishDiagnosticsNotification.type,r=>this.handleDiagnostics(r)),e.onRequest(_.RegistrationRequest.type,r=>this.handleRegistrationRequest(r)),e.onRequest("client/registerFeature",r=>this.handleRegistrationRequest(r)),e.onRequest(_.UnregistrationRequest.type,r=>this.handleUnregistrationRequest(r)),e.onRequest("client/unregisterFeature",r=>this.handleUnregistrationRequest(r)),e.onRequest(_.ApplyWorkspaceEditRequest.type,r=>this.handleApplyWorkspaceEdit(r));for(let[r,a]of this._pendingNotificationHandlers)this._notificationDisposables.set(r,e.onNotification(r,a));this._pendingNotificationHandlers.clear();for(let[r,a]of this._pendingRequestHandlers)this._requestDisposables.set(r,e.onRequest(r,a));this._pendingRequestHandlers.clear();for(let[r,a]of this._pendingProgressHandlers)this._progressDisposables.set(r,e.onProgress(a.type,r,a.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(_.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),n}catch(n){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(n)?this.initialize(e):this.stop():n instanceof _.ResponseError&&n.data&&n.data.retry?J.window.showErrorMessage(n.message,{title:"Retry",id:"retry"}).then(i=>{i&&i.id==="retry"?this.initialize(e):this.stop()}):(n&&n.message&&J.window.showErrorMessage(n.message),this.error("Server initialization failed.",n),this.stop()),n}}_clientGetRootPath(){let e=J.workspace.workspaceFolders;if(!e||e.length===0)return;let t=e[0];if(t.uri.scheme==="file")return t.uri.fsPath}stop(e=2e3){return this.shutdown("stop",e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t){if(this.$state===K.Stopped||this.$state===K.Initial)return;if(this.$state===K.Stopping){if(this._onStop!==void 0)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}let n=this.activeConnection();if(n===void 0||this.$state!==K.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=K.Stopping,this.cleanUp(e);let i=new Promise(a=>{(0,_.RAL)().timer.setTimeout(a,t)}),r=(async a=>(await a.shutdown(),await a.exit(),a))(n);return this._onStop=Promise.race([i,r]).then(a=>{if(a!==void 0)a.end(),a.dispose();else throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out")},a=>{throw this.error("Stopping server failed",a,!1),a}).finally(()=>{this.$state=K.Stopped,e==="stop"&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()})}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();let t=this._listeners.splice(0,this._listeners.length);for(let n of t)n.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(let n of Array.from(this._features.entries()).map(i=>i[1]).reverse())n.clear();e==="stop"&&this._diagnostics!==void 0&&(this._diagnostics.dispose(),this._diagnostics=void 0),this._idleInterval!==void 0&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){this._outputChannel!==void 0&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){let t=this;async function n(r){return t._fileEvents.push(r),t._fileEventDelayer.trigger(async()=>{await t.sendNotification(_.DidChangeWatchedFilesNotification.type,{changes:t._fileEvents}),t._fileEvents=[]})}let i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,n):n(e)).catch(r=>{t.error("Notify file events failed.",r)})}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock(async()=>{try{let t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._pendingOpenNotifications);if(t.length===0)return;for(let n of t){let i=this.code2ProtocolConverter.asChangeTextDocumentParams(n);await e.sendNotification(_.DidChangeTextDocumentNotification.type,i),this._didChangeTextDocumentFeature.notificationSent(n,_.DidChangeTextDocumentNotification.type,i)}}catch(t){throw this.error("Sending pending changes failed",t,!1),t}})}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger(async()=>{let e=this.activeConnection();if(e===void 0){this.triggerPendingChangeDelivery();return}await this.sendPendingFullTextDocumentChanges(e)}).catch(e=>this.error("Delivering pending changes failed",e,!1))}handleDiagnostics(e){if(!this._diagnostics)return;let t=e.uri;this._diagnosticQueueState.state==="busy"&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,_.RAL)().timer.setImmediate(()=>{this.workDiagnosticQueue()})}workDiagnosticQueue(){if(this._diagnosticQueueState.state==="busy")return;let e=this._diagnosticQueue.entries().next();if(e.done===!0)return;let[t,n]=e.value;this._diagnosticQueue.delete(t);let i=new J.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(n,i.token).then(r=>{if(!i.token.isCancellationRequested){let a=this._p2c.asUri(t),c=this.clientOptions.middleware;c.handleDiagnostics?c.handleDiagnostics(a,r,(u,l)=>this.setDiagnostics(u,l)):this.setDiagnostics(a,r)}}).finally(()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()})}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return J.env.language}async $start(){if(this.$state===K.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();let e=this.activeConnection();if(e===void 0)throw new Error("Starting server failed");return e}async createConnection(){let e=(i,r,a)=>{this.handleConnectionError(i,r,a).catch(c=>this.error("Handling connection error failed",c))},t=()=>{this.handleConnectionClosed().catch(i=>this.error("Handling connection close failed",i))},n=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=up(n.reader,n.writer,e,t,this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===K.Stopped)return;try{this._connection!==void 0&&this._connection.dispose()}catch{}let e={action:yt.DoNotRestart};if(this.$state!==K.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch{}this._connection=void 0,e.action===yt.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,e.handled===!0?!1:"force"),this.cleanUp("stop"),this.$state===K.Starting?this.$state=K.StartFailed:this.$state=K.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===yt.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",!e.handled),this.cleanUp("restart"),this.$state=K.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch(t=>this.error("Restarting server failed",t,"force")))}async handleConnectionError(e,t,n){let i=await this._clientOptions.errorHandler.error(e,t,n);i.action===qn.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "factoriomod-debug",
3
3
  "displayName": "Factorio Modding Tool Kit",
4
- "version": "2.0.7",
4
+ "version": "2.0.8",
5
5
  "publisher": "justarandomgeek",
6
6
  "description": "Debug Tools for developing Factorio Mods",
7
7
  "author": {
@@ -44,8 +44,8 @@
44
44
  "test": "c8 mocha"
45
45
  },
46
46
  "devDependencies": {
47
- "@inquirer/input": "^4.1.12",
48
- "@inquirer/password": "^4.0.15",
47
+ "@inquirer/input": "^4.2.0",
48
+ "@inquirer/password": "^4.0.16",
49
49
  "@stylistic/eslint-plugin-ts": "^4.4.1",
50
50
  "@types/archiver": "^6.0.3",
51
51
  "@types/buffers": "^0.1.34",
@@ -57,7 +57,7 @@
57
57
  "@types/inquirer": "^9.0.8",
58
58
  "@types/mocha": "^10.0.10",
59
59
  "@types/mute-stream": "^0.0.4",
60
- "@types/node": "^22.15.32",
60
+ "@types/node": "^22.16.2",
61
61
  "@types/node-fetch": "^2.6.12",
62
62
  "@types/readdir-glob": "^1.1.5",
63
63
  "@types/request": "^2.48.12",
@@ -67,21 +67,21 @@
67
67
  "@vscode/codicons": "^0.0.36",
68
68
  "@vscode/debugadapter": "^1.68.0",
69
69
  "@vscode/debugadapter-testsupport": "^1.68.0",
70
- "@vscode/vsce": "^3.5.0",
70
+ "@vscode/vsce": "^3.6.0",
71
71
  "@vscode/webview-ui-toolkit": "^1.4.0",
72
72
  "archiver": "^7.0.1",
73
73
  "c8": "^10.1.3",
74
- "chai": "^5.2.0",
74
+ "chai": "^5.2.1",
75
75
  "chai-as-promised": "^8.0.1",
76
76
  "commander": "^14.0.0",
77
77
  "d3": "^7.9.0",
78
78
  "d3-flame-graph": "^4.1.3",
79
79
  "dot-object": "^2.1.5",
80
- "esbuild": "^0.25.5",
80
+ "esbuild": "^0.25.6",
81
81
  "esbuild-plugin-import-glob": "^0.1.1",
82
82
  "esbuild-visualizer": "^0.7.0",
83
- "eslint": "^9.29.0",
84
- "globals": "^16.2.0",
83
+ "eslint": "^9.30.1",
84
+ "globals": "^16.3.0",
85
85
  "ini": "^5.0.0",
86
86
  "jiti": "^2.4.2",
87
87
  "jsonc-parser": "^3.3.1",
@@ -95,7 +95,7 @@
95
95
  "tree-kill": "^1.2.2",
96
96
  "tsx": "^4.20.3",
97
97
  "typescript": "^5.8.3",
98
- "typescript-eslint": "^8.34.1",
98
+ "typescript-eslint": "^8.36.0",
99
99
  "vscode-languageclient": "^9.0.1",
100
100
  "vscode-languageserver": "^9.0.1",
101
101
  "vscode-languageserver-textdocument": "^1.0.12",