@codingame/monaco-vscode-json-language-features-default-extension 26.2.2 → 27.0.0

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.
@@ -1,2 +1,44 @@
1
- var serverExportVar;(()=>{var e={20:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const r=n(8766),o=n(1662);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(r.DidOpenNotebookDocumentNotification.type,t=>e(t)),onDidChangeNotebookDocument:e=>this.connection.onNotification(r.DidChangeNotebookDocumentNotification.type,t=>e(t)),onDidSaveNotebookDocument:e=>this.connection.onNotification(r.DidSaveNotebookDocumentNotification.type,t=>e(t)),onDidCloseNotebookDocument:e=>this.connection.onNotification(r.DidCloseNotebookDocumentNotification.type,t=>e(t))}}};class i{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(e){return this.openHandler=e,r.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,r.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,r.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return i.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return i.NULL_DISPOSE}onDidSaveTextDocument(){return i.NULL_DISPOSE}}t.NotebookDocuments=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(e){e instanceof o.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new o.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new r.Emitter,this._onDidChange=new r.Emitter,this._onDidSave=new r.Emitter,this._onDidClose=new r.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,n=this.notebookCellMap.get(t);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new i,n=[];return n.push(this.cellTextDocuments.listen(t)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument(async e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const n of e.cellTextDocuments)await t.openTextDocument({textDocument:n});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)})),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument(async e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===n)return;n.version=e.notebookDocument.version;const r=n.metadata;let o=!1;const i=e.change;void 0!==i.metadata&&(o=!0,n.metadata=i.metadata);const s=[],a=[],c=[],u=[];if(void 0!==i.cells){const e=i.cells;if(void 0!==e.structure){const r=e.structure.array;if(n.cells.splice(r.start,r.deleteCount,...void 0!==r.cells?r.cells:[]),void 0!==e.structure.didOpen)for(const n of e.structure.didOpen)await t.openTextDocument({textDocument:n}),s.push(n.uri);if(e.structure.didClose)for(const n of e.structure.didClose)await t.closeTextDocument({textDocument:n}),a.push(n.uri)}if(void 0!==e.data){const t=new Map(e.data.map(e=>[e.document,e]));for(let e=0;e<=n.cells.length;e++){const r=t.get(n.cells[e].document);if(void 0!==r){const o=n.cells.splice(e,1,r);if(c.push({old:o[0],new:r}),t.delete(r.document),0===t.size)break}}}if(void 0!==e.textContent)for(const n of e.textContent)await t.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),u.push(n.document.uri)}this.updateCellMap(n);const l={notebookDocument:n};o&&(l.metadata={old:r,new:n.metadata});const d=[];for(const e of s)d.push(this.getNotebookCell(e));const f=[];for(const e of a)f.push(this.getNotebookCell(e));const h=[];for(const e of u)h.push(this.getNotebookCell(e));(d.length>0||f.length>0||c.length>0||h.length>0)&&(l.cells={added:d,removed:f,changed:{data:c,textContent:h}}),void 0===l.metadata&&void 0===l.cells||this._onDidChange.fire(l)})),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument(e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)})),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument(async e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==n){this._onDidClose.fire(n);for(const n of e.cellTextDocuments)await t.closeTextDocument({textDocument:n});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of n.cells)this.notebookCellMap.delete(e.document)}})),r.Disposable.create(()=>{n.forEach(e=>e.dispose())})}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CM=t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(3281);var o,i;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(o||(t.MessageDirection=o={})),t.RegistrationType=class{____;method;constructor(e){this.method=e}};class s extends r.RequestType0{__;___;____;_pr;constructor(e){super(e)}}t.ProtocolRequestType0=s;class a extends r.RequestType{__;___;____;_pr;constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=a;class c extends r.NotificationType0{___;____;constructor(e){super(e)}}t.ProtocolNotificationType0=c;class u extends r.NotificationType{___;____;constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=u,function(e){e.create=function(e,t){return{client:e,server:t}}}(i||(t.CM=i={}))},493:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const r=n(8766);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(r.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(r.DocumentDiagnosticRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.DocumentDiagnosticRequest.partialResult,t))),onWorkspace:e=>this.connection.onRequest(r.WorkspaceDiagnosticRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.WorkspaceDiagnosticRequest.partialResult,t)))}}}},577:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0,t.createMessageConnection=function(e,n,r,o){const i=void 0!==r?r:t.NullLogger;let s=0,a=0,v=0;const R="2.0",S=o?.maxParallelism??-1;let w,x=0;const M=new Map;let E;const q=new Map,j=new Map;let I,L,F=new d.LinkedMap,$=new Map,V=new Set,W=new Map,U=b.Off,H=D.Text,B=A.New;const z=new f.Emitter,K=new f.Emitter,J=new f.Emitter,X=new f.Emitter,G=new f.Emitter,Z=o&&o.cancellationStrategy?o.cancellationStrategy:P.Message;function Q(e){}function Y(){return B===A.Listening}function ee(){return B===A.Closed}function te(){return B===A.Disposed}function ne(){B!==A.New&&B!==A.Listening||(B=A.Closed,K.fire(void 0))}function re(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function oe(){I||0===F.size||-1!==S&&x>=S||(I=(0,c.default)().timer.setImmediate(async()=>{if(I=void 0,0===F.size)return;if(-1!==S&&x>=S)return;const e=F.shift();let t;try{x++;const n=o?.messageStrategy;t=O.is(n)?n.handleMessage(e,ie):ie(e)}catch(e){i.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then(()=>{x--,oe()}).catch(e=>{i.error(`Processing message queue failed: ${e.toString()}`)}):x--,oe()}}))}async function ie(e){return l.Message.isRequest(e)?async function(e){if(te())return Promise.resolve();function t(t,r,o){const i={jsonrpc:R,id:e.id};return t instanceof l.ResponseError?i.error=t.toJson():i.result=void 0===t?null:t,ue(i,r,o),n.write(i)}function r(t,r,o){const i={jsonrpc:R,id:e.id,error:t.toJson()};return ue(i,r,o),n.write(i)}!function(e){if(U!==b.Off&&L)if(H===D.Text){let t;U!==b.Verbose&&U!==b.Compact||!e.params||(t=`Params: ${ce(e.params)}`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else de("receive-request",e)}(e);const o=M.get(e.method);let i,s;o&&(i=o.type,s=o.handler);const a=Date.now();if(s||w){const n=e.id??String(Date.now()),o=T.is(Z.receiver)?Z.receiver.createCancellationTokenSource(n):Z.receiver.createCancellationTokenSource(e);null!==e.id&&V.has(e.id)&&o.cancel(),null!==e.id&&W.set(n,o);try{let n;if(s)if(void 0===e.params){if(void 0!==i&&0!==i.numberOfParams)return r(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines ${i.numberOfParams} params but received none.`),e.method,a);n=s(o.token)}else if(Array.isArray(e.params)){if(void 0!==i&&i.parameterStructures===l.ParameterStructures.byName)return r(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,a);n=s(...e.params,o.token)}else{if(void 0!==i&&i.parameterStructures===l.ParameterStructures.byPosition)return r(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,a);n=s(e.params,o.token)}else w&&(n=w(e.method,e.params,o.token));const c=await n;await t(c,e.method,a)}catch(n){n instanceof l.ResponseError?await t(n,e.method,a):n&&u.string(n.message)?await r(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,a):await r(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)}finally{W.delete(n)}}else await r(new l.ResponseError(l.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,a)}(e):l.Message.isNotification(e)?async function(e){if(te())return;let t,n;if(e.method===p.type.method){const t=e.params.id;return V.delete(t),void le(e)}{const r=q.get(e.method);r&&(n=r.handler,t=r.type)}if(n||E)try{if(le(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==l.ParameterStructures.byName&&i.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await n();else if(Array.isArray(e.params)){const r=e.params;e.method===g.type.method&&2===r.length&&m.is(r[0])?await n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===l.ParameterStructures.byName&&i.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&i.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),await n(...r))}else void 0!==t&&t.parameterStructures===l.ParameterStructures.byPosition&&i.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await n(e.params);else E&&await E(e.method,e.params)}catch(t){t.message?i.error(`Notification handler '${e.method}' failed with message: ${t.message}`):i.error(`Notification handler '${e.method}' failed unexpectedly.`)}else J.fire(e)}(e):l.Message.isResponse(e)?ae(e):function(e){if(!e)return void i.error("Received empty message.");i.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(u.string(t.id)||u.number(t.id)){const e=t.id,n=$.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ne),e.onError(function(e){z.fire([e,void 0,void 0])}),n.onClose(ne),n.onError(function(e){z.fire(e)});const se=e=>{try{if(l.Message.isNotification(e)&&e.method===p.type.method){const t=e.params.id,r=re(t),s=F.get(r);if(l.Message.isRequest(s)){const a=o?.connectionStrategy,c=a&&a.cancelUndispatched?a.cancelUndispatched(s,Q):void 0;if(c&&(void 0!==c.error||void 0!==c.result))return F.delete(r),W.delete(t),c.id=s.id,ue(c,e.method,Date.now()),void n.write(c).catch(()=>i.error("Sending response for canceled message failed."))}const a=W.get(t);if(void 0!==a)return a.cancel(),void le(e);V.add(t)}!function(e,t){var n;l.Message.isRequest(t)?e.set(re(t.id),t):l.Message.isResponse(t)?-1===S?e.set(null===(n=t.id)?"res-unknown-"+(++v).toString():"res-"+n.toString(),t):ae(t):e.set("not-"+(++a).toString(),t)}(F,e)}finally{oe()}};function ae(e){if(!te())if(null===e.id)e.error?i.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{const t=e.id,n=$.get(t);if(function(e,t){if(U!==b.Off&&L)if(H===D.Text){let n;if(U!==b.Verbose&&U!==b.Compact||(e.error&&e.error.data?n=`Error data: ${ce(e.error.data)}`:e.result?n=`Result: ${ce(e.result)}`:void 0===e.error&&(n="No result returned.")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else L.log(`Received response ${e.id} without active response promise.`,n)}else de("receive-response",e)}(e,n),void 0!==n){$.delete(t);try{if(e.error){const t=e.error;n.reject(new l.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?i.error(`Response handler '${n.method}' failed with message: ${e.message}`):i.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function ce(e){if(null!=e)switch(U){case b.Verbose:return JSON.stringify(e,null,4);case b.Compact:return JSON.stringify(e);default:return}}function ue(e,t,n){if(U!==b.Off&&L)if(H===D.Text){let r;U!==b.Verbose&&U!==b.Compact||(e.error&&e.error.data?r=`Error data: ${ce(e.error.data)}`:e.result?r=`Result: ${ce(e.result)}`:void 0===e.error&&(r="No result returned.")),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else de("send-response",e)}function le(e){if(U!==b.Off&&L&&e.method!==C.type.method)if(H===D.Text){let t;U!==b.Verbose&&U!==b.Compact||(t=e.params?`Params: ${ce(e.params)}`:"No parameters provided."),L.log(`Received notification '${e.method}'.`,t)}else de("receive-notification",e)}function de(e,t){if(!L||U===b.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(n)}function fe(){if(ee())throw new N(_.Closed,"Connection is closed.");if(te())throw new N(_.Disposed,"Connection is disposed.")}function he(e){return void 0===e?null:e}function pe(e){return null===e?void 0:e}function me(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ge(e,t){switch(e){case l.ParameterStructures.auto:return me(t)?pe(t):[he(t)];case l.ParameterStructures.byName:if(!me(t))throw new Error("Received parameters by name but param is not an object literal.");return pe(t);case l.ParameterStructures.byPosition:return[he(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ye(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(he(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const be={sendNotification:(e,...t)=>{let r,o;if(fe(),u.string(e)){r=e;const n=t[0];let i=0,s=l.ParameterStructures.auto;l.ParameterStructures.is(n)&&(i=1,s=n);const a=t.length,c=a-i;switch(c){case 0:o=void 0;break;case 1:o=ge(s,t[i]);break;default:if(s===l.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);o=t.slice(i,a).map(e=>he(e))}}else{const n=t;r=e.method,o=ye(e,n)}const s={jsonrpc:R,method:r,params:o};return function(e){if(U!==b.Off&&L)if(H===D.Text){let t;U!==b.Verbose&&U!==b.Compact||(t=e.params?`Params: ${ce(e.params)}`:"No parameters provided."),L.log(`Sending notification '${e.method}'.`,t)}else de("send-notification",e)}(s),n.write(s).catch(e=>{throw i.error("Sending notification failed."),e})},onNotification:(e,t)=>{let n;return fe(),u.func(e)?E=e:t&&(u.string(e)?(n=e,q.set(e,{type:void 0,handler:t})):(n=e.method,q.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?q.get(n)?.handler===t&&q.delete(n):E===e&&(E=void 0)}}},onProgress:(e,t,n)=>{if(j.has(t))throw new Error(`Progress handler for token ${t} already registered`);return j.set(t,n),{dispose:()=>{j.get(t)===n&&j.delete(t)}}},sendProgress:(e,t,n)=>be.sendNotification(g.type,{token:t,value:n}),onUnhandledProgress:X.event,sendRequest:(e,...t)=>{function r(e,t){const n=Z.sender.sendCancellation(e,t);void 0===n?i.log(`Received no promise from cancellation strategy when cancelling id ${t}`):n.catch(()=>{i.log(`Sending cancellation messages for id ${t} failed.`)})}let o,a,c;if(fe(),function(){if(!Y())throw new Error("Call listen() first.")}(),u.string(e)){o=e;const n=t[0],r=t[t.length-1];let i=0,s=l.ParameterStructures.auto;l.ParameterStructures.is(n)&&(i=1,s=n);let u=t.length;h.CancellationToken.is(r)&&(u-=1,c=r);const d=u-i;switch(d){case 0:a=void 0;break;case 1:a=ge(s,t[i]);break;default:if(s===l.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);a=t.slice(i,u).map(e=>he(e))}}else{const n=t;o=e.method,a=ye(e,n);const r=e.numberOfParams;c=h.CancellationToken.is(n[r])?n[r]:void 0}const d=s++;let f,p=!1;void 0!==c&&(c.isCancellationRequested?p=!0:f=c.onCancellationRequested(()=>{r(be,d)}));const m={jsonrpc:R,id:d,method:o,params:a};return function(e){if(U!==b.Off&&L)if(H===D.Text){let t;U!==b.Verbose&&U!==b.Compact||!e.params||(t=`Params: ${ce(e.params)}`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else de("send-request",e)}(m),"function"==typeof Z.sender.enableCancellation&&Z.sender.enableCancellation(m),new Promise(async(e,t)=>{const s={method:o,timerStart:Date.now(),resolve:t=>{e(t),Z.sender.cleanup(d),f?.dispose()},reject:e=>{t(e),Z.sender.cleanup(d),f?.dispose()}};try{$.set(d,s),await n.write(m),p&&r(be,d)}catch(e){throw $.delete(d),s.reject(new l.ResponseError(l.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),i.error("Sending request failed."),e}})},onRequest:(e,t)=>{fe();let n=null;return y.is(e)?(n=void 0,w=e):u.string(e)?(n=null,void 0!==t&&(n=e,M.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,M.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?M.get(n)?.handler===t&&M.delete(n):w===e&&(w=void 0))}}},hasPendingResponse:()=>$.size>0,trace:async(e,t,n)=>{let r=!1,o=D.Text;void 0!==n&&(u.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||D.Text)),U=e,H=o,L=U===b.Off?void 0:t,!r||ee()||te()||await be.sendNotification(k.type,{value:b.toString(e)})},onError:z.event,onClose:K.event,onUnhandledNotification:J.event,onDispose:G.event,end:()=>{n.end()},dispose:()=>{if(te())return;B=A.Disposed,G.fire(void 0);const t=new l.ResponseError(l.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of $.values())e.reject(t);$=new Map,W=new Map,V=new Set,F=new d.LinkedMap,u.func(n.dispose)&&n.dispose(),u.func(e.dispose)&&e.dispose()},listen:()=>{fe(),function(){if(Y())throw new N(_.AlreadyListening,"Connection is already listening")}(),B=A.Listening,e.listen(se)},inspect:()=>{(0,c.default)().console.log("inspect")}};return be.onNotification(C.type,e=>{if(U===b.Off||!L)return;const t=U===b.Verbose||U===b.Compact;L.log(e.message,t?e.verbose:void 0)}),be.onNotification(g.type,async e=>{const t=j.get(e.token);t?await t(e.value):X.fire(e)}),be};const c=a(n(9590)),u=s(n(8585)),l=n(6177),d=n(3352),f=n(2676),h=n(9850);var p,m,g,y,b,v,D,k,C,_,R,T,S,w,x,P,O,M,A;!function(e){e.type=new l.NotificationType("$/cancelRequest")}(p||(p={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(m||(t.ProgressToken=m={})),function(e){e.type=new l.NotificationType("$/progress")}(g||(g={})),t.ProgressType=class{__;_pr;constructor(){}},function(e){e.is=function(e){return u.func(e)}}(y||(y={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(b||(t.Trace=b={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(v||(t.TraceValue=v={})),t.TraceValues=v,function(e){e.fromString=function(t){if(!u.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(b||(t.Trace=b={})),function(e){e.Text="text",e.JSON="json"}(D||(t.TraceFormat=D={})),function(e){e.fromString=function(t){return u.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(D||(t.TraceFormat=D={})),function(e){e.type=new l.NotificationType("$/setTrace")}(k||(t.SetTraceNotification=k={})),function(e){e.type=new l.NotificationType("$/logTrace")}(C||(t.LogTraceNotification=C={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(_||(t.ConnectionErrors=_={}));class N extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,N.prototype)}}t.ConnectionError=N,function(e){e.is=function(e){const t=e;return t&&u.func(t.cancelUndispatched)}}(R||(t.ConnectionStrategy=R={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&u.func(t.createCancellationTokenSource)&&(void 0===t.dispose||u.func(t.dispose))}}(T||(t.IdCancellationReceiverStrategy=T={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&u.func(t.createCancellationTokenSource)&&(void 0===t.dispose||u.func(t.dispose))}}(S||(t.RequestCancellationReceiverStrategy=S={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new h.CancellationTokenSource}),e.is=function(e){return T.is(e)||S.is(e)}}(w||(t.CancellationReceiverStrategy=w={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(p.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&u.func(t.sendCancellation)&&u.func(t.cleanup)}}(x||(t.CancellationSenderStrategy=x={})),function(e){e.Message=Object.freeze({receiver:w.Message,sender:x.Message}),e.is=function(e){const t=e;return t&&w.is(t.receiver)&&x.is(t.sender)}}(P||(t.CancellationStrategy=P={})),function(e){e.is=function(e){const t=e;return t&&u.func(t.handleMessage)}}(O||(t.MessageStrategy=O={})),function(e){e.is=function(e){const t=e;return t&&(P.is(t.cancellationStrategy)||R.is(t.connectionStrategy)||O.is(t.messageStrategy)||u.number(t.maxParallelism))}}(M||(t.ConnectionOptions=M={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(A||(A={}))},645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")}(o||(t.TypeHierarchyPrepareRequest=o={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeHierarchySupertypesRequest=i={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(372);var o;!function(e){e.method="window/showDocument",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("window.showDocument.support",void 0)}(o||(t.ShowDocumentRequest=o={}))},1248:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=o,t.stringArray=function(e){return o(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},1276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionFeature=void 0;const r=n(8766);t.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(r.InlineCompletionRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t)))}}}},1301:(e,t,n)=>{"use strict";function r(e,t=!1){const n=e.length;let r=0,a="",c=0,u=16,l=0,d=0,f=0,h=0,p=0;function m(t,n){let o=0,i=0;for(;o<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)i=16*i+t-48;else if(t>=65&&t<=70)i=16*i+t-65+10;else{if(!(t>=97&&t<=102))break;i=16*i+t-97+10}r++,o++}return o<t&&(i=-1),i}function g(){if(a="",p=0,c=r,d=l,h=f,r>=n)return c=n,u=17;let t=e.charCodeAt(r);if(o(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(o(t));return u=15}if(i(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),l++,f=r,u=14;switch(t){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,a=function(){let t="",o=r;for(;;){if(r>=n){t+=e.substring(o,r),p=2;break}const s=e.charCodeAt(r);if(34===s){t+=e.substring(o,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(i(s)){t+=e.substring(o,r),p=2;break}p=6}r++}else{if(t+=e.substring(o,r),r++,r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=m(4,!0);e>=0?t+=String.fromCharCode(e):p=4;break;default:p=5}o=r}}return t}(),u=10;case 47:const o=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!i(e.charCodeAt(r));)r++;return a=e.substring(o,r),u=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let s=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,s=!0;break}r++,i(t)&&(13===t&&10===e.charCodeAt(r)&&r++,l++,f=r)}return s||(r++,p=1),a=e.substring(o,r),u=13}return a+=String.fromCharCode(t),r++,u=16;case 45:if(a+=String.fromCharCode(t),r++,r===n||!s(e.charCodeAt(r)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&s(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&s(e.charCodeAt(r))))return p=3,e.substring(t,r);for(r++;r<e.length&&s(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&s(e.charCodeAt(r))){for(r++;r<e.length&&s(e.charCodeAt(r));)r++;n=r}else p=3;return e.substring(t,n)}(),u=11;default:for(;r<n&&y(t);)r++,t=e.charCodeAt(r);if(c!==r){switch(a=e.substring(c,r),a){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),r++,u=16}}function y(e){if(o(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",c=0,u=16,p=0},getPosition:()=>r,scan:t?function(){let e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:()=>u,getTokenValue:()=>a,getTokenOffset:()=>c,getTokenLength:()=>r-c,getTokenStartLine:()=>d,getTokenStartCharacter:()=>c-h,getTokenError:()=>p}}function o(e){return 32===e||9===e}function i(e){return 10===e||13===e}function s(e){return e>=48&&e<=57}var a;n.r(t),n.d(t,{ClientCapabilities:()=>Qe,CodeAction:()=>Te,CodeActionContext:()=>Re,CodeActionKind:()=>Ce,Color:()=>M,ColorInformation:()=>A,ColorPresentation:()=>N,Command:()=>V,CompletionItem:()=>ue,CompletionItemKind:()=>re,CompletionItemTag:()=>ie,CompletionList:()=>le,Diagnostic:()=>$,DiagnosticSeverity:()=>I,DocumentHighlight:()=>ge,DocumentHighlightKind:()=>me,DocumentLink:()=>xe,DocumentSymbol:()=>ke,DocumentUri:()=>_,ErrorCode:()=>Ge,FoldingRange:()=>q,FoldingRangeKind:()=>E,Hover:()=>fe,InsertTextFormat:()=>oe,Location:()=>P,MarkedString:()=>de,MarkupContent:()=>ne,MarkupKind:()=>te,Position:()=>w,Range:()=>x,SchemaDraft:()=>Ze,SelectionRange:()=>Pe,SymbolInformation:()=>ve,SymbolKind:()=>ye,TextDocument:()=>Xe,TextDocumentEdit:()=>z,TextEdit:()=>W,VersionedTextDocumentIdentifier:()=>Q,WorkspaceEdit:()=>G,getLanguageService:()=>On,isSchemaResolveError:()=>gt}),function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(a||(a={}));const c=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),u=200,l={" ":{"\n":new Array(u).fill(0).map((e,t)=>"\n"+" ".repeat(t)),"\r":new Array(u).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(u).fill(0).map((e,t)=>"\r\n"+" ".repeat(t))},"\t":{"\n":new Array(u).fill(0).map((e,t)=>"\n"+"\t".repeat(t)),"\r":new Array(u).fill(0).map((e,t)=>"\r"+"\t".repeat(t)),"\r\n":new Array(u).fill(0).map((e,t)=>"\r\n"+"\t".repeat(t))}},d=["\n","\r","\r\n"];function f(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function h(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var p;!function(e){e.DEFAULT={allowTrailingComma:!1}}(p||(p={}));const m=r;var g,y;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(g||(g={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(y||(y={}));const b=function(e,t=[],n=p.DEFAULT){let o=null,i=[];const s=[];function a(e){Array.isArray(i)?i.push(e):null!==o&&(i[o]=e)}return function(e,t,n=p.DEFAULT){const o=r(e,!1),i=[];let s=0;function a(e){return e?t=>0===s&&e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>0===s&&e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),()=>i.slice()):()=>!0}function u(e){return e?()=>{s>0?s++:!1===e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),()=>i.slice())&&(s=1)}:()=>!0}function l(e){return e?()=>{s>0&&s--,0===s&&e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:()=>!0}const d=u(t.onObjectBegin),f=c(t.onObjectProperty),h=l(t.onObjectEnd),m=u(t.onArrayBegin),g=l(t.onArrayEnd),y=c(t.onLiteralValue),b=a(t.onSeparator),v=(k=t.onComment)?()=>0===s&&k(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0,D=a(t.onError);var k;const C=n&&n.disallowComments,_=n&&n.allowTrailingComma;function R(){for(;;){const e=o.scan();switch(o.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:C||T(11);break;case 2:T(12);break;case 6:T(16)}switch(e){case 12:case 13:C?T(10):v();break;case 16:T(1);break;case 15:case 14:break;default:return e}}}function T(e,t=[],n=[]){if(D(e),t.length+n.length>0){let e=o.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){R();break}if(-1!==n.indexOf(e))break;e=R()}}}function S(e){const t=o.getTokenValue();return e?y(t):(f(t),i.push(t)),R(),!0}function w(){return 10!==o.getToken()?(T(3,[],[2,5]),!1):(S(!1),6===o.getToken()?(b(":"),R(),x()||T(4,[],[2,5])):T(5,[],[2,5]),i.pop(),!0)}function x(){switch(o.getToken()){case 3:return function(){m(),R();let e=!0,t=!1;for(;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||T(4,[],[]),b(","),R(),4===o.getToken()&&_)break}else t&&T(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,x()||T(4,[],[4,5]),t=!0}return g(),e||i.pop(),4!==o.getToken()?T(8,[4],[]):R(),!0}();case 1:return function(){d(),R();let e=!1;for(;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||T(4,[],[]),b(","),R(),2===o.getToken()&&_)break}else e&&T(6,[],[]);w()||T(4,[],[2,5]),e=!0}return h(),2!==o.getToken()?T(7,[2],[]):R(),!0}();case 10:return S(!0);default:return function(){switch(o.getToken()){case 11:const e=o.getTokenValue();let t=Number(e);isNaN(t)&&(T(2),t=0),y(t);break;case 7:y(null);break;case 8:y(!0);break;case 9:y(!1);break;default:return!1}return R(),!0}()}}R(),17===o.getToken()?!!n.allowEmptyContent||T(4,[],[]):x()?17!==o.getToken()&&T(9,[],[]):T(4,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),s.push(i),i=e,o=null},onObjectProperty:e=>{o=e},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const e=[];a(e),s.push(i),i=e,o=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]},v=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){const o=t.children;if(Array.isArray(o))for(let t=0;t<o.length&&o[t].offset<=n;t++){const i=e(o[t],n,r);if(i)return i}return t}},D=function e(t){if(!t.parent||!t.parent.children)return[];const n=e(t.parent);if("property"===t.parent.type){const e=t.parent.children[0].value;n.push(e)}else if("array"===t.parent.type){const e=t.parent.children.indexOf(t);-1!==e&&n.push(e)}return n},k=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let r of t.children){const t=r.children[1];t&&(n[r.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};var C,_,R,T,S,w,x,P,O,M,A,N,E,q,j,I,L,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,be,ve,De,ke,Ce,_e,Re,Te,Se,we,xe,Pe,Oe,Me,Ae,Ne,Ee,qe,je,Ie,Le,Fe,$e,Ve,We,Ue,He,Be,ze,Ke,Je,Xe,Ge,Ze,Qe,Ye;function et(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!et(e[n],t[n]))return!1}else{const o=[];for(r in e)o.push(r);o.sort();const i=[];for(r in t)i.push(r);if(i.sort(),!et(o,i))return!1;for(n=0;n<o.length;n++)if(!et(e[o[n]],t[o[n]]))return!1}return!0}function tt(e){return"number"==typeof e}function nt(e){return void 0!==e}function rt(e){return"boolean"==typeof e}function ot(e){return"string"==typeof e}function it(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function st(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function at(e){let t="";(function(e,t){if(e.length<4)return!1;for(let n=0;n<4;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function ct(e){let t=0;for(let n=0;n<e.length;n++){t++;const r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(C||(C={})),function(e){e.is=function(e){return"string"==typeof e}}(_||(_={})),function(e){e.is=function(e){return"string"==typeof e}}(R||(R={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(T||(T={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(S||(S={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=S.MAX_VALUE),t===Number.MAX_VALUE&&(t=S.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&Je.uinteger(t.line)&&Je.uinteger(t.character)}}(w||(w={})),function(e){e.create=function(e,t,n,r){if(Je.uinteger(e)&&Je.uinteger(t)&&Je.uinteger(n)&&Je.uinteger(r))return{start:w.create(e,t),end:w.create(n,r)};if(w.is(e)&&w.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return Je.objectLiteral(t)&&w.is(t.start)&&w.is(t.end)}}(x||(x={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&x.is(t.range)&&(Je.string(t.uri)||Je.undefined(t.uri))}}(P||(P={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&x.is(t.targetRange)&&Je.string(t.targetUri)&&x.is(t.targetSelectionRange)&&(x.is(t.originSelectionRange)||Je.undefined(t.originSelectionRange))}}(O||(O={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.numberRange(t.red,0,1)&&Je.numberRange(t.green,0,1)&&Je.numberRange(t.blue,0,1)&&Je.numberRange(t.alpha,0,1)}}(M||(M={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&x.is(t.range)&&M.is(t.color)}}(A||(A={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.label)&&(Je.undefined(t.textEdit)||W.is(t))&&(Je.undefined(t.additionalTextEdits)||Je.typedArray(t.additionalTextEdits,W.is))}}(N||(N={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(E||(E={})),function(e){e.create=function(e,t,n,r,o,i){const s={startLine:e,endLine:t};return Je.defined(n)&&(s.startCharacter=n),Je.defined(r)&&(s.endCharacter=r),Je.defined(o)&&(s.kind=o),Je.defined(i)&&(s.collapsedText=i),s},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.uinteger(t.startLine)&&Je.uinteger(t.startLine)&&(Je.undefined(t.startCharacter)||Je.uinteger(t.startCharacter))&&(Je.undefined(t.endCharacter)||Je.uinteger(t.endCharacter))&&(Je.undefined(t.kind)||Je.string(t.kind))}}(q||(q={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Je.defined(t)&&P.is(t.location)&&Je.string(t.message)}}(j||(j={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(I||(I={})),function(e){e.Unnecessary=1,e.Deprecated=2}(L||(L={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.href)}}(F||(F={})),function(e){e.create=function(e,t,n,r,o,i){let s={range:e,message:t};return Je.defined(n)&&(s.severity=n),Je.defined(r)&&(s.code=r),Je.defined(o)&&(s.source=o),Je.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;let n=e;return Je.defined(n)&&x.is(n.range)&&Je.string(n.message)&&(Je.number(n.severity)||Je.undefined(n.severity))&&(Je.integer(n.code)||Je.string(n.code)||Je.undefined(n.code))&&(Je.undefined(n.codeDescription)||Je.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Je.string(n.source)||Je.undefined(n.source))&&(Je.undefined(n.relatedInformation)||Je.typedArray(n.relatedInformation,j.is))}}($||($={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return Je.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.title)&&Je.string(t.command)}}(V||(V={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.newText)&&x.is(t.range)}}(W||(W={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.label)&&(Je.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Je.string(t.description)||void 0===t.description)}}(U||(U={})),function(e){e.is=function(e){const t=e;return Je.string(t)}}(H||(H={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return W.is(t)&&(U.is(t.annotationId)||H.is(t.annotationId))}}(B||(B={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Je.defined(t)&&Y.is(t.textDocument)&&Array.isArray(t.edits)}}(z||(z={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Je.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(K||(K={})),function(e){e.create=function(e,t,n,r){let o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Je.string(t.oldUri)&&Je.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(J||(J={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Je.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Je.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Je.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(X||(X={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Je.string(e.kind)?K.is(e)||J.is(e)||X.is(e):z.is(e)))}}(G||(G={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)}}(Z||(Z={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&Je.integer(t.version)}}(Q||(Q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&(null===t.version||Je.integer(t.version))}}(Y||(Y={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&Je.string(t.languageId)&&Je.integer(t.version)&&Je.string(t.text)}}(ee||(ee={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(te||(te={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(e)&&te.is(t.kind)&&Je.string(t.value)}}(ne||(ne={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(re||(re={})),function(e){e.PlainText=1,e.Snippet=2}(oe||(oe={})),function(e){e.Deprecated=1}(ie||(ie={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Je.string(t.newText)&&x.is(t.insert)&&x.is(t.replace)}}(se||(se={})),function(e){e.asIs=1,e.adjustIndentation=2}(ae||(ae={})),function(e){e.is=function(e){const t=e;return t&&(Je.string(t.detail)||void 0===t.detail)&&(Je.string(t.description)||void 0===t.description)}}(ce||(ce={})),function(e){e.create=function(e){return{label:e}}}(ue||(ue={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(le||(le={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Je.string(t)||Je.objectLiteral(t)&&Je.string(t.language)&&Je.string(t.value)}}(de||(de={})),function(e){e.is=function(e){let t=e;return!!t&&Je.objectLiteral(t)&&(ne.is(t.contents)||de.is(t.contents)||Je.typedArray(t.contents,de.is))&&(void 0===e.range||x.is(e.range))}}(fe||(fe={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(he||(he={})),function(e){e.create=function(e,t,...n){let r={label:e};return Je.defined(t)&&(r.documentation=t),Je.defined(n)?r.parameters=n:r.parameters=[],r}}(pe||(pe={})),function(e){e.Text=1,e.Read=2,e.Write=3}(me||(me={})),function(e){e.create=function(e,t){let n={range:e};return Je.number(t)&&(n.kind=t),n}}(ge||(ge={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(ye||(ye={})),function(e){e.Deprecated=1}(be||(be={})),function(e){e.create=function(e,t,n,r,o){let i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(ve||(ve={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(De||(De={})),function(e){e.create=function(e,t,n,r,o,i){let s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){let t=e;return t&&Je.string(t.name)&&Je.number(t.kind)&&x.is(t.range)&&x.is(t.selectionRange)&&(void 0===t.detail||Je.string(t.detail))&&(void 0===t.deprecated||Je.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(ke||(ke={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Ce||(Ce={})),function(e){e.Invoked=1,e.Automatic=2}(_e||(_e={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Je.defined(t)&&Je.typedArray(t.diagnostics,$.is)&&(void 0===t.only||Je.typedArray(t.only,Je.string))&&(void 0===t.triggerKind||t.triggerKind===_e.Invoked||t.triggerKind===_e.Automatic)}}(Re||(Re={})),function(e){e.create=function(e,t,n){let r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):V.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Je.string(t.title)&&(void 0===t.diagnostics||Je.typedArray(t.diagnostics,$.is))&&(void 0===t.kind||Je.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||V.is(t.command))&&(void 0===t.isPreferred||Je.boolean(t.isPreferred))&&(void 0===t.edit||G.is(t.edit))}}(Te||(Te={})),function(e){e.create=function(e,t){let n={range:e};return Je.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Je.defined(t)&&x.is(t.range)&&(Je.undefined(t.command)||V.is(t.command))}}(Se||(Se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.uinteger(t.tabSize)&&Je.boolean(t.insertSpaces)}}(we||(we={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Je.defined(t)&&x.is(t.range)&&(Je.undefined(t.target)||Je.string(t.target))}}(xe||(xe={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Je.objectLiteral(n)&&x.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Pe||(Pe={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Oe||(Oe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Me||(Me={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Ae||(Ae={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&x.is(t.range)&&Je.string(t.text)}}(Ne||(Ne={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&x.is(t.range)&&Je.boolean(t.caseSensitiveLookup)&&(Je.string(t.variableName)||void 0===t.variableName)}}(Ee||(Ee={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&x.is(t.range)&&(Je.string(t.expression)||void 0===t.expression)}}(qe||(qe={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Je.defined(t)&&x.is(e.stoppedLocation)}}(je||(je={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Ie||(Ie={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&(void 0===t.tooltip||Je.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.location||P.is(t.location))&&(void 0===t.command||V.is(t.command))}}(Le||(Le={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Je.objectLiteral(t)&&w.is(t.position)&&(Je.string(t.label)||Je.typedArray(t.label,Le.is))&&(void 0===t.kind||Ie.is(t.kind))&&void 0===t.textEdits||Je.typedArray(t.textEdits,W.is)&&(void 0===t.tooltip||Je.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.paddingLeft||Je.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Je.boolean(t.paddingRight))}}(Fe||(Fe={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}($e||($e={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Ve||(Ve={})),function(e){e.create=function(e){return{items:e}}}(We||(We={})),function(e){e.Invoked=0,e.Automatic=1}(Ue||(Ue={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(He||(He={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Be||(Be={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&R.is(t.uri)&&Je.string(t.name)}}(ze||(ze={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s<o.length&&a<i.length;){let t=n(o[s],i[a]);e[c++]=t<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new ut(e,t,n,r)},e.is=function(e){let t=e;return!!(Je.defined(t)&&Je.string(t.uri)&&(Je.undefined(t.languageId)||Je.string(t.languageId))&&Je.uinteger(t.lineCount)&&Je.func(t.getText)&&Je.func(t.positionAt)&&Je.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText(),o=t(n,(e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),i=r.length;for(let t=o.length-1;t>=0;t--){let n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(Ke||(Ke={}));class ut{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return w.create(0,e);for(;n<r;){let o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}let o=n-1;return w.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Je||(Je={}));class lt{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(lt.isIncremental(t)){const e=pt(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const o=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const a=ft(t.text,!1,n);if(i-o===a.length)for(let e=0,t=a.length;e<t;e++)s[e+o+1]=a[e];else a.length<1e4?s.splice(o+1,i-o,...a):this._lineOffsets=s=s.slice(0,o+1).concat(a,s.slice(i+1));const c=t.text.length-(r-n);if(0!==c)for(let e=o+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+c}else{if(!lt.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=ft(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){const o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}const o=n-1;return{line:o,character:(e=this.ensureBeforeEOL(e,t[o]))-t[o]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1<t.length?t[e.line+1]:this._content.length,o=Math.min(n+e.character,r);return this.ensureBeforeEOL(o,n)}ensureBeforeEOL(e,t){for(;e>t&&ht(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function dt(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);dt(r,t),dt(o,t);let i=0,s=0,a=0;for(;i<r.length&&s<o.length;){const n=t(r[i],o[s]);e[a++]=n<=0?r[i++]:o[s++]}for(;i<r.length;)e[a++]=r[i++];for(;s<o.length;)e[a++]=o[s++];return e}function ft(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){const o=e.charCodeAt(t);ht(o)&&(13===o&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function ht(e){return 13===e||10===e}function pt(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function mt(e){const t=pt(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function gt(e){return e>=Ge.SchemaResolveError}!function(e){e.create=function(e,t,n,r){return new lt(e,t,n,r)},e.update=function(e,t,n){if(e instanceof lt)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=dt(t.map(mt),(e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n});let o=0;const i=[];for(const t of r){const r=e.offsetAt(t.range.start);if(r<o)throw new Error("Overlapping edit");r>o&&i.push(n.substring(o,r)),t.newText.length&&i.push(t.newText),o=e.offsetAt(t.range.end)}return i.push(n.substr(o)),i.join("")}}(Xe||(Xe={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",e[e.SchemaResolveError=65536]="SchemaResolveError"}(Ge||(Ge={})),function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"}(Ze||(Ze={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[te.Markdown,te.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}}(Qe||(Qe={})),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=a,s=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,o=47===s.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,s=i-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(o+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=o+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,o=0,i=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){o=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){o=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){r=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};let o;if(n.r(r),n.d(r,{URI:()=>f,Utils:()=>S}),"object"==typeof process)o=!1;else if("object"==typeof navigator){let e=navigator.userAgent;o=e.indexOf("Windows")>=0}const i=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function c(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!i.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const u="",l="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){return e instanceof f||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,o,i=!1){"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==l&&(t=l+t):t=l}return t}(this.scheme,n||u),this.query=r||u,this.fragment=o||u,c(this,i))}get fsPath(){return b(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===r?r=this.path:null===r&&(r=u),void 0===o?o=this.query:null===o&&(o=u),void 0===i?i=this.fragment:null===i&&(i=u),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new p(t,n,r,o,i)}static parse(e,t=!1){const n=d.exec(e);return n?new p(n[2]||u,C(n[4]||u),C(n[5]||u),C(n[7]||u),C(n[9]||u),t):new p(u,u,u,u,u)}static file(e){let t=u;if(o&&(e=e.replace(/\\/g,l)),e[0]===l&&e[1]===l){const n=e.indexOf(l,2);-1===n?(t=e.substring(2),e=l):(t=e.substring(2,n),e=e.substring(n)||l)}return new p("file",t,e,u,u)}static from(e){const t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return c(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{const t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}const h=o?1:void 0;class p extends f{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(e,t,n){let r,o=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));const t=m[s];void 0!==t?(-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),r+=t):-1===o&&(o=i)}}return-1!==o&&(r+=encodeURIComponent(e.substring(o))),void 0!==r?r:e}function y(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=m[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function b(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o&&(n=n.replace(/\//g,"\\")),n}function v(e,t){const n=t?y:g;let r="",{scheme:o,authority:i,path:s,query:a,fragment:c}=e;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=l,r+=l),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?r+=n(i,!1,!0):(r+=n(i.substr(0,e),!1,!0),r+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:g(c,!1,!1)),r}function D(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+D(e.substr(3)):e}}const k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(k)?e.replace(k,e=>D(e)):e}var _=n(975);const R=_.posix||_,T="/";var S;!function(e){e.joinPath=function(e,...t){return e.with({path:R.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==T&&(n=T+n,r=!0);let o=R.resolve(n,...t);return r&&o[0]===T&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===T)return e;let t=R.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return R.basename(e.path)},e.extname=function(e){return R.extname(e.path)}}(S||(S={})),Ye=r})();const{URI:yt,Utils:bt}=Ye;var vt=n(3608);const Dt={"color-hex":{errorMessage:vt.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:vt.t("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:vt.t("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:vt.t("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:vt.t("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:vt.t("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:vt.t("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:vt.t("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class kt{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class Ct extends kt{constructor(e,t){super(e,t),this.type="null",this.value=null}}class _t extends kt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class Rt extends kt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class Tt extends kt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class St extends kt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class wt extends kt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class xt extends kt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function Pt(e){return rt(e)?e?{}:{not:{}}:e}var Ot;!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(Ot||(Ot={}));function Mt(e){e.startsWith("http://json-schema.org/")&&(e="https://json-schema.org/"+e.substring(23));try{return yt.parse(e).toString(!0)}catch(t){return e}}function At(e){return Nt[Mt(e)]??void 0}const Nt={"https://json-schema.org/draft-03/schema":Ze.v3,"https://json-schema.org/draft-04/schema":Ze.v4,"https://json-schema.org/draft-06/schema":Ze.v6,"https://json-schema.org/draft-07/schema":Ze.v7,"https://json-schema.org/draft/2019-09/schema":Ze.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ze.v2020_12};class Et{constructor(e){this.schemaDraft=e}}class qt{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||$t(e,this.focusOffset))&&e!==this.exclude}newSub(){return new qt(-1,this.exclude)}}class jt{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}jt.instance=new jt;class It{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues&&(this.enumValues=this.enumValues.concat(e.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(const e of this.problems)e.code===Ge.EnumValueMismatch&&(e.message=vt.t("Value is not accepted. Valid values: {0}.",this.enumValues.map(e=>JSON.stringify(e)).join(", ")))}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(e=>this.processedProperties.add(e))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}}function Lt(e){return k(e)}function Ft(e){return D(e)}function $t(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}class Vt{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return v(this.root,e,t)}visit(e){if(this.root){const t=n=>{let r=e(n);const o=n.children;if(Array.isArray(o))for(let e=0;e<o.length&&r;e++)r=t(o[e]);return r};t(this.root)}}validate(e,t,n=I.Warning,r){if(this.root&&t){const o=new It;return Ut(this.root,t,o,jt.instance,new Et(r??Wt(t))),o.problems.map(t=>{const r=x.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return $.create(r,t.message,t.severity??n,t.code)})}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new qt(t,n),o=Wt(e),i=new Et(o);return Ut(this.root,e,new It,r,i),r.schemas}return[]}}function Wt(e,t=Ze.v2020_12){let n=e.$schema;return n?At(n)??t:t}function Ut(e,t,n,r,o){if(!e||!r.include(e))return;if("property"===e.type)return Ut(e.valueNode,t,n,r,o);const i=e;switch(function(){function e(e){return i.type===e||"integer"===e&&"number"===i.type&&i.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||vt.t("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||vt.t('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf){const t=new It,s=r.newSub();Ut(i,Pt(e),t,s,o),n.merge(t),r.merge(s)}const s=Pt(t.not);if(s){const e=new It,a=r.newSub();Ut(i,s,e,a,o),e.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||vt.t("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,r.add(e)}const a=(e,t)=>{const s=[],a=function(e){if(e.length<2)return;const t=t=>{const n=new Map;for(let r=0;r<e.length;r++){const o=t(Pt(e[r]),r);if(!o)return;o.forEach(([e,t])=>{if(void 0!==t.const){n.has(e)||n.set(e,new Map);const o=n.get(e);o.has(t.const)||o.set(t.const,[]),o.get(t.const).push(r)}})}return n},n=(t,n)=>{for(const[r,o]of t){const t=new Set;if(o.forEach(e=>e.forEach(e=>t.add(e))),t.size===e.length){const t=n(r),i=o.get(t);if(i?.length)return i.map(t=>e[t]);break}}};if("object"===i.type&&i.properties?.length){const e=t(e=>e.properties?Object.entries(e.properties).map(([e,t])=>[e,Pt(t)]):void 0);if(e)return n(e,e=>{const t=i.properties.find(t=>t.keyNode.value===e);return"string"===t?.valueNode?.type?t.valueNode.value:void 0})}else if("array"===i.type&&i.items?.length){const e=t(e=>{const t=e.prefixItems||(Array.isArray(e.items)?e.items:void 0);return t?t.map((e,t)=>[t,Pt(e)]):void 0});if(e)return n(e,e=>{const t=i.items[e];return"string"===t?.type?t.value:void 0})}}(e)??e;let c;for(const e of a){const n=Pt(e),a=new It,u=r.newSub();if(Ut(i,n,a,u,o),a.hasProblems()||s.push(n),c)if(t||a.hasProblems()||c.validationResult.hasProblems()){const e=a.compare(c.validationResult);e>0?c={schema:n,validationResult:a,matchingSchemas:u}:0===e&&(c.matchingSchemas.merge(u),c.validationResult.mergeEnumValues(a))}else c.matchingSchemas.merge(u),c.validationResult.propertiesMatches+=a.propertiesMatches,c.validationResult.propertiesValueMatches+=a.propertiesValueMatches,c.validationResult.mergeProcessedProperties(a);else c={schema:n,validationResult:a,matchingSchemas:u}}return s.length>1&&t&&n.problems.push({location:{offset:i.offset,length:1},message:vt.t("Matches multiple schemas when only one must validate.")}),c&&(c.validationResult.updateEnumMismatchProblemMessages(),n.merge(c.validationResult),r.merge(c.matchingSchemas)),s.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1),Array.isArray(t.oneOf)&&a(t.oneOf,!0);const c=e=>{const t=new It,s=r.newSub();Ut(i,Pt(e),t,s,o),n.merge(t),r.merge(s)},u=Pt(t.if);if(u&&((e,t,s)=>{const a=Pt(e),u=new It,l=r.newSub();Ut(i,a,u,l,o),r.merge(l),n.mergeProcessedProperties(u),u.hasProblems()?s&&c(s):t&&c(t)})(u,Pt(t.then),Pt(t.else)),Array.isArray(t.enum)){const e=Lt(i);let r=!1;for(const n of t.enum)if(et(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:i.offset,length:i.length},code:Ge.EnumValueMismatch,message:t.errorMessage||vt.t("Value is not accepted. Valid values: {0}.",t.enum.map(e=>JSON.stringify(e)).join(", "))})}nt(t.const)&&(et(Lt(i),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:Ge.EnumValueMismatch,message:t.errorMessage||vt.t("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]);let l=t.deprecationMessage;if(l||t.deprecated){l=l||vt.t("Value is deprecated");let e="property"===i.parent?.type?i.parent:i;n.problems.push({location:{offset:e.offset,length:e.length},severity:I.Warning,message:l,code:Ge.Deprecated})}}(),i.type){case"object":!function(e){const i=Object.create(null),s=new Set;for(const t of e.properties){const e=t.keyNode.value;i[e]=t.valueNode,s.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!i[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:o,message:vt.t('Missing property "{0}".',r)})}const a=e=>{s.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const s=t.properties[e],c=i[e];if(c)if(rt(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=c.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||vt.t("Property {0} is not allowed.",e)})}else{const e=new It;Ut(c,s,e,r,o),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const c=at(e);if(c){const u=[];for(const a of s)if(c.test(a)){u.push(a);const s=i[a];if(s){const i=t.patternProperties[e];if(rt(i))if(i)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||vt.t("Property {0} is not allowed.",a)})}else{const e=new It;Ut(s,i,e,r,o),n.mergePropertyMatch(e)}}}u.forEach(a)}}const c=t.additionalProperties;if(void 0!==c)for(const e of s){a(e);const s=i[e];if(s)if(!1===c){const r=s.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||vt.t("Property {0} is not allowed.",e)})}else if(!0!==c){const e=new It;Ut(s,c,e,r,o),n.mergePropertyMatch(e)}}const u=t.unevaluatedProperties;if(void 0!==u){const e=[];for(const a of s)if(!n.processedProperties.has(a)){e.push(a);const s=i[a];if(s)if(!1===u){const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||vt.t("Property {0} is not allowed.",a)})}else if(!0!==u){const e=new It;Ut(s,u,e,r,o),n.mergePropertyMatch(e)}}e.forEach(a)}if(tt(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Object has more properties than limit of {0}.",t.maxProperties)}),tt(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(const e in t.dependentRequired){const n=i[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&d(e,r)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=i[e],r=t.dependentSchemas[e];n&&it(r)&&d(e,r)}if(t.dependencies)for(const e in t.dependencies)i[e]&&d(e,t.dependencies[e]);const l=Pt(t.propertyNames);if(l)for(const t of e.properties){const e=t.keyNode;e&&Ut(e,l,n,r,o)}function d(t,s){if(Array.isArray(s))for(const r of s)i[r]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Object is missing property {0} required by property {1}.",r,t)});else{const t=Pt(s);if(t){const i=new It;Ut(e,t,i,r,o),n.mergePropertyMatch(i)}}}}(i);break;case"array":!function(e){let i,s;o.schemaDraft>=Ze.v2020_12?(i=t.prefixItems,s=Array.isArray(t.items)?void 0:t.items):(i=Array.isArray(t.items)?t.items:void 0,s=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==i){const l=Math.min(i.length,e.items.length);for(;a<l;a++){const d=Pt(i[a]),f=new It,h=e.items[a];h&&(Ut(h,d,f,r,o),n.mergePropertyMatch(f)),n.processedProperties.add(String(a))}}if(void 0!==s&&a<e.items.length)if("boolean"==typeof s)for(!1===s&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Array has too many items according to schema. Expected {0} or fewer.",a)});a<e.items.length;a++)n.processedProperties.add(String(a)),n.propertiesValueMatches++;else for(;a<e.items.length;a++){const p=new It;Ut(e.items[a],s,p,r,o),n.mergePropertyMatch(p),n.processedProperties.add(String(a))}const c=Pt(t.contains);if(c){let m=0;for(let g=0;g<e.items.length;g++){const y=e.items[g],b=new It;Ut(y,c,b,jt.instance,o),b.hasProblems()||(m++,o.schemaDraft>=Ze.v2020_12&&n.processedProperties.add(String(g)))}0!==m||tt(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||vt.t("Array does not contain required item.")}),tt(t.minContains)&&m<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||vt.t("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),tt(t.maxContains)&&m>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||vt.t("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const u=t.unevaluatedItems;if(void 0!==u)for(let v=0;v<e.items.length;v++){if(!n.processedProperties.has(String(v)))if(!1===u)n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Item does not match any validation rule from the array.")});else{const D=new It;Ut(e.items[v],t.unevaluatedItems,D,r,o),n.mergePropertyMatch(D)}n.processedProperties.add(String(v)),n.propertiesValueMatches++}if(tt(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Array has too few items. Expected {0} or more.",t.minItems)}),tt(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){const k=Lt(e);function C(){for(let e=0;e<k.length-1;e++){const t=k[e];for(let n=e+1;n<k.length;n++)if(et(t,k[n]))return!0}return!1}C()&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Array has duplicate items.")})}}(i);break;case"string":!function(e){if(tt(t.minLength)&&ct(e.value)<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("String is shorter than the minimum length of {0}.",t.minLength)}),tt(t.maxLength)&&ct(e.value)>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("String is longer than the maximum length of {0}.",t.maxLength)}),ot(t.pattern)){const r=at(t.pattern);r&&!r.test(e.value)&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||vt.t('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=vt.t("URI with a scheme is expected.")):r=vt.t("URI is expected.")}else r=vt.t("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||vt.t("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=Dt[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(i);break;case"number":!function(e){const r=e.value;function o(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(tt(t.multipleOf)){let i=-1;if(Number.isInteger(t.multipleOf))i=r%t.multipleOf;else{let e=o(t.multipleOf),n=o(r);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier<e.multiplier?n.value*=t:e.value*=t,i=n.value%e.value}}0!==i&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Value is not divisible by {0}.",t.multipleOf)})}function i(e,t){return tt(t)?t:rt(t)&&t?e:void 0}function s(e,t){if(!rt(t)||!t)return e}const a=i(t.minimum,t.exclusiveMinimum);tt(a)&&r<=a&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Value is below the exclusive minimum of {0}.",a)});const c=i(t.maximum,t.exclusiveMaximum);tt(c)&&r>=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Value is above the exclusive maximum of {0}.",c)});const u=s(t.minimum,t.exclusiveMinimum);tt(u)&&r<u&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Value is below the minimum of {0}.",u)});const l=s(t.maximum,t.exclusiveMaximum);tt(l)&&r>l&&n.problems.push({location:{offset:e.offset,length:e.length},message:vt.t("Value is above the maximum of {0}.",l)})}(i)}r.add({node:i,schema:t})}function Ht(e,t,n){if(null!==e&&"object"==typeof e){const r=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";let o="[\n";for(let t=0;t<e.length;t++)o+=r+Ht(e[t],r,n),t<e.length-1&&(o+=","),o+="\n";return o+=t+"]",o}{const o=Object.keys(e);if(0===o.length)return"{}";let i="{\n";for(let t=0;t<o.length;t++){const s=o[t];i+=r+JSON.stringify(s)+": "+Ht(e[s],r,n),t<o.length-1&&(i+=","),i+="\n"}return i+=t+"}",i}}return n(e)}class Bt{constructor(e,t=[],n=Promise,r={}){this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r}doResolve(e){for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},o=e.getText(),i=e.offsetAt(t);let s=n.getNodeFromOffset(i,!0);if(this.isInComment(e,s?s.offset:0,i))return Promise.resolve(r);if(s&&i===s.offset+s.length&&i>0){const e=o[i-1];("object"===s.type&&"}"===e||"array"===s.type&&"]"===e)&&(s=s.parent)}const a=this.getCurrentWord(e,i);let c;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){let n=i-a.length;n>0&&'"'===o[n-1]&&n--,c=x.create(e.positionAt(n),t)}else c=x.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));const u=new Map,l={add:e=>{let t=e.label;const n=u.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";u.has(e)||(t=e)}e.textEdit=W.replace(c,e.insertText),e.label=t,u.set(t,e),r.items.push(e)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then(t=>{const d=[];let f,h=!0,p="";if(s&&"string"===s.type){const e=s.parent;e&&"property"===e.type&&e.keyNode===s&&(h=!e.valueNode,f=e,p=o.substr(s.offset+1,s.length-2),e&&(s=e.parent))}if(s&&"object"===s.type){if(s.offset===i)return r;s.properties.forEach(e=>{f&&f===e||u.set(e.keyNode.value,ue.create("__"))});let m="";h&&(m=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?this.getPropertyCompletions(t,n,s,h,m,l):this.getSchemaLessPropertyCompletions(n,s,p,l);const g=Ft(s);this.contributions.forEach(t=>{const n=t.collectPropertyCompletions(e.uri,g,a,h,""===m,l);n&&d.push(n)}),!t&&a.length>0&&'"'!==o.charAt(i-a.length-1)&&(l.add({kind:re.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,m),insertTextFormat:oe.Snippet,documentation:""}),l.setAsIncomplete())}const m={};return t?this.getValueCompletions(t,n,s,i,e,l,m):this.getSchemaLessValueCompletions(n,s,i,e,l),this.contributions.length>0&&this.getContributedValueCompletions(n,s,i,e,l,d),this.promiseConstructor.all(d).then(()=>{if(0===l.getNumberOfProposals()){let t=i;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(m,n,l)}return r})})}getPropertyCompletions(e,t,n,r,o,i){t.getMatchingSchemas(e.schema,n.offset).forEach(e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach(e=>{const n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.completionDetail&&(t.detail=n.completionDetail),void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&st(t.insertText,`$1${o}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(t)}});const n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t,s,a)=>{const c={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||"",sortText:a,detail:s};c.insertText&&st(c.insertText,`$1${o}`)&&(c.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(c)};if(n.enum)for(let t=0;t<n.enum.length;t++){let r;n.markdownEnumDescriptions&&t<n.markdownEnumDescriptions.length?r=this.fromMarkup(n.markdownEnumDescriptions[t]):n.enumDescriptions&&t<n.enumDescriptions.length&&(r=n.enumDescriptions[t]);const o=n.enumSortTexts?.[t],i=n.enumDetails?.[t];e(n.enum[t],r,i,o)}if(n.examples)for(let t=0;t<n.examples.length;t++)e(n.examples[t],void 0,void 0,void 0);n.const&&e(n.const,void 0,n.completionDetail,n.suggestSortText)}}})}getSchemaLessPropertyCompletions(e,t,n,r){const o=e=>{e.properties.forEach(e=>{const t=e.keyNode.value;r.add({kind:re.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})})};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit(e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0))}else"array"===t.parent.type&&t.parent.items.forEach(e=>{"object"===e.type&&e!==t&&o(e)});else"object"===t.type&&r.add({kind:re.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:oe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,o){let i=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(i=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:oe.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:oe.Snippet,documentation:""});const s=this.evaluateSeparatorAfter(r,i),a=e=>{e.parent&&!$t(e.parent,n,!0)&&o.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,s),insertTextFormat:oe.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,s,o)};if("property"===t.type&&n>(t.colonOffset||0)){const r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;const i=t.keyNode.value;e.visit(e=>("property"===e.type&&e.keyNode.value===i&&e.valueNode&&a(e.valueNode),!0)),"$schema"===i&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit(e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0))}else t.items.forEach(a)}getValueCompletions(e,t,n,r,o,i,s){let a,c,u=r;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(u=n.offset+n.length,c=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){const e=n.valueNode;if(e&&r>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const l=this.evaluateSeparatorAfter(o,u),d=t.getMatchingSchemas(e.schema,n.offset,c);for(const e of d)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=i;if(e.schema.uniqueItems){const e=new Set;n.children.forEach(t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(Lt(t)))}),t={...i,add(t){e.has(t.label)||i.add(t)}}}if(Array.isArray(e.schema.items)){const i=this.findItemAtOffset(n,o,r);i<e.schema.items.length&&this.addSchemaValueCompletions(e.schema.items[i],l,t,s)}else this.addSchemaValueCompletions(e.schema.items,l,t,s)}if(void 0!==a){let t=!1;if(e.schema.properties){const n=e.schema.properties[a];n&&(t=!0,this.addSchemaValueCompletions(n,l,i,s))}if(e.schema.patternProperties&&!t)for(const n of Object.keys(e.schema.patternProperties)){const r=at(n);if(r?.test(a)){t=!0;const r=e.schema.patternProperties[n];this.addSchemaValueCompletions(r,l,i,s)}}if(e.schema.additionalProperties&&!t){const t=e.schema.additionalProperties;this.addSchemaValueCompletions(t,l,i,s)}}}"$schema"!==a||n.parent||this.addDollarSchemaCompletions(l,i),s.boolean&&(this.addBooleanValueCompletion(!0,l,i),this.addBooleanValueCompletion(!1,l,i)),s.null&&this.addNullValueCompletion(l,i)}}else this.addSchemaValueCompletions(e.schema,"",i,s)}getContributedValueCompletions(e,t,n,r,o,i){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),t&&"property"===t.type&&n>(t.colonOffset||0)){const e=t.keyNode.value,s=t.valueNode;if((!s||n<=s.offset+s.length)&&t.parent){const n=Ft(t.parent);this.contributions.forEach(t=>{const s=t.collectValueCompletions(r.uri,n,e,o);s&&i.push(s)})}}}else this.contributions.forEach(e=>{const t=e.collectDefaultCompletions(r.uri,o);t&&i.push(t)})}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)),Array.isArray(e.anyOf)&&e.anyOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)),Array.isArray(e.oneOf)&&e.oneOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r)))}addDefaultValueCompletions(e,t,n,r=0){let o=!1;if(nt(e.default)){let i=e.type,s=e.default;for(let e=r;e>0;e--)s=[s],i="array";const a={kind:this.getSuggestionKind(i),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:oe.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:vt.t("Default value")}:a.detail=vt.t("Default value"),n.add(a),o=!0}Array.isArray(e.examples)&&e.examples.forEach(i=>{let s=e.type,a=i;for(let e=r;e>0;e--)a=[a],s="array";n.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:oe.Snippet}),o=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(i=>{let s,a,c=e.type,u=i.body,l=i.label;if(nt(u)){let n=e.type;for(let e=r;e>0;e--)u=[u],n="array";s=this.getInsertTextForSnippetValue(u,t),a=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else{if("string"!=typeof i.bodyText)return;{let e="",n="",o="";for(let t=r;t>0;t--)e=e+o+"[\n",n=n+"\n"+o+"]",o+="\t",c="array";s=e+o+i.bodyText.split("\n").join("\n"+o)+n+t,l=l||s,a=s.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(c),label:l,documentation:this.fromMarkup(i.markdownDescription)||i.description,insertText:s,insertTextFormat:oe.Snippet,filterText:a}),o=!0}),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(nt(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:oe.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,o=e.enum.length;r<o;r++){const o=e.enum[r];let i=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?i=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(i=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:oe.Snippet,sortText:e.enumSortTexts?.[r],detail:e.enumDetails?.[r],documentation:i})}}collectTypes(e,t){if(Array.isArray(e.enum)||nt(e.const))return;const n=e.type;Array.isArray(n)?n.forEach(e=>t[e]=!0):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:oe.Snippet,detail:vt.t("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:oe.Snippet,detail:vt.t("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:oe.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:oe.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds(e=>"http"===e||"https"===e).forEach(n=>{n.startsWith("https://json-schema.org/draft-")&&(n+="#"),t.add({kind:re.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:oe.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return Ht(e,"",e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return re.Value;switch(e){case"string":default:return re.Value;case"object":return re.Module;case"property":return re.Property}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const o=this.getInsertTextForValue(e,"");if(!n)return o;const i=o+": ";let s,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;nt(e)&&(s=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(s||1!==t.enum.length||(s=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),nt(t.const)&&(s||(s=this.getInsertTextForGuessedValue(t.const,"")),a++),nt(t.default)&&(s||(s=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(s||(s=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){case"boolean":s="$1";break;case"string":s='"$1"';break;case"object":s="{$1}";break;case"array":s="[$1]";break;case"number":case"integer":s="${1:0}";break;case"null":s="${1:null}";break;default:return o}}}return(!s||a>1)&&(s="$1"),i+s+r}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=m(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=m(t.getText(),!0),o=e.items;for(let e=o.length-1;e>=0;e--){const t=o[e];if(n>t.offset+t.length)return r.setPosition(t.offset+t.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?e+1:e;if(n>=t.offset)return e}return 0}isInComment(e,t,n){const r=m(e.getText(),!1);r.setPosition(t);let o=r.scan();for(;17!==o&&r.getTokenOffset()+r.getTokenLength()<n;)o=r.scan();return(12===o||13===o)&&r.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:te.Markdown,value:e}}doesSupportMarkdown(){if(!nt(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(te.Markdown)}return this.supportsMarkdown}doesSupportsCommitCharacters(){return nt(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return nt(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}class zt{constructor(e,t=[],n){this.schemaService=e,this.contributions=t,this.promise=n||Promise}doHover(e,t,n){const r=e.offsetAt(t);let o=n.getNodeFromOffset(r);if(!o||("object"===o.type||"array"===o.type)&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);const i=o;if("string"===o.type){const e=o.parent;if(e&&"property"===e.type&&e.keyNode===o&&(o=e.valueNode,!o))return this.promise.resolve(null)}const s=x.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),a=e=>({contents:e,range:s}),c=Ft(o);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].getInfoContribution(e.uri,c);if(n)return n.then(e=>a(e))}return this.schemaService.getSchemaForResource(e.uri,n).then(e=>{if(!e)return null;let t,r,i,s;const c=n.getMatchingSchemas(e.schema,o.offset).filter(e=>e.node===o&&!e.inverted).map(e=>e.schema);for(const e of c)if(t=t||e.title,r=r||e.markdownDescription||Kt(e.description),e.enum){const t=e.enum.indexOf(Lt(o));e.markdownEnumDescriptions?i=e.markdownEnumDescriptions[t]:e.enumDescriptions&&(i=Kt(e.enumDescriptions[t])),i&&(s=e.enum[t],"string"!=typeof s&&(s=JSON.stringify(s)))}let u="";return t&&(u=Kt(t)),r&&(u.length>0&&(u+="\n\n"),u+=r),i&&(u.length>0&&(u+="\n\n"),u+=`\`${l=s,-1!==l.indexOf("`")?"`` "+l+" ``":l}\`: ${i}`),a([u]);var l})}}function Kt(e){if(e)return e.trim().replace(/[\\`*_{}[\]()<>#+\-.!]/g,"\\$&").replace(/([ \t]+)/g,(e,t)=>"&nbsp;".repeat(t.length)).replace(/\n/g,"\\\n")}class Jt{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:I.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const o=[],i={},s=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;i[t]||(i[t]=!0,o.push(e))},a=r=>{let i=n?.trailingCommas?Qt(n.trailingCommas):I.Error,a=n?.comments?Qt(n.comments):this.commentSeverity,c=n?.schemaValidation?Qt(n.schemaValidation):I.Warning,u=n?.schemaRequest?Qt(n.schemaRequest):I.Warning;if(r){const o=(n,r,o)=>{if(t.root&&u){const i=t.root,a="object"===i.type?i.properties[0]:void 0;if(a&&"$schema"===a.keyNode.value){const t=a.valueNode||a,i=x.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));s($.create(i,n,u,r,"json",o))}else{const t=x.create(e.positionAt(i.offset),e.positionAt(i.offset+1));s($.create(t,n,u,r,"json",o))}}};if(r.errors.length){const e=r.errors[0];o(e.message,e.code,e.relatedInformation)}else if(c){for(const e of r.warnings)o(e.message,e.code,e.relatedInformation);const i=t.validate(e,r.schema,c,n?.schemaDraft);i&&i.forEach(s)}Gt(r.schema)&&(a=void 0),Zt(r.schema)&&(i=void 0)}for(const e of t.syntaxErrors){if(e.code===Ge.TrailingComma){if("number"!=typeof i)continue;e.severity=i}s(e)}if("number"==typeof a){const e=vt.t("Comments are not permitted in JSON.");t.comments.forEach(t=>{s($.create(t,e,a,Ge.CommentNotPermitted))})}return o};if(r){const e=r.id||"schemaservice://untitled/"+Xt++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then(e=>a(e))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(e=>a(e))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}}let Xt=0;function Gt(e){if(e&&"object"==typeof e){if(rt(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=Gt(t);if(rt(e))return e}}}function Zt(e){if(e&&"object"==typeof e){if(rt(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(rt(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=Zt(t);if(rt(e))return e}}}function Qt(e){switch(e){case"error":return I.Error;case"warning":return I.Warning;case"ignore":return}}function Yt(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function en(e){if("#"===e[0])switch(e.length){case 4:return{red:17*Yt(e.charCodeAt(1))/255,green:17*Yt(e.charCodeAt(2))/255,blue:17*Yt(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Yt(e.charCodeAt(1))/255,green:17*Yt(e.charCodeAt(2))/255,blue:17*Yt(e.charCodeAt(3))/255,alpha:17*Yt(e.charCodeAt(4))/255};case 7:return{red:(16*Yt(e.charCodeAt(1))+Yt(e.charCodeAt(2)))/255,green:(16*Yt(e.charCodeAt(3))+Yt(e.charCodeAt(4)))/255,blue:(16*Yt(e.charCodeAt(5))+Yt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Yt(e.charCodeAt(1))+Yt(e.charCodeAt(2)))/255,green:(16*Yt(e.charCodeAt(3))+Yt(e.charCodeAt(4)))/255,blue:(16*Yt(e.charCodeAt(5))+Yt(e.charCodeAt(6)))/255,alpha:(16*Yt(e.charCodeAt(7))+Yt(e.charCodeAt(8)))/255}}}class tn{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||st(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=P.create(e.uri,nn(e,s));if(t.push({name:rn(r.valueNode),kind:ye.Function,location:a}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[{node:r,containerName:""}];let a=0,c=!1;const u=[],l=(t,n)=>{"array"===t.type?t.items.forEach(e=>{e&&s.push({node:e,containerName:n})}):"object"===t.type&&t.properties.forEach(t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=P.create(e.uri,nn(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;u.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:i,containerName:n}),s.push({node:r,containerName:a})}else c=!0})};for(;a<s.length;){const e=s[a++];l(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),u}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||st(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=nn(e,s),c=nn(e,r.keyNode);if(t.push({name:rn(r.valueNode),kind:ye.Function,range:a,selectionRange:c}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[],a=[{node:r,result:s}];let c=0,u=!1;const l=(t,n)=>{"array"===t.type?t.items.forEach((t,r)=>{if(t)if(o>0){o--;const i=nn(e,t),s=i,c={name:String(r),kind:this.getSymbolKind(t.type),range:i,selectionRange:s,children:[]};n.push(c),a.push({result:c.children,node:t})}else u=!0}):"object"===t.type&&t.properties.forEach(t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=nn(e,t),s=nn(e,t.keyNode),c=[],u={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:i,selectionRange:s,children:c,detail:this.getDetail(r)};n.push(u),a.push({result:c,node:r})}else u=!0})};for(;c<a.length;){const e=a[c++];l(e.node,e.result)}return u&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),s}getSymbolKind(e){switch(e){case"object":return ye.Module;case"string":return ye.String;case"number":return ye.Number;case"array":return ye.Array;case"boolean":return ye.Boolean;default:return ye.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e)return"boolean"===e.type||"number"===e.type||"null"===e.type||"string"===e.type?String(e.value):"array"===e.type?e.children.length?void 0:"[]":"object"===e.type?e.children.length?void 0:"{}":void 0}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then(r=>{const o=[];if(r){let i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const s=t.getMatchingSchemas(r.schema),a={};for(const t of s)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const r=String(t.node.offset);if(!a[r]){const s=en(Lt(t.node));if(s){const n=nn(e,t.node);o.push({color:s,range:n})}if(a[r]=!0,i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),o}}}return o})}getColorPresentations(e,t,n,r){const o=[],i=Math.round(255*n.red),s=Math.round(255*n.green),a=Math.round(255*n.blue);function c(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let u;return u=1===n.alpha?`#${c(i)}${c(s)}${c(a)}`:`#${c(i)}${c(s)}${c(a)}${c(Math.round(255*n.alpha))}`,o.push({label:u,textEdit:W.replace(r,JSON.stringify(u))}),o}}function nn(e,t){return x.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function rn(e){return Lt(e)||vt.t("<empty>")}const on={schemaAssociations:[],schemas:{"https://json-schema.org/draft-04/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"https://json-schema.org/draft-07/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},"https://json-schema.org/draft/2020-12/schema":{$id:"https://json-schema.org/draft/2020-12/schema",$schema:"https://json-schema.org/draft/2020-12/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},$ref:{type:"string",format:"uri-reference"},$dynamicRef:{type:"string",format:"uri-reference"},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},prefixItems:{$ref:"#/$defs/schemaArray"},items:{$ref:"#"},contains:{$ref:"#"},additionalProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},unevaluatedItems:{$ref:"#"},unevaluatedProperties:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}},"https://json-schema.org/draft/2019-09/schema":{$id:"https://json-schema.org/draft/2019-09/schema",$schema:"https://json-schema.org/draft/2019-09/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},additionalItems:{$ref:"#"},unevaluatedItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$ref:"#"},additionalProperties:{$ref:"#"},unevaluatedProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}},sn={id:vt.t("A unique identifier for the schema."),$schema:vt.t("The schema to verify this document against."),title:vt.t("A descriptive title of the schema."),description:vt.t("A long description of the schema. Used in hover menus and suggestions."),default:vt.t("A default value. Used by suggestions."),multipleOf:vt.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:vt.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:vt.t("Makes the maximum property exclusive."),minimum:vt.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:vt.t("Makes the minimum property exclusive."),maxLength:vt.t("The maximum length of a string."),minLength:vt.t("The minimum length of a string."),pattern:vt.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:vt.t("For arrays, only when items is set as an array. If items are a schema, this schema validates items after the ones specified by the items schema. If false, additional items will cause validation to fail."),items:vt.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:vt.t("The maximum number of items that can be inside an array. Inclusive."),minItems:vt.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:vt.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:vt.t("The maximum number of properties an object can have. Inclusive."),minProperties:vt.t("The minimum number of properties an object can have. Inclusive."),required:vt.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:vt.t("Either a schema or a boolean. If a schema, used to validate all properties not matched by 'properties', 'propertyNames', or 'patternProperties'. If false, any properties not defined by the adajacent keywords will cause this schema to fail."),definitions:vt.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:vt.t("A map of property names to schemas for each property."),patternProperties:vt.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:vt.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:vt.t("The set of literal values that are valid."),type:vt.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:vt.t("Describes the format expected for the value. By default, not used for validation"),allOf:vt.t("An array of schemas, all of which must match."),anyOf:vt.t("An array of schemas, where at least one must match."),oneOf:vt.t("An array of schemas, exactly one of which must match."),not:vt.t("A schema which must not match."),$id:vt.t("A unique identifier for the schema."),$ref:vt.t("Reference a definition hosted on any location."),$comment:vt.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:vt.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:vt.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:vt.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:vt.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:vt.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:vt.t("Describes the media type of a string property."),contentEncoding:vt.t("Describes the content encoding of a string property."),if:vt.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:vt.t('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:vt.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in on.schemas){const t=on.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=sn[e];r&&(n.description=r)}}function an(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const o=!!t&&!!t.extended,i=!!t&&!!t.globstar;let s=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let c;for(let e=0,t=n.length;e<t;e++)switch(c=n[e],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(o){r+=".";break}case"[":case"]":if(o){r+=c;break}case"{":if(o){s=!0,r+="(";break}case"}":if(o){s=!1,r+=")";break}case",":if(s){r+="|";break}r+="\\"+c;break;case"*":const t=n[e-1];let a=1;for(;"*"===n[e+1];)a++,e++;const u=n[e+1];i?!(a>1)||"/"!==t&&void 0!==t&&"{"!==t&&","!==t||"/"!==u&&void 0!==u&&","!==u&&"}"!==u?r+="([^/]*)":("/"===u?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+=".*";break;default:r+=c}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}class cn{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:an("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=mn(t)).endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}}class un{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new ln(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}}class ln{constructor(e,t=[]){this.schema=e,this.errors=t}}function dn(e,t,n){return{message:e,code:t,relatedInformation:n?[{location:{uri:n,range:x.create(0,0,0,0)},message:e}]:void 0}}class fn{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return Pt(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const r of Object.keys(t.patternProperties)){const o=at(r);if(o?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}class hn{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{const n=yt.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=Mt(e)],r=Object.keys(this.schemasById).map(e=>this.schemasById[e]);for(;n.length;){const e=n.pop();for(let o=0;o<r.length;o++){const i=r[o];i&&(i.uri===e||i.dependencies.has(e))&&(i.uri!==e&&n.push(i.uri),i.clearSchema()&&(t=!0),r[o]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const e in t){const n=Mt(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let e of t){const t=e.uris.map(Mt),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){const n=new un(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){const r=new cn(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){const t=Mt(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=Mt(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=vt.t("Unable to load schema from '{0}'. No schema request service available",gn(e));return this.promise.resolve(new ln({},[dn(t,Ge.SchemaResolveError,e)]))}return this.requestService(e).then(t=>{if(!t){const t=vt.t("Unable to load schema from '{0}': No content.",gn(e));return new ln({},[dn(t,Ge.SchemaResolveError,e)])}const n=[];65279===t.charCodeAt(0)&&(n.push(dn(vt.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",gn(e)),Ge.SchemaResolveError,e)),t=t.trimStart());let r={};const o=[];return r=b(t,o),o.length&&n.push(dn(vt.t("Unable to parse content from '{0}': Parse error at offset {1}.",gn(e),o[0].offset),Ge.SchemaResolveError,e)),new ln(r,n)},t=>{let{message:n,code:r}=t;if("string"!=typeof n){let e=t.toString();const r=t.toString().split("Error: ");r.length>1&&(e=r[1]),st(e,".")&&(e=e.substr(0,e.length-1)),n=e}let o=Ge.SchemaResolveError;"number"==typeof r&&r<65536&&(o+=r);const i=vt.t("Unable to load schema from '{0}': {1}.",gn(e),n);return new ln({},[dn(i,o,e)])})}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema,o=r.$schema?At(r.$schema):void 0;if(o===Ze.v3)return this.promise.resolve(new fn({},[dn(vt.t("Draft-03 schemas are not supported."),Ge.SchemaUnsupportedFeature)],[],o));let i=new Set;const s=this.contextService,a=(e,t,r,o)=>{let i;if(i=void 0===o||0===o.length?t:"/"===o.charAt(0)?((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some(e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n)),n})(t,o):((e,t,n)=>(t.anchors||(t.anchors=l(e)),t.anchors.get(n)))(t,r,o),i)((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,i);else{const e=vt.t("$ref '{0}' in '{1}' can not be resolved.",o||"",r.uri);n.push(dn(e,Ge.SchemaResolveError))}},c=(e,t,r,o)=>{s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(t)&&(t=s.resolveRelativePath(t,o.uri)),t=Mt(t);const i=this.getOrAddSchemaHandle(t);return i.getUnresolvedSchema().then(s=>{if(o.dependencies.add(t),s.errors.length){const e=s.errors[0],o=r?vt.t("Problems loading reference '{0}': {1}",r,e.message):e.message;n.push(dn(o,e.code,t))}return a(e,s.schema,i,r),u(e,s.schema,i)})},u=(e,t,n)=>{const r=[];return this.traverseNodes(e,e=>{const o=new Set;for(;e.$ref;){const i=e.$ref,s=i.split("#",2);if(delete e.$ref,s[0].length>0)return void r.push(c(e,s[0],s[1],n));if(!o.has(i)){const r=s[1];a(e,t,n,r),o.add(i)}}e.$recursiveRef&&i.add("$recursiveRef"),e.$dynamicRef&&i.add("$dynamicRef")}),this.promise.all(r)},l=e=>{const t=new Map;return this.traverseNodes(e,e=>{const r=e.$id||e.id,o=ot(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;o&&(t.has(o)?n.push(dn(vt.t("Duplicate anchor declaration: '{0}'",o),Ge.SchemaResolveError)):t.set(o,e)),e.$recursiveAnchor&&i.add("$recursiveAnchor"),e.$dynamicAnchor&&i.add("$dynamicAnchor")}),t};return u(r,r,t).then(e=>{let t=[];return i.size&&t.push(dn(vt.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(i.keys()).join(", ")),Ge.SchemaUnsupportedFeature)),new fn(r,n,t,o)})}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)it(t)&&a.push(t)},o=(...e)=>{for(const t of e)if(it(t))for(const e in t){const n=t[e];it(n)&&a.push(n)}},i=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)it(e)&&a.push(e)},s=e=>{if(Array.isArray(e))for(const t of e)it(t)&&a.push(t);else it(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),o(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),i(c.anyOf,c.allOf,c.oneOf,c.prefixItems),s(c.items)),c=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=mn(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=Mt(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map(e=>({$ref:e}))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+pn++;return this.addSchemaHandle(e,n).getResolvedSchema().then(e=>t.getMatchingSchemas(e.schema).filter(e=>!e.inverted))}return this.getSchemaForResource(e.uri,t).then(e=>e?t.getMatchingSchemas(e.schema).filter(e=>!e.inverted):[])}}let pn=0;function mn(e){try{return yt.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function gn(e){try{const t=yt.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function yn(e,t){const n=[],r=[],o=[];let i=-1;const s=m(e.getText(),!1);let a=s.scan();function c(e){n.push(e),r.push(o.length)}for(;17!==a;){switch(a){case 1:case 3:{const t=e.positionAt(s.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};o.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(o.length>0&&o[o.length-1].kind===t){const t=o.pop(),n=e.positionAt(s.getTokenOffset()).line;t&&n>t.startLine+1&&i!==t.startLine&&(t.endLine=n-1,c(t),i=t.startLine)}break}case 13:{const t=e.positionAt(s.getTokenOffset()).line,n=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;1===s.getTokenError()&&t+1<e.lineCount?s.setPosition(e.offsetAt(w.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:E.Comment}),i=t);break}case 12:{const t=e.getText().substr(s.getTokenOffset(),s.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){const n=e.positionAt(s.getTokenOffset()).line;if(t[1]){const e={startLine:n,endLine:n,kind:E.Region};o.push(e)}else{let e=o.length-1;for(;e>=0&&o[e].kind!==E.Region;)e--;if(e>=0){const t=o[e];o.length=e,n>t.startLine&&i!==t.startLine&&(t.endLine=n,c(t),i=t.startLine)}}}break}}a=s.scan()}const u=t&&t.rangeLimit;if("number"!=typeof u||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const l=[];for(let e of r)e<30&&(l[e]=(l[e]||0)+1);let d=0,f=0;for(let e=0;e<l.length;e++){const t=l[e];if(t){if(t+d>u){f=e;break}d+=t}}const h=[];for(let e=0;e<n.length;e++){const t=r[e];"number"==typeof t&&(t<f||t===f&&d++<u)&&h.push(n[e])}return h}function bn(e,t,n){function r(t,n){return x.create(e.positionAt(t),e.positionAt(n))}const o=m(e.getText(),!0);function i(e,t){return o.setPosition(e),o.scan()===t?o.getTokenOffset()+o.getTokenLength():-1}return t.map(function(t){let o=e.offsetAt(t),s=n.getNodeFromOffset(o,!0);const a=[];for(;s;){switch(s.type){case"string":case"object":case"array":const e=s.offset+1,t=s.offset+s.length-1;e<t&&o>=e&&o<=t&&a.push(r(e,t)),a.push(r(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(r(s.offset,s.offset+s.length))}if("property"===s.type||s.parent&&"array"===s.parent.type){const e=i(s.offset+s.length,5);-1!==e&&a.push(r(s.offset,e))}s=s.parent}let c;for(let e=a.length-1;e>=0;e--)c=Pe.create(a[e],c);return c||(c=Pe.create(x.create(t,t))),c})}function vn(e,t,n){let o;if(n){const t=e.offsetAt(n.start);o={offset:t,length:e.offsetAt(n.end)-t}}const i={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return function(e,t,n){return function(e,t,n){let o,i,s,a,u;if(t){for(a=t.offset,u=a+t.length,s=a;s>0&&!h(e,s-1);)s--;let r=u;for(;r<e.length&&!h(e,r);)r++;i=e.substring(s,r),o=function(e,t){let n=0,r=0;const o=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===c[1])r++;else{if("\t"!==t)break;r+=o}n++}return Math.floor(r/o)}(i,n)}else i=e,o=0,s=0,a=0,u=e.length;const p=function(e,t){for(let e=0;e<t.length;e++){const n=t.charAt(e);if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(n,e),m=d.includes(p);let g,y=0,b=0;g=n.insertSpaces?c[n.tabSize||4]??f(c[1],n.tabSize||4):"\t";const v="\t"===g?"\t":" ";let D=r(i,!1),k=!1;function C(){if(y>1)return f(p,y)+f(g,o+b);const e=g.length*(o+b);return!m||e>l[v][p].length?p+f(g,o+b):e<=0?p:l[v][p][e]}function _(){let e=D.scan();for(y=0;15===e||14===e;)14===e&&n.keepLines?y+=1:14===e&&(y=1),e=D.scan();return k=16===e||0!==D.getTokenError(),e}const R=[];function T(n,r,o){k||t&&!(r<u&&o>a)||e.substring(r,o)===n||R.push({offset:r,length:o-r,content:n})}let S=_();if(n.keepLines&&y>0&&T(f(p,y),0,0),17!==S){let e=D.getTokenOffset()+s;T(g.length*o<20&&n.insertSpaces?c[g.length*o]:f(g,o),s,e)}for(;17!==S;){let e=D.getTokenOffset()+D.getTokenLength()+s,t=_(),r="",o=!1;for(;0===y&&(12===t||13===t);){let n=D.getTokenOffset()+s;T(c[1],e,n),e=D.getTokenOffset()+D.getTokenLength()+s,o=12===t,r=o?C():"",t=_()}if(2===t)1!==S&&b--,n.keepLines&&y>0||!n.keepLines&&1!==S?r=C():n.keepLines&&(r=c[1]);else if(4===t)3!==S&&b--,n.keepLines&&y>0||!n.keepLines&&3!==S?r=C():n.keepLines&&(r=c[1]);else{switch(S){case 3:case 1:b++,r=n.keepLines&&y>0||!n.keepLines?C():c[1];break;case 5:r=n.keepLines&&y>0||!n.keepLines?C():c[1];break;case 12:r=C();break;case 13:y>0?r=C():o||(r=c[1]);break;case 6:n.keepLines&&y>0?r=C():o||(r=c[1]);break;case 10:n.keepLines&&y>0?r=C():6!==t||o||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&y>0?r=C():12!==t&&13!==t||o?5!==t&&17!==t&&(k=!0):r=c[1];break;case 16:k=!0}y>0&&(12===t||13===t)&&(r=C())}17===t&&(r=n.keepLines&&y>0?C():n.insertFinalNewline?p:""),T(r,e,D.getTokenOffset()+s),S=t}return R}(e,t,n)}(e.getText(),o,i).map(t=>W.replace(x.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content))}var Dn;!function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"}(Dn||(Dn={}));class kn{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:function(e,t,n){const r=t.propertyName.toLowerCase(),o=e[0].propertyName.toLowerCase(),i=e[e.length-1].propertyName.toLowerCase();if(r<o)return 0;if(r>i)return e.length;let s=0,a=e.length-1;for(;s<=a;){let r=a+s>>1,o=n(t,e[r]);if(o>0)s=r+1;else{if(!(o<0))return r;a=r-1}}return-s-1}(this.childrenProperties,e,Cn),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}}function Cn(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function _n(e,t,n){if(0!==t.childrenProperties.length)if(t.type===Dn.Object){let r=1/0;for(const e of t.childrenProperties)e.beginningLineNumber<r&&(r=e.beginningLineNumber);n+=r-t.beginningLineNumber,t.childrenProperties.sort((e,t)=>e.propertyName.localeCompare(t.propertyName)),e.push(new Tn(n,t.childrenProperties))}else t.type===Dn.Array&&Rn(e,t,n)}function Rn(e,t,n){for(const r of t.childrenProperties){if(r.type===Dn.Object){let o=1/0;for(const e of r.childrenProperties)e.beginningLineNumber<o&&(o=e.beginningLineNumber);const i=o-r.beginningLineNumber;e.push(new Tn(n+r.beginningLineNumber-t.beginningLineNumber+i,r.childrenProperties))}r.type===Dn.Array&&Rn(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}class Tn{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}}function Sn(e,t){const n=[];return t.visit(r=>{if("property"===r.type&&"$ref"===r.keyNode.value&&"string"===r.valueNode?.type){const o=r.valueNode.value,i=function(e,t){const n=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(Pn)}(t);return n?xn(n,e.root):null}(t,o);if(i){const t=e.positionAt(i.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:wn(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function wn(e,t){return x.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function xn(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const r=t.properties.find(e=>e.keyNode.value===n);return r?xn(e,r.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),o=t.items[r];return o?xn(e,o):null}return null}function Pn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function On(e){const t=e.promiseConstructor||Promise,n=new hn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(on);const r=new Bt(n,e.contributions,t,e.clientCapabilities),o=new zt(n,e.contributions,t),i=new tn(n),s=new Jt(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),s.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:e=>function(e,t){const n=[];let r=-1;const o=e.getText(),i=m(o,!1),s=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=i.scan();switch(l(),t){case 12:case 13:Array.isArray(s)&&s.push(x.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,o,i,s,a=I.Error){if(0===n.length||i!==r){const c=x.create(e.positionAt(i),e.positionAt(s));n.push($.create(c,t,a,o,e.languageId)),r=i}}function u(e,t,n=void 0,r=[],s=[]){let u=i.getTokenOffset(),l=i.getTokenOffset()+i.getTokenLength();if(u===l&&u>0){for(u--;u>0&&/\s/.test(o.charAt(u));)u--;l=u+1}if(c(e,t,u,l),n&&d(n,!1),r.length+s.length>0){let e=i.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==s.indexOf(e))break;e=a()}}return n}function l(){switch(i.getTokenError()){case 4:return u(vt.t("Invalid unicode sequence in string."),Ge.InvalidUnicode),!0;case 5:return u(vt.t("Invalid escape character in string."),Ge.InvalidEscapeCharacter),!0;case 3:return u(vt.t("Unexpected end of number."),Ge.UnexpectedEndOfNumber),!0;case 1:return u(vt.t("Unexpected end of comment."),Ge.UnexpectedEndOfComment),!0;case 2:return u(vt.t("Unexpected end of string."),Ge.UnexpectedEndOfString),!0;case 6:return u(vt.t("Invalid characters in string. Control characters must be escaped."),Ge.InvalidCharacter),!0}return!1}function d(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&a(),e}const f=new St(void 0,0,0);function h(t,n){const r=new wt(t,i.getTokenOffset(),f);let o=p(r);if(!o){if(16!==i.getToken())return;{u(vt.t("Property keys must be doublequoted"),Ge.PropertyKeysMustBeDoublequoted);const e=new St(r,i.getTokenOffset(),i.getTokenLength());e.value=i.getTokenValue(),o=e,a()}}if(r.keyNode=o,"//"!==o.value){const e=n[o.value];e?(c(vt.t("Duplicate object key"),Ge.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,I.Warning),it(e)&&c(vt.t("Duplicate object key"),Ge.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,I.Warning),n[o.value]=!0):n[o.value]=r}if(6===i.getToken())r.colonOffset=i.getTokenOffset(),a();else if(u(vt.t("Colon expected"),Ge.ColonExpected),10===i.getToken()&&e.positionAt(o.offset+o.length).line<e.positionAt(i.getTokenOffset()).line)return r.length=o.length,r;const s=g(r);return s?(r.valueNode=s,r.length=s.offset+s.length-r.offset,r):u(vt.t("Value expected"),Ge.ValueExpected,r,[],[2,5])}function p(e){if(10!==i.getToken())return;const t=new St(e,i.getTokenOffset());return t.value=i.getTokenValue(),d(t,!0)}function g(e){return function(e){if(3!==i.getToken())return;const t=new Rt(e,i.getTokenOffset());a();let n=!1;for(;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){n||u(vt.t("Value expected"),Ge.ValueExpected);const e=i.getTokenOffset();if(a(),4===i.getToken()){n&&c(vt.t("Trailing comma"),Ge.TrailingComma,e,e+1);continue}}else n&&u(vt.t("Expected comma"),Ge.CommaExpected);const e=g(t);e?t.items.push(e):u(vt.t("Value expected"),Ge.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==i.getToken()?u(vt.t("Expected comma or closing bracket"),Ge.CommaOrCloseBacketExpected,t):d(t,!0)}(e)||function(e){if(1!==i.getToken())return;const t=new xt(e,i.getTokenOffset()),n=Object.create(null);a();let r=!1;for(;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||u(vt.t("Property expected"),Ge.PropertyExpected);const e=i.getTokenOffset();if(a(),2===i.getToken()){r&&c(vt.t("Trailing comma"),Ge.TrailingComma,e,e+1);continue}}else r&&u(vt.t("Expected comma"),Ge.CommaExpected);const e=h(t,n);e?t.properties.push(e):u(vt.t("Property expected"),Ge.PropertyExpected,void 0,[],[2,5]),r=!0}return 2!==i.getToken()?u(vt.t("Expected comma or closing brace"),Ge.CommaOrCloseBraceExpected,t):d(t,!0)}(e)||p(e)||function(e){if(11!==i.getToken())return;const t=new Tt(e,i.getTokenOffset());if(0===i.getTokenError()){const e=i.getTokenValue();try{const n=JSON.parse(e);if(!tt(n))return u(vt.t("Invalid number format."),Ge.Undefined,t);t.value=n}catch(e){return u(vt.t("Invalid number format."),Ge.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return d(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return d(new Ct(e,i.getTokenOffset()),!0);case 8:return d(new _t(e,!0,i.getTokenOffset()),!0);case 9:return d(new _t(e,!1,i.getTokenOffset()),!0);default:return}}(e)}let y;return 17!==a()&&(y=g(y),y?17!==i.getToken()&&u(vt.t("End of file expected."),Ge.Undefined):u(vt.t("Expected a JSON object, array or literal."),Ge.Undefined)),new Vt(y,n,s)}(e,{collectComments:!0}),newJSONDocument:(e,t,n)=>function(e,t=[],n=[]){return new Vt(e,t,n)}(e,t,n),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:o.doHover.bind(o),getFoldingRanges:yn,getSelectionRanges:bn,findDefinition:()=>Promise.resolve([]),findLinks:Sn,format:(e,t,n)=>vn(e,n,t),sort:(e,t)=>function(e,t){const n={...t,keepLines:!1},r=Xe.applyEdits(e,vn(e,n,void 0)),o=Xe.create("test://test.json","json",0,r),i=function(e,t){if(0===t.childrenProperties.length)return e;const n=Xe.create("test://test.json","json",0,e.getText()),r=[];for(_n(r,t,t.beginningLineNumber);r.length>0;){const t=r.shift(),o=t.propertyTreeArray;let i=t.beginningLineNumber;for(let t=0;t<o.length;t++){const s=o[t],a=x.create(w.create(s.beginningLineNumber,0),w.create(s.endLineNumber+1,0)),c=e.getText(a),u=Xe.create("test://test.json","json",0,c);if(!0===s.lastProperty&&t!==o.length-1){const e=s.lineWhereToAddComma-s.beginningLineNumber,t=s.indexWhereToAddComa,n={range:x.create(w.create(e,t),w.create(e,t)),text:","};Xe.update(u,[n],1)}else if(!1===s.lastProperty&&t===o.length-1){const e=s.commaIndex,t=s.commaLine-s.beginningLineNumber,n={range:x.create(w.create(t,e),w.create(t,e+1)),text:""};Xe.update(u,[n],1)}const l=s.endLineNumber-s.beginningLineNumber+1,d={range:x.create(w.create(i,0),w.create(i+l,0)),text:u.getText()};Xe.update(n,[d],1),_n(r,s,i),i+=l}}return n}(o,function(e){const t=e.getText(),n=m(t,!1);let r,o,i,s=new kn,a=s,c=s,u=s,l=0,d=0,f=-1,h=-1,p=0,g=0,y=[],b=!1,v=!1;for(;17!==(r=n.scan());){if(!0===b&&14!==r&&15!==r&&12!==r&&13!==r&&void 0===c.endLineNumber){let e=n.getTokenStartLine();2===i||4===i?u.endLineNumber=e-1:c.endLineNumber=e-1,p=e,b=!1}if(!0===v&&14!==r&&15!==r&&12!==r&&13!==r&&(p=n.getTokenStartLine(),v=!1),n.getTokenStartLine()!==l){for(let t=l;t<n.getTokenStartLine();t++)d+=e.getText(x.create(w.create(t,0),w.create(t+1,0))).length;l=n.getTokenStartLine()}switch(r){case 10:if(void 0===o||1===o||5===o&&y[y.length-1]===Dn.Object){const e=new kn(n.getTokenValue(),p);u=c,c=a.addChildProperty(e)}break;case 3:if(void 0===s.beginningLineNumber&&(s.beginningLineNumber=n.getTokenStartLine()),y[y.length-1]===Dn.Object)a=c;else if(y[y.length-1]===Dn.Array){const e=new kn(n.getTokenValue(),p);e.noKeyName=!0,u=c,c=a.addChildProperty(e),a=c}y.push(Dn.Array),c.type=Dn.Array,p=n.getTokenStartLine(),p++;break;case 1:if(void 0===s.beginningLineNumber)s.beginningLineNumber=n.getTokenStartLine();else if(y[y.length-1]===Dn.Array){const e=new kn(n.getTokenValue(),p);e.noKeyName=!0,u=c,c=a.addChildProperty(e)}c.type=Dn.Object,y.push(Dn.Object),a=c,p=n.getTokenStartLine(),p++;break;case 4:g=n.getTokenStartLine(),y.pop(),void 0!==c.endLineNumber||2!==o&&4!==o||(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=f,c.indexWhereToAddComa=h,u=c,c=c?c.parent:void 0,a=c),s.endLineNumber=g,p=g+1;break;case 2:g=n.getTokenStartLine(),y.pop(),1!==o&&(void 0===c.endLineNumber&&(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=f,c.indexWhereToAddComa=h),u=c,c=c?c.parent:void 0,a=c),s.endLineNumber=n.getTokenStartLine(),p=g+1;break;case 5:g=n.getTokenStartLine(),void 0!==c.endLineNumber||y[y.length-1]!==Dn.Object&&(y[y.length-1]!==Dn.Array||2!==o&&4!==o)||(c.endLineNumber=g,c.commaIndex=n.getTokenOffset()-d,c.commaLine=g),2!==o&&4!==o||(u=c,c=c?c.parent:void 0,a=c),p=g+1;break;case 13:5!==o||f!==n.getTokenStartLine()||(y[y.length-1]!==Dn.Array||2!==i&&4!==i)&&y[y.length-1]!==Dn.Object||(y[y.length-1]!==Dn.Array||2!==i&&4!==i)&&y[y.length-1]!==Dn.Object||(c.endLineNumber=void 0,b=!0),1!==o&&3!==o||f!==n.getTokenStartLine()||(v=!0)}14!==r&&13!==r&&12!==r&&15!==r&&(i=o,o=r,f=n.getTokenStartLine(),h=n.getTokenOffset()+n.getTokenLength()-d)}return s}(o)),s=vn(i,n,void 0),a=Xe.applyEdits(i,s);return[W.replace(x.create(w.create(0,0),e.positionAt(e.getText().length)),a)]}(e,t)}}},1560:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.GlobPattern=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.RegularExpressionEngineKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=void 0,t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=void 0;const a=n(372),c=n(4292),u=s(n(8598)),l=n(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return l.ImplementationRequest}});const d=n(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return d.TypeDefinitionRequest}});const f=n(9935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return f.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return f.DidChangeWorkspaceFoldersNotification}});const h=n(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return h.ConfigurationRequest}});const p=n(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return p.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return p.ColorPresentationRequest}});const m=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return m.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return m.FoldingRangeRefreshRequest}});const g=n(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return g.DeclarationRequest}});const y=n(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return y.SelectionRangeRequest}});const b=n(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return b.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return b.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return b.WorkDoneProgressCancelNotification}});const v=n(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return v.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return v.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return v.CallHierarchyPrepareRequest}});const D=n(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return D.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return D.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return D.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return D.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return D.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return D.SemanticTokensRegistrationType}});const k=n(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return k.ShowDocumentRequest}});const C=n(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return C.LinkedEditingRangeRequest}});const _=n(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return _.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return _.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return _.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return _.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return _.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return _.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return _.WillDeleteFilesRequest}});const R=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return R.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return R.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return R.MonikerRequest}});const T=n(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return T.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return T.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return T.TypeHierarchySupertypesRequest}});const S=n(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return S.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return S.InlineValueRefreshRequest}});const w=n(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return w.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return w.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return w.InlayHintRefreshRequest}});const x=n(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return x.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return x.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return x.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return x.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return x.DiagnosticRefreshRequest}});const P=n(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return P.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return P.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return P.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return P.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return P.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return P.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return P.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return P.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return P.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return P.DidCloseNotebookDocumentNotification}});const O=n(3307);Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return O.InlineCompletionRequest}});const M=n(4289);var A,N,E,q,j,I,L,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,be,ve,De,ke,Ce,_e,Re,Te,Se,we,xe,Pe,Oe,Me,Ae,Ne,Ee,qe,je,Ie,Le,Fe,$e,Ve,We,Ue,He;Object.defineProperty(t,"TextDocumentContentRequest",{enumerable:!0,get:function(){return M.TextDocumentContentRequest}}),Object.defineProperty(t,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return M.TextDocumentContentRefreshRequest}}),function(e){e.is=function(e){const t=e;return u.string(t)||u.string(t.language)||u.string(t.scheme)||pe.is(t.pattern)}}(A||(t.TextDocumentFilter=A={})),function(e){e.is=function(e){const t=e;return u.objectLiteral(t)&&(u.string(t.notebookType)||u.string(t.scheme)||u.string(t.pattern))}}(N||(t.NotebookDocumentFilter=N={})),function(e){e.is=function(e){const t=e;return u.objectLiteral(t)&&(u.string(t.notebook)||N.is(t.notebook))&&(void 0===t.language||u.string(t.language))}}(E||(t.NotebookCellTextDocumentFilter=E={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(const t of e)if(!u.string(t)&&!A.is(t)&&!E.is(t))return!1;return!0}}(q||(t.DocumentSelector=q={})),function(e){e.method="client/registerCapability",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(j||(t.RegistrationRequest=j={})),function(e){e.method="client/unregisterCapability",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(I||(t.UnregistrationRequest=I={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(L||(t.ResourceOperationKind=L={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(F||(t.FailureHandlingKind=F={})),function(e){e.ES2020="ES2020"}($||(t.RegularExpressionEngineKind=$={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(V||(t.PositionEncodingKind=V={})),function(e){e.hasId=function(e){const t=e;return t&&u.string(t.id)&&t.id.length>0}}(W||(t.StaticRegistrationOptions=W={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||q.is(t.documentSelector))}}(U||(t.TextDocumentRegistrationOptions=U={})),function(e){e.is=function(e){const t=e;return u.objectLiteral(t)&&(void 0===t.workDoneProgress||u.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&u.boolean(t.workDoneProgress)}}(H||(t.WorkDoneProgressOptions=H={})),function(e){e.method="initialize",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(B||(t.InitializeRequest=B={})),function(e){e.unknownProtocolVersion=1}(z||(t.InitializeErrorCodes=z={})),function(e){e.method="initialized",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method)}(K||(t.InitializedNotification=K={})),function(e){e.method="shutdown",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType0(e.method)}(J||(t.ShutdownRequest=J={})),function(e){e.method="exit",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType0(e.method)}(X||(t.ExitNotification=X={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("workspace.didChangeConfiguration",void 0)}(G||(t.DidChangeConfigurationNotification=G={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(Z||(t.MessageType=Z={})),function(e){e.method="window/showMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("window.showMessage",void 0)}(Q||(t.ShowMessageNotification=Q={})),function(e){e.method="window/showMessageRequest",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("window.showMessage",void 0)}(Y||(t.ShowMessageRequest=Y={})),function(e){e.method="window/logMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(ee||(t.LogMessageNotification=ee={})),function(e){e.method="telemetry/event",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(te||(t.TelemetryEventNotification=te={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(ne||(t.TextDocumentSyncKind=ne={})),function(e){e.method="textDocument/didOpen",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync.openClose")}(re||(t.DidOpenTextDocumentNotification=re={})),function(e){e.isIncremental=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(oe||(t.TextDocumentContentChangeEvent=oe={})),function(e){e.method="textDocument/didChange",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync")}(ie||(t.DidChangeTextDocumentNotification=ie={})),function(e){e.method="textDocument/didClose",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization","textDocumentSync.openClose")}(se||(t.DidCloseTextDocumentNotification=se={})),function(e){e.method="textDocument/didSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")}(ae||(t.DidSaveTextDocumentNotification=ae={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ce||(t.TextDocumentSaveReason=ce={})),function(e){e.method="textDocument/willSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")}(ue||(t.WillSaveTextDocumentNotification=ue={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")}(le||(t.WillSaveTextDocumentWaitUntilRequest=le={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("workspace.didChangeWatchedFiles",void 0)}(de||(t.DidChangeWatchedFilesNotification=de={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(fe||(t.FileChangeType=fe={})),function(e){e.is=function(e){const t=e;return u.objectLiteral(t)&&(c.URI.is(t.baseUri)||c.WorkspaceFolder.is(t.baseUri))&&u.string(t.pattern)}}(he||(t.RelativePattern=he={})),function(e){e.is=function(e){const t=e;return u.string(t)||he.is(t)}}(pe||(t.GlobPattern=pe={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(me||(t.WatchKind=me={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method),e.capabilities=a.CM.create("textDocument.publishDiagnostics",void 0)}(ge||(t.PublishDiagnosticsNotification=ge={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ye||(t.CompletionTriggerKind=ye={})),function(e){e.method="textDocument/completion",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.completion","completionProvider")}(be||(t.CompletionRequest=be={})),function(e){e.method="completionItem/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")}(ve||(t.CompletionResolveRequest=ve={})),function(e){e.method="textDocument/hover",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.hover","hoverProvider")}(De||(t.HoverRequest=De={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(ke||(t.SignatureHelpTriggerKind=ke={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.signatureHelp","signatureHelpProvider")}(Ce||(t.SignatureHelpRequest=Ce={})),function(e){e.method="textDocument/definition",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.definition","definitionProvider")}(_e||(t.DefinitionRequest=_e={})),function(e){e.method="textDocument/references",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.references","referencesProvider")}(Re||(t.ReferencesRequest=Re={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentHighlight","documentHighlightProvider")}(Te||(t.DocumentHighlightRequest=Te={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentSymbol","documentSymbolProvider")}(Se||(t.DocumentSymbolRequest=Se={})),function(e){e.method="textDocument/codeAction",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeAction","codeActionProvider")}(we||(t.CodeActionRequest=we={})),function(e){e.method="codeAction/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")}(xe||(t.CodeActionResolveRequest=xe={})),function(e){e.method="workspace/symbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.symbol","workspaceSymbolProvider")}(Pe||(t.WorkspaceSymbolRequest=Pe={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")}(Oe||(t.WorkspaceSymbolResolveRequest=Oe={})),function(e){e.method="textDocument/codeLens",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeLens","codeLensProvider")}(Me||(t.CodeLensRequest=Me={})),function(e){e.method="codeLens/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")}(Ae||(t.CodeLensResolveRequest=Ae={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType0(e.method),e.capabilities=a.CM.create("workspace.codeLens",void 0)}(Ne||(t.CodeLensRefreshRequest=Ne={})),function(e){e.method="textDocument/documentLink",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentLink","documentLinkProvider")}(Ee||(t.DocumentLinkRequest=Ee={})),function(e){e.method="documentLink/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")}(qe||(t.DocumentLinkResolveRequest=qe={})),function(e){e.method="textDocument/formatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.formatting","documentFormattingProvider")}(je||(t.DocumentFormattingRequest=je={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")}(Ie||(t.DocumentRangeFormattingRequest=Ie={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")}(Le||(t.DocumentRangesFormattingRequest=Le={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")}(Fe||(t.DocumentOnTypeFormattingRequest=Fe={})),function(e){e.Identifier=1}($e||(t.PrepareSupportDefaultBehavior=$e={})),function(e){e.method="textDocument/rename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rename","renameProvider")}(Ve||(t.RenameRequest=Ve={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")}(We||(t.PrepareRenameRequest=We={})),function(e){e.method="workspace/executeCommand",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method),e.capabilities=a.CM.create("workspace.executeCommand","executeCommandProvider")}(Ue||(t.ExecuteCommandRequest=Ue={})),function(e){e.method="workspace/applyEdit",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType("workspace/applyEdit"),e.capabilities=a.CM.create("workspace.applyEdit",void 0)}(He||(t.ApplyWorkspaceEditRequest=He={}))},1580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,n,o){return r.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,r.createMessageConnection)(e,t,n,o)};const r=n(3281)},1660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(372);var o;!function(e){e.method="workspace/configuration",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("workspace.configuration",void 0)}(o||(t.ConfigurationRequest=o={}))},1662:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const r=n(8766);t.TextDocuments=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new r.Emitter,this._onDidOpen=new r.Emitter,this._onDidClose=new r.Emitter,this._onDidSave=new r.Emitter,this._onWillSave=new r.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=r.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument(e=>{const t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,n);const r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)})),t.push(e.onDidChangeTextDocument(e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:r}=t;if(null==r)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let o=this._syncedDocuments.get(t.uri);void 0!==o&&(o=this._configuration.update(o,n,r),this._syncedDocuments.set(t.uri,o),this._onDidChangeContent.fire(Object.freeze({document:o})))})),t.push(e.onDidCloseTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))})),t.push(e.onWillSaveTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))})),t.push(e.onWillSaveTextDocumentWaitUntil((e,t)=>{const n=this._syncedDocuments.get(e.textDocument.uri);return void 0!==n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]})),t.push(e.onDidSaveTextDocument(e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))})),r.Disposable.create(()=>{t.forEach(e=>e.dispose())})}}},1815:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const r=n(8766);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(r.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(r.InlineValueRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t)))}}}},2112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const r=n(8766);t.WorkspaceFoldersFeature=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);const t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new r.Emitter,this.connection.onNotification(r.DidChangeWorkspaceFoldersNotification.type,e=>{this._onDidChangeWorkspaceFolders.fire(e.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(r.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(r.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},2478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(372);var o,i,s,a,c,u;!function(e){e.Relative="relative"}(o||(t.TokenFormat=o={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(i||(t.SemanticTokensRegistrationType=i={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method,e.capabilities=r.CM.create("textDocument.semanticTokens","semanticTokensProvider")}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method,e.capabilities=r.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method,e.capabilities=r.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method),e.capabilities=r.CM.create("workspace.semanticTokens.refreshSupport",void 0)}(u||(t.SemanticTokensRefreshRequest=u={}))},2655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const r=n(8766);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(r.SemanticTokensRefreshRequest.type),on:e=>{const t=r.SemanticTokensRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))},onDelta:e=>{const t=r.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))},onRange:e=>{const t=r.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))}}}};class o{originalSequence;modifiedSequence;constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let n=0;for(;n<t&&n<e&&this.originalSequence[n]===this.modifiedSequence[n];)n++;if(n<t&&n<e){let r=e-1,o=t-1;for(;r>=n&&o>=n&&this.originalSequence[r]===this.modifiedSequence[o];)r--,o--;(r<n||o<n)&&(r++,o++);const i=r-n+1,s=this.modifiedSequence.slice(n,o+1);return 1===s.length&&s[0]===this.originalSequence[r]?[{start:n,deleteCount:i-1}]:[{start:n,deleteCount:i,data:s}]}return n<t?[{start:n,deleteCount:0,data:this.modifiedSequence.slice(n)}]:n<e?[{start:n,deleteCount:e-n}]:[]}}t.SemanticTokensDiff=o;class i{_id;_prevLine;_prevChar;_dataIsSortedAndDeltaEncoded;_data;_dataNonDelta;_dataLen;_prevData;constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataNonDelta=[],this._dataLen=0,this._dataIsSortedAndDeltaEncoded=!0}push(e,t,n,r,o){this._dataIsSortedAndDeltaEncoded&&(e<this._prevLine||e===this._prevLine&&t<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=i._deltaDecode(this._data));let s=e,a=t;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,0===s&&(a-=this._prevChar));const c=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;c[this._dataLen++]=s,c[this._dataLen++]=a,c[this._dataLen++]=n,c[this._dataLen++]=r,c[this._dataLen++]=o,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}static _deltaDecode(e){const t=e.length/5|0;let n=0,r=0;const o=[];for(let i=0;i<t;i++){const t=5*i;let s=e[t],a=e[t+1];0===s?(s=n,a+=r):s+=n;const c=e[t+2],u=e[t+3],l=e[t+4];o[t+0]=s,o[t+1]=a,o[t+2]=c,o[t+3]=u,o[t+4]=l,n=s,r=a}return o}static _sortAndDeltaEncode(e){const t=[],n=e.length/5|0;for(let e=0;e<n;e++)t[e]=e;t.sort((t,n)=>{const r=e[5*t],o=e[5*n];return r===o?e[5*t+1]-e[5*n+1]:r-o});const r=[];let o=0,i=0;for(let s=0;s<n;s++){const n=5*t[s],a=e[n+0],c=e[n+1],u=e[n+2],l=e[n+3],d=e[n+4],f=a-o,h=0===f?c-i:c,p=5*s;r[p+0]=f,r[p+1]=h,r[p+2]=u,r[p+3]=l,r[p+4]=d,o=a,i=c}return r}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:i._sortAndDeltaEncode(this._dataNonDelta)}previousResult(e){this.id===e&&(this._prevData=this.getFinalDataDelta()),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this.getFinalDataDelta()}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new o(this._prevData,this.getFinalDataDelta()).computeDiff()}:this.build()}}t.SemanticTokensBuilder=i},2676:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const o=r(n(9590));var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{_callbacks;_contexts;add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,o=this._callbacks.length;r<o;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0);for(let i=0,s=n.length;i<s;i++)try{t.push(n[i].apply(r[i],e))}catch(e){(0,o.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class a{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=a},2687:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(3281),o=n(372);var i,s,a;!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(i||(t.WorkDoneProgress=i={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method),e.capabilities=o.CM.create("window.workDoneProgress",void 0)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},2697:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const r=n(8766);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(r.DidCreateFilesNotification.type,t=>e(t))}onDidRenameFiles(e){return this.connection.onNotification(r.DidRenameFilesNotification.type,t=>e(t))}onDidDeleteFiles(e){return this.connection.onNotification(r.DidDeleteFilesNotification.type,t=>e(t))}onWillCreateFiles(e){return this.connection.onRequest(r.WillCreateFilesRequest.type,(t,n)=>e(t,n))}onWillRenameFiles(e){return this.connection.onRequest(r.WillRenameFilesRequest.type,(t,n)=>e(t,n))}onWillDeleteFiles(e){return this.connection.onRequest(r.WillDeleteFilesRequest.type,(t,n)=>e(t,n))}}},2861:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const c=n(2655);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return c.SemanticTokensBuilder}});const u=s(n(1276)),l=s(n(9202));a(n(8766),t);const d=n(1662);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return d.TextDocuments}});const f=n(20);var h;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return f.NotebookDocuments}}),a(n(7874),t),function(e){e.all={__brand:"features",workspace:l.TextDocumentContentFeature,languages:u.InlineCompletionFeature}}(h||(t.ProposedFeatures=h={}))},2874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/foldingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.foldingRange","foldingRangeProvider")}(o||(t.FoldingRangeRequest=o={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method),e.capabilities=r.CM.create("workspace.foldingRange.refreshSupport",void 0)}(i||(t.FoldingRangeRefreshRequest=i={}))},2936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const r=n(8766);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=r.MonikerRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))}}}}},2938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0,t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const n=t.workDoneToken;return delete t.workDoneToken,new i(e,n)},t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new l(e,n)};const r=n(8766),o=n(6116);class i{_connection;_token;static Instances=new Map;constructor(e,t){this._connection=e,this._token=t,i.Instances.set(this._token,this)}begin(e,t,n,o){const i={kind:"begin",title:e,message:n,cancellable:o};"number"==typeof t&&(i.percentage=Math.round(t)),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,i)}report(e,t){const n={kind:"report"};"number"==typeof e?(n.percentage=Math.round(e),void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(r.WorkDoneProgress.type,this._token,n)}done(){i.Instances.delete(this._token),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,{kind:"end"})}}class s extends i{_source;constructor(e,t){super(e,t),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{_source;constructor(){super(),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var u;t.ProgressFeature=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(r.WorkDoneProgressCancelNotification.type,e=>{const t=i.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()}))}attachWorkDoneProgress(e){return void 0===e?new a:new i(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,o.generateUuid)();return this.connection.sendRequest(r.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new s(this.connection,e))}return Promise.resolve(new c)}},function(e){e.type=new r.ProgressType}(u||(u={}));class l{_connection;_token;constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(u.type,this._token,e)}}},3124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/inlineValue",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.inlineValue","inlineValueProvider")}(o||(t.InlineValueRequest=o={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method),e.capabilities=r.CM.create("workspace.inlineValue.refreshSupport",void 0)}(i||(t.InlineValueRefreshRequest=i={}))},3193:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const c=a(n(9590)),u=s(n(8585)),l=n(4323),d=n(2676);var f,h;!function(e){e.is=function(e){const t=e;return t&&u.func(t.dispose)&&u.func(t.onClose)&&u.func(t.onError)&&u.func(t.write)}}(f||(t.MessageWriter=f={}));class p{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new d.Emitter,this.closeEmitter=new d.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${u.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=p,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,c.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,c.default)().applicationJson.encoder}}}(h||(h={})),t.WriteableStreamMessageWriter=class extends p{writable;options;errorCount;writeSemaphore;constructor(e,t){super(),this.writable=e,this.options=h.fromOptions(t),this.errorCount=0,this.writeSemaphore=new l.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},3234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDiagnosticsPushSupport=function(e,t,n,r){const i={},s=[];function a(e){const t=i[e.uri];t&&(t.dispose(),delete i[e.uri])}function c(e){a(e);const s=i[e.uri]=n.timer.setTimeout(async()=>{if(s===i[e.uri])try{const n=await r(e);s===i[e.uri]&&t.sendDiagnostics({uri:e.uri,diagnostics:n}),delete i[e.uri]}catch(n){t.console.error((0,o.formatError)(`Error while validating ${e.uri}`,n))}},500)}return e.onDidChangeContent(e=>{c(e.document)},void 0,s),e.onDidClose(e=>{a(e.document),t.sendDiagnostics({uri:e.document.uri,diagnostics:[]})},void 0,s),{requestRefresh:()=>{e.all().forEach(c)},dispose:()=>{s.forEach(e=>e.dispose()),s.length=0;const e=Object.keys(i);for(const t of e)i[t].dispose(),delete i[t]}}},t.registerDiagnosticsPullSupport=function(e,t,n,i){function s(e){return{kind:r.DocumentDiagnosticReportKind.Full,items:e}}const a=t.languages.diagnostics.on(async(t,r)=>(0,o.runSafeAsync)(n,async()=>{const n=e.get(t.textDocument.uri);return s(n?await i(n):[])},s([]),`Error while computing diagnostics for ${t.textDocument.uri}`,r));return{requestRefresh:function(){t.languages.diagnostics.refresh()},dispose:()=>{a.dispose()}}};const r=n(2861),o=n(6251)},3281:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=void 0;const o=n(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return o.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return o.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return o.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return o.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return o.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return o.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return o.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return o.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return o.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return o.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return o.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return o.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return o.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return o.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return o.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return o.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return o.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return o.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return o.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return o.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return o.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return o.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return o.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return o.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return o.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return o.ParameterStructures}});const i=n(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const s=n(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const a=n(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return a.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return a.Emitter}});const c=n(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}});const u=n(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return u.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return u.SharedArrayReceiverStrategy}});const l=n(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const d=n(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return d.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return d.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return d.WriteableStreamMessageWriter}});const f=n(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return f.AbstractMessageBuffer}});const h=n(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValue",{enumerable:!0,get:function(){return h.TraceValue}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return h.IdCancellationReceiverStrategy}}),Object.defineProperty(t,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return h.RequestCancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}});const p=r(n(9590));t.RAL=p.default},3307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")}(o||(t.InlineCompletionRequest=o={}))},3352:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n||(t.Touch=n={}));class r{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(e){const t=this._map.get(e);return t?t.previous?.value:void 0}after(e){const t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=n.None){const r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let o=this._map.get(e);if(o)o.value=t,r!==n.None&&this.touch(o,r);else{switch(o={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=r,t.LRUCache=class extends r{_limit;_ratio;constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},3487:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/selectionRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.selectionRange","selectionRangeProvider")}(o||(t.SelectionRangeRequest=o={}))},3557:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const a=n(4292),c=s(n(8598)),u=n(372);var l,d,f,h,p,m,g,y,b,v;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(l||(t.NotebookCellKind=l={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return c.objectLiteral(t)&&a.uinteger.is(t.executionOrder)&&(void 0===t.success||c.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(d||(t.ExecutionSummary=d={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),o=Array.isArray(n);if(r!==o)return!1;if(r&&o){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1}if(c.objectLiteral(e)&&c.objectLiteral(n)){const r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;if(r.sort(),o.sort(),!t(r,o))return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!t(e[i],n[i]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return c.objectLiteral(t)&&l.is(t.kind)&&a.DocumentUri.is(t.document)&&(void 0===t.metadata||c.objectLiteral(t.metadata))},e.diff=function(e,n){const r=new Set;return e.document!==n.document&&r.add("document"),e.kind!==n.kind&&r.add("kind"),e.executionSummary!==n.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||d.equals(e.executionSummary,n.executionSummary)||r.add("executionSummary"),r}}(f||(t.NotebookCell=f={})),function(e){e.create=function(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}},e.is=function(e){const t=e;return c.objectLiteral(t)&&c.string(t.uri)&&a.integer.is(t.version)&&c.typedArray(t.cells,f.is)}}(h||(t.NotebookDocument=h={})),function(e){e.method="notebookDocument/sync",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.RegistrationType(e.method)}(p||(t.NotebookDocumentSyncRegistrationType=p={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=p.method}(m||(t.DidOpenNotebookDocumentNotification=m={})),function(e){e.is=function(e){const t=e;return c.objectLiteral(t)&&a.uinteger.is(t.start)&&a.uinteger.is(t.deleteCount)&&(void 0===t.cells||c.typedArray(t.cells,f.is))},e.create=function(e,t,n){const r={start:e,deleteCount:t};return void 0!==n&&(r.cells=n),r}}(g||(t.NotebookCellArrayChange=g={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=p.method}(y||(t.DidChangeNotebookDocumentNotification=y={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=p.method}(b||(t.DidSaveNotebookDocumentNotification=b={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=p.method}(v||(t.DidCloseNotebookDocumentNotification=v={}))},3608:(e,t,n)=>{"use strict";var r;function o(e){if("contents"in e)r="string"==typeof e.contents?JSON.parse(e.contents):e.contents;else{if("fsPath"in e){const t=function(){throw new Error("Unsupported in browser")}(e.fsPath),n=JSON.parse(t);return void(r=c(n)?n.contents.bundle:n)}if(e.uri){let t=e.uri;return"string"==typeof e.uri&&(t=new URL(e.uri)),new Promise((e,n)=>{(async function(e){if("http:"===e.protocol||"https:"===e.protocol){const t=await fetch(e);return await t.text()}throw new Error("Unsupported protocol")})(t).then(t=>{try{const n=JSON.parse(t);r=c(n)?n.contents.bundle:n,e()}catch(e){n(e)}}).catch(e=>{n(e)})})}}}function i(...e){const t=e[0];let n,o,s;if("string"==typeof t)n=t,o=t,e.splice(0,1),s=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let r=t[0];for(let e=1;e<t.length;e++)r+=`{${e-1}}`+t[e];return i(r,...n)}o=t.message,n=o,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),s=t.args??{}}const c=r?.[n];return c?"string"==typeof c?a(c,s):c.comment?a(c.message,s):a(o,s):a(o,s)}n.r(t),n.d(t,{config:()=>o,t:()=>i});var s=/{([^}]+)}/g;function a(e,t){return 0===Object.keys(t).length?e:e.replace(s,(e,n)=>t[n]??e)}function c(e){return!("object"!=typeof e?.contents?.bundle||"string"!=typeof e?.version)}},3918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(8766);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.CallHierarchyPrepareRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)),onIncomingCalls:e=>{const t=r.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))},onOutgoingCalls:e=>{const t=r.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))}}}}},4019:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},4289:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=void 0;const r=n(372);var o,i;!function(e){e.method="workspace/textDocumentContent",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")}(o||(t.TextDocumentContentRequest=o={})),function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TextDocumentContentRefreshRequest=i={}))},4292:(e,t,n)=>{"use strict";var r,o,i,s,a,c,u,l,d,f,h,p,m,g,y,b,v,D,k,C,_,R,T,S,w,x,P,O,M,A,N,E,q,j,I,L,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,be,ve,De,ke,Ce,_e,Re,Te,Se,we,xe,Pe,Oe;n.r(t),n.d(t,{AnnotatedTextEdit:()=>T,ApplyKind:()=>H,ChangeAnnotation:()=>_,ChangeAnnotationIdentifier:()=>R,CodeAction:()=>ue,CodeActionContext:()=>ae,CodeActionKind:()=>ie,CodeActionTag:()=>ce,CodeActionTriggerKind:()=>se,CodeDescription:()=>v,CodeLens:()=>le,Color:()=>d,ColorInformation:()=>f,ColorPresentation:()=>h,Command:()=>k,CompletionItem:()=>z,CompletionItemKind:()=>F,CompletionItemLabelDetails:()=>B,CompletionItemTag:()=>V,CompletionList:()=>K,CreateFile:()=>w,DeleteFile:()=>P,Diagnostic:()=>D,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>b,DocumentHighlight:()=>Y,DocumentHighlightKind:()=>Q,DocumentLink:()=>fe,DocumentSymbol:()=>oe,DocumentUri:()=>r,EOL:()=>Ee,FoldingRange:()=>m,FoldingRangeKind:()=>p,FormattingOptions:()=>de,Hover:()=>X,InlayHint:()=>_e,InlayHintKind:()=>ke,InlayHintLabelPart:()=>Ce,InlineCompletionContext:()=>Pe,InlineCompletionItem:()=>Te,InlineCompletionList:()=>Se,InlineCompletionTriggerKind:()=>we,InlineValueContext:()=>De,InlineValueEvaluatableExpression:()=>ve,InlineValueText:()=>ye,InlineValueVariableLookup:()=>be,InsertReplaceEdit:()=>W,InsertTextFormat:()=>$,InsertTextMode:()=>U,LanguageKind:()=>q,Location:()=>u,LocationLink:()=>l,MarkedString:()=>J,MarkupContent:()=>L,MarkupKind:()=>I,OptionalVersionedTextDocumentIdentifier:()=>E,ParameterInformation:()=>G,Position:()=>a,Range:()=>c,RenameFile:()=>x,SelectedCompletionInfo:()=>xe,SelectionRange:()=>he,SemanticTokenModifiers:()=>me,SemanticTokenTypes:()=>pe,SemanticTokens:()=>ge,SignatureInformation:()=>Z,SnippetTextEdit:()=>M,StringValue:()=>Re,SymbolInformation:()=>ne,SymbolKind:()=>ee,SymbolTag:()=>te,TextDocument:()=>qe,TextDocumentEdit:()=>S,TextDocumentIdentifier:()=>A,TextDocumentItem:()=>j,TextEdit:()=>C,URI:()=>o,VersionedTextDocumentIdentifier:()=>N,WorkspaceChange:()=>Ne,WorkspaceEdit:()=>O,WorkspaceFolder:()=>Oe,WorkspaceSymbol:()=>re,integer:()=>i,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){const t=e;return je.objectLiteral(t)&&je.uinteger(t.line)&&je.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(je.uinteger(e)&&je.uinteger(t)&&je.uinteger(n)&&je.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){const t=e;return je.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){const t=e;return je.objectLiteral(t)&&c.is(t.range)&&(je.string(t.uri)||je.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){const t=e;return je.objectLiteral(t)&&c.is(t.targetRange)&&je.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||je.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return je.objectLiteral(t)&&je.numberRange(t.red,0,1)&&je.numberRange(t.green,0,1)&&je.numberRange(t.blue,0,1)&&je.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return je.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return je.objectLiteral(t)&&je.string(t.label)&&(je.undefined(t.textEdit)||C.is(t))&&(je.undefined(t.additionalTextEdits)||je.typedArray(t.additionalTextEdits,C.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,r,o,i){const s={startLine:e,endLine:t};return je.defined(n)&&(s.startCharacter=n),je.defined(r)&&(s.endCharacter=r),je.defined(o)&&(s.kind=o),je.defined(i)&&(s.collapsedText=i),s},e.is=function(e){const t=e;return je.objectLiteral(t)&&je.uinteger(t.startLine)&&je.uinteger(t.startLine)&&(je.undefined(t.startCharacter)||je.uinteger(t.startCharacter))&&(je.undefined(t.endCharacter)||je.uinteger(t.endCharacter))&&(je.undefined(t.kind)||je.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){const t=e;return je.defined(t)&&u.is(t.location)&&je.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(b||(b={})),function(e){e.is=function(e){const t=e;return je.objectLiteral(t)&&je.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,r,o,i){const s={range:e,message:t};return je.defined(n)&&(s.severity=n),je.defined(r)&&(s.code=r),je.defined(o)&&(s.source=o),je.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;const n=e;return je.defined(n)&&c.is(n.range)&&je.string(n.message)&&(je.number(n.severity)||je.undefined(n.severity))&&(je.integer(n.code)||je.string(n.code)||je.undefined(n.code))&&(je.undefined(n.codeDescription)||je.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(je.string(n.source)||je.undefined(n.source))&&(je.undefined(n.relatedInformation)||je.typedArray(n.relatedInformation,g.is))}}(D||(D={})),function(e){e.create=function(e,t,...n){const r={title:e,command:t};return je.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){const t=e;return je.defined(t)&&je.string(t.title)&&(void 0===t.tooltip||je.string(t.tooltip))&&je.string(t.command)}}(k||(k={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return je.objectLiteral(t)&&je.string(t.newText)&&c.is(t.range)}}(C||(C={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return je.objectLiteral(t)&&je.string(t.label)&&(je.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(je.string(t.description)||void 0===t.description)}}(_||(_={})),function(e){e.is=function(e){const t=e;return je.string(t)}}(R||(R={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return C.is(t)&&(_.is(t.annotationId)||R.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){const t=e;return je.defined(t)&&E.is(t.textDocument)&&Array.isArray(t.edits)}}(S||(S={})),function(e){e.create=function(e,t,n){const r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"create"===t.kind&&je.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||R.is(t.annotationId))}}(w||(w={})),function(e){e.create=function(e,t,n,r){const o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){const t=e;return t&&"rename"===t.kind&&je.string(t.oldUri)&&je.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||R.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t,n){const r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"delete"===t.kind&&je.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||je.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||je.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||R.is(t.annotationId))}}(P||(P={})),function(e){e.is=function(e){const t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>je.string(e.kind)?w.is(e)||x.is(e)||P.is(e):S.is(e)))}}(O||(O={}));class Me{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,o;if(void 0===n?r=C.insert(e,t):R.is(n)?(o=n,r=T.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=T.insert(e,t,o)),this.edits.push(r),void 0!==o)return o}replace(e,t,n){let r,o;if(void 0===n?r=C.replace(e,t):R.is(n)?(o=n,r=T.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=T.replace(e,t,o)),this.edits.push(r),void 0!==o)return o}delete(e,t){let n,r;if(void 0===t?n=C.del(e):R.is(t)?(r=t,n=T.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=T.del(e,r)),this.edits.push(n),void 0!==r)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}!function(e){e.is=function(e){const t=e;return je.objectLiteral(t)&&c.is(t.range)&&Re.isSnippet(t.snippet)&&(void 0===t.annotationId||_.is(t.annotationId)||R.is(t.annotationId))}}(M||(M={}));class Ae{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(R.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class Ne{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ae(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(S.is(e)){const t=new Me(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const n=new Me(e.changes[t]);this._textEditChanges[t]=n})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(E.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new Me(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){const n=[];this._workspaceEdit.changes[e]=n,t=new Me(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Ae,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,i;if(_.is(t)||R.is(t)?r=t:n=t,void 0===r?o=w.create(e,n):(i=R.is(r)?r:this._changeAnnotations.manage(r),o=w.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}renameFile(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let o,i,s;if(_.is(n)||R.is(n)?o=n:r=n,void 0===o?i=x.create(e,t,r):(s=R.is(o)?o:this._changeAnnotations.manage(o),i=x.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,i;if(_.is(t)||R.is(t)?r=t:n=t,void 0===r?o=P.create(e,n):(i=R.is(r)?r:this._changeAnnotations.manage(r),o=P.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){const t=e;return je.defined(t)&&je.string(t.uri)}}(A||(A={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return je.defined(t)&&je.string(t.uri)&&je.integer(t.version)}}(N||(N={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return je.defined(t)&&je.string(t.uri)&&(null===t.version||je.integer(t.version))}}(E||(E={})),function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"}(q||(q={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){const t=e;return je.defined(t)&&je.string(t.uri)&&je.string(t.languageId)&&je.integer(t.version)&&je.string(t.text)}}(j||(j={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(I||(I={})),function(e){e.is=function(e){const t=e;return je.objectLiteral(e)&&I.is(t.kind)&&je.string(t.value)}}(L||(L={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(F||(F={})),function(e){e.PlainText=1,e.Snippet=2}($||($={})),function(e){e.Deprecated=1}(V||(V={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&je.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(W||(W={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.Replace=1,e.Merge=2}(H||(H={})),function(e){e.is=function(e){const t=e;return t&&(je.string(t.detail)||void 0===t.detail)&&(je.string(t.description)||void 0===t.description)}}(B||(B={})),function(e){e.create=function(e){return{label:e}}}(z||(z={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(K||(K={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return je.string(t)||je.objectLiteral(t)&&je.string(t.language)&&je.string(t.value)}}(J||(J={})),function(e){e.is=function(e){const t=e;return!!t&&je.objectLiteral(t)&&(L.is(t.contents)||J.is(t.contents)||je.typedArray(t.contents,J.is))&&(void 0===e.range||c.is(e.range))}}(X||(X={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(G||(G={})),function(e){e.create=function(e,t,...n){const r={label:e};return je.defined(t)&&(r.documentation=t),je.defined(n)?r.parameters=n:r.parameters=[],r}}(Z||(Z={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Q||(Q={})),function(e){e.create=function(e,t){const n={range:e};return je.number(t)&&(n.kind=t),n}}(Y||(Y={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(ee||(ee={})),function(e){e.Deprecated=1}(te||(te={})),function(e){e.create=function(e,t,n,r,o){const i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(ne||(ne={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(re||(re={})),function(e){e.create=function(e,t,n,r,o,i){const s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){const t=e;return t&&je.string(t.name)&&je.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||je.string(t.detail))&&(void 0===t.deprecated||je.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(oe||(oe={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"}(ie||(ie={})),function(e){e.Invoked=1,e.Automatic=2}(se||(se={})),function(e){e.create=function(e,t,n){const r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){const t=e;return je.defined(t)&&je.typedArray(t.diagnostics,D.is)&&(void 0===t.only||je.typedArray(t.only,je.string))&&(void 0===t.triggerKind||t.triggerKind===se.Invoked||t.triggerKind===se.Automatic)}}(ae||(ae={})),function(e){e.LLMGenerated=1,e.is=function(t){return je.defined(t)&&t===e.LLMGenerated}}(ce||(ce={})),function(e){e.create=function(e,t,n){const r={title:e};let o=!0;return"string"==typeof t?(o=!1,r.kind=t):k.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return t&&je.string(t.title)&&(void 0===t.diagnostics||je.typedArray(t.diagnostics,D.is))&&(void 0===t.kind||je.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||k.is(t.command))&&(void 0===t.isPreferred||je.boolean(t.isPreferred))&&(void 0===t.edit||O.is(t.edit))&&(void 0===t.tags||je.typedArray(t.tags,ce.is))}}(ue||(ue={})),function(e){e.create=function(e,t){const n={range:e};return je.defined(t)&&(n.data=t),n},e.is=function(e){const t=e;return je.defined(t)&&c.is(t.range)&&(je.undefined(t.command)||k.is(t.command))}}(le||(le={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){const t=e;return je.defined(t)&&je.uinteger(t.tabSize)&&je.boolean(t.insertSpaces)}}(de||(de={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){const t=e;return je.defined(t)&&c.is(t.range)&&(je.undefined(t.target)||je.string(t.target))}}(fe||(fe={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){const n=t;return je.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(he||(he={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"}(pe||(pe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(me||(me={})),function(e){e.is=function(e){const t=e;return je.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(ge||(ge={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&je.string(t.text)}}(ye||(ye={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&je.boolean(t.caseSensitiveLookup)&&(je.string(t.variableName)||void 0===t.variableName)}}(be||(be={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(je.string(t.expression)||void 0===t.expression)}}(ve||(ve={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return je.defined(t)&&c.is(e.stoppedLocation)}}(De||(De={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ke||(ke={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return je.objectLiteral(t)&&(void 0===t.tooltip||je.string(t.tooltip)||L.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||k.is(t.command))}}(Ce||(Ce={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return je.objectLiteral(t)&&a.is(t.position)&&(je.string(t.label)||je.typedArray(t.label,Ce.is))&&(void 0===t.kind||ke.is(t.kind))&&void 0===t.textEdits||je.typedArray(t.textEdits,C.is)&&(void 0===t.tooltip||je.string(t.tooltip)||L.is(t.tooltip))&&(void 0===t.paddingLeft||je.boolean(t.paddingLeft))&&(void 0===t.paddingRight||je.boolean(t.paddingRight))}}(_e||(_e={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}},e.isSnippet=function(e){const t=e;return je.objectLiteral(t)&&"snippet"===t.kind&&je.string(t.value)}}(Re||(Re={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Te||(Te={})),function(e){e.create=function(e){return{items:e}}}(Se||(Se={})),function(e){e.Invoked=1,e.Automatic=2}(we||(we={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(xe||(xe={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Pe||(Pe={})),function(e){e.is=function(e){const t=e;return je.objectLiteral(t)&&o.is(t.uri)&&je.string(t.name)}}(Oe||(Oe={}));const Ee=["\n","\r\n","\r"];var qe,je;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s<o.length&&a<i.length;){const t=n(o[s],i[a]);e[c++]=t<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new Ie(e,t,n,r)},e.is=function(e){const t=e;return!!(je.defined(t)&&je.string(t.uri)&&(je.undefined(t.languageId)||je.string(t.languageId))&&je.uinteger(t.lineCount)&&je.func(t.getText)&&je.func(t.positionAt)&&je.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText();const o=t(n,(e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n});let i=r.length;for(let t=o.length-1;t>=0;t--){const n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(qe||(qe={}));class Ie{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){const e=[],t=this._content;let n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);const o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return a.create(0,e);for(;n<r;){const o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}const o=n-1;return a.create(o,e-t[o])}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(je||(je={}))},4323:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const o=r(n(9590));t.Semaphore=class{_capacity;_active;_waiting;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(){0!==this._waiting.length&&this._active!==this._capacity&&(0,o.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4512:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,n,r){return(0,i.createMessageConnection)(e,t,n,r)};const i=n(6439);o(n(6439),t),o(n(8766),t)},4566:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8867),o=n(9406),i=new r.BrowserMessageReader(self),s=new r.BrowserMessageWriter(self),a=(0,r.createConnection)(i,s);console.log=a.console.log.bind(a.console),console.error=a.console.error.bind(a.console);const c={timer:{setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}}}};(0,o.startServer)(a,c)},4615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3281);class o extends r.AbstractMessageBuffer{static emptyBuffer=new Uint8Array(0);asciiDecoder;constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}class i{socket;_onData;_messageListener;constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class s{socket;constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new i(e),asWritableStream:e=>new s(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function u(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(u||(u={})),t.default=u},4635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const r=n(8766);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(r.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(r.InlayHintRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t))),resolve:e=>this.connection.onRequest(r.InlayHintResolveRequest.type,(t,n)=>e(t,n))}}}},4996:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(9850);var o;!function(e){e.Continue=0,e.Cancelled=1}(o||(o={})),t.SharedArraySenderStrategy=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=o.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class i{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{token;constructor(e){this.token=new i(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{kind="request";createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new s(t)}}},5026:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const r=n(8766);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.TypeHierarchyPrepareRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)),onSupertypes:e=>{const t=r.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))},onSubtypes:e=>{const t=r.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))}}}}},5316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")}(o||(t.LinkedEditingRangeRequest=o={}))},5340:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageModelCache=function(e,t,n){let r,o={},i=0;return t>0&&(r=setInterval(()=>{const e=Date.now()-1e3*t,n=Object.keys(o);for(const t of n)o[t].cTime<e&&(delete o[t],i--)},1e3*t)),{get(t){const r=t.version,s=t.languageId,a=o[t.uri];if(a&&a.version===r&&a.languageId===s)return a.cTime=Date.now(),a.languageModel;const c=n(t);if(o[t.uri]={languageModel:c,version:r,languageId:s,cTime:Date.now()},a||i++,i===e){let e=Number.MAX_VALUE,t=null;for(const n in o){const r=o[n];r.cTime<e&&(t=n,e=r.cTime)}t&&(delete o[t],i--)}return c},onDocumentRemoved(e){const t=e.uri;o[t]&&(delete o[t],i--)},dispose(){void 0!==r&&(clearInterval(r),r=void 0,o={},i=0)}}}},6007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const r=n(8766);t.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(r.FoldingRangeRefreshRequest.type),on:e=>{const t=r.FoldingRangeRequest.type;return this.connection.onRequest(t,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n)))}}}}},6011:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const a=n(3281),c=s(n(8598)),u=n(372);var l,d,f,h,p;!function(e){e.is=function(e){const t=e;return t&&c.boolean(t.retriggerRequest)}}(l||(t.DiagnosticServerCancellationData=l={})),function(e){e.Full="full",e.Unchanged="unchanged"}(d||(t.DocumentDiagnosticReportKind=d={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType,e.capabilities=u.CM.create("textDocument.diagnostic","diagnosticProvider")}(f||(t.DocumentDiagnosticRequest=f={})),function(e){e.method="workspace/diagnostic",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType,e.capabilities=u.CM.create("workspace.diagnostics","diagnosticProvider.workspaceDiagnostics")}(h||(t.WorkspaceDiagnosticRequest=h={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=u.MessageDirection.serverToClient,e.type=new u.ProtocolRequestType0(e.method),e.capabilities=u.CM.create("workspace.diagnostics.refreshSupport",void 0)}(p||(t.DiagnosticRefreshRequest=p={}))},6116:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=void 0,t.v4=o,t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return o().asHex()};class n{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}}function o(){return new r}t.empty=new n("00000000-0000-0000-0000-000000000000");const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return i.test(e)}},6177:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const a=s(n(8585));var c,u;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(c||(t.ErrorCodes=c={}));class l extends Error{code;data;constructor(e,t,n){super(t),this.code=a.number(e)?e:c.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,l.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=l;class d{kind;static auto=new d("auto");static byPosition=new d("byPosition");static byName=new d("byName");constructor(e){this.kind=e}static is(e){return e===d.auto||e===d.byName||e===d.byPosition}toString(){return this.kind}}t.ParameterStructures=d;class f{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return d.auto}}t.AbstractMessageSignature=f,t.RequestType0=class extends f{_;constructor(e){super(e,0)}},t.RequestType=class extends f{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends f{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends f{_;constructor(e){super(e,2)}},t.RequestType3=class extends f{_;constructor(e){super(e,3)}},t.RequestType4=class extends f{_;constructor(e){super(e,4)}},t.RequestType5=class extends f{_;constructor(e){super(e,5)}},t.RequestType6=class extends f{_;constructor(e){super(e,6)}},t.RequestType7=class extends f{_;constructor(e){super(e,7)}},t.RequestType8=class extends f{_;constructor(e){super(e,8)}},t.RequestType9=class extends f{_;constructor(e){super(e,9)}},t.NotificationType=class extends f{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends f{_;constructor(e){super(e,0)}},t.NotificationType1=class extends f{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends f{_;constructor(e){super(e,2)}},t.NotificationType3=class extends f{_;constructor(e){super(e,3)}},t.NotificationType4=class extends f{_;constructor(e){super(e,4)}},t.NotificationType5=class extends f{_;constructor(e){super(e,5)}},t.NotificationType6=class extends f{_;constructor(e){super(e,6)}},t.NotificationType7=class extends f{_;constructor(e){super(e,7)}},t.NotificationType8=class extends f{_;constructor(e){super(e,8)}},t.NotificationType9=class extends f{_;constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&a.string(t.method)&&(a.string(t.id)||a.number(t.id))},e.isNotification=function(e){const t=e;return t&&a.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(a.string(t.id)||a.number(t.id)||null===t.id)}}(u||(t.Message=u={}))},6251:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatError=o,t.runSafeAsync=function(e,t,n,r,s){return new Promise(a=>{e.timer.setImmediate(()=>{if(!s.isCancellationRequested)return t().then(e=>{s.isCancellationRequested?a(i()):a(e)},e=>{console.error(o(r,e)),a(n)});a(i())})})},t.runSafe=function(e,t,n,r,s){return new Promise(a=>{e.timer.setImmediate(()=>{if(s.isCancellationRequested)a(i());else try{const e=t();if(s.isCancellationRequested)return void a(i());a(e)}catch(e){console.error(o(r,e)),a(n)}})})};const r=n(2861);function o(e,t){if(t instanceof Error){const n=t;return`${e}: ${n.message}\n${n.stack}`}return"string"==typeof t?`${e}: ${t}`:t?`${e}: ${t.toString()}`:e}function i(){return console.log("cancelled"),new r.ResponseError(r.LSPErrorCodes.RequestCancelled,"Request cancelled")}},6439:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserMessageWriter=t.BrowserMessageReader=void 0,t.createMessageConnection=function(e,t,n,r){return void 0===n&&(n=s.NullLogger),s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,s.createMessageConnection)(e,t,n,r)},i(n(4615)).default.install();const s=n(3281);o(n(3281),t);class a extends s.AbstractMessageReader{_onData;_messageListener;constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=a;class c extends s.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=c},6732:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(3608));let c=!1;const u=[],l=async e=>{if(c)u.push(e);else{const t=[];c=!0;const r=e.data.i10lLocation;if(r)try{await a.config({uri:r}),t.push(`l10n: Configured to ${r.toString()}.`)}catch(e){t.push(`l10n: Problems loading ${r.toString()} : ${e}.`)}else t.push("l10n: No bundle configured.");await Promise.resolve().then(n.bind(n,4566)),self.onmessage!==l&&(u.forEach(e=>self.onmessage?.(e)),u.length=0),t.forEach(console.log)}};self.onmessage=l},6914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/declaration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.declaration","declarationProvider")}(o||(t.DeclarationRequest=o={}))},7672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/documentColor",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.colorProvider","colorProvider")}(o||(t.DocumentColorRequest=o={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.colorProvider","colorProvider")}(i||(t.ColorPresentationRequest=i={}))},7752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.inlayHint","inlayHintProvider")}(o||(t.InlayHintRequest=o={})),function(e){e.method="inlayHint/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")}(i||(t.InlayHintResolveRequest=i={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method),e.capabilities=r.CM.create("workspace.inlayHint.refreshSupport",void 0)}(s||(t.InlayHintRefreshRequest=s={}))},7874:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0,t.combineConsoleFeatures=$,t.combineTelemetryFeatures=V,t.combineTracerFeatures=W,t.combineClientFeatures=U,t.combineWindowFeatures=H,t.combineWorkspaceFeatures=B,t.combineLanguagesFeatures=z,t.combineNotebooksFeatures=K,t.combineFeatures=function(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:n(e.console,t.console,$),tracer:n(e.tracer,t.tracer,W),telemetry:n(e.telemetry,t.telemetry,V),client:n(e.client,t.client,U),window:n(e.window,t.window,H),workspace:n(e.workspace,t.workspace,B),languages:n(e.languages,t.languages,z),notebooks:n(e.notebooks,t.notebooks,K)}},t.createConnection=function(e,t,n){const r=n&&n.console?new(n.console(S)):new S,o=e(r);r.rawAttach(o);const i=n&&n.tracer?new(n.tracer(E)):new E,s=n&&n.telemetry?new(n.telemetry(q)):new q,u=n&&n.client?new(n.client(A)):new A,d=n&&n.window?new(n.window(w)):new w,f=n&&n.workspace?new(n.workspace(N)):new N,h=n&&n.languages?new(n.languages(I)):new I,p=n&&n.notebooks?new(n.notebooks(F)):new F,m=[r,i,s,u,d,f,h,p];let g,y,b;const v={listen:()=>o.listen(),sendRequest:(e,...t)=>o.sendRequest(c.string(e)?e:e.method,...t),onRequest:(e,t)=>o.onRequest(e,t),sendNotification:(e,t)=>{const n=c.string(e)?e:e.method;return o.sendNotification(n,t)},onNotification:(e,t)=>o.onNotification(e,t),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:e=>(y=e,{dispose:()=>{y=void 0}}),onInitialized:e=>o.onNotification(a.InitializedNotification.type,e),onShutdown:e=>(g=e,{dispose:()=>{g=void 0}}),onExit:e=>(b=e,{dispose:()=>{b=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return i},get client(){return u},get window(){return d},get workspace(){return f},get languages(){return h},get notebooks(){return p},onDidChangeConfiguration:e=>o.onNotification(a.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>o.onNotification(a.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>o.onNotification(a.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>o.onNotification(a.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>o.onNotification(a.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>o.onNotification(a.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>o.onRequest(a.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>o.onNotification(a.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>o.sendNotification(a.PublishDiagnosticsNotification.type,e),onHover:e=>o.onRequest(a.HoverRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),void 0)),onCompletion:e=>o.onRequest(a.CompletionRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onCompletionResolve:e=>o.onRequest(a.CompletionResolveRequest.type,e),onSignatureHelp:e=>o.onRequest(a.SignatureHelpRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),void 0)),onDeclaration:e=>o.onRequest(a.DeclarationRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onDefinition:e=>o.onRequest(a.DefinitionRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onTypeDefinition:e=>o.onRequest(a.TypeDefinitionRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onImplementation:e=>o.onRequest(a.ImplementationRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onReferences:e=>o.onRequest(a.ReferencesRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onDocumentHighlight:e=>o.onRequest(a.DocumentHighlightRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onDocumentSymbol:e=>o.onRequest(a.DocumentSymbolRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onWorkspaceSymbol:e=>o.onRequest(a.WorkspaceSymbolRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onWorkspaceSymbolResolve:e=>o.onRequest(a.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>o.onRequest(a.CodeActionRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onCodeActionResolve:e=>o.onRequest(a.CodeActionResolveRequest.type,(t,n)=>e(t,n)),onCodeLens:e=>o.onRequest(a.CodeLensRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onCodeLensResolve:e=>o.onRequest(a.CodeLensResolveRequest.type,(t,n)=>e(t,n)),onDocumentFormatting:e=>o.onRequest(a.DocumentFormattingRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),void 0)),onDocumentRangeFormatting:e=>o.onRequest(a.DocumentRangeFormattingRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),void 0)),onDocumentOnTypeFormatting:e=>o.onRequest(a.DocumentOnTypeFormattingRequest.type,(t,n)=>e(t,n)),onRenameRequest:e=>o.onRequest(a.RenameRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),void 0)),onPrepareRename:e=>o.onRequest(a.PrepareRenameRequest.type,(t,n)=>e(t,n)),onDocumentLinks:e=>o.onRequest(a.DocumentLinkRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onDocumentLinkResolve:e=>o.onRequest(a.DocumentLinkResolveRequest.type,(t,n)=>e(t,n)),onDocumentColor:e=>o.onRequest(a.DocumentColorRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onColorPresentation:e=>o.onRequest(a.ColorPresentationRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onFoldingRanges:e=>o.onRequest(a.FoldingRangeRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onSelectionRanges:e=>o.onRequest(a.SelectionRangeRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),(0,l.attachPartialResult)(o,t))),onExecuteCommand:e=>o.onRequest(a.ExecuteCommandRequest.type,(t,n)=>e(t,n,(0,l.attachWorkDone)(o,t),void 0)),dispose:()=>o.dispose()};for(const e of m)e.attach(v);return o.onRequest(a.InitializeRequest.type,e=>{t.initialize(e),c.string(e.trace)&&(i.trace=a.Trace.fromString(e.trace));for(const t of m)t.initialize(e.capabilities);if(y){const t=y(e,(new a.CancellationTokenSource).token,(0,l.attachWorkDone)(o,e),void 0);return(n=t,n instanceof Promise?n:c.thenable(n)?new Promise((e,t)=>{n.then(t=>e(t),e=>t(e))}):Promise.resolve(n)).then(e=>{if(e instanceof a.ResponseError)return e;let t=e;t||(t={capabilities:{}});let n=t.capabilities;n||(n={},t.capabilities=n),void 0===n.textDocumentSync||null===n.textDocumentSync?n.textDocumentSync=c.number(v.__textDocumentSync)?v.__textDocumentSync:a.TextDocumentSyncKind.None:c.number(n.textDocumentSync)||c.number(n.textDocumentSync.change)||(n.textDocumentSync.change=c.number(v.__textDocumentSync)?v.__textDocumentSync:a.TextDocumentSyncKind.None);for(const e of m)e.fillServerCapabilities(n);return t})}{const e={capabilities:{textDocumentSync:a.TextDocumentSyncKind.None}};for(const t of m)t.fillServerCapabilities(e.capabilities);return e}var n}),o.onRequest(a.ShutdownRequest.type,()=>(t.shutdownReceived=!0,g?g((new a.CancellationTokenSource).token):void 0)),o.onNotification(a.ExitNotification.type,()=>{try{if(b)return b()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),o.onNotification(a.SetTraceNotification.type,e=>{i.trace=a.Trace.fromString(e.value)}),v};const a=n(8766),c=s(n(1248)),u=s(n(6116)),l=n(2938),d=n(8491),f=n(2112),h=n(3918),p=n(2655),m=n(8817),g=n(2697),y=n(8517),b=n(5026),v=n(1815),D=n(6007),k=n(4635),C=n(493),_=n(20),R=n(2936);function T(e){if(null!==e)return e}t.ErrorMessageTracker=class{_messages;constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach(t=>{e.window.showErrorMessage(t)})}};class S{_rawConnection;_connection;constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(a.MessageType.Error,e)}warn(e){this.send(a.MessageType.Warning,e)}info(e){this.send(a.MessageType.Info,e)}log(e){this.send(a.MessageType.Log,e)}debug(e){this.send(a.MessageType.Debug,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(a.LogMessageNotification.type,{type:e,message:t}).catch(()=>{(0,a.RAL)().console.error("Sending log message failed")})}}const w=(0,m.ShowDocumentFeature)((0,l.ProgressFeature)(class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){const n={type:a.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,n).then(T)}showWarningMessage(e,...t){const n={type:a.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,n).then(T)}showInformationMessage(e,...t){const n={type:a.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,n).then(T)}}));var x,P;!function(e){e.create=function(){return new O}}(x||(t.BulkRegistration=x={}));class O{_registrations=[];_registered=new Set;add(e,t){const n=c.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const r=u.generateUuid();this._registrations.push({id:r,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function(){return new M(void 0,[])}}(P||(t.BulkUnregistration=P={}));class M{_connection;_unregistrations=new Map;constructor(e,t){this._connection=e,t.forEach(e=>{this._unregistrations.set(e.method,e)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){const e=[];for(const t of this._unregistrations.values())e.push(t);const t={unregisterations:e};this._connection.sendRequest(a.UnregistrationRequest.type,t).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(e){const t=c.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;const r={unregisterations:[n]};return this._connection.sendRequest(a.UnregistrationRequest.type,r).then(()=>{this._unregistrations.delete(t)},e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)}),!0}}class A{_connection;attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof O?this.registerMany(e):e instanceof M?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const r=c.string(t)?t:t.method,o=u.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(a.RegistrationRequest.type,i).then(t=>(e.add({id:o,method:r}),e),e=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(e)))}registerSingle2(e,t){const n=c.string(e)?e:e.method,r=u.generateUuid(),o={registrations:[{id:r,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(a.RegistrationRequest.type,o).then(e=>a.Disposable.create(()=>{this.unregisterSingle(r,n).catch(()=>{this.connection.console.info(`Un-registering capability with id ${r} failed.`)})}),e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e)))}unregisterSingle(e,t){const n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(a.UnregistrationRequest.type,n).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){const t=e.asRegistrationParams();return this.connection.sendRequest(a.RegistrationRequest.type,t).then(()=>new M(this._connection,t.registrations.map(e=>({id:e.id,method:e.method}))),e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e)))}}const N=(0,g.FileOperationsFeature)((0,f.WorkspaceFoldersFeature)((0,d.ConfigurationFeature)(class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){const t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(a.ApplyWorkspaceEditRequest.type,t)}})));class E{_trace;_connection;constructor(){this._trace=a.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==a.Trace.Off&&this.connection.sendNotification(a.LogTraceNotification.type,{message:e,verbose:this._trace===a.Trace.Verbose?t:void 0}).catch(()=>{})}}class q{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(a.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}}class j{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,l.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,l.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=j;const I=(0,D.FoldingRangeFeature)((0,R.MonikerFeature)((0,C.DiagnosticFeature)((0,k.InlayHintFeature)((0,v.InlineValueFeature)((0,b.TypeHierarchyFeature)((0,y.LinkedEditingRangeFeature)((0,p.SemanticTokensFeature)((0,h.CallHierarchyFeature)(j)))))))));class L{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,l.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,l.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=L;const F=(0,_.NotebookSyncFeature)(L);function $(e,t){return function(n){return t(e(n))}}function V(e,t){return function(n){return t(e(n))}}function W(e,t){return function(n){return t(e(n))}}function U(e,t){return function(n){return t(e(n))}}function H(e,t){return function(n){return t(e(n))}}function B(e,t){return function(n){return t(e(n))}}function z(e,t){return function(n){return t(e(n))}}function K(e,t){return function(n){return t(e(n))}}},8461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.typeDefinition","typeDefinitionProvider")}(o||(t.TypeDefinitionRequest=o={}))},8491:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const a=n(8766),c=s(n(1248));t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?c.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){const t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(a.ConfigurationRequest.type,t).then(t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null)}}},8517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const r=n(8766);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(r.LinkedEditingRangeRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))}}},8585:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))}},8598:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},8765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.callHierarchy","callHierarchyProvider")}(o||(t.CallHierarchyPrepareRequest=o={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.CallHierarchyIncomingCallsRequest=i={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},8766:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(n(3281),t),o(n(4292),t),o(n(372),t),o(n(1560),t);var i,s=n(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(i||(t.LSPErrorCodes=i={}))},8817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const r=n(8766);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(r.ShowDocumentRequest.type,e)}}},8867:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=function(e,t,n,r){let o,s,c,u;return void 0!==e&&"features"===e.__brand&&(o=e,e=t,t=n,n=r),i.ConnectionStrategy.is(e)||i.ConnectionOptions.is(e)?u=e:(s=e,c=t,u=n),(0,i.createConnection)(e=>(0,i.createProtocolConnection)(s,c,e,u),a,o)};const i=n(2861);o(n(4512),t),o(n(2861),t);let s=!1;const a={initialize:e=>{},get shutdownReceived(){return s},set shutdownReceived(e){s=e},exit:e=>{}}},8945:function(e){var t;t=()=>(()=>{"use strict";var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=a,s=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,o=47===s.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,s=i-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(o+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=o+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,o=0,i=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){o=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){o=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){r=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},70:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows=!1;else if("object"==typeof navigator){let e=navigator.userAgent;t.isWindows=e.indexOf("Windows")>=0}},231:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const r=n(70),o=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function a(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",u="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,o,i=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,n||c),this.query=r||c,this.fragment=o||c,a(this,i))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===r?r=this.path:null===r&&(r=c),void 0===o?o=this.query:null===o&&(o=c),void 0===i?i=this.fragment:null===i&&(i=c),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new h(t,n,r,o,i)}static parse(e,t=!1){const n=l.exec(e);return n?new h(n[2]||c,k(n[4]||c),k(n[5]||c),k(n[7]||c),k(n[9]||c),t):new h(c,c,c,c,c)}static file(e){let t=c;if(r.isWindows&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const n=e.indexOf(u,2);-1===n?(t=e.substring(2),e=u):(t=e.substring(2,n),e=e.substring(n)||u)}return new h("file",t,e,c,c)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}t.URI=d;const f=r.isWindows?1:void 0;class h extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t,n){let r,o=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));const t=p[s];void 0!==t?(-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),r+=t):-1===o&&(o=i)}}return-1!==o&&(r+=encodeURIComponent(e.substring(o))),void 0!==r?r:e}function g(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=p[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function y(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.isWindows&&(n=n.replace(/\//g,"\\")),n}function b(e,t){const n=t?g:m;let r="",{scheme:o,authority:i,path:s,query:a,fragment:c}=e;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=u,r+=u),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?r+=n(i,!1,!0):(r+=n(i.substr(0,e),!1,!0),r+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:m(c,!1,!1)),r}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}t.uriToFsPath=y;const D=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(D)?e.replace(D,e=>v(e)):e}},552:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const s=i(n(975)),a=s.posix||s,c="/";var u;!function(e){e.joinPath=function(e,...t){return e.with({path:a.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==c&&(n=c+n,r=!0);let o=a.resolve(n,...t);return r&&o[0]===c&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===c)return e;let t=a.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return a.basename(e.path)},e.extname=function(e){return a.extname(e.path)}}(u||(t.Utils=u={}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.URI=void 0;const t=n(231);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return t.URI}});const o=n(552);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),r})(),e.exports=t()},9047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(372);var o,i,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(o||(t.UniquenessLevel=o={})),function(e){e.$import="import",e.$export="export",e.local="local"}(i||(t.MonikerKind=i={})),function(e){e.method="textDocument/moniker",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.moniker","monikerProvider")}(s||(t.MonikerRequest=s={}))},9085:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const c=a(n(9590)),u=s(n(8585)),l=n(2676),d=n(4323);var f,h;!function(e){e.is=function(e){const t=e;return t&&u.func(t.listen)&&u.func(t.dispose)&&u.func(t.onError)&&u.func(t.onClose)&&u.func(t.onPartialMessage)}}(f||(t.MessageReader=f={}));class p{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new l.Emitter,this.closeEmitter=new l.Emitter,this.partialMessageEmitter=new l.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${u.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=p,function(e){e.fromOptions=function(e){let t,n;const r=new Map;let o;const i=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,r.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)r.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(o=e.contentTypeDecoder,i.set(o.name,o)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)i.set(t.name,t)}return void 0===o&&(o=(0,c.default)().applicationJson.decoder,i.set(o.name,o)),{charset:t,contentDecoder:n,contentDecoders:r,contentTypeDecoder:o,contentTypeDecoders:i}}}(h||(h={})),t.ReadableStreamMessageReader=class extends p{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super(),this.readable=e,this.options=h.fromOptions(t),this.buffer=(0,c.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new d.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,c.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},9202:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentFeature=void 0;const r=n(8766);t.TextDocumentContentFeature=e=>class extends e{get textDocumentContent(){return{refresh:e=>this.connection.sendRequest(r.TextDocumentContentRefreshRequest.type,{uri:e}),on:e=>this.connection.onRequest(r.TextDocumentContentRequest.type,(t,n)=>e(t,n))}}}},9244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,o=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(r=0;r<e.length;){switch(e[r]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,r++;break e;default:t=0}break;default:t=0}r++}o+=e.byteLength,n++}if(4!==t)return;const i=this._read(o+r),s=new Map,a=this.toString(i,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const n=a[t],r=n.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${n}`);const o=n.substr(0,r),i=n.substr(r+1).trim();s.set(e?o.toLowerCase():o,i)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const o=r.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},9406:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.startServer=function(e,t){function n(n=["https","http","file"]){const r={};for(const e of n)"file"===e?r[e]=t.file:"http"!==e&&"https"!==e||(r[e]=t.http);return t=>{const n=t.substr(0,t.indexOf(":")),o=r[n];return o?o.getContent(t):e.sendRequest(m.type,t).then(e=>e,e=>Promise.reject(e))}}let r=(0,l.getLanguageService)({workspaceContext:C,contributions:[],clientCapabilities:l.ClientCapabilities.LATEST});const o=new a.TextDocuments(l.TextDocument);o.listen(e);let i,s=!1,f=!1,T=!1,S=Number.MAX_VALUE,w=Number.MAX_VALUE,x=Number.MAX_VALUE,P=Number.MAX_VALUE,O=Number.MAX_VALUE,M=Number.MAX_VALUE,A=Number.MAX_VALUE;e.onInitialize(c=>{const d=c.initializationOptions||{},h=d?.handledSchemaProtocols;function p(e,t){const n=e.split(".");let r=c.capabilities;for(let e=0;r&&e<n.length;e++){if(!r.hasOwnProperty(n[e]))return t;r=r[n[e]]}return r}r=(0,l.getLanguageService)({schemaRequestService:n(h),workspaceContext:C,contributions:[],clientCapabilities:c.capabilities}),s=p("textDocument.completion.completionItem.snippetSupport",!1),f=p("textDocument.rangeFormatting.dynamicRegistration",!1)&&"boolean"!=typeof d.provideFormatter,S=p("textDocument.foldingRange.rangeLimit",Number.MAX_VALUE),T=p("textDocument.documentSymbol.hierarchicalDocumentSymbolSupport",!1),A=d.customCapabilities?.rangeFormatting?.editLimit||Number.MAX_VALUE;const m=p("textDocument.diagnostic",void 0);return i=void 0===m?(0,u.registerDiagnosticsPushSupport)(o,e,t,F):(0,u.registerDiagnosticsPullSupport)(o,e,t,F),{capabilities:{textDocumentSync:a.TextDocumentSyncKind.Incremental,completionProvider:s?{resolveProvider:!1,triggerCharacters:['"',":"]}:void 0,hoverProvider:!0,documentSymbolProvider:!0,documentRangeFormattingProvider:!0===d.provideFormatter,documentFormattingProvider:!0===d.provideFormatter,colorProvider:{},foldingRangeProvider:!0,selectionRangeProvider:!0,documentLinkProvider:{},diagnosticProvider:{documentSelector:null,interFileDependencies:!1,workspaceDiagnostics:!1},codeActionProvider:{codeActionKinds:[_]}}}});let N,E,q=null,j=!0,I=!1;function L(e){const t={validate:j,allowComments:!0,schemas:new Array};if(E)if(Array.isArray(E))Array.prototype.push.apply(t.schemas,E);else for(const e in E){const n=E[e];Array.isArray(n)&&n.forEach(n=>{t.schemas.push({uri:n,fileMatch:[e]})})}N&&N.forEach((e,n)=>{let r=e.url;!r&&e.schema&&(r=e.schema.id||`vscode://schemas/custom/${n}`),r&&t.schemas.push({uri:r,fileMatch:e.fileMatch,schema:e.schema,folderUri:e.folderUri})}),e&&t.schemas.push(...e),r.configure(t),i?.requestRefresh()}async function F(e){if(0===e.getText().length)return[];const t=V(e),n="jsonc"===e.languageId?{comments:"ignore",trailingCommas:"warning"}:{comments:"error",trailingCommas:"error"};return await r.doValidation(e,t,n)}e.onDidChangeConfiguration(n=>{const r=n.settings;t.configureHttpRequests?.(r?.http?.proxy,!!r.http?.proxyStrictSSL),N=r.json?.schemas,j=!!r.json?.validate?.enable,I=r.json?.keepLines?.enable||!1,L();const o=e=>Math.trunc(Math.max(e,0));if(w=o(r.json?.resultLimit||Number.MAX_VALUE),x=o(r.json?.jsonFoldingLimit||S),P=o(r.json?.jsoncFoldingLimit||S),O=o(r.json?.jsonColorDecoratorLimit||Number.MAX_VALUE),M=o(r.json?.jsoncColorDecoratorLimit||Number.MAX_VALUE),f){const t=r.json?.format?.enable;if(t){if(!q){const t=[{language:"json"},{language:"jsonc"}];q=[e.client.register(a.DocumentRangeFormattingRequest.type,{documentSelector:t}),e.client.register(a.DocumentFormattingRequest.type,{documentSelector:t})]}}else q&&(q.forEach(e=>e.then(e=>e.dispose())),q=null)}}),e.onNotification(p.type,e=>{E=e,L()}),e.onNotification(g.type,e=>{let t=!1;if(Array.isArray(e))for(const n of e)r.resetSchema(n)&&(t=!0);else t=r.resetSchema(e);t&&i?.requestRefresh()}),e.onRequest(b.type,async()=>{i?.requestRefresh()}),e.onRequest(y.type,async e=>{const t=o.get(e);return t?(L(),await F(t)):[]}),e.onRequest(D.type,async({schemaUri:e,content:t})=>{const n="vscode://schemas/temp/"+(new Date).getTime(),r=l.TextDocument.create(n,"json",1,t);return L([{uri:e,fileMatch:[n]}]),await F(r)}),e.onRequest(v.type,async e=>{const t=o.get(e);if(t){const e=V(t);return r.getLanguageStatus(t,e)}return{schemas:[]}}),e.onRequest(k.type,async e=>{const t=e.uri,n=e.options,i=o.get(t);return i?r.sort(i,n):[]}),e.onDidChangeWatchedFiles(e=>{let t=!1;for(const n of e.changes)r.resetSchema(n.uri)&&(t=!0);t&&i?.requestRefresh()});const $=(0,d.getLanguageModelCache)(10,60,e=>r.parseJSONDocument(e));function V(e){return $.get(e)}function W(e,t,n){n.keepLines=I;const i=o.get(e.uri);if(i){const e=r.format(i,t??R(i),n);if(e.length>A){const t=l.TextDocument.applyEdits(i,e);return[a.TextEdit.replace(R(i),t)]}return e}return[]}o.onDidClose(e=>{$.onDocumentRemoved(e.document)}),e.onShutdown(()=>{$.dispose()}),e.onCompletion((e,n)=>(0,c.runSafeAsync)(t,async()=>{const t=o.get(e.textDocument.uri);if(t){const n=V(t);return r.doComplete(t,e.position,n)}return null},null,`Error while computing completions for ${e.textDocument.uri}`,n)),e.onHover((e,n)=>(0,c.runSafeAsync)(t,async()=>{const t=o.get(e.textDocument.uri);if(t){const n=V(t);return r.doHover(t,e.position,n)}return null},null,`Error while computing hover for ${e.textDocument.uri}`,n)),e.onDocumentSymbol((e,n)=>(0,c.runSafe)(t,()=>{const t=o.get(e.textDocument.uri);if(t){const e=V(t);return T?r.findDocumentSymbols2(t,e,{resultLimit:w}):r.findDocumentSymbols(t,e,{resultLimit:w})}return[]},[],`Error while computing document symbols for ${e.textDocument.uri}`,n)),e.onCodeAction((e,n)=>(0,c.runSafeAsync)(t,async()=>{if(o.get(e.textDocument.uri)){const e=a.CodeAction.create("Sort JSON",_);return e.command={command:"json.sort",title:h.t("Sort JSON")},[e]}return[]},[],`Error while computing code actions for ${e.textDocument.uri}`,n)),e.onDocumentRangeFormatting((e,n)=>(0,c.runSafe)(t,()=>W(e.textDocument,e.range,e.options),[],`Error while formatting range for ${e.textDocument.uri}`,n)),e.onDocumentFormatting((e,n)=>(0,c.runSafe)(t,()=>W(e.textDocument,void 0,e.options),[],`Error while formatting ${e.textDocument.uri}`,n)),e.onDocumentColor((e,n)=>(0,c.runSafeAsync)(t,async()=>{const t=o.get(e.textDocument.uri);if(t){const e=V(t),n="jsonc"===t.languageId?M:O;return r.findDocumentColors(t,e,{resultLimit:n})}return[]},[],`Error while computing document colors for ${e.textDocument.uri}`,n)),e.onColorPresentation((e,n)=>(0,c.runSafe)(t,()=>{const t=o.get(e.textDocument.uri);if(t){const n=V(t);return r.getColorPresentations(t,n,e.color,e.range)}return[]},[],`Error while computing color presentations for ${e.textDocument.uri}`,n)),e.onFoldingRanges((e,n)=>(0,c.runSafe)(t,()=>{const t=o.get(e.textDocument.uri);if(t){const e="jsonc"===t.languageId?P:x;return r.getFoldingRanges(t,{rangeLimit:e})}return null},null,`Error while computing folding ranges for ${e.textDocument.uri}`,n)),e.onSelectionRanges((e,n)=>(0,c.runSafe)(t,()=>{const t=o.get(e.textDocument.uri);if(t){const n=V(t);return r.getSelectionRanges(t,e.positions,n)}return[]},[],`Error while computing selection ranges for ${e.textDocument.uri}`,n)),e.onDocumentLinks((e,n)=>(0,c.runSafeAsync)(t,async()=>{const t=o.get(e.textDocument.uri);if(t){const e=V(t);return r.findLinks(t,e)}return[]},[],`Error while computing links for ${e.textDocument.uri}`,n)),e.listen()};const a=n(2861),c=n(6251),u=n(3234),l=n(1301),d=n(5340),f=n(8945),h=s(n(3608));var p,m,g,y,b,v,D,k;!function(e){e.type=new a.NotificationType("json/schemaAssociations")}(p||(p={})),function(e){e.type=new a.RequestType("vscode/content")}(m||(m={})),function(e){e.type=new a.NotificationType("json/schemaContent")}(g||(g={})),function(e){e.type=new a.RequestType("json/validate")}(y||(y={})),function(e){e.type=new a.RequestType("json/validateAll")}(b||(b={})),function(e){e.type=new a.RequestType("json/languageStatus")}(v||(v={})),function(e){e.type=new a.RequestType("json/validateContent")}(D||(D={})),function(e){e.type=new a.RequestType("json/sort")}(k||(k={}));const C={resolveRelativePath:(e,t)=>{const n=t.substring(0,t.lastIndexOf("/")+1);return f.Utils.resolvePath(f.URI.parse(n),e).toString()}},_=a.CodeActionKind.Source.concat(".sort",".json");function R(e){return l.Range.create(l.Position.create(0,0),e.positionAt(e.getText().length))}},9574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/implementation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("textDocument.implementation","implementationProvider")}(o||(t.ImplementationRequest=o={}))},9590:(e,t)=>{"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},9840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(372);var o,i,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(o||(t.FileOperationPatternKind=o={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")}(i||(t.WillCreateFilesRequest=i={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.capabilities=r.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.capabilities=r.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.capabilities=r.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.capabilities=r.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")}(l||(t.WillDeleteFilesRequest=l={}))},9850:function(e,t,n){"use strict";var r,o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return i(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const c=a(n(9590)),u=s(n(8585)),l=n(2676);var d;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:l.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:l.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||u.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(d||(t.CancellationToken=d={}));const f=Object.freeze(function(e,t){const n=(0,c.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}});class h{_isCancelled=!1;_emitter;cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?f:(this._emitter||(this._emitter=new l.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{_token;get token(){return this._token||(this._token=new h),this._token}cancel(){this._token?this._token.cancel():this._token=d.Cancelled}dispose(){this._token?this._token instanceof h&&this._token.dispose():this._token=d.None}}},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(372);var o,i;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method),e.capabilities=r.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")}(o||(t.WorkspaceFoldersRequest=o={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.capabilities=r.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")}(i||(t.DidChangeWorkspaceFoldersNotification=i={}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(6732);serverExportVar=r})();
2
- //# sourceMappingURL=jsonServerMain.js.map
1
+ "use strict";var Om=Object.create;var Br=Object.defineProperty;var Mm=Object.getOwnPropertyDescriptor;var Nm=Object.getOwnPropertyNames;var Em=Object.getPrototypeOf,Am=Object.prototype.hasOwnProperty;var oe=(e,t)=>()=>(e&&(t=e(e=0)),t);var J=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cm=(e,t)=>{for(var n in t)Br(e,n,{get:t[n],enumerable:!0})},el=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Nm(t))!Am.call(e,i)&&i!==n&&Br(e,i,{get:()=>t[i],enumerable:!(r=Mm(t,i))||r.enumerable});return e};var zr=(e,t,n)=>(n=e!=null?Om(Em(e)):{},el(t||!e||!e.__esModule?Br(n,"default",{value:e,enumerable:!0}):n,e)),Io=e=>el(Br({},"__esModule",{value:!0}),e);var b=oe(()=>{});async function jm(e){if(e.protocol==="http:"||e.protocol==="https:")return await(await fetch(e)).text();throw new Error("Unsupported protocol")}function qm(e){throw new Error("Unsupported in browser")}function nl(e){if("contents"in e){typeof e.contents=="string"?dr=JSON.parse(e.contents):dr=e.contents;return}if("fsPath"in e){let t=qm(e.fsPath),n=JSON.parse(t);dr=tl(n)?n.contents.bundle:n;return}if(e.uri){let t=e.uri;return typeof e.uri=="string"&&(t=new URL(e.uri)),new Promise((n,r)=>{jm(t).then(i=>{try{let o=JSON.parse(i);dr=tl(o)?o.contents.bundle:o,n()}catch(o){r(o)}}).catch(i=>{r(i)})})}}function E(...e){let t=e[0],n,r,i;if(typeof t=="string")n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!="object"?e:e[0];else if(t instanceof Array){let s=e.slice(1);if(t.length!==s.length+1)throw new Error("expected a string as the first argument to l10n.t");let a=t[0];for(let f=1;f<t.length;f++)a+=`{${f-1}}`+t[f];return E(a,...s)}else r=t.message,n=r,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{};let o=dr?.[n];return o?typeof o=="string"?Jr(o,i):o.comment?Jr(o.message,i):Jr(r,i):Jr(r,i)}function Jr(e,t){return Object.keys(t).length===0?e:e.replace(Lm,(n,r)=>t[r]??n)}function tl(e){return typeof e?.contents?.bundle=="object"&&typeof e?.version=="string"}var dr,Lm,Rt=oe(()=>{"use strict";b();Lm=/{([^}]+)}/g});var Pn=J(Ot=>{"use strict";b();Object.defineProperty(Ot,"__esModule",{value:!0});Ot.boolean=Im;Ot.string=rl;Ot.number=Fm;Ot.error=$m;Ot.func=Vm;Ot.array=il;Ot.stringArray=Wm;function Im(e){return e===!0||e===!1}function rl(e){return typeof e=="string"||e instanceof String}function Fm(e){return typeof e=="number"||e instanceof Number}function $m(e){return e instanceof Error}function Vm(e){return typeof e=="function"}function il(e){return Array.isArray(e)}function Wm(e){return il(e)&&e.every(t=>rl(t))}});var us=J(G=>{"use strict";b();var Um=G&&G.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Hm=G&&G.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Bm=G&&G.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Um(n,t,r[i]);return Hm(n,t),n}})();Object.defineProperty(G,"__esModule",{value:!0});G.Message=G.NotificationType9=G.NotificationType8=G.NotificationType7=G.NotificationType6=G.NotificationType5=G.NotificationType4=G.NotificationType3=G.NotificationType2=G.NotificationType1=G.NotificationType0=G.NotificationType=G.RequestType9=G.RequestType8=G.RequestType7=G.RequestType6=G.RequestType5=G.RequestType4=G.RequestType3=G.RequestType2=G.RequestType1=G.RequestType=G.RequestType0=G.AbstractMessageSignature=G.ParameterStructures=G.ResponseError=G.ErrorCodes=void 0;var un=Bm(Pn()),Fo;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(Fo||(G.ErrorCodes=Fo={}));var $o=class e extends Error{code;data;constructor(t,n,r){super(n),this.code=un.number(t)?t:Fo.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,e.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};G.ResponseError=$o;var Vt=class e{kind;static auto=new e("auto");static byPosition=new e("byPosition");static byName=new e("byName");constructor(t){this.kind=t}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};G.ParameterStructures=Vt;var he=class{method;numberOfParams;constructor(t,n){this.method=t,this.numberOfParams=n}get parameterStructures(){return Vt.auto}};G.AbstractMessageSignature=he;var Vo=class extends he{_;constructor(t){super(t,0)}};G.RequestType0=Vo;var Wo=class extends he{_parameterStructures;_;constructor(t,n=Vt.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};G.RequestType=Wo;var Uo=class extends he{_parameterStructures;_;constructor(t,n=Vt.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};G.RequestType1=Uo;var Ho=class extends he{_;constructor(t){super(t,2)}};G.RequestType2=Ho;var Bo=class extends he{_;constructor(t){super(t,3)}};G.RequestType3=Bo;var zo=class extends he{_;constructor(t){super(t,4)}};G.RequestType4=zo;var Jo=class extends he{_;constructor(t){super(t,5)}};G.RequestType5=Jo;var Xo=class extends he{_;constructor(t){super(t,6)}};G.RequestType6=Xo;var Go=class extends he{_;constructor(t){super(t,7)}};G.RequestType7=Go;var Qo=class extends he{_;constructor(t){super(t,8)}};G.RequestType8=Qo;var Zo=class extends he{_;constructor(t){super(t,9)}};G.RequestType9=Zo;var Yo=class extends he{_parameterStructures;_;constructor(t,n=Vt.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};G.NotificationType=Yo;var Ko=class extends he{_;constructor(t){super(t,0)}};G.NotificationType0=Ko;var es=class extends he{_parameterStructures;_;constructor(t,n=Vt.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};G.NotificationType1=es;var ts=class extends he{_;constructor(t){super(t,2)}};G.NotificationType2=ts;var ns=class extends he{_;constructor(t){super(t,3)}};G.NotificationType3=ns;var rs=class extends he{_;constructor(t){super(t,4)}};G.NotificationType4=rs;var is=class extends he{_;constructor(t){super(t,5)}};G.NotificationType5=is;var os=class extends he{_;constructor(t){super(t,6)}};G.NotificationType6=os;var ss=class extends he{_;constructor(t){super(t,7)}};G.NotificationType7=ss;var as=class extends he{_;constructor(t){super(t,8)}};G.NotificationType8=as;var cs=class extends he{_;constructor(t){super(t,9)}};G.NotificationType9=cs;var ol;(function(e){function t(i){let o=i;return o&&un.string(o.method)&&(un.string(o.id)||un.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&un.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(un.string(o.id)||un.number(o.id)||o.id===null)}e.isResponse=r})(ol||(G.Message=ol={}))});var fs=J(Wt=>{"use strict";b();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LRUCache=Wt.LinkedMap=Wt.Touch=void 0;var Fe;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Fe||(Wt.Touch=Fe={}));var Xr=class{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(t){let n=this._map.get(t);return n?n.previous?.value:void 0}after(t){let n=this._map.get(t);return n?n.next?.value:void 0}has(t){return this._map.has(t)}get(t,n=Fe.None){let r=this._map.get(t);if(r)return n!==Fe.None&&this.touch(r,n),r.value}set(t,n,r=Fe.None){let i=this._map.get(t);if(i)i.value=n,r!==Fe.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case Fe.None:this.addItemLast(i);break;case Fe.First:this.addItemFirst(i);break;case Fe.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==Fe.First&&n!==Fe.Last)){if(n===Fe.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===Fe.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};Wt.LinkedMap=Xr;var ls=class extends Xr{_limit;_ratio;constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=Fe.AsNew){return super.get(t,n)}peek(t){return super.get(t,Fe.None)}set(t,n){return super.set(t,n,Fe.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Wt.LRUCache=ls});var al=J(Gr=>{"use strict";b();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.Disposable=void 0;var sl;(function(e){function t(n){return{dispose:n}}e.create=t})(sl||(Gr.Disposable=sl={}))});var Ut=J(hs=>{"use strict";b();Object.defineProperty(hs,"__esModule",{value:!0});var ds;function ps(){if(ds===void 0)throw new Error("No runtime abstraction layer installed");return ds}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");ds=n}e.install=t})(ps||(ps={}));hs.default=ps});var Sn=J(Ht=>{"use strict";b();var zm=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.Emitter=Ht.Event=void 0;var Jm=zm(Ut()),cl;(function(e){let t={dispose(){}};e.None=function(){return t}})(cl||(Ht.Event=cl={}));var gs=class{_callbacks;_contexts;add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],t))}catch(a){(0,Jm.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},ms=class e{_options;static _noop=function(){};_event;_callbacks;constructor(t){this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new gs),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),i.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Ht.Emitter=ms});var Yr=J(Xe=>{"use strict";b();var Xm=Xe&&Xe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gm=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qm=Xe&&Xe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Xm(n,t,r[i]);return Gm(n,t),n}})(),Zm=Xe&&Xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.CancellationTokenSource=Xe.CancellationToken=void 0;var Ym=Zm(Ut()),Km=Qm(Pn()),ys=Sn(),Qr;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ys.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ys.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||Km.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Qr||(Xe.CancellationToken=Qr={}));var ey=Object.freeze(function(e,t){let n=(0,Ym.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),Zr=class{_isCancelled=!1;_emitter;cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ey:(this._emitter||(this._emitter=new ys.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},bs=class{_token;get token(){return this._token||(this._token=new Zr),this._token}cancel(){this._token?this._token.cancel():this._token=Qr.Cancelled}dispose(){this._token?this._token instanceof Zr&&this._token.dispose():this._token=Qr.None}};Xe.CancellationTokenSource=bs});var ul=J(kn=>{"use strict";b();Object.defineProperty(kn,"__esModule",{value:!0});kn.SharedArrayReceiverStrategy=kn.SharedArraySenderStrategy=void 0;var ty=Yr(),pr;(function(e){e.Continue=0,e.Cancelled=1})(pr||(pr={}));var vs=class{buffers;constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=pr.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,pr.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};kn.SharedArraySenderStrategy=vs;var _s=class{data;constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===pr.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},ws=class{token;constructor(t){this.token=new _s(t)}cancel(){}dispose(){}},Ds=class{kind="request";createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new ty.CancellationTokenSource:new ws(n)}};kn.SharedArrayReceiverStrategy=Ds});var Ps=J(Tn=>{"use strict";b();var ny=Tn&&Tn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.Semaphore=void 0;var ry=ny(Ut()),xs=class{_capacity;_active;_waiting;constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,ry.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};Tn.Semaphore=xs});var fl=J($e=>{"use strict";b();var iy=$e&&$e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),oy=$e&&$e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sy=$e&&$e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&iy(n,t,r[i]);return oy(n,t),n}})(),ay=$e&&$e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($e,"__esModule",{value:!0});$e.ReadableStreamMessageReader=$e.AbstractMessageReader=$e.MessageReader=void 0;var ks=ay(Ut()),Rn=sy(Pn()),Ss=Sn(),cy=Ps(),ll;(function(e){function t(n){let r=n;return r&&Rn.func(r.listen)&&Rn.func(r.dispose)&&Rn.func(r.onError)&&Rn.func(r.onClose)&&Rn.func(r.onPartialMessage)}e.is=t})(ll||($e.MessageReader=ll={}));var Kr=class{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new Ss.Emitter,this.closeEmitter=new Ss.Emitter,this.partialMessageEmitter=new Ss.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${Rn.string(t.message)?t.message:"unknown"}`)}};$e.AbstractMessageReader=Kr;var Ts;(function(e){function t(n){let r,i,o,s=new Map,a,f=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let c of n.contentDecoders)s.set(c.name,c);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,f.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let c of n.contentTypeDecoders)f.set(c.name,c)}return a===void 0&&(a=(0,ks.default)().applicationJson.decoder,f.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:f}}e.fromOptions=t})(Ts||(Ts={}));var Rs=class extends Kr{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(t,n){super(),this.readable=t,this.options=Ts.fromOptions(n),this.buffer=(0,ks.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new cy.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){try{for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property.
2
+ ${JSON.stringify(Object.fromEntries(r))}`));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=o}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,ks.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};$e.ReadableStreamMessageReader=Rs});var ml=J(Ve=>{"use strict";b();var uy=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ly=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fy=Ve&&Ve.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&uy(n,t,r[i]);return ly(n,t),n}})(),dy=Ve&&Ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.WriteableStreamMessageWriter=Ve.AbstractMessageWriter=Ve.MessageWriter=void 0;var dl=dy(Ut()),hr=fy(Pn()),py=Ps(),pl=Sn(),hy="Content-Length: ",hl=`\r
3
+ `,gl;(function(e){function t(n){let r=n;return r&&hr.func(r.dispose)&&hr.func(r.onClose)&&hr.func(r.onError)&&hr.func(r.write)}e.is=t})(gl||(Ve.MessageWriter=gl={}));var ei=class{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new pl.Emitter,this.closeEmitter=new pl.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,n,r){this.errorEmitter.fire([this.asError(t),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${hr.string(t.message)?t.message:"unknown"}`)}};Ve.AbstractMessageWriter=ei;var Os;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,dl.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,dl.default)().applicationJson.encoder}}e.fromOptions=t})(Os||(Os={}));var Ms=class extends ei{writable;options;errorCount;writeSemaphore;constructor(t,n){super(),this.writable=t,this.options=Os.fromOptions(n),this.errorCount=0,this.writeSemaphore=new py.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(hy,r.byteLength.toString(),hl),i.push(hl),this.doWrite(t,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,t),Promise.reject(i)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};Ve.WriteableStreamMessageWriter=Ms});var yl=J(ti=>{"use strict";b();Object.defineProperty(ti,"__esModule",{value:!0});ti.AbstractMessageBuffer=void 0;var gy=13,my=10,yy=`\r
4
+ `,Ns=class{_encoding;_chunks;_totalLength;constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let c=this._chunks[r];for(i=0;i<c.length;){switch(c[i]){case gy:switch(n){case 0:n=1;break;case 2:n=3;break;default:n=0}break;case my:switch(n){case 1:n=2;break;case 3:n=4,i++;break e;default:n=0}break;default:n=0}i++}o+=c.byteLength,r++}if(n!==4)return;let s=this._read(o+i),a=new Map,f=this.toString(s,"ascii").split(yy);if(f.length<2)return a;for(let c=0;c<f.length-2;c++){let d=f[c],v=d.indexOf(":");if(v===-1)throw new Error(`Message header must separate key and value using ':'
5
+ ${d}`);let l=d.substr(0,v),h=d.substr(v+1).trim();a.set(t?l.toLowerCase():l,h)}return a}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(t===0)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(o)}if(this._chunks[0].byteLength>t){let o=this._chunks[0],s=this.asNative(o,t);return this._chunks[0]=o.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,i=0;for(;t>0;){let o=this._chunks[i];if(o.byteLength>t){let s=o.slice(0,t);n.set(s,r),r+=t,this._chunks[i]=o.slice(t),this._totalLength-=t,t-=t}else n.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,t-=o.byteLength}return n}};ti.AbstractMessageBuffer=Ns});var wl=J(K=>{"use strict";b();var by=K&&K.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),vy=K&&K.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_y=K&&K.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&by(n,t,r[i]);return vy(n,t),n}})(),wy=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(K,"__esModule",{value:!0});K.ConnectionOptions=K.MessageStrategy=K.CancellationStrategy=K.CancellationSenderStrategy=K.CancellationReceiverStrategy=K.RequestCancellationReceiverStrategy=K.IdCancellationReceiverStrategy=K.ConnectionStrategy=K.ConnectionError=K.ConnectionErrors=K.LogTraceNotification=K.SetTraceNotification=K.TraceFormat=K.TraceValues=K.TraceValue=K.Trace=K.NullLogger=K.ProgressType=K.ProgressToken=void 0;K.createMessageConnection=Dy;var bl=wy(Ut()),be=_y(Pn()),te=us(),vl=fs(),gr=Sn(),Es=Yr(),br;(function(e){e.type=new te.NotificationType("$/cancelRequest")})(br||(br={}));var As;(function(e){function t(n){return typeof n=="string"||typeof n=="number"}e.is=t})(As||(K.ProgressToken=As={}));var mr;(function(e){e.type=new te.NotificationType("$/progress")})(mr||(mr={}));var Cs=class{__;_pr;constructor(){}};K.ProgressType=Cs;var js;(function(e){function t(n){return be.func(n)}e.is=t})(js||(js={}));K.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var ae;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(ae||(K.Trace=ae={}));var qs;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(qs||(K.TraceValue=qs={}));K.TraceValues=qs;(function(e){function t(r){if(!be.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(ae||(K.Trace=ae={}));var Ke;(function(e){e.Text="text",e.JSON="json"})(Ke||(K.TraceFormat=Ke={}));(function(e){function t(n){return be.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(Ke||(K.TraceFormat=Ke={}));var Ls;(function(e){e.type=new te.NotificationType("$/setTrace")})(Ls||(K.SetTraceNotification=Ls={}));var ni;(function(e){e.type=new te.NotificationType("$/logTrace")})(ni||(K.LogTraceNotification=ni={}));var yr;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(yr||(K.ConnectionErrors=yr={}));var On=class e extends Error{code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};K.ConnectionError=On;var Is;(function(e){function t(n){let r=n;return r&&be.func(r.cancelUndispatched)}e.is=t})(Is||(K.ConnectionStrategy=Is={}));var ri;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&be.func(r.createCancellationTokenSource)&&(r.dispose===void 0||be.func(r.dispose))}e.is=t})(ri||(K.IdCancellationReceiverStrategy=ri={}));var Fs;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&be.func(r.createCancellationTokenSource)&&(r.dispose===void 0||be.func(r.dispose))}e.is=t})(Fs||(K.RequestCancellationReceiverStrategy=Fs={}));var ii;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Es.CancellationTokenSource}});function t(n){return ri.is(n)||Fs.is(n)}e.is=t})(ii||(K.CancellationReceiverStrategy=ii={}));var oi;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(br.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&be.func(r.sendCancellation)&&be.func(r.cleanup)}e.is=t})(oi||(K.CancellationSenderStrategy=oi={}));var si;(function(e){e.Message=Object.freeze({receiver:ii.Message,sender:oi.Message});function t(n){let r=n;return r&&ii.is(r.receiver)&&oi.is(r.sender)}e.is=t})(si||(K.CancellationStrategy=si={}));var ai;(function(e){function t(n){let r=n;return r&&be.func(r.handleMessage)}e.is=t})(ai||(K.MessageStrategy=ai={}));var _l;(function(e){function t(n){let r=n;return r&&(si.is(r.cancellationStrategy)||Is.is(r.connectionStrategy)||ai.is(r.messageStrategy)||be.number(r.maxParallelism))}e.is=t})(_l||(K.ConnectionOptions=_l={}));var dt;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(dt||(dt={}));function Dy(e,t,n,r){let i=n!==void 0?n:K.NullLogger,o=0,s=0,a=0,f="2.0",c=r?.maxParallelism??-1,d=0,v,l=new Map,h,_=new Map,x=new Map,D,T=new vl.LinkedMap,m=new Map,u=new Set,y=new Map,S=ae.Off,M=Ke.Text,P,B=dt.New,Z=new gr.Emitter,A=new gr.Emitter,k=new gr.Emitter,g=new gr.Emitter,L=new gr.Emitter,C=r&&r.cancellationStrategy?r.cancellationStrategy:si.Message;function N(w){}function F(){return B===dt.Listening}function $(){return B===dt.Closed}function U(){return B===dt.Disposed}function X(){(B===dt.New||B===dt.Listening)&&(B=dt.Closed,A.fire(void 0))}function z(w){Z.fire([w,void 0,void 0])}function re(w){Z.fire(w)}e.onClose(X),e.onError(z),t.onClose(X),t.onError(re);function ie(w){if(w===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+w.toString()}function Re(w){return w===null?"res-unknown-"+(++a).toString():"res-"+w.toString()}function de(){return"not-"+(++s).toString()}function mt(w,I){te.Message.isRequest(I)?w.set(ie(I.id),I):te.Message.isResponse(I)?c===-1?w.set(Re(I.id),I):Qu(I):w.set(de(),I)}function kt(){D||T.size===0||c!==-1&&d>=c||(D=(0,bl.default)().timer.setImmediate(async()=>{if(D=void 0,T.size===0||c!==-1&&d>=c)return;let w=T.shift(),I;try{d++;let W=r?.messageStrategy;ai.is(W)?I=W.handleMessage(w,Gu):I=Gu(w)}catch(W){i.error(`Processing message queue failed: ${W.toString()}`)}finally{I instanceof Promise?I.then(()=>{d--,kt()}).catch(W=>{i.error(`Processing message queue failed: ${W.toString()}`)}):d--,kt()}}))}async function Gu(w){return te.Message.isRequest(w)?vm(w):te.Message.isNotification(w)?_m(w):te.Message.isResponse(w)?Qu(w):wm(w)}let bm=w=>{try{if(te.Message.isNotification(w)&&w.method===br.type.method){let I=w.params.id,W=ie(I),Q=T.get(W);if(te.Message.isRequest(Q)){let ye=r?.connectionStrategy,ce=ye&&ye.cancelUndispatched?ye.cancelUndispatched(Q,N):void 0;if(ce&&(ce.error!==void 0||ce.result!==void 0)){T.delete(W),y.delete(I),ce.id=Q.id,jo(ce,w.method,Date.now()),t.write(ce).catch(()=>i.error("Sending response for canceled message failed."));return}}let se=y.get(I);if(se!==void 0){se.cancel(),qo(w);return}else u.add(I)}mt(T,w)}finally{kt()}};async function vm(w){if(U())return Promise.resolve();function I(Oe,Ie,_e){let we={jsonrpc:f,id:w.id};return Oe instanceof te.ResponseError?we.error=Oe.toJson():we.result=Oe===void 0?null:Oe,jo(we,Ie,_e),t.write(we)}function W(Oe,Ie,_e){let we={jsonrpc:f,id:w.id,error:Oe.toJson()};return jo(we,Ie,_e),t.write(we)}Pm(w);let Q=l.get(w.method),se,ye;Q&&(se=Q.type,ye=Q.handler);let ce=Date.now();if(ye||v){let Oe=w.id??String(Date.now()),Ie=ri.is(C.receiver)?C.receiver.createCancellationTokenSource(Oe):C.receiver.createCancellationTokenSource(w);w.id!==null&&u.has(w.id)&&Ie.cancel(),w.id!==null&&y.set(Oe,Ie);try{let _e;if(ye)if(w.params===void 0){if(se!==void 0&&se.numberOfParams!==0)return W(new te.ResponseError(te.ErrorCodes.InvalidParams,`Request ${w.method} defines ${se.numberOfParams} params but received none.`),w.method,ce);_e=ye(Ie.token)}else if(Array.isArray(w.params)){if(se!==void 0&&se.parameterStructures===te.ParameterStructures.byName)return W(new te.ResponseError(te.ErrorCodes.InvalidParams,`Request ${w.method} defines parameters by name but received parameters by position`),w.method,ce);_e=ye(...w.params,Ie.token)}else{if(se!==void 0&&se.parameterStructures===te.ParameterStructures.byPosition)return W(new te.ResponseError(te.ErrorCodes.InvalidParams,`Request ${w.method} defines parameters by position but received parameters by name`),w.method,ce);_e=ye(w.params,Ie.token)}else v&&(_e=v(w.method,w.params,Ie.token));let we=await _e;await I(we,w.method,ce)}catch(_e){_e instanceof te.ResponseError?await I(_e,w.method,ce):_e&&be.string(_e.message)?await W(new te.ResponseError(te.ErrorCodes.InternalError,`Request ${w.method} failed with message: ${_e.message}`),w.method,ce):await W(new te.ResponseError(te.ErrorCodes.InternalError,`Request ${w.method} failed unexpectedly without providing any details.`),w.method,ce)}finally{y.delete(Oe)}}else await W(new te.ResponseError(te.ErrorCodes.MethodNotFound,`Unhandled method ${w.method}`),w.method,ce)}function Qu(w){if(!U())if(w.id===null)w.error?i.error(`Received response message without id: Error is:
6
+ ${JSON.stringify(w.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let I=w.id,W=m.get(I);if(Sm(w,W),W!==void 0){m.delete(I);try{if(w.error){let Q=w.error;W.reject(new te.ResponseError(Q.code,Q.message,Q.data))}else if(w.result!==void 0)W.resolve(w.result);else throw new Error("Should never happen.")}catch(Q){Q.message?i.error(`Response handler '${W.method}' failed with message: ${Q.message}`):i.error(`Response handler '${W.method}' failed unexpectedly.`)}}}}async function _m(w){if(U())return;let I,W;if(w.method===br.type.method){let Q=w.params.id;u.delete(Q),qo(w);return}else{let Q=_.get(w.method);Q&&(W=Q.handler,I=Q.type)}if(W||h)try{if(qo(w),W)if(w.params===void 0)I!==void 0&&I.numberOfParams!==0&&I.parameterStructures!==te.ParameterStructures.byName&&i.error(`Notification ${w.method} defines ${I.numberOfParams} params but received none.`),await W();else if(Array.isArray(w.params)){let Q=w.params;w.method===mr.type.method&&Q.length===2&&As.is(Q[0])?await W({token:Q[0],value:Q[1]}):(I!==void 0&&(I.parameterStructures===te.ParameterStructures.byName&&i.error(`Notification ${w.method} defines parameters by name but received parameters by position`),I.numberOfParams!==w.params.length&&i.error(`Notification ${w.method} defines ${I.numberOfParams} params but received ${Q.length} arguments`)),await W(...Q))}else I!==void 0&&I.parameterStructures===te.ParameterStructures.byPosition&&i.error(`Notification ${w.method} defines parameters by position but received parameters by name`),await W(w.params);else h&&await h(w.method,w.params)}catch(Q){Q.message?i.error(`Notification handler '${w.method}' failed with message: ${Q.message}`):i.error(`Notification handler '${w.method}' failed unexpectedly.`)}else k.fire(w)}function wm(w){if(!w){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
7
+ ${JSON.stringify(w,null,4)}`);let I=w;if(be.string(I.id)||be.number(I.id)){let W=I.id,Q=m.get(W);Q&&Q.reject(new Error("The received response has neither a result nor an error property."))}}function Ft(w){if(w!=null)switch(S){case ae.Verbose:return JSON.stringify(w,null,4);case ae.Compact:return JSON.stringify(w);default:return}}function Dm(w){if(!(S===ae.Off||!P))if(M===Ke.Text){let I;(S===ae.Verbose||S===ae.Compact)&&w.params&&(I=`Params: ${Ft(w.params)}`),P.log(`Sending request '${w.method} - (${w.id})'.`,I)}else xn("send-request",w)}function xm(w){if(!(S===ae.Off||!P))if(M===Ke.Text){let I;(S===ae.Verbose||S===ae.Compact)&&(w.params?I=`Params: ${Ft(w.params)}`:I="No parameters provided."),P.log(`Sending notification '${w.method}'.`,I)}else xn("send-notification",w)}function jo(w,I,W){if(!(S===ae.Off||!P))if(M===Ke.Text){let Q;(S===ae.Verbose||S===ae.Compact)&&(w.error&&w.error.data?Q=`Error data: ${Ft(w.error.data)}`:w.result?Q=`Result: ${Ft(w.result)}`:w.error===void 0&&(Q="No result returned.")),P.log(`Sending response '${I} - (${w.id})'. Processing request took ${Date.now()-W}ms`,Q)}else xn("send-response",w)}function Pm(w){if(!(S===ae.Off||!P))if(M===Ke.Text){let I;(S===ae.Verbose||S===ae.Compact)&&w.params&&(I=`Params: ${Ft(w.params)}`),P.log(`Received request '${w.method} - (${w.id})'.`,I)}else xn("receive-request",w)}function qo(w){if(!(S===ae.Off||!P||w.method===ni.type.method))if(M===Ke.Text){let I;(S===ae.Verbose||S===ae.Compact)&&(w.params?I=`Params: ${Ft(w.params)}`:I="No parameters provided."),P.log(`Received notification '${w.method}'.`,I)}else xn("receive-notification",w)}function Sm(w,I){if(!(S===ae.Off||!P))if(M===Ke.Text){let W;if((S===ae.Verbose||S===ae.Compact)&&(w.error&&w.error.data?W=`Error data: ${Ft(w.error.data)}`:w.result?W=`Result: ${Ft(w.result)}`:w.error===void 0&&(W="No result returned.")),I){let Q=w.error?` Request failed: ${w.error.message} (${w.error.code}).`:"";P.log(`Received response '${I.method} - (${w.id})' in ${Date.now()-I.timerStart}ms.${Q}`,W)}else P.log(`Received response ${w.id} without active response promise.`,W)}else xn("receive-response",w)}function xn(w,I){if(!P||S===ae.Off)return;let W={isLSPMessage:!0,type:w,message:I,timestamp:Date.now()};P.log(W)}function ur(){if($())throw new On(yr.Closed,"Connection is closed.");if(U())throw new On(yr.Disposed,"Connection is disposed.")}function km(){if(F())throw new On(yr.AlreadyListening,"Connection is already listening")}function Tm(){if(!F())throw new Error("Call listen() first.")}function lr(w){return w===void 0?null:w}function Zu(w){if(w!==null)return w}function Yu(w){return w!=null&&!Array.isArray(w)&&typeof w=="object"}function Lo(w,I){switch(w){case te.ParameterStructures.auto:return Yu(I)?Zu(I):[lr(I)];case te.ParameterStructures.byName:if(!Yu(I))throw new Error("Received parameters by name but param is not an object literal.");return Zu(I);case te.ParameterStructures.byPosition:return[lr(I)];default:throw new Error(`Unknown parameter structure ${w.toString()}`)}}function Ku(w,I){let W,Q=w.numberOfParams;switch(Q){case 0:W=void 0;break;case 1:W=Lo(w.parameterStructures,I[0]);break;default:W=[];for(let se=0;se<I.length&&se<Q;se++)W.push(lr(I[se]));if(I.length<Q)for(let se=I.length;se<Q;se++)W.push(null);break}return W}let an={sendNotification:(w,...I)=>{ur();let W,Q;if(be.string(w)){W=w;let ye=I[0],ce=0,Oe=te.ParameterStructures.auto;te.ParameterStructures.is(ye)&&(ce=1,Oe=ye);let Ie=I.length,_e=Ie-ce;switch(_e){case 0:Q=void 0;break;case 1:Q=Lo(Oe,I[ce]);break;default:if(Oe===te.ParameterStructures.byName)throw new Error(`Received ${_e} parameters for 'by Name' notification parameter structure.`);Q=I.slice(ce,Ie).map(we=>lr(we));break}}else{let ye=I;W=w.method,Q=Ku(w,ye)}let se={jsonrpc:f,method:W,params:Q};return xm(se),t.write(se).catch(ye=>{throw i.error("Sending notification failed."),ye})},onNotification:(w,I)=>{ur();let W;return be.func(w)?h=w:I&&(be.string(w)?(W=w,_.set(w,{type:void 0,handler:I})):(W=w.method,_.set(w.method,{type:w,handler:I}))),{dispose:()=>{W!==void 0?_.get(W)?.handler===I&&_.delete(W):h===w&&(h=void 0)}}},onProgress:(w,I,W)=>{if(x.has(I))throw new Error(`Progress handler for token ${I} already registered`);return x.set(I,W),{dispose:()=>{x.get(I)===W&&x.delete(I)}}},sendProgress:(w,I,W)=>an.sendNotification(mr.type,{token:I,value:W}),onUnhandledProgress:g.event,sendRequest:(w,...I)=>{ur(),Tm();function W(we,ft){let Tt=C.sender.sendCancellation(we,ft);Tt===void 0?i.log(`Received no promise from cancellation strategy when cancelling id ${ft}`):Tt.catch(()=>{i.log(`Sending cancellation messages for id ${ft} failed.`)})}let Q,se,ye;if(be.string(w)){Q=w;let we=I[0],ft=I[I.length-1],Tt=0,fr=te.ParameterStructures.auto;te.ParameterStructures.is(we)&&(Tt=1,fr=we);let cn=I.length;Es.CancellationToken.is(ft)&&(cn=cn-1,ye=ft);let yt=cn-Tt;switch(yt){case 0:se=void 0;break;case 1:se=Lo(fr,I[Tt]);break;default:if(fr===te.ParameterStructures.byName)throw new Error(`Received ${yt} parameters for 'by Name' request parameter structure.`);se=I.slice(Tt,cn).map(Rm=>lr(Rm));break}}else{let we=I;Q=w.method,se=Ku(w,we);let ft=w.numberOfParams;ye=Es.CancellationToken.is(we[ft])?we[ft]:void 0}let ce=o++,Oe,Ie=!1;ye!==void 0&&(ye.isCancellationRequested?Ie=!0:Oe=ye.onCancellationRequested(()=>{W(an,ce)}));let _e={jsonrpc:f,id:ce,method:Q,params:se};return Dm(_e),typeof C.sender.enableCancellation=="function"&&C.sender.enableCancellation(_e),new Promise(async(we,ft)=>{let Tt=yt=>{we(yt),C.sender.cleanup(ce),Oe?.dispose()},fr=yt=>{ft(yt),C.sender.cleanup(ce),Oe?.dispose()},cn={method:Q,timerStart:Date.now(),resolve:Tt,reject:fr};try{m.set(ce,cn),await t.write(_e),Ie&&W(an,ce)}catch(yt){throw m.delete(ce),cn.reject(new te.ResponseError(te.ErrorCodes.MessageWriteError,yt.message?yt.message:"Unknown reason")),i.error("Sending request failed."),yt}})},onRequest:(w,I)=>{ur();let W=null;return js.is(w)?(W=void 0,v=w):be.string(w)?(W=null,I!==void 0&&(W=w,l.set(w,{handler:I,type:void 0}))):I!==void 0&&(W=w.method,l.set(w.method,{type:w,handler:I})),{dispose:()=>{W!==null&&(W!==void 0?l.get(W)?.handler===I&&l.delete(W):v===w&&(v=void 0))}}},hasPendingResponse:()=>m.size>0,trace:async(w,I,W)=>{let Q=!1,se=Ke.Text;W!==void 0&&(be.boolean(W)?Q=W:(Q=W.sendNotification||!1,se=W.traceFormat||Ke.Text)),S=w,M=se,S===ae.Off?P=void 0:P=I,Q&&!$()&&!U()&&await an.sendNotification(Ls.type,{value:ae.toString(w)})},onError:Z.event,onClose:A.event,onUnhandledNotification:k.event,onDispose:L.event,end:()=>{t.end()},dispose:()=>{if(U())return;B=dt.Disposed,L.fire(void 0);let w=new te.ResponseError(te.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let I of m.values())I.reject(w);m=new Map,y=new Map,u=new Set,T=new vl.LinkedMap,be.func(t.dispose)&&t.dispose(),be.func(e.dispose)&&e.dispose()},listen:()=>{ur(),km(),B=dt.Listening,e.listen(bm)},inspect:()=>{(0,bl.default)().console.log("inspect")}};return an.onNotification(ni.type,w=>{if(S===ae.Off||!P)return;let I=S===ae.Verbose||S===ae.Compact;P.log(w.message,I?w.verbose:void 0)}),an.onNotification(mr.type,async w=>{let I=x.get(w.token);I?await I(w.value):g.fire(w)}),an}});var Mt=J(j=>{"use strict";b();var xy=j&&j.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0});j.ProgressType=j.ProgressToken=j.createMessageConnection=j.NullLogger=j.ConnectionOptions=j.ConnectionStrategy=j.AbstractMessageBuffer=j.WriteableStreamMessageWriter=j.AbstractMessageWriter=j.MessageWriter=j.ReadableStreamMessageReader=j.AbstractMessageReader=j.MessageReader=j.SharedArrayReceiverStrategy=j.SharedArraySenderStrategy=j.CancellationToken=j.CancellationTokenSource=j.Emitter=j.Event=j.Disposable=j.LRUCache=j.Touch=j.LinkedMap=j.ParameterStructures=j.NotificationType9=j.NotificationType8=j.NotificationType7=j.NotificationType6=j.NotificationType5=j.NotificationType4=j.NotificationType3=j.NotificationType2=j.NotificationType1=j.NotificationType0=j.NotificationType=j.ErrorCodes=j.ResponseError=j.RequestType9=j.RequestType8=j.RequestType7=j.RequestType6=j.RequestType5=j.RequestType4=j.RequestType3=j.RequestType2=j.RequestType1=j.RequestType0=j.RequestType=j.Message=j.RAL=void 0;j.MessageStrategy=j.CancellationStrategy=j.CancellationSenderStrategy=j.RequestCancellationReceiverStrategy=j.IdCancellationReceiverStrategy=j.CancellationReceiverStrategy=j.ConnectionError=j.ConnectionErrors=j.LogTraceNotification=j.SetTraceNotification=j.TraceFormat=j.TraceValues=j.TraceValue=j.Trace=void 0;var pe=us();Object.defineProperty(j,"Message",{enumerable:!0,get:function(){return pe.Message}});Object.defineProperty(j,"RequestType",{enumerable:!0,get:function(){return pe.RequestType}});Object.defineProperty(j,"RequestType0",{enumerable:!0,get:function(){return pe.RequestType0}});Object.defineProperty(j,"RequestType1",{enumerable:!0,get:function(){return pe.RequestType1}});Object.defineProperty(j,"RequestType2",{enumerable:!0,get:function(){return pe.RequestType2}});Object.defineProperty(j,"RequestType3",{enumerable:!0,get:function(){return pe.RequestType3}});Object.defineProperty(j,"RequestType4",{enumerable:!0,get:function(){return pe.RequestType4}});Object.defineProperty(j,"RequestType5",{enumerable:!0,get:function(){return pe.RequestType5}});Object.defineProperty(j,"RequestType6",{enumerable:!0,get:function(){return pe.RequestType6}});Object.defineProperty(j,"RequestType7",{enumerable:!0,get:function(){return pe.RequestType7}});Object.defineProperty(j,"RequestType8",{enumerable:!0,get:function(){return pe.RequestType8}});Object.defineProperty(j,"RequestType9",{enumerable:!0,get:function(){return pe.RequestType9}});Object.defineProperty(j,"ResponseError",{enumerable:!0,get:function(){return pe.ResponseError}});Object.defineProperty(j,"ErrorCodes",{enumerable:!0,get:function(){return pe.ErrorCodes}});Object.defineProperty(j,"NotificationType",{enumerable:!0,get:function(){return pe.NotificationType}});Object.defineProperty(j,"NotificationType0",{enumerable:!0,get:function(){return pe.NotificationType0}});Object.defineProperty(j,"NotificationType1",{enumerable:!0,get:function(){return pe.NotificationType1}});Object.defineProperty(j,"NotificationType2",{enumerable:!0,get:function(){return pe.NotificationType2}});Object.defineProperty(j,"NotificationType3",{enumerable:!0,get:function(){return pe.NotificationType3}});Object.defineProperty(j,"NotificationType4",{enumerable:!0,get:function(){return pe.NotificationType4}});Object.defineProperty(j,"NotificationType5",{enumerable:!0,get:function(){return pe.NotificationType5}});Object.defineProperty(j,"NotificationType6",{enumerable:!0,get:function(){return pe.NotificationType6}});Object.defineProperty(j,"NotificationType7",{enumerable:!0,get:function(){return pe.NotificationType7}});Object.defineProperty(j,"NotificationType8",{enumerable:!0,get:function(){return pe.NotificationType8}});Object.defineProperty(j,"NotificationType9",{enumerable:!0,get:function(){return pe.NotificationType9}});Object.defineProperty(j,"ParameterStructures",{enumerable:!0,get:function(){return pe.ParameterStructures}});var $s=fs();Object.defineProperty(j,"LinkedMap",{enumerable:!0,get:function(){return $s.LinkedMap}});Object.defineProperty(j,"LRUCache",{enumerable:!0,get:function(){return $s.LRUCache}});Object.defineProperty(j,"Touch",{enumerable:!0,get:function(){return $s.Touch}});var Py=al();Object.defineProperty(j,"Disposable",{enumerable:!0,get:function(){return Py.Disposable}});var Dl=Sn();Object.defineProperty(j,"Event",{enumerable:!0,get:function(){return Dl.Event}});Object.defineProperty(j,"Emitter",{enumerable:!0,get:function(){return Dl.Emitter}});var xl=Yr();Object.defineProperty(j,"CancellationTokenSource",{enumerable:!0,get:function(){return xl.CancellationTokenSource}});Object.defineProperty(j,"CancellationToken",{enumerable:!0,get:function(){return xl.CancellationToken}});var Pl=ul();Object.defineProperty(j,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Pl.SharedArraySenderStrategy}});Object.defineProperty(j,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Pl.SharedArrayReceiverStrategy}});var Vs=fl();Object.defineProperty(j,"MessageReader",{enumerable:!0,get:function(){return Vs.MessageReader}});Object.defineProperty(j,"AbstractMessageReader",{enumerable:!0,get:function(){return Vs.AbstractMessageReader}});Object.defineProperty(j,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Vs.ReadableStreamMessageReader}});var Ws=ml();Object.defineProperty(j,"MessageWriter",{enumerable:!0,get:function(){return Ws.MessageWriter}});Object.defineProperty(j,"AbstractMessageWriter",{enumerable:!0,get:function(){return Ws.AbstractMessageWriter}});Object.defineProperty(j,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Ws.WriteableStreamMessageWriter}});var Sy=yl();Object.defineProperty(j,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Sy.AbstractMessageBuffer}});var ke=wl();Object.defineProperty(j,"ConnectionStrategy",{enumerable:!0,get:function(){return ke.ConnectionStrategy}});Object.defineProperty(j,"ConnectionOptions",{enumerable:!0,get:function(){return ke.ConnectionOptions}});Object.defineProperty(j,"NullLogger",{enumerable:!0,get:function(){return ke.NullLogger}});Object.defineProperty(j,"createMessageConnection",{enumerable:!0,get:function(){return ke.createMessageConnection}});Object.defineProperty(j,"ProgressToken",{enumerable:!0,get:function(){return ke.ProgressToken}});Object.defineProperty(j,"ProgressType",{enumerable:!0,get:function(){return ke.ProgressType}});Object.defineProperty(j,"Trace",{enumerable:!0,get:function(){return ke.Trace}});Object.defineProperty(j,"TraceValue",{enumerable:!0,get:function(){return ke.TraceValue}});Object.defineProperty(j,"TraceFormat",{enumerable:!0,get:function(){return ke.TraceFormat}});Object.defineProperty(j,"SetTraceNotification",{enumerable:!0,get:function(){return ke.SetTraceNotification}});Object.defineProperty(j,"LogTraceNotification",{enumerable:!0,get:function(){return ke.LogTraceNotification}});Object.defineProperty(j,"ConnectionErrors",{enumerable:!0,get:function(){return ke.ConnectionErrors}});Object.defineProperty(j,"ConnectionError",{enumerable:!0,get:function(){return ke.ConnectionError}});Object.defineProperty(j,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ke.CancellationReceiverStrategy}});Object.defineProperty(j,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return ke.IdCancellationReceiverStrategy}});Object.defineProperty(j,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return ke.RequestCancellationReceiverStrategy}});Object.defineProperty(j,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ke.CancellationSenderStrategy}});Object.defineProperty(j,"CancellationStrategy",{enumerable:!0,get:function(){return ke.CancellationStrategy}});Object.defineProperty(j,"MessageStrategy",{enumerable:!0,get:function(){return ke.MessageStrategy}});Object.defineProperty(j,"TraceValues",{enumerable:!0,get:function(){return ke.TraceValues}});var ky=xy(Ut());j.RAL=ky.default});var bi={};Cm(bi,{AnnotatedTextEdit:()=>Nt,ApplyKind:()=>la,ChangeAnnotation:()=>Bt,ChangeAnnotationIdentifier:()=>Me,CodeAction:()=>ka,CodeActionContext:()=>Sa,CodeActionKind:()=>Pa,CodeActionTag:()=>hi,CodeActionTriggerKind:()=>Sr,CodeDescription:()=>Ys,CodeLens:()=>Ta,Color:()=>ui,ColorInformation:()=>zs,ColorPresentation:()=>Js,Command:()=>ln,CompletionItem:()=>da,CompletionItemKind:()=>oa,CompletionItemLabelDetails:()=>fa,CompletionItemTag:()=>aa,CompletionList:()=>pa,CreateFile:()=>Nn,DeleteFile:()=>An,Diagnostic:()=>wr,DiagnosticRelatedInformation:()=>li,DiagnosticSeverity:()=>Qs,DiagnosticTag:()=>Zs,DocumentHighlight:()=>ba,DocumentHighlightKind:()=>ya,DocumentLink:()=>Oa,DocumentSymbol:()=>xa,DocumentUri:()=>Us,EOL:()=>Ty,FoldingRange:()=>Gs,FoldingRangeKind:()=>Xs,FormattingOptions:()=>Ra,Hover:()=>ha,InlayHint:()=>Ia,InlayHintKind:()=>gi,InlayHintLabelPart:()=>mi,InlineCompletionContext:()=>Ua,InlineCompletionItem:()=>Fa,InlineCompletionList:()=>$a,InlineCompletionTriggerKind:()=>Va,InlineValueContext:()=>La,InlineValueEvaluatableExpression:()=>qa,InlineValueText:()=>Ca,InlineValueVariableLookup:()=>ja,InsertReplaceEdit:()=>ca,InsertTextFormat:()=>sa,InsertTextMode:()=>ua,LanguageKind:()=>ra,Location:()=>_r,LocationLink:()=>Bs,MarkedString:()=>Pr,MarkupContent:()=>Cn,MarkupKind:()=>pi,OptionalVersionedTextDocumentIdentifier:()=>xr,ParameterInformation:()=>ga,Position:()=>it,Range:()=>ve,RenameFile:()=>En,SelectedCompletionInfo:()=>Wa,SelectionRange:()=>Ma,SemanticTokenModifiers:()=>Ea,SemanticTokenTypes:()=>Na,SemanticTokens:()=>Aa,SignatureInformation:()=>ma,SnippetTextEdit:()=>Ks,StringValue:()=>yi,SymbolInformation:()=>wa,SymbolKind:()=>va,SymbolTag:()=>_a,TextDocument:()=>Ba,TextDocumentEdit:()=>Dr,TextDocumentIdentifier:()=>ta,TextDocumentItem:()=>ia,TextEdit:()=>bt,URI:()=>ci,VersionedTextDocumentIdentifier:()=>na,WorkspaceChange:()=>ea,WorkspaceEdit:()=>fi,WorkspaceFolder:()=>Ha,WorkspaceSymbol:()=>Da,integer:()=>Hs,uinteger:()=>vr});var Us,ci,Hs,vr,it,ve,_r,Bs,ui,zs,Js,Xs,Gs,li,Qs,Zs,Ys,wr,ln,bt,Bt,Me,Nt,Dr,Nn,En,An,fi,Mn,Ks,di,ea,ta,na,xr,ra,ia,pi,Cn,oa,sa,aa,ca,ua,la,fa,da,pa,Pr,ha,ga,ma,ya,ba,va,_a,wa,Da,xa,Pa,Sr,Sa,hi,ka,Ta,Ra,Oa,Ma,Na,Ea,Aa,Ca,ja,qa,La,gi,mi,Ia,yi,Fa,$a,Va,Wa,Ua,Ha,Ty,Ba,za,R,vi=oe(()=>{"use strict";b();(function(e){function t(n){return typeof n=="string"}e.is=t})(Us||(Us={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(ci||(ci={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Hs||(Hs={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(vr||(vr={}));(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=vr.MAX_VALUE),i===Number.MAX_VALUE&&(i=vr.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.uinteger(i.line)&&R.uinteger(i.character)}e.is=n})(it||(it={}));(function(e){function t(r,i,o,s){if(R.uinteger(r)&&R.uinteger(i)&&R.uinteger(o)&&R.uinteger(s))return{start:it.create(r,i),end:it.create(o,s)};if(it.is(r)&&it.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${s}]`)}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&it.is(i.start)&&it.is(i.end)}e.is=n})(ve||(ve={}));(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&ve.is(i.range)&&(R.string(i.uri)||R.undefined(i.uri))}e.is=n})(_r||(_r={}));(function(e){function t(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&ve.is(i.targetRange)&&R.string(i.targetUri)&&ve.is(i.targetSelectionRange)&&(ve.is(i.originSelectionRange)||R.undefined(i.originSelectionRange))}e.is=n})(Bs||(Bs={}));(function(e){function t(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.numberRange(i.red,0,1)&&R.numberRange(i.green,0,1)&&R.numberRange(i.blue,0,1)&&R.numberRange(i.alpha,0,1)}e.is=n})(ui||(ui={}));(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&ve.is(i.range)&&ui.is(i.color)}e.is=n})(zs||(zs={}));(function(e){function t(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.undefined(i.textEdit)||bt.is(i))&&(R.undefined(i.additionalTextEdits)||R.typedArray(i.additionalTextEdits,bt.is))}e.is=n})(Js||(Js={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Xs||(Xs={}));(function(e){function t(r,i,o,s,a,f){let c={startLine:r,endLine:i};return R.defined(o)&&(c.startCharacter=o),R.defined(s)&&(c.endCharacter=s),R.defined(a)&&(c.kind=a),R.defined(f)&&(c.collapsedText=f),c}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.uinteger(i.startLine)&&R.uinteger(i.startLine)&&(R.undefined(i.startCharacter)||R.uinteger(i.startCharacter))&&(R.undefined(i.endCharacter)||R.uinteger(i.endCharacter))&&(R.undefined(i.kind)||R.string(i.kind))}e.is=n})(Gs||(Gs={}));(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&_r.is(i.location)&&R.string(i.message)}e.is=n})(li||(li={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Qs||(Qs={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Zs||(Zs={}));(function(e){function t(n){let r=n;return R.objectLiteral(r)&&R.string(r.href)}e.is=t})(Ys||(Ys={}));(function(e){function t(r,i,o,s,a,f){let c={range:r,message:i};return R.defined(o)&&(c.severity=o),R.defined(s)&&(c.code=s),R.defined(a)&&(c.source=a),R.defined(f)&&(c.relatedInformation=f),c}e.create=t;function n(r){var i;let o=r;return R.defined(o)&&ve.is(o.range)&&R.string(o.message)&&(R.number(o.severity)||R.undefined(o.severity))&&(R.integer(o.code)||R.string(o.code)||R.undefined(o.code))&&(R.undefined(o.codeDescription)||R.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(R.string(o.source)||R.undefined(o.source))&&(R.undefined(o.relatedInformation)||R.typedArray(o.relatedInformation,li.is))}e.is=n})(wr||(wr={}));(function(e){function t(r,i,...o){let s={title:r,command:i};return R.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.title)&&(i.tooltip===void 0||R.string(i.tooltip))&&R.string(i.command)}e.is=n})(ln||(ln={}));(function(e){function t(o,s){return{range:o,newText:s}}e.replace=t;function n(o,s){return{range:{start:o,end:o},newText:s}}e.insert=n;function r(o){return{range:o,newText:""}}e.del=r;function i(o){let s=o;return R.objectLiteral(s)&&R.string(s.newText)&&ve.is(s.range)}e.is=i})(bt||(bt={}));(function(e){function t(r,i,o){let s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(R.string(i.description)||i.description===void 0)}e.is=n})(Bt||(Bt={}));(function(e){function t(n){let r=n;return R.string(r)}e.is=t})(Me||(Me={}));(function(e){function t(o,s,a){return{range:o,newText:s,annotationId:a}}e.replace=t;function n(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}e.insert=n;function r(o,s){return{range:o,newText:"",annotationId:s}}e.del=r;function i(o){let s=o;return bt.is(s)&&(Bt.is(s.annotationId)||Me.is(s.annotationId))}e.is=i})(Nt||(Nt={}));(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&xr.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(Dr||(Dr={}));(function(e){function t(r,i,o){let s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&R.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Me.is(i.annotationId))}e.is=n})(Nn||(Nn={}));(function(e){function t(r,i,o,s){let a={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&R.string(i.oldUri)&&R.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Me.is(i.annotationId))}e.is=n})(En||(En={}));(function(e){function t(r,i,o){let s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&R.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||R.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||R.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Me.is(i.annotationId))}e.is=n})(An||(An={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>R.string(i.kind)?Nn.is(i)||En.is(i)||An.is(i):Dr.is(i)))}e.is=t})(fi||(fi={}));Mn=class{constructor(t,n){this.edits=t,this.changeAnnotations=n}insert(t,n,r){let i,o;if(r===void 0?i=bt.insert(t,n):Me.is(r)?(o=r,i=Nt.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=Nt.insert(t,n,o)),this.edits.push(i),o!==void 0)return o}replace(t,n,r){let i,o;if(r===void 0?i=bt.replace(t,n):Me.is(r)?(o=r,i=Nt.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=Nt.replace(t,n,o)),this.edits.push(i),o!==void 0)return o}delete(t,n){let r,i;if(n===void 0?r=bt.del(t):Me.is(n)?(i=n,r=Nt.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Nt.del(t,i)),this.edits.push(r),i!==void 0)return i}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}};(function(e){function t(n){let r=n;return R.objectLiteral(r)&&ve.is(r.range)&&yi.isSnippet(r.snippet)&&(r.annotationId===void 0||Bt.is(r.annotationId)||Me.is(r.annotationId))}e.is=t})(Ks||(Ks={}));di=class{constructor(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,n){let r;if(Me.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(n===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=n,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},ea=class{constructor(t){this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new di(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(n=>{if(Dr.is(n)){let r=new Mn(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):t.changes&&Object.keys(t.changes).forEach(n=>{let r=new Mn(t.changes[n]);this._textEditChanges[n]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if(xr.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){let i=[],o={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(o),r=new Mn(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let n=this._textEditChanges[t];if(!n){let r=[];this._workspaceEdit.changes[t]=r,n=new Mn(r),this._textEditChanges[t]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new di,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Bt.is(n)||Me.is(n)?i=n:r=n;let o,s;if(i===void 0?o=Nn.create(t,r):(s=Me.is(i)?i:this._changeAnnotations.manage(i),o=Nn.create(t,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}renameFile(t,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let o;Bt.is(r)||Me.is(r)?o=r:i=r;let s,a;if(o===void 0?s=En.create(t,n,i):(a=Me.is(o)?o:this._changeAnnotations.manage(o),s=En.create(t,n,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}deleteFile(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Bt.is(n)||Me.is(n)?i=n:r=n;let o,s;if(i===void 0?o=An.create(t,r):(s=Me.is(i)?i:this._changeAnnotations.manage(i),o=An.create(t,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s}};(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)}e.is=n})(ta||(ta={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&R.integer(i.version)}e.is=n})(na||(na={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&(i.version===null||R.integer(i.version))}e.is=n})(xr||(xr={}));(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(ra||(ra={}));(function(e){function t(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&R.string(i.languageId)&&R.integer(i.version)&&R.string(i.text)}e.is=n})(ia||(ia={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(pi||(pi={}));(function(e){function t(n){let r=n;return R.objectLiteral(n)&&pi.is(r.kind)&&R.string(r.value)}e.is=t})(Cn||(Cn={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(oa||(oa={}));(function(e){e.PlainText=1,e.Snippet=2})(sa||(sa={}));(function(e){e.Deprecated=1})(aa||(aa={}));(function(e){function t(r,i,o){return{newText:r,insert:i,replace:o}}e.create=t;function n(r){let i=r;return i&&R.string(i.newText)&&ve.is(i.insert)&&ve.is(i.replace)}e.is=n})(ca||(ca={}));(function(e){e.asIs=1,e.adjustIndentation=2})(ua||(ua={}));(function(e){e.Replace=1,e.Merge=2})(la||(la={}));(function(e){function t(n){let r=n;return r&&(R.string(r.detail)||r.detail===void 0)&&(R.string(r.description)||r.description===void 0)}e.is=t})(fa||(fa={}));(function(e){function t(n){return{label:n}}e.create=t})(da||(da={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(pa||(pa={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let i=r;return R.string(i)||R.objectLiteral(i)&&R.string(i.language)&&R.string(i.value)}e.is=n})(Pr||(Pr={}));(function(e){function t(n){let r=n;return!!r&&R.objectLiteral(r)&&(Cn.is(r.contents)||Pr.is(r.contents)||R.typedArray(r.contents,Pr.is))&&(n.range===void 0||ve.is(n.range))}e.is=t})(ha||(ha={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(ga||(ga={}));(function(e){function t(n,r,...i){let o={label:n};return R.defined(r)&&(o.documentation=r),R.defined(i)?o.parameters=i:o.parameters=[],o}e.create=t})(ma||(ma={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(ya||(ya={}));(function(e){function t(n,r){let i={range:n};return R.number(r)&&(i.kind=r),i}e.create=t})(ba||(ba={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(va||(va={}));(function(e){e.Deprecated=1})(_a||(_a={}));(function(e){function t(n,r,i,o,s){let a={name:n,kind:r,location:{uri:o,range:i}};return s&&(a.containerName=s),a}e.create=t})(wa||(wa={}));(function(e){function t(n,r,i,o){return o!==void 0?{name:n,kind:r,location:{uri:i,range:o}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(Da||(Da={}));(function(e){function t(r,i,o,s,a,f){let c={name:r,detail:i,kind:o,range:s,selectionRange:a};return f!==void 0&&(c.children=f),c}e.create=t;function n(r){let i=r;return i&&R.string(i.name)&&R.number(i.kind)&&ve.is(i.range)&&ve.is(i.selectionRange)&&(i.detail===void 0||R.string(i.detail))&&(i.deprecated===void 0||R.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(xa||(xa={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(Pa||(Pa={}));(function(e){e.Invoked=1,e.Automatic=2})(Sr||(Sr={}));(function(e){function t(r,i,o){let s={diagnostics:r};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}e.create=t;function n(r){let i=r;return R.defined(i)&&R.typedArray(i.diagnostics,wr.is)&&(i.only===void 0||R.typedArray(i.only,R.string))&&(i.triggerKind===void 0||i.triggerKind===Sr.Invoked||i.triggerKind===Sr.Automatic)}e.is=n})(Sa||(Sa={}));(function(e){e.LLMGenerated=1;function t(n){return R.defined(n)&&n===e.LLMGenerated}e.is=t})(hi||(hi={}));(function(e){function t(r,i,o){let s={title:r},a=!0;return typeof i=="string"?(a=!1,s.kind=i):ln.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}e.create=t;function n(r){let i=r;return i&&R.string(i.title)&&(i.diagnostics===void 0||R.typedArray(i.diagnostics,wr.is))&&(i.kind===void 0||R.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||ln.is(i.command))&&(i.isPreferred===void 0||R.boolean(i.isPreferred))&&(i.edit===void 0||fi.is(i.edit))&&(i.tags===void 0||R.typedArray(i.tags,hi.is))}e.is=n})(ka||(ka={}));(function(e){function t(r,i){let o={range:r};return R.defined(i)&&(o.data=i),o}e.create=t;function n(r){let i=r;return R.defined(i)&&ve.is(i.range)&&(R.undefined(i.command)||ln.is(i.command))}e.is=n})(Ta||(Ta={}));(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&R.uinteger(i.tabSize)&&R.boolean(i.insertSpaces)}e.is=n})(Ra||(Ra={}));(function(e){function t(r,i,o){return{range:r,target:i,data:o}}e.create=t;function n(r){let i=r;return R.defined(i)&&ve.is(i.range)&&(R.undefined(i.target)||R.string(i.target))}e.is=n})(Oa||(Oa={}));(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&ve.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(Ma||(Ma={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"})(Na||(Na={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Ea||(Ea={}));(function(e){function t(n){let r=n;return R.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Aa||(Aa={}));(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){let i=r;return i!=null&&ve.is(i.range)&&R.string(i.text)}e.is=n})(Ca||(Ca={}));(function(e){function t(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}e.create=t;function n(r){let i=r;return i!=null&&ve.is(i.range)&&R.boolean(i.caseSensitiveLookup)&&(R.string(i.variableName)||i.variableName===void 0)}e.is=n})(ja||(ja={}));(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){let i=r;return i!=null&&ve.is(i.range)&&(R.string(i.expression)||i.expression===void 0)}e.is=n})(qa||(qa={}));(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){let i=r;return R.defined(i)&&ve.is(r.stoppedLocation)}e.is=n})(La||(La={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(gi||(gi={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&(i.tooltip===void 0||R.string(i.tooltip)||Cn.is(i.tooltip))&&(i.location===void 0||_r.is(i.location))&&(i.command===void 0||ln.is(i.command))}e.is=n})(mi||(mi={}));(function(e){function t(r,i,o){let s={position:r,label:i};return o!==void 0&&(s.kind=o),s}e.create=t;function n(r){let i=r;return R.objectLiteral(i)&&it.is(i.position)&&(R.string(i.label)||R.typedArray(i.label,mi.is))&&(i.kind===void 0||gi.is(i.kind))&&i.textEdits===void 0||R.typedArray(i.textEdits,bt.is)&&(i.tooltip===void 0||R.string(i.tooltip)||Cn.is(i.tooltip))&&(i.paddingLeft===void 0||R.boolean(i.paddingLeft))&&(i.paddingRight===void 0||R.boolean(i.paddingRight))}e.is=n})(Ia||(Ia={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t;function n(r){let i=r;return R.objectLiteral(i)&&i.kind==="snippet"&&R.string(i.value)}e.isSnippet=n})(yi||(yi={}));(function(e){function t(n,r,i,o){return{insertText:n,filterText:r,range:i,command:o}}e.create=t})(Fa||(Fa={}));(function(e){function t(n){return{items:n}}e.create=t})($a||($a={}));(function(e){e.Invoked=1,e.Automatic=2})(Va||(Va={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Wa||(Wa={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Ua||(Ua={}));(function(e){function t(n){let r=n;return R.objectLiteral(r)&&ci.is(r.uri)&&R.string(r.name)}e.is=t})(Ha||(Ha={}));Ty=[`
8
+ `,`\r
9
+ `,"\r"];(function(e){function t(o,s,a,f){return new za(o,s,a,f)}e.create=t;function n(o){let s=o;return!!(R.defined(s)&&R.string(s.uri)&&(R.undefined(s.languageId)||R.string(s.languageId))&&R.uinteger(s.lineCount)&&R.func(s.getText)&&R.func(s.positionAt)&&R.func(s.offsetAt))}e.is=n;function r(o,s){let a=o.getText(),f=i(s,(d,v)=>{let l=d.range.start.line-v.range.start.line;return l===0?d.range.start.character-v.range.start.character:l}),c=a.length;for(let d=f.length-1;d>=0;d--){let v=f[d],l=o.offsetAt(v.range.start),h=o.offsetAt(v.range.end);if(h<=c)a=a.substring(0,l)+v.newText+a.substring(h,a.length);else throw new Error("Overlapping edit");c=l}return a}e.applyEdits=r;function i(o,s){if(o.length<=1)return o;let a=o.length/2|0,f=o.slice(0,a),c=o.slice(a);i(f,s),i(c,s);let d=0,v=0,l=0;for(;d<f.length&&v<c.length;)s(f[d],c[v])<=0?o[l++]=f[d++]:o[l++]=c[v++];for(;d<f.length;)o[l++]=f[d++];for(;v<c.length;)o[l++]=c[v++];return o}})(Ba||(Ba={}));za=class{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(t.push(i),r=!1);let o=n.charAt(i);r=o==="\r"||o===`
10
+ `,o==="\r"&&i+1<n.length&&n.charAt(i+1)===`
11
+ `&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return it.create(0,t);for(;r<i;){let s=Math.floor((r+i)/2);n[s]>t?i=s:r=s+1}let o=r-1;return it.create(o,t-n[o])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(e){let t=Object.prototype.toString;function n(h){return typeof h<"u"}e.defined=n;function r(h){return typeof h>"u"}e.undefined=r;function i(h){return h===!0||h===!1}e.boolean=i;function o(h){return t.call(h)==="[object String]"}e.string=o;function s(h){return t.call(h)==="[object Number]"}e.number=s;function a(h,_,x){return t.call(h)==="[object Number]"&&_<=h&&h<=x}e.numberRange=a;function f(h){return t.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}e.integer=f;function c(h){return t.call(h)==="[object Number]"&&0<=h&&h<=2147483647}e.uinteger=c;function d(h){return t.call(h)==="[object Function]"}e.func=d;function v(h){return h!==null&&typeof h=="object"}e.objectLiteral=v;function l(h,_){return Array.isArray(h)&&h.every(_)}e.typedArray=l})(R||(R={}))});var ge=J(We=>{"use strict";b();Object.defineProperty(We,"__esModule",{value:!0});We.CM=We.ProtocolNotificationType=We.ProtocolNotificationType0=We.ProtocolRequestType=We.ProtocolRequestType0=We.RegistrationType=We.MessageDirection=void 0;var jn=Mt(),Sl;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Sl||(We.MessageDirection=Sl={}));var Ja=class{____;method;constructor(t){this.method=t}};We.RegistrationType=Ja;var Xa=class extends jn.RequestType0{__;___;____;_pr;constructor(t){super(t)}};We.ProtocolRequestType0=Xa;var Ga=class extends jn.RequestType{__;___;____;_pr;constructor(t){super(t,jn.ParameterStructures.byName)}};We.ProtocolRequestType=Ga;var Qa=class extends jn.NotificationType0{___;____;constructor(t){super(t)}};We.ProtocolNotificationType0=Qa;var Za=class extends jn.NotificationType{___;____;constructor(t){super(t,jn.ParameterStructures.byName)}};We.ProtocolNotificationType=Za;var kl;(function(e){function t(n,r){return{client:n,server:r}}e.create=t})(kl||(We.CM=kl={}))});var _i=J(pt=>{"use strict";b();Object.defineProperty(pt,"__esModule",{value:!0});pt.boolean=Ry;pt.string=Tl;pt.number=Oy;pt.error=My;pt.func=Ny;pt.array=Rl;pt.stringArray=Ey;pt.typedArray=Ay;pt.objectLiteral=Cy;function Ry(e){return e===!0||e===!1}function Tl(e){return typeof e=="string"||e instanceof String}function Oy(e){return typeof e=="number"||e instanceof Number}function My(e){return e instanceof Error}function Ny(e){return typeof e=="function"}function Rl(e){return Array.isArray(e)}function Ey(e){return Rl(e)&&e.every(t=>Tl(t))}function Ay(e,t){return Array.isArray(e)&&e.every(t)}function Cy(e){return e!==null&&typeof e=="object"}});var Ml=J(wi=>{"use strict";b();Object.defineProperty(wi,"__esModule",{value:!0});wi.ImplementationRequest=void 0;var Ya=ge(),Ol;(function(e){e.method="textDocument/implementation",e.messageDirection=Ya.MessageDirection.clientToServer,e.type=new Ya.ProtocolRequestType(e.method),e.capabilities=Ya.CM.create("textDocument.implementation","implementationProvider")})(Ol||(wi.ImplementationRequest=Ol={}))});var El=J(Di=>{"use strict";b();Object.defineProperty(Di,"__esModule",{value:!0});Di.TypeDefinitionRequest=void 0;var Ka=ge(),Nl;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Ka.MessageDirection.clientToServer,e.type=new Ka.ProtocolRequestType(e.method),e.capabilities=Ka.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(Nl||(Di.TypeDefinitionRequest=Nl={}))});var jl=J(Ln=>{"use strict";b();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.DidChangeWorkspaceFoldersNotification=Ln.WorkspaceFoldersRequest=void 0;var qn=ge(),Al;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=qn.MessageDirection.serverToClient,e.type=new qn.ProtocolRequestType0(e.method),e.capabilities=qn.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(Al||(Ln.WorkspaceFoldersRequest=Al={}));var Cl;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=qn.MessageDirection.clientToServer,e.type=new qn.ProtocolNotificationType(e.method),e.capabilities=qn.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(Cl||(Ln.DidChangeWorkspaceFoldersNotification=Cl={}))});var Ll=J(xi=>{"use strict";b();Object.defineProperty(xi,"__esModule",{value:!0});xi.ConfigurationRequest=void 0;var ec=ge(),ql;(function(e){e.method="workspace/configuration",e.messageDirection=ec.MessageDirection.serverToClient,e.type=new ec.ProtocolRequestType(e.method),e.capabilities=ec.CM.create("workspace.configuration",void 0)})(ql||(xi.ConfigurationRequest=ql={}))});var $l=J(Fn=>{"use strict";b();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.ColorPresentationRequest=Fn.DocumentColorRequest=void 0;var In=ge(),Il;(function(e){e.method="textDocument/documentColor",e.messageDirection=In.MessageDirection.clientToServer,e.type=new In.ProtocolRequestType(e.method),e.capabilities=In.CM.create("textDocument.colorProvider","colorProvider")})(Il||(Fn.DocumentColorRequest=Il={}));var Fl;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=In.MessageDirection.clientToServer,e.type=new In.ProtocolRequestType(e.method),e.capabilities=In.CM.create("textDocument.colorProvider","colorProvider")})(Fl||(Fn.ColorPresentationRequest=Fl={}))});var Ul=J(Vn=>{"use strict";b();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.FoldingRangeRefreshRequest=Vn.FoldingRangeRequest=void 0;var $n=ge(),Vl;(function(e){e.method="textDocument/foldingRange",e.messageDirection=$n.MessageDirection.clientToServer,e.type=new $n.ProtocolRequestType(e.method),e.capabilities=$n.CM.create("textDocument.foldingRange","foldingRangeProvider")})(Vl||(Vn.FoldingRangeRequest=Vl={}));var Wl;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=$n.MessageDirection.serverToClient,e.type=new $n.ProtocolRequestType0(e.method),e.capabilities=$n.CM.create("workspace.foldingRange.refreshSupport",void 0)})(Wl||(Vn.FoldingRangeRefreshRequest=Wl={}))});var Bl=J(Pi=>{"use strict";b();Object.defineProperty(Pi,"__esModule",{value:!0});Pi.DeclarationRequest=void 0;var tc=ge(),Hl;(function(e){e.method="textDocument/declaration",e.messageDirection=tc.MessageDirection.clientToServer,e.type=new tc.ProtocolRequestType(e.method),e.capabilities=tc.CM.create("textDocument.declaration","declarationProvider")})(Hl||(Pi.DeclarationRequest=Hl={}))});var Jl=J(Si=>{"use strict";b();Object.defineProperty(Si,"__esModule",{value:!0});Si.SelectionRangeRequest=void 0;var nc=ge(),zl;(function(e){e.method="textDocument/selectionRange",e.messageDirection=nc.MessageDirection.clientToServer,e.type=new nc.ProtocolRequestType(e.method),e.capabilities=nc.CM.create("textDocument.selectionRange","selectionRangeProvider")})(zl||(Si.SelectionRangeRequest=zl={}))});var Zl=J(zt=>{"use strict";b();Object.defineProperty(zt,"__esModule",{value:!0});zt.WorkDoneProgressCancelNotification=zt.WorkDoneProgressCreateRequest=zt.WorkDoneProgress=void 0;var jy=Mt(),kr=ge(),Xl;(function(e){e.type=new jy.ProgressType;function t(n){return n===e.type}e.is=t})(Xl||(zt.WorkDoneProgress=Xl={}));var Gl;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=kr.MessageDirection.serverToClient,e.type=new kr.ProtocolRequestType(e.method),e.capabilities=kr.CM.create("window.workDoneProgress",void 0)})(Gl||(zt.WorkDoneProgressCreateRequest=Gl={}));var Ql;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=kr.MessageDirection.clientToServer,e.type=new kr.ProtocolNotificationType(e.method)})(Ql||(zt.WorkDoneProgressCancelNotification=Ql={}))});var tf=J(Jt=>{"use strict";b();Object.defineProperty(Jt,"__esModule",{value:!0});Jt.CallHierarchyOutgoingCallsRequest=Jt.CallHierarchyIncomingCallsRequest=Jt.CallHierarchyPrepareRequest=void 0;var fn=ge(),Yl;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=fn.MessageDirection.clientToServer,e.type=new fn.ProtocolRequestType(e.method),e.capabilities=fn.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(Yl||(Jt.CallHierarchyPrepareRequest=Yl={}));var Kl;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=fn.MessageDirection.clientToServer,e.type=new fn.ProtocolRequestType(e.method)})(Kl||(Jt.CallHierarchyIncomingCallsRequest=Kl={}));var ef;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=fn.MessageDirection.clientToServer,e.type=new fn.ProtocolRequestType(e.method)})(ef||(Jt.CallHierarchyOutgoingCallsRequest=ef={}))});var cf=J(Ge=>{"use strict";b();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.SemanticTokensRefreshRequest=Ge.SemanticTokensRangeRequest=Ge.SemanticTokensDeltaRequest=Ge.SemanticTokensRequest=Ge.SemanticTokensRegistrationType=Ge.TokenFormat=void 0;var et=ge(),nf;(function(e){e.Relative="relative"})(nf||(Ge.TokenFormat=nf={}));var Tr;(function(e){e.method="textDocument/semanticTokens",e.type=new et.RegistrationType(e.method)})(Tr||(Ge.SemanticTokensRegistrationType=Tr={}));var rf;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.registrationMethod=Tr.method,e.capabilities=et.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(rf||(Ge.SemanticTokensRequest=rf={}));var of;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.registrationMethod=Tr.method,e.capabilities=et.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(of||(Ge.SemanticTokensDeltaRequest=of={}));var sf;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=et.MessageDirection.clientToServer,e.type=new et.ProtocolRequestType(e.method),e.registrationMethod=Tr.method,e.capabilities=et.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(sf||(Ge.SemanticTokensRangeRequest=sf={}));var af;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=et.MessageDirection.serverToClient,e.type=new et.ProtocolRequestType0(e.method),e.capabilities=et.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(af||(Ge.SemanticTokensRefreshRequest=af={}))});var lf=J(ki=>{"use strict";b();Object.defineProperty(ki,"__esModule",{value:!0});ki.ShowDocumentRequest=void 0;var rc=ge(),uf;(function(e){e.method="window/showDocument",e.messageDirection=rc.MessageDirection.serverToClient,e.type=new rc.ProtocolRequestType(e.method),e.capabilities=rc.CM.create("window.showDocument.support",void 0)})(uf||(ki.ShowDocumentRequest=uf={}))});var df=J(Ti=>{"use strict";b();Object.defineProperty(Ti,"__esModule",{value:!0});Ti.LinkedEditingRangeRequest=void 0;var ic=ge(),ff;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=ic.MessageDirection.clientToServer,e.type=new ic.ProtocolRequestType(e.method),e.capabilities=ic.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(ff||(Ti.LinkedEditingRangeRequest=ff={}))});var _f=J(Ue=>{"use strict";b();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.WillDeleteFilesRequest=Ue.DidDeleteFilesNotification=Ue.DidRenameFilesNotification=Ue.WillRenameFilesRequest=Ue.DidCreateFilesNotification=Ue.WillCreateFilesRequest=Ue.FileOperationPatternKind=void 0;var Ne=ge(),pf;(function(e){e.file="file",e.folder="folder"})(pf||(Ue.FileOperationPatternKind=pf={}));var hf;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=Ne.MessageDirection.clientToServer,e.type=new Ne.ProtocolRequestType(e.method),e.capabilities=Ne.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(hf||(Ue.WillCreateFilesRequest=hf={}));var gf;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=Ne.MessageDirection.clientToServer,e.type=new Ne.ProtocolNotificationType(e.method),e.capabilities=Ne.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(gf||(Ue.DidCreateFilesNotification=gf={}));var mf;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=Ne.MessageDirection.clientToServer,e.type=new Ne.ProtocolRequestType(e.method),e.capabilities=Ne.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(mf||(Ue.WillRenameFilesRequest=mf={}));var yf;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=Ne.MessageDirection.clientToServer,e.type=new Ne.ProtocolNotificationType(e.method),e.capabilities=Ne.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(yf||(Ue.DidRenameFilesNotification=yf={}));var bf;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=Ne.MessageDirection.clientToServer,e.type=new Ne.ProtocolNotificationType(e.method),e.capabilities=Ne.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(bf||(Ue.DidDeleteFilesNotification=bf={}));var vf;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=Ne.MessageDirection.clientToServer,e.type=new Ne.ProtocolRequestType(e.method),e.capabilities=Ne.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(vf||(Ue.WillDeleteFilesRequest=vf={}))});var Pf=J(Xt=>{"use strict";b();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.MonikerRequest=Xt.MonikerKind=Xt.UniquenessLevel=void 0;var oc=ge(),wf;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(wf||(Xt.UniquenessLevel=wf={}));var Df;(function(e){e.$import="import",e.$export="export",e.local="local"})(Df||(Xt.MonikerKind=Df={}));var xf;(function(e){e.method="textDocument/moniker",e.messageDirection=oc.MessageDirection.clientToServer,e.type=new oc.ProtocolRequestType(e.method),e.capabilities=oc.CM.create("textDocument.moniker","monikerProvider")})(xf||(Xt.MonikerRequest=xf={}))});var Rf=J(Gt=>{"use strict";b();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.TypeHierarchySubtypesRequest=Gt.TypeHierarchySupertypesRequest=Gt.TypeHierarchyPrepareRequest=void 0;var dn=ge(),Sf;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=dn.MessageDirection.clientToServer,e.type=new dn.ProtocolRequestType(e.method),e.capabilities=dn.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(Sf||(Gt.TypeHierarchyPrepareRequest=Sf={}));var kf;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=dn.MessageDirection.clientToServer,e.type=new dn.ProtocolRequestType(e.method)})(kf||(Gt.TypeHierarchySupertypesRequest=kf={}));var Tf;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=dn.MessageDirection.clientToServer,e.type=new dn.ProtocolRequestType(e.method)})(Tf||(Gt.TypeHierarchySubtypesRequest=Tf={}))});var Nf=J(Un=>{"use strict";b();Object.defineProperty(Un,"__esModule",{value:!0});Un.InlineValueRefreshRequest=Un.InlineValueRequest=void 0;var Wn=ge(),Of;(function(e){e.method="textDocument/inlineValue",e.messageDirection=Wn.MessageDirection.clientToServer,e.type=new Wn.ProtocolRequestType(e.method),e.capabilities=Wn.CM.create("textDocument.inlineValue","inlineValueProvider")})(Of||(Un.InlineValueRequest=Of={}));var Mf;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=Wn.MessageDirection.serverToClient,e.type=new Wn.ProtocolRequestType0(e.method),e.capabilities=Wn.CM.create("workspace.inlineValue.refreshSupport",void 0)})(Mf||(Un.InlineValueRefreshRequest=Mf={}))});var jf=J(Qt=>{"use strict";b();Object.defineProperty(Qt,"__esModule",{value:!0});Qt.InlayHintRefreshRequest=Qt.InlayHintResolveRequest=Qt.InlayHintRequest=void 0;var Et=ge(),Ef;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Et.MessageDirection.clientToServer,e.type=new Et.ProtocolRequestType(e.method),e.capabilities=Et.CM.create("textDocument.inlayHint","inlayHintProvider")})(Ef||(Qt.InlayHintRequest=Ef={}));var Af;(function(e){e.method="inlayHint/resolve",e.messageDirection=Et.MessageDirection.clientToServer,e.type=new Et.ProtocolRequestType(e.method),e.capabilities=Et.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(Af||(Qt.InlayHintResolveRequest=Af={}));var Cf;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Et.MessageDirection.serverToClient,e.type=new Et.ProtocolRequestType0(e.method),e.capabilities=Et.CM.create("workspace.inlayHint.refreshSupport",void 0)})(Cf||(Qt.InlayHintRefreshRequest=Cf={}))});var Wf=J(Ee=>{"use strict";b();var qy=Ee&&Ee.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Ly=Ee&&Ee.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Iy=Ee&&Ee.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&qy(n,t,r[i]);return Ly(n,t),n}})();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.DiagnosticRefreshRequest=Ee.WorkspaceDiagnosticRequest=Ee.DocumentDiagnosticRequest=Ee.DocumentDiagnosticReportKind=Ee.DiagnosticServerCancellationData=void 0;var Vf=Mt(),Fy=Iy(_i()),At=ge(),qf;(function(e){function t(n){let r=n;return r&&Fy.boolean(r.retriggerRequest)}e.is=t})(qf||(Ee.DiagnosticServerCancellationData=qf={}));var Lf;(function(e){e.Full="full",e.Unchanged="unchanged"})(Lf||(Ee.DocumentDiagnosticReportKind=Lf={}));var If;(function(e){e.method="textDocument/diagnostic",e.messageDirection=At.MessageDirection.clientToServer,e.type=new At.ProtocolRequestType(e.method),e.partialResult=new Vf.ProgressType,e.capabilities=At.CM.create("textDocument.diagnostic","diagnosticProvider")})(If||(Ee.DocumentDiagnosticRequest=If={}));var Ff;(function(e){e.method="workspace/diagnostic",e.messageDirection=At.MessageDirection.clientToServer,e.type=new At.ProtocolRequestType(e.method),e.partialResult=new Vf.ProgressType,e.capabilities=At.CM.create("workspace.diagnostics","diagnosticProvider.workspaceDiagnostics")})(Ff||(Ee.WorkspaceDiagnosticRequest=Ff={}));var $f;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=At.MessageDirection.serverToClient,e.type=new At.ProtocolRequestType0(e.method),e.capabilities=At.CM.create("workspace.diagnostics.refreshSupport",void 0)})($f||(Ee.DiagnosticRefreshRequest=$f={}))});var Gf=J(ue=>{"use strict";b();var $y=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Vy=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wy=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&$y(n,t,r[i]);return Vy(n,t),n}})();Object.defineProperty(ue,"__esModule",{value:!0});ue.DidCloseNotebookDocumentNotification=ue.DidSaveNotebookDocumentNotification=ue.DidChangeNotebookDocumentNotification=ue.NotebookCellArrayChange=ue.DidOpenNotebookDocumentNotification=ue.NotebookDocumentSyncRegistrationType=ue.NotebookDocument=ue.NotebookCell=ue.ExecutionSummary=ue.NotebookCellKind=void 0;var Rr=(vi(),Io(bi)),ht=Wy(_i()),vt=ge(),sc;(function(e){e.Markup=1,e.Code=2;function t(n){return n===1||n===2}e.is=t})(sc||(ue.NotebookCellKind=sc={}));var ac;(function(e){function t(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}e.create=t;function n(i){let o=i;return ht.objectLiteral(o)&&Rr.uinteger.is(o.executionOrder)&&(o.success===void 0||ht.boolean(o.success))}e.is=n;function r(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}e.equals=r})(ac||(ue.ExecutionSummary=ac={}));var Ri;(function(e){function t(o,s){return{kind:o,document:s}}e.create=t;function n(o){let s=o;return ht.objectLiteral(s)&&sc.is(s.kind)&&Rr.DocumentUri.is(s.document)&&(s.metadata===void 0||ht.objectLiteral(s.metadata))}e.is=n;function r(o,s){let a=new Set;return o.document!==s.document&&a.add("document"),o.kind!==s.kind&&a.add("kind"),o.executionSummary!==s.executionSummary&&a.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&a.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!ac.equals(o.executionSummary,s.executionSummary)&&a.add("executionSummary"),a}e.diff=r;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let a=Array.isArray(o),f=Array.isArray(s);if(a!==f)return!1;if(a&&f){if(o.length!==s.length)return!1;for(let c=0;c<o.length;c++)if(!i(o[c],s[c]))return!1}if(ht.objectLiteral(o)&&ht.objectLiteral(s)){let c=Object.keys(o),d=Object.keys(s);if(c.length!==d.length||(c.sort(),d.sort(),!i(c,d)))return!1;for(let v=0;v<c.length;v++){let l=c[v];if(!i(o[l],s[l]))return!1}}return!0}})(Ri||(ue.NotebookCell=Ri={}));var Uf;(function(e){function t(r,i,o,s){return{uri:r,notebookType:i,version:o,cells:s}}e.create=t;function n(r){let i=r;return ht.objectLiteral(i)&&ht.string(i.uri)&&Rr.integer.is(i.version)&&ht.typedArray(i.cells,Ri.is)}e.is=n})(Uf||(ue.NotebookDocument=Uf={}));var Hn;(function(e){e.method="notebookDocument/sync",e.messageDirection=vt.MessageDirection.clientToServer,e.type=new vt.RegistrationType(e.method)})(Hn||(ue.NotebookDocumentSyncRegistrationType=Hn={}));var Hf;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=vt.MessageDirection.clientToServer,e.type=new vt.ProtocolNotificationType(e.method),e.registrationMethod=Hn.method})(Hf||(ue.DidOpenNotebookDocumentNotification=Hf={}));var Bf;(function(e){function t(r){let i=r;return ht.objectLiteral(i)&&Rr.uinteger.is(i.start)&&Rr.uinteger.is(i.deleteCount)&&(i.cells===void 0||ht.typedArray(i.cells,Ri.is))}e.is=t;function n(r,i,o){let s={start:r,deleteCount:i};return o!==void 0&&(s.cells=o),s}e.create=n})(Bf||(ue.NotebookCellArrayChange=Bf={}));var zf;(function(e){e.method="notebookDocument/didChange",e.messageDirection=vt.MessageDirection.clientToServer,e.type=new vt.ProtocolNotificationType(e.method),e.registrationMethod=Hn.method})(zf||(ue.DidChangeNotebookDocumentNotification=zf={}));var Jf;(function(e){e.method="notebookDocument/didSave",e.messageDirection=vt.MessageDirection.clientToServer,e.type=new vt.ProtocolNotificationType(e.method),e.registrationMethod=Hn.method})(Jf||(ue.DidSaveNotebookDocumentNotification=Jf={}));var Xf;(function(e){e.method="notebookDocument/didClose",e.messageDirection=vt.MessageDirection.clientToServer,e.type=new vt.ProtocolNotificationType(e.method),e.registrationMethod=Hn.method})(Xf||(ue.DidCloseNotebookDocumentNotification=Xf={}))});var Zf=J(Oi=>{"use strict";b();Object.defineProperty(Oi,"__esModule",{value:!0});Oi.InlineCompletionRequest=void 0;var cc=ge(),Qf;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=cc.MessageDirection.clientToServer,e.type=new cc.ProtocolRequestType(e.method),e.capabilities=cc.CM.create("textDocument.inlineCompletion","inlineCompletionProvider")})(Qf||(Oi.InlineCompletionRequest=Qf={}))});var ed=J(Bn=>{"use strict";b();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.TextDocumentContentRefreshRequest=Bn.TextDocumentContentRequest=void 0;var Or=ge(),Yf;(function(e){e.method="workspace/textDocumentContent",e.messageDirection=Or.MessageDirection.clientToServer,e.type=new Or.ProtocolRequestType(e.method),e.capabilities=Or.CM.create("workspace.textDocumentContent","workspace.textDocumentContent")})(Yf||(Bn.TextDocumentContentRequest=Yf={}));var Kf;(function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=Or.MessageDirection.serverToClient,e.type=new Or.ProtocolRequestType(e.method)})(Kf||(Bn.TextDocumentContentRefreshRequest=Kf={}))});var hp=J(p=>{"use strict";b();var Uy=p&&p.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Hy=p&&p.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),By=p&&p.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Uy(n,t,r[i]);return Hy(n,t),n}})();Object.defineProperty(p,"__esModule",{value:!0});p.CodeActionRequest=p.DocumentSymbolRequest=p.DocumentHighlightRequest=p.ReferencesRequest=p.DefinitionRequest=p.SignatureHelpRequest=p.SignatureHelpTriggerKind=p.HoverRequest=p.CompletionResolveRequest=p.CompletionRequest=p.CompletionTriggerKind=p.PublishDiagnosticsNotification=p.WatchKind=p.GlobPattern=p.RelativePattern=p.FileChangeType=p.DidChangeWatchedFilesNotification=p.WillSaveTextDocumentWaitUntilRequest=p.WillSaveTextDocumentNotification=p.TextDocumentSaveReason=p.DidSaveTextDocumentNotification=p.DidCloseTextDocumentNotification=p.DidChangeTextDocumentNotification=p.TextDocumentContentChangeEvent=p.DidOpenTextDocumentNotification=p.TextDocumentSyncKind=p.TelemetryEventNotification=p.LogMessageNotification=p.ShowMessageRequest=p.ShowMessageNotification=p.MessageType=p.DidChangeConfigurationNotification=p.ExitNotification=p.ShutdownRequest=p.InitializedNotification=p.InitializeErrorCodes=p.InitializeRequest=p.WorkDoneProgressOptions=p.TextDocumentRegistrationOptions=p.StaticRegistrationOptions=p.PositionEncodingKind=p.RegularExpressionEngineKind=p.FailureHandlingKind=p.ResourceOperationKind=p.UnregistrationRequest=p.RegistrationRequest=p.DocumentSelector=p.NotebookCellTextDocumentFilter=p.NotebookDocumentFilter=p.TextDocumentFilter=void 0;p.UniquenessLevel=p.WillDeleteFilesRequest=p.DidDeleteFilesNotification=p.WillRenameFilesRequest=p.DidRenameFilesNotification=p.WillCreateFilesRequest=p.DidCreateFilesNotification=p.FileOperationPatternKind=p.LinkedEditingRangeRequest=p.ShowDocumentRequest=p.SemanticTokensRegistrationType=p.SemanticTokensRefreshRequest=p.SemanticTokensRangeRequest=p.SemanticTokensDeltaRequest=p.SemanticTokensRequest=p.TokenFormat=p.CallHierarchyPrepareRequest=p.CallHierarchyOutgoingCallsRequest=p.CallHierarchyIncomingCallsRequest=p.WorkDoneProgressCancelNotification=p.WorkDoneProgressCreateRequest=p.WorkDoneProgress=p.SelectionRangeRequest=p.DeclarationRequest=p.FoldingRangeRefreshRequest=p.FoldingRangeRequest=p.ColorPresentationRequest=p.DocumentColorRequest=p.ConfigurationRequest=p.DidChangeWorkspaceFoldersNotification=p.WorkspaceFoldersRequest=p.TypeDefinitionRequest=p.ImplementationRequest=p.ApplyWorkspaceEditRequest=p.ExecuteCommandRequest=p.PrepareRenameRequest=p.RenameRequest=p.PrepareSupportDefaultBehavior=p.DocumentOnTypeFormattingRequest=p.DocumentRangesFormattingRequest=p.DocumentRangeFormattingRequest=p.DocumentFormattingRequest=p.DocumentLinkResolveRequest=p.DocumentLinkRequest=p.CodeLensRefreshRequest=p.CodeLensResolveRequest=p.CodeLensRequest=p.WorkspaceSymbolResolveRequest=p.WorkspaceSymbolRequest=p.CodeActionResolveRequest=void 0;p.TextDocumentContentRefreshRequest=p.TextDocumentContentRequest=p.InlineCompletionRequest=p.DidCloseNotebookDocumentNotification=p.DidSaveNotebookDocumentNotification=p.DidChangeNotebookDocumentNotification=p.NotebookCellArrayChange=p.DidOpenNotebookDocumentNotification=p.NotebookDocumentSyncRegistrationType=p.NotebookDocument=p.NotebookCell=p.ExecutionSummary=p.NotebookCellKind=p.DiagnosticRefreshRequest=p.WorkspaceDiagnosticRequest=p.DocumentDiagnosticRequest=p.DocumentDiagnosticReportKind=p.DiagnosticServerCancellationData=p.InlayHintRefreshRequest=p.InlayHintResolveRequest=p.InlayHintRequest=p.InlineValueRefreshRequest=p.InlineValueRequest=p.TypeHierarchySupertypesRequest=p.TypeHierarchySubtypesRequest=p.TypeHierarchyPrepareRequest=p.MonikerRequest=p.MonikerKind=void 0;var q=ge(),td=(vi(),Io(bi)),Ae=By(_i()),zy=Ml();Object.defineProperty(p,"ImplementationRequest",{enumerable:!0,get:function(){return zy.ImplementationRequest}});var Jy=El();Object.defineProperty(p,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Jy.TypeDefinitionRequest}});var up=jl();Object.defineProperty(p,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return up.WorkspaceFoldersRequest}});Object.defineProperty(p,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return up.DidChangeWorkspaceFoldersNotification}});var Xy=Ll();Object.defineProperty(p,"ConfigurationRequest",{enumerable:!0,get:function(){return Xy.ConfigurationRequest}});var lp=$l();Object.defineProperty(p,"DocumentColorRequest",{enumerable:!0,get:function(){return lp.DocumentColorRequest}});Object.defineProperty(p,"ColorPresentationRequest",{enumerable:!0,get:function(){return lp.ColorPresentationRequest}});var fp=Ul();Object.defineProperty(p,"FoldingRangeRequest",{enumerable:!0,get:function(){return fp.FoldingRangeRequest}});Object.defineProperty(p,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return fp.FoldingRangeRefreshRequest}});var Gy=Bl();Object.defineProperty(p,"DeclarationRequest",{enumerable:!0,get:function(){return Gy.DeclarationRequest}});var Qy=Jl();Object.defineProperty(p,"SelectionRangeRequest",{enumerable:!0,get:function(){return Qy.SelectionRangeRequest}});var gc=Zl();Object.defineProperty(p,"WorkDoneProgress",{enumerable:!0,get:function(){return gc.WorkDoneProgress}});Object.defineProperty(p,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return gc.WorkDoneProgressCreateRequest}});Object.defineProperty(p,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return gc.WorkDoneProgressCancelNotification}});var mc=tf();Object.defineProperty(p,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return mc.CallHierarchyIncomingCallsRequest}});Object.defineProperty(p,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return mc.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(p,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return mc.CallHierarchyPrepareRequest}});var zn=cf();Object.defineProperty(p,"TokenFormat",{enumerable:!0,get:function(){return zn.TokenFormat}});Object.defineProperty(p,"SemanticTokensRequest",{enumerable:!0,get:function(){return zn.SemanticTokensRequest}});Object.defineProperty(p,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return zn.SemanticTokensDeltaRequest}});Object.defineProperty(p,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return zn.SemanticTokensRangeRequest}});Object.defineProperty(p,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return zn.SemanticTokensRefreshRequest}});Object.defineProperty(p,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return zn.SemanticTokensRegistrationType}});var Zy=lf();Object.defineProperty(p,"ShowDocumentRequest",{enumerable:!0,get:function(){return Zy.ShowDocumentRequest}});var Yy=df();Object.defineProperty(p,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return Yy.LinkedEditingRangeRequest}});var pn=_f();Object.defineProperty(p,"FileOperationPatternKind",{enumerable:!0,get:function(){return pn.FileOperationPatternKind}});Object.defineProperty(p,"DidCreateFilesNotification",{enumerable:!0,get:function(){return pn.DidCreateFilesNotification}});Object.defineProperty(p,"WillCreateFilesRequest",{enumerable:!0,get:function(){return pn.WillCreateFilesRequest}});Object.defineProperty(p,"DidRenameFilesNotification",{enumerable:!0,get:function(){return pn.DidRenameFilesNotification}});Object.defineProperty(p,"WillRenameFilesRequest",{enumerable:!0,get:function(){return pn.WillRenameFilesRequest}});Object.defineProperty(p,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return pn.DidDeleteFilesNotification}});Object.defineProperty(p,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return pn.WillDeleteFilesRequest}});var yc=Pf();Object.defineProperty(p,"UniquenessLevel",{enumerable:!0,get:function(){return yc.UniquenessLevel}});Object.defineProperty(p,"MonikerKind",{enumerable:!0,get:function(){return yc.MonikerKind}});Object.defineProperty(p,"MonikerRequest",{enumerable:!0,get:function(){return yc.MonikerRequest}});var bc=Rf();Object.defineProperty(p,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return bc.TypeHierarchyPrepareRequest}});Object.defineProperty(p,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return bc.TypeHierarchySubtypesRequest}});Object.defineProperty(p,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return bc.TypeHierarchySupertypesRequest}});var dp=Nf();Object.defineProperty(p,"InlineValueRequest",{enumerable:!0,get:function(){return dp.InlineValueRequest}});Object.defineProperty(p,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return dp.InlineValueRefreshRequest}});var vc=jf();Object.defineProperty(p,"InlayHintRequest",{enumerable:!0,get:function(){return vc.InlayHintRequest}});Object.defineProperty(p,"InlayHintResolveRequest",{enumerable:!0,get:function(){return vc.InlayHintResolveRequest}});Object.defineProperty(p,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return vc.InlayHintRefreshRequest}});var Mr=Wf();Object.defineProperty(p,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Mr.DiagnosticServerCancellationData}});Object.defineProperty(p,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Mr.DocumentDiagnosticReportKind}});Object.defineProperty(p,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Mr.DocumentDiagnosticRequest}});Object.defineProperty(p,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Mr.WorkspaceDiagnosticRequest}});Object.defineProperty(p,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Mr.DiagnosticRefreshRequest}});var _t=Gf();Object.defineProperty(p,"NotebookCellKind",{enumerable:!0,get:function(){return _t.NotebookCellKind}});Object.defineProperty(p,"ExecutionSummary",{enumerable:!0,get:function(){return _t.ExecutionSummary}});Object.defineProperty(p,"NotebookCell",{enumerable:!0,get:function(){return _t.NotebookCell}});Object.defineProperty(p,"NotebookDocument",{enumerable:!0,get:function(){return _t.NotebookDocument}});Object.defineProperty(p,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return _t.NotebookDocumentSyncRegistrationType}});Object.defineProperty(p,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return _t.DidOpenNotebookDocumentNotification}});Object.defineProperty(p,"NotebookCellArrayChange",{enumerable:!0,get:function(){return _t.NotebookCellArrayChange}});Object.defineProperty(p,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return _t.DidChangeNotebookDocumentNotification}});Object.defineProperty(p,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return _t.DidSaveNotebookDocumentNotification}});Object.defineProperty(p,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return _t.DidCloseNotebookDocumentNotification}});var Ky=Zf();Object.defineProperty(p,"InlineCompletionRequest",{enumerable:!0,get:function(){return Ky.InlineCompletionRequest}});var pp=ed();Object.defineProperty(p,"TextDocumentContentRequest",{enumerable:!0,get:function(){return pp.TextDocumentContentRequest}});Object.defineProperty(p,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return pp.TextDocumentContentRefreshRequest}});var uc;(function(e){function t(n){let r=n;return Ae.string(r)||Ae.string(r.language)||Ae.string(r.scheme)||hc.is(r.pattern)}e.is=t})(uc||(p.TextDocumentFilter=uc={}));var lc;(function(e){function t(n){let r=n;return Ae.objectLiteral(r)&&(Ae.string(r.notebookType)||Ae.string(r.scheme)||Ae.string(r.pattern))}e.is=t})(lc||(p.NotebookDocumentFilter=lc={}));var fc;(function(e){function t(n){let r=n;return Ae.objectLiteral(r)&&(Ae.string(r.notebook)||lc.is(r.notebook))&&(r.language===void 0||Ae.string(r.language))}e.is=t})(fc||(p.NotebookCellTextDocumentFilter=fc={}));var dc;(function(e){function t(n){if(!Array.isArray(n))return!1;for(let r of n)if(!Ae.string(r)&&!uc.is(r)&&!fc.is(r))return!1;return!0}e.is=t})(dc||(p.DocumentSelector=dc={}));var nd;(function(e){e.method="client/registerCapability",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolRequestType(e.method)})(nd||(p.RegistrationRequest=nd={}));var rd;(function(e){e.method="client/unregisterCapability",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolRequestType(e.method)})(rd||(p.UnregistrationRequest=rd={}));var id;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(id||(p.ResourceOperationKind=id={}));var od;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(od||(p.FailureHandlingKind=od={}));var sd;(function(e){e.ES2020="ES2020"})(sd||(p.RegularExpressionEngineKind=sd={}));var ad;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(ad||(p.PositionEncodingKind=ad={}));var cd;(function(e){function t(n){let r=n;return r&&Ae.string(r.id)&&r.id.length>0}e.hasId=t})(cd||(p.StaticRegistrationOptions=cd={}));var ud;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||dc.is(r.documentSelector))}e.is=t})(ud||(p.TextDocumentRegistrationOptions=ud={}));var ld;(function(e){function t(r){let i=r;return Ae.objectLiteral(i)&&(i.workDoneProgress===void 0||Ae.boolean(i.workDoneProgress))}e.is=t;function n(r){let i=r;return i&&Ae.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=n})(ld||(p.WorkDoneProgressOptions=ld={}));var fd;(function(e){e.method="initialize",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method)})(fd||(p.InitializeRequest=fd={}));var dd;(function(e){e.unknownProtocolVersion=1})(dd||(p.InitializeErrorCodes=dd={}));var pd;(function(e){e.method="initialized",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType(e.method)})(pd||(p.InitializedNotification=pd={}));var hd;(function(e){e.method="shutdown",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType0(e.method)})(hd||(p.ShutdownRequest=hd={}));var gd;(function(e){e.method="exit",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType0(e.method)})(gd||(p.ExitNotification=gd={}));var md;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("workspace.didChangeConfiguration",void 0)})(md||(p.DidChangeConfigurationNotification=md={}));var yd;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(yd||(p.MessageType=yd={}));var bd;(function(e){e.method="window/showMessage",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("window.showMessage",void 0)})(bd||(p.ShowMessageNotification=bd={}));var vd;(function(e){e.method="window/showMessageRequest",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("window.showMessage",void 0)})(vd||(p.ShowMessageRequest=vd={}));var _d;(function(e){e.method="window/logMessage",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolNotificationType(e.method)})(_d||(p.LogMessageNotification=_d={}));var wd;(function(e){e.method="telemetry/event",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolNotificationType(e.method)})(wd||(p.TelemetryEventNotification=wd={}));var Dd;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Dd||(p.TextDocumentSyncKind=Dd={}));var xd;(function(e){e.method="textDocument/didOpen",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(xd||(p.DidOpenTextDocumentNotification=xd={}));var Pd;(function(e){function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}e.isIncremental=t;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}e.isFull=n})(Pd||(p.TextDocumentContentChangeEvent=Pd={}));var Sd;(function(e){e.method="textDocument/didChange",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("textDocument.synchronization","textDocumentSync")})(Sd||(p.DidChangeTextDocumentNotification=Sd={}));var kd;(function(e){e.method="textDocument/didClose",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(kd||(p.DidCloseTextDocumentNotification=kd={}));var Td;(function(e){e.method="textDocument/didSave",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Td||(p.DidSaveTextDocumentNotification=Td={}));var Rd;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Rd||(p.TextDocumentSaveReason=Rd={}));var Od;(function(e){e.method="textDocument/willSave",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(Od||(p.WillSaveTextDocumentNotification=Od={}));var Md;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(Md||(p.WillSaveTextDocumentWaitUntilRequest=Md={}));var Nd;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("workspace.didChangeWatchedFiles",void 0)})(Nd||(p.DidChangeWatchedFilesNotification=Nd={}));var Ed;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Ed||(p.FileChangeType=Ed={}));var pc;(function(e){function t(n){let r=n;return Ae.objectLiteral(r)&&(td.URI.is(r.baseUri)||td.WorkspaceFolder.is(r.baseUri))&&Ae.string(r.pattern)}e.is=t})(pc||(p.RelativePattern=pc={}));var hc;(function(e){function t(n){let r=n;return Ae.string(r)||pc.is(r)}e.is=t})(hc||(p.GlobPattern=hc={}));var Ad;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Ad||(p.WatchKind=Ad={}));var Cd;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolNotificationType(e.method),e.capabilities=q.CM.create("textDocument.publishDiagnostics",void 0)})(Cd||(p.PublishDiagnosticsNotification=Cd={}));var jd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(jd||(p.CompletionTriggerKind=jd={}));var qd;(function(e){e.method="textDocument/completion",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.completion","completionProvider")})(qd||(p.CompletionRequest=qd={}));var Ld;(function(e){e.method="completionItem/resolve",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Ld||(p.CompletionResolveRequest=Ld={}));var Id;(function(e){e.method="textDocument/hover",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.hover","hoverProvider")})(Id||(p.HoverRequest=Id={}));var Fd;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Fd||(p.SignatureHelpTriggerKind=Fd={}));var $d;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.signatureHelp","signatureHelpProvider")})($d||(p.SignatureHelpRequest=$d={}));var Vd;(function(e){e.method="textDocument/definition",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.definition","definitionProvider")})(Vd||(p.DefinitionRequest=Vd={}));var Wd;(function(e){e.method="textDocument/references",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.references","referencesProvider")})(Wd||(p.ReferencesRequest=Wd={}));var Ud;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Ud||(p.DocumentHighlightRequest=Ud={}));var Hd;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(Hd||(p.DocumentSymbolRequest=Hd={}));var Bd;(function(e){e.method="textDocument/codeAction",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.codeAction","codeActionProvider")})(Bd||(p.CodeActionRequest=Bd={}));var zd;(function(e){e.method="codeAction/resolve",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(zd||(p.CodeActionResolveRequest=zd={}));var Jd;(function(e){e.method="workspace/symbol",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("workspace.symbol","workspaceSymbolProvider")})(Jd||(p.WorkspaceSymbolRequest=Jd={}));var Xd;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Xd||(p.WorkspaceSymbolResolveRequest=Xd={}));var Gd;(function(e){e.method="textDocument/codeLens",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.codeLens","codeLensProvider")})(Gd||(p.CodeLensRequest=Gd={}));var Qd;(function(e){e.method="codeLens/resolve",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Qd||(p.CodeLensResolveRequest=Qd={}));var Zd;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolRequestType0(e.method),e.capabilities=q.CM.create("workspace.codeLens",void 0)})(Zd||(p.CodeLensRefreshRequest=Zd={}));var Yd;(function(e){e.method="textDocument/documentLink",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.documentLink","documentLinkProvider")})(Yd||(p.DocumentLinkRequest=Yd={}));var Kd;(function(e){e.method="documentLink/resolve",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Kd||(p.DocumentLinkResolveRequest=Kd={}));var ep;(function(e){e.method="textDocument/formatting",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.formatting","documentFormattingProvider")})(ep||(p.DocumentFormattingRequest=ep={}));var tp;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(tp||(p.DocumentRangeFormattingRequest=tp={}));var np;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(np||(p.DocumentRangesFormattingRequest=np={}));var rp;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(rp||(p.DocumentOnTypeFormattingRequest=rp={}));var ip;(function(e){e.Identifier=1})(ip||(p.PrepareSupportDefaultBehavior=ip={}));var op;(function(e){e.method="textDocument/rename",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.rename","renameProvider")})(op||(p.RenameRequest=op={}));var sp;(function(e){e.method="textDocument/prepareRename",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(sp||(p.PrepareRenameRequest=sp={}));var ap;(function(e){e.method="workspace/executeCommand",e.messageDirection=q.MessageDirection.clientToServer,e.type=new q.ProtocolRequestType(e.method),e.capabilities=q.CM.create("workspace.executeCommand","executeCommandProvider")})(ap||(p.ExecuteCommandRequest=ap={}));var cp;(function(e){e.method="workspace/applyEdit",e.messageDirection=q.MessageDirection.serverToClient,e.type=new q.ProtocolRequestType("workspace/applyEdit"),e.capabilities=q.CM.create("workspace.applyEdit",void 0)})(cp||(p.ApplyWorkspaceEditRequest=cp={}))});var mp=J(_c=>{"use strict";b();Object.defineProperty(_c,"__esModule",{value:!0});_c.createProtocolConnection=eb;var gp=Mt();function eb(e,t,n,r){return gp.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,gp.createMessageConnection)(e,t,n,r)}});var De=J(Qe=>{"use strict";b();var tb=Qe&&Qe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Mi=Qe&&Qe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&tb(t,e,n)};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.LSPErrorCodes=Qe.createProtocolConnection=void 0;Mi(Mt(),Qe);Mi((vi(),Io(bi)),Qe);Mi(ge(),Qe);Mi(hp(),Qe);var nb=mp();Object.defineProperty(Qe,"createProtocolConnection",{enumerable:!0,get:function(){return nb.createProtocolConnection}});var yp;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(yp||(Qe.LSPErrorCodes=yp={}))});var Dc=J(Zt=>{"use strict";b();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.SemanticTokensBuilder=Zt.SemanticTokensDiff=Zt.SemanticTokensFeature=void 0;var Ni=De(),rb=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Ni.SemanticTokensRefreshRequest.type),on:t=>{let n=Ni.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Ni.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Ni.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Zt.SemanticTokensFeature=rb;var Ei=class{originalSequence;modifiedSequence;constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<t&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<t){let i=t-1,o=n-1;for(;i>=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<r||o<r)&&(i++,o++);let s=i-r+1,a=this.modifiedSequence.slice(r,o+1);return a.length===1&&a[0]===this.originalSequence[i]?[{start:r,deleteCount:s-1}]:[{start:r,deleteCount:s,data:a}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<t?[{start:r,deleteCount:t-r}]:[]}};Zt.SemanticTokensDiff=Ei;var wc=class e{_id;_prevLine;_prevChar;_dataIsSortedAndDeltaEncoded;_data;_dataNonDelta;_dataLen;_prevData;constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataNonDelta=[],this._dataLen=0,this._dataIsSortedAndDeltaEncoded=!0}push(t,n,r,i,o){this._dataIsSortedAndDeltaEncoded&&(t<this._prevLine||t===this._prevLine&&n<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=e._deltaDecode(this._data));let s=t,a=n;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,s===0&&(a-=this._prevChar));let f=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;f[this._dataLen++]=s,f[this._dataLen++]=a,f[this._dataLen++]=r,f[this._dataLen++]=i,f[this._dataLen++]=o,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}static _deltaDecode(t){let n=t.length/5|0,r=0,i=0,o=[];for(let s=0;s<n;s++){let a=5*s,f=t[a],c=t[a+1];f===0?(f=r,c+=i):f+=r;let d=t[a+2],v=t[a+3],l=t[a+4];o[a+0]=f,o[a+1]=c,o[a+2]=d,o[a+3]=v,o[a+4]=l,r=f,i=c}return o}static _sortAndDeltaEncode(t){let n=[],r=t.length/5|0;for(let a=0;a<r;a++)n[a]=a;n.sort((a,f)=>{let c=t[5*a],d=t[5*f];if(c===d){let v=t[5*a+1],l=t[5*f+1];return v-l}return c-d});let i=[],o=0,s=0;for(let a=0;a<r;a++){let f=5*n[a],c=t[f+0],d=t[f+1],v=t[f+2],l=t[f+3],h=t[f+4],_=c-o,x=_===0?d-s:d,D=5*a;i[D+0]=_,i[D+1]=x,i[D+2]=v,i[D+3]=l,i[D+4]=h,o=c,s=d}return i}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:e._sortAndDeltaEncode(this._dataNonDelta)}previousResult(t){this.id===t&&(this._prevData=this.getFinalDataDelta()),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this.getFinalDataDelta()}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new Ei(this._prevData,this.getFinalDataDelta()).computeDiff()}:this.build()}};Zt.SemanticTokensBuilder=wc});var bp=J(Ai=>{"use strict";b();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.InlineCompletionFeature=void 0;var ib=De(),ob=e=>class extends e{get inlineCompletion(){return{on:t=>this.connection.onRequest(ib.InlineCompletionRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Ai.InlineCompletionFeature=ob});var _p=J(Ci=>{"use strict";b();Object.defineProperty(Ci,"__esModule",{value:!0});Ci.TextDocumentContentFeature=void 0;var vp=De(),sb=e=>class extends e{get textDocumentContent(){return{refresh:t=>this.connection.sendRequest(vp.TextDocumentContentRefreshRequest.type,{uri:t}),on:t=>this.connection.onRequest(vp.TextDocumentContentRequest.type,(n,r)=>t(n,r))}}};Ci.TextDocumentContentFeature=sb});var Pc=J(ji=>{"use strict";b();Object.defineProperty(ji,"__esModule",{value:!0});ji.TextDocuments=void 0;var hn=De(),xc=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new hn.Emitter,this._onDidOpen=new hn.Emitter,this._onDidClose=new hn.Emitter,this._onDidSave=new hn.Emitter,this._onWillSave=new hn.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=hn.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let a=this._syncedDocuments.get(i.uri);a!==void 0&&(a=this._configuration.update(a,o,s),this._syncedDocuments.set(i.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(t.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(t.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),hn.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};ji.TextDocuments=xc});var Tc=J(Jn=>{"use strict";b();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.NotebookDocuments=Jn.NotebookSyncFeature=void 0;var ot=De(),wp=Pc(),ab=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(ot.DidOpenNotebookDocumentNotification.type,n=>t(n)),onDidChangeNotebookDocument:t=>this.connection.onNotification(ot.DidChangeNotebookDocumentNotification.type,n=>t(n)),onDidSaveNotebookDocument:t=>this.connection.onNotification(ot.DidSaveNotebookDocumentNotification.type,n=>t(n)),onDidCloseNotebookDocument:t=>this.connection.onNotification(ot.DidCloseNotebookDocumentNotification.type,n=>t(n))}}};Jn.NotebookSyncFeature=ab;var Sc=class e{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(t){return this.openHandler=t,ot.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){return this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,ot.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){return this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,ot.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){return this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}},kc=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(t){t instanceof wp.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new wp.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new ot.Emitter,this._onDidChange=new ot.Emitter,this._onDidSave=new ot.Emitter,this._onDidClose=new ot.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new Sc,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(async i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)await n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(async i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,a=!1,f=i.change;f.metadata!==void 0&&(a=!0,o.metadata=f.metadata);let c=[],d=[],v=[],l=[];if(f.cells!==void 0){let T=f.cells;if(T.structure!==void 0){let m=T.structure.array;if(o.cells.splice(m.start,m.deleteCount,...m.cells!==void 0?m.cells:[]),T.structure.didOpen!==void 0)for(let u of T.structure.didOpen)await n.openTextDocument({textDocument:u}),c.push(u.uri);if(T.structure.didClose)for(let u of T.structure.didClose)await n.closeTextDocument({textDocument:u}),d.push(u.uri)}if(T.data!==void 0){let m=new Map(T.data.map(u=>[u.document,u]));for(let u=0;u<=o.cells.length;u++){let y=m.get(o.cells[u].document);if(y!==void 0){let S=o.cells.splice(u,1,y);if(v.push({old:S[0],new:y}),m.delete(y.document),m.size===0)break}}}if(T.textContent!==void 0)for(let m of T.textContent)await n.changeTextDocument({textDocument:m.document,contentChanges:m.changes}),l.push(m.document.uri)}this.updateCellMap(o);let h={notebookDocument:o};a&&(h.metadata={old:s,new:o.metadata});let _=[];for(let T of c)_.push(this.getNotebookCell(T));let x=[];for(let T of d)x.push(this.getNotebookCell(T));let D=[];for(let T of l)D.push(this.getNotebookCell(T));(_.length>0||x.length>0||v.length>0||D.length>0)&&(h.cells={added:_,removed:x,changed:{data:v,textContent:D}}),(h.metadata!==void 0||h.cells!==void 0)&&this._onDidChange.fire(h)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(async i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)await n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),ot.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};Jn.NotebookDocuments=kc});var Rc=J(gt=>{"use strict";b();Object.defineProperty(gt,"__esModule",{value:!0});gt.boolean=cb;gt.string=Dp;gt.number=ub;gt.error=lb;gt.func=xp;gt.array=Pp;gt.stringArray=fb;gt.typedArray=db;gt.thenable=pb;function cb(e){return e===!0||e===!1}function Dp(e){return typeof e=="string"||e instanceof String}function ub(e){return typeof e=="number"||e instanceof Number}function lb(e){return e instanceof Error}function xp(e){return typeof e=="function"}function Pp(e){return Array.isArray(e)}function fb(e){return Pp(e)&&e.every(t=>Dp(t))}function db(e,t){return Array.isArray(e)&&e.every(t)}function pb(e){return e&&xp(e.then)}});var Mc=J(Yt=>{"use strict";b();Object.defineProperty(Yt,"__esModule",{value:!0});Yt.empty=void 0;Yt.v4=Sp;Yt.isUUID=kp;Yt.parse=gb;Yt.generateUuid=mb;var Nr=class{_value;constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Oc=class e extends Nr{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};Yt.empty=new Nr("00000000-0000-0000-0000-000000000000");function Sp(){return new Oc}var hb=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function kp(e){return hb.test(e)}function gb(e){if(!kp(e))throw new Error("invalid uuid");return new Nr(e)}function mb(){return Sp().asHex()}});var Tp=J(Gn=>{"use strict";b();Object.defineProperty(Gn,"__esModule",{value:!0});Gn.ProgressFeature=void 0;Gn.attachWorkDone=bb;Gn.attachPartialResult=_b;var Kt=De(),yb=Mc(),Xn=class e{_connection;_token;static Instances=new Map;constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(t,n,r,i){let o={kind:"begin",title:t,message:r,cancellable:i};typeof n=="number"&&(o.percentage=Math.round(n)),this._connection.sendProgress(Kt.WorkDoneProgress.type,this._token,o)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=Math.round(t),n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(Kt.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Kt.WorkDoneProgress.type,this._token,{kind:"end"})}},qi=class extends Xn{_source;constructor(t,n){super(t,n),this._source=new Kt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Er=class{constructor(){}begin(){}report(){}done(){}},Li=class extends Er{_source;constructor(){super(),this._source=new Kt.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function bb(e,t){if(t===void 0||t.workDoneToken===void 0)return new Er;let n=t.workDoneToken;return delete t.workDoneToken,new Xn(e,n)}var vb=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Kt.WorkDoneProgressCancelNotification.type,n=>{let r=Xn.Instances.get(n.token);(r instanceof qi||r instanceof Li)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Er:new Xn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,yb.generateUuid)();return this.connection.sendRequest(Kt.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new qi(this.connection,t))}else return Promise.resolve(new Li)}};Gn.ProgressFeature=vb;var Nc;(function(e){e.type=new Kt.ProgressType})(Nc||(Nc={}));var Ec=class{_connection;_token;constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Nc.type,this._token,t)}};function _b(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Ec(e,n)}});var Rp=J(wt=>{"use strict";b();var wb=wt&&wt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Db=wt&&wt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xb=wt&&wt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&wb(n,t,r[i]);return Db(n,t),n}})();Object.defineProperty(wt,"__esModule",{value:!0});wt.ConfigurationFeature=void 0;var Pb=De(),Sb=xb(Rc()),kb=e=>class extends e{getConfiguration(t){return t?Sb.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Pb.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};wt.ConfigurationFeature=kb});var Op=J(Fi=>{"use strict";b();Object.defineProperty(Fi,"__esModule",{value:!0});Fi.WorkspaceFoldersFeature=void 0;var Ii=De(),Tb=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ii.Emitter,this.connection.onNotification(Ii.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ii.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ii.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Fi.WorkspaceFoldersFeature=Tb});var Mp=J($i=>{"use strict";b();Object.defineProperty($i,"__esModule",{value:!0});$i.CallHierarchyFeature=void 0;var Ac=De(),Rb=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Ac.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Ac.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Ac.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};$i.CallHierarchyFeature=Rb});var Np=J(Vi=>{"use strict";b();Object.defineProperty(Vi,"__esModule",{value:!0});Vi.ShowDocumentFeature=void 0;var Ob=De(),Mb=e=>class extends e{showDocument(t){return this.connection.sendRequest(Ob.ShowDocumentRequest.type,t)}};Vi.ShowDocumentFeature=Mb});var Ep=J(Wi=>{"use strict";b();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.FileOperationsFeature=void 0;var Qn=De(),Nb=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(Qn.DidCreateFilesNotification.type,n=>t(n))}onDidRenameFiles(t){return this.connection.onNotification(Qn.DidRenameFilesNotification.type,n=>t(n))}onDidDeleteFiles(t){return this.connection.onNotification(Qn.DidDeleteFilesNotification.type,n=>t(n))}onWillCreateFiles(t){return this.connection.onRequest(Qn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(Qn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(Qn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Wi.FileOperationsFeature=Nb});var Ap=J(Ui=>{"use strict";b();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.LinkedEditingRangeFeature=void 0;var Eb=De(),Ab=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Eb.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Ui.LinkedEditingRangeFeature=Ab});var Cp=J(Hi=>{"use strict";b();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.TypeHierarchyFeature=void 0;var Cc=De(),Cb=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Cc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Cc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Cc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Hi.TypeHierarchyFeature=Cb});var qp=J(Bi=>{"use strict";b();Object.defineProperty(Bi,"__esModule",{value:!0});Bi.InlineValueFeature=void 0;var jp=De(),jb=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(jp.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(jp.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Bi.InlineValueFeature=jb});var Ip=J(zi=>{"use strict";b();Object.defineProperty(zi,"__esModule",{value:!0});zi.FoldingRangeFeature=void 0;var Lp=De(),qb=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(Lp.FoldingRangeRefreshRequest.type),on:t=>{let n=Lp.FoldingRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};zi.FoldingRangeFeature=qb});var Fp=J(Ji=>{"use strict";b();Object.defineProperty(Ji,"__esModule",{value:!0});Ji.InlayHintFeature=void 0;var jc=De(),Lb=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(jc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(jc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(jc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Ji.InlayHintFeature=Lb});var $p=J(Xi=>{"use strict";b();Object.defineProperty(Xi,"__esModule",{value:!0});Xi.DiagnosticFeature=void 0;var Ar=De(),Ib=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Ar.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Ar.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ar.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Ar.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ar.WorkspaceDiagnosticRequest.partialResult,n)))}}};Xi.DiagnosticFeature=Ib});var Vp=J(Gi=>{"use strict";b();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.MonikerFeature=void 0;var Fb=De(),$b=e=>class extends e{get moniker(){return{on:t=>{let n=Fb.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Gi.MonikerFeature=$b});var rh=J(le=>{"use strict";b();var Vb=le&&le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Wb=le&&le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Xp=le&&le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Vb(n,t,r[i]);return Wb(n,t),n}})();Object.defineProperty(le,"__esModule",{value:!0});le._NotebooksImpl=le._LanguagesImpl=le.BulkUnregistration=le.BulkRegistration=le.ErrorMessageTracker=void 0;le.combineConsoleFeatures=Gp;le.combineTelemetryFeatures=Qp;le.combineTracerFeatures=Zp;le.combineClientFeatures=Yp;le.combineWindowFeatures=Kp;le.combineWorkspaceFeatures=eh;le.combineLanguagesFeatures=th;le.combineNotebooksFeatures=nh;le.combineFeatures=rv;le.createConnection=iv;var H=De(),st=Xp(Rc()),Lc=Xp(Mc()),ne=Tp(),Ub=Rp(),Hb=Op(),Bb=Mp(),zb=Dc(),Jb=Np(),Xb=Ep(),Gb=Ap(),Qb=Cp(),Zb=qp(),Yb=Ip(),Kb=Fp(),ev=$p(),tv=Tc(),nv=Vp();function qc(e){if(e!==null)return e}var Ic=class{_messages;constructor(){this._messages=Object.create(null)}add(t){let n=this._messages[t];n||(n=0),n++,this._messages[t]=n}sendErrors(t){Object.keys(this._messages).forEach(n=>{t.window.showErrorMessage(n)})}};le.ErrorMessageTracker=Ic;var Qi=class{_rawConnection;_connection;constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(H.MessageType.Error,t)}warn(t){this.send(H.MessageType.Warning,t)}info(t){this.send(H.MessageType.Info,t)}log(t){this.send(H.MessageType.Log,t)}debug(t){this.send(H.MessageType.Debug,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(H.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,H.RAL)().console.error("Sending log message failed")})}},Fc=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:H.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(H.ShowMessageRequest.type,r).then(qc)}showWarningMessage(t,...n){let r={type:H.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(H.ShowMessageRequest.type,r).then(qc)}showInformationMessage(t,...n){let r={type:H.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(H.ShowMessageRequest.type,r).then(qc)}},Wp=(0,Jb.ShowDocumentFeature)((0,ne.ProgressFeature)(Fc)),Up;(function(e){function t(){return new Zi}e.create=t})(Up||(le.BulkRegistration=Up={}));var Zi=class{_registrations=[];_registered=new Set;add(t,n){let r=st.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Lc.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},Hp;(function(e){function t(){return new Cr(void 0,[])}e.create=t})(Hp||(le.BulkUnregistration=Hp={}));var Cr=class{_connection;_unregistrations=new Map;constructor(t,n){this._connection=t,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(H.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=st.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(H.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},Yi=class{_connection;attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof Zi?this.registerMany(t):t instanceof Cr?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let i=st.string(n)?n:n.method,o=Lc.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(H.RegistrationRequest.type,s).then(a=>(t.add({id:o,method:i}),t),a=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=st.string(t)?t:t.method,i=Lc.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(H.RegistrationRequest.type,o).then(s=>H.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(H.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(H.RegistrationRequest.type,n).then(()=>new Cr(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},$c=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(i){return i&&!!i.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(H.ApplyWorkspaceEditRequest.type,r)}},Bp=(0,Xb.FileOperationsFeature)((0,Hb.WorkspaceFoldersFeature)((0,Ub.ConfigurationFeature)($c))),Ki=class{_trace;_connection;constructor(){this._trace=H.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==H.Trace.Off&&this.connection.sendNotification(H.LogTraceNotification.type,{message:t,verbose:this._trace===H.Trace.Verbose?n:void 0}).catch(()=>{})}},eo=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(H.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},to=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,ne.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,ne.attachPartialResult)(this.connection,n)}};le._LanguagesImpl=to;var zp=(0,Yb.FoldingRangeFeature)((0,nv.MonikerFeature)((0,ev.DiagnosticFeature)((0,Kb.InlayHintFeature)((0,Zb.InlineValueFeature)((0,Qb.TypeHierarchyFeature)((0,Gb.LinkedEditingRangeFeature)((0,zb.SemanticTokensFeature)((0,Bb.CallHierarchyFeature)(to))))))))),no=class{_connection;constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,ne.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,ne.attachPartialResult)(this.connection,n)}};le._NotebooksImpl=no;var Jp=(0,tv.NotebookSyncFeature)(no);function Gp(e,t){return function(n){return t(e(n))}}function Qp(e,t){return function(n){return t(e(n))}}function Zp(e,t){return function(n){return t(e(n))}}function Yp(e,t){return function(n){return t(e(n))}}function Kp(e,t){return function(n){return t(e(n))}}function eh(e,t){return function(n){return t(e(n))}}function th(e,t){return function(n){return t(e(n))}}function nh(e,t){return function(n){return t(e(n))}}function rv(e,t){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(e.console,t.console,Gp),tracer:n(e.tracer,t.tracer,Zp),telemetry:n(e.telemetry,t.telemetry,Qp),client:n(e.client,t.client,Yp),window:n(e.window,t.window,Kp),workspace:n(e.workspace,t.workspace,eh),languages:n(e.languages,t.languages,th),notebooks:n(e.notebooks,t.notebooks,nh)}}function iv(e,t,n){let r=n&&n.console?new(n.console(Qi)):new Qi,i=e(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(Ki)):new Ki,s=n&&n.telemetry?new(n.telemetry(eo)):new eo,a=n&&n.client?new(n.client(Yi)):new Yi,f=n&&n.window?new(n.window(Wp)):new Wp,c=n&&n.workspace?new(n.workspace(Bp)):new Bp,d=n&&n.languages?new(n.languages(zp)):new zp,v=n&&n.notebooks?new(n.notebooks(Jp)):new Jp,l=[r,o,s,a,f,c,d,v];function h(m){return m instanceof Promise?m:st.thenable(m)?new Promise((u,y)=>{m.then(S=>u(S),S=>y(S))}):Promise.resolve(m)}let _,x,D,T={listen:()=>i.listen(),sendRequest:(m,...u)=>i.sendRequest(st.string(m)?m:m.method,...u),onRequest:(m,u)=>i.onRequest(m,u),sendNotification:(m,u)=>{let y=st.string(m)?m:m.method;return i.sendNotification(y,u)},onNotification:(m,u)=>i.onNotification(m,u),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:m=>(x=m,{dispose:()=>{x=void 0}}),onInitialized:m=>i.onNotification(H.InitializedNotification.type,m),onShutdown:m=>(_=m,{dispose:()=>{_=void 0}}),onExit:m=>(D=m,{dispose:()=>{D=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return a},get window(){return f},get workspace(){return c},get languages(){return d},get notebooks(){return v},onDidChangeConfiguration:m=>i.onNotification(H.DidChangeConfigurationNotification.type,m),onDidChangeWatchedFiles:m=>i.onNotification(H.DidChangeWatchedFilesNotification.type,m),__textDocumentSync:void 0,onDidOpenTextDocument:m=>i.onNotification(H.DidOpenTextDocumentNotification.type,m),onDidChangeTextDocument:m=>i.onNotification(H.DidChangeTextDocumentNotification.type,m),onDidCloseTextDocument:m=>i.onNotification(H.DidCloseTextDocumentNotification.type,m),onWillSaveTextDocument:m=>i.onNotification(H.WillSaveTextDocumentNotification.type,m),onWillSaveTextDocumentWaitUntil:m=>i.onRequest(H.WillSaveTextDocumentWaitUntilRequest.type,m),onDidSaveTextDocument:m=>i.onNotification(H.DidSaveTextDocumentNotification.type,m),sendDiagnostics:m=>i.sendNotification(H.PublishDiagnosticsNotification.type,m),onHover:m=>i.onRequest(H.HoverRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),void 0)),onCompletion:m=>i.onRequest(H.CompletionRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onCompletionResolve:m=>i.onRequest(H.CompletionResolveRequest.type,m),onSignatureHelp:m=>i.onRequest(H.SignatureHelpRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),void 0)),onDeclaration:m=>i.onRequest(H.DeclarationRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onDefinition:m=>i.onRequest(H.DefinitionRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onTypeDefinition:m=>i.onRequest(H.TypeDefinitionRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onImplementation:m=>i.onRequest(H.ImplementationRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onReferences:m=>i.onRequest(H.ReferencesRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onDocumentHighlight:m=>i.onRequest(H.DocumentHighlightRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onDocumentSymbol:m=>i.onRequest(H.DocumentSymbolRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onWorkspaceSymbol:m=>i.onRequest(H.WorkspaceSymbolRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onWorkspaceSymbolResolve:m=>i.onRequest(H.WorkspaceSymbolResolveRequest.type,m),onCodeAction:m=>i.onRequest(H.CodeActionRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onCodeActionResolve:m=>i.onRequest(H.CodeActionResolveRequest.type,(u,y)=>m(u,y)),onCodeLens:m=>i.onRequest(H.CodeLensRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onCodeLensResolve:m=>i.onRequest(H.CodeLensResolveRequest.type,(u,y)=>m(u,y)),onDocumentFormatting:m=>i.onRequest(H.DocumentFormattingRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),void 0)),onDocumentRangeFormatting:m=>i.onRequest(H.DocumentRangeFormattingRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),void 0)),onDocumentOnTypeFormatting:m=>i.onRequest(H.DocumentOnTypeFormattingRequest.type,(u,y)=>m(u,y)),onRenameRequest:m=>i.onRequest(H.RenameRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),void 0)),onPrepareRename:m=>i.onRequest(H.PrepareRenameRequest.type,(u,y)=>m(u,y)),onDocumentLinks:m=>i.onRequest(H.DocumentLinkRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onDocumentLinkResolve:m=>i.onRequest(H.DocumentLinkResolveRequest.type,(u,y)=>m(u,y)),onDocumentColor:m=>i.onRequest(H.DocumentColorRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onColorPresentation:m=>i.onRequest(H.ColorPresentationRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onFoldingRanges:m=>i.onRequest(H.FoldingRangeRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onSelectionRanges:m=>i.onRequest(H.SelectionRangeRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),(0,ne.attachPartialResult)(i,u))),onExecuteCommand:m=>i.onRequest(H.ExecuteCommandRequest.type,(u,y)=>m(u,y,(0,ne.attachWorkDone)(i,u),void 0)),dispose:()=>i.dispose()};for(let m of l)m.attach(T);return i.onRequest(H.InitializeRequest.type,m=>{t.initialize(m),st.string(m.trace)&&(o.trace=H.Trace.fromString(m.trace));for(let u of l)u.initialize(m.capabilities);if(x){let u=x(m,new H.CancellationTokenSource().token,(0,ne.attachWorkDone)(i,m),void 0);return h(u).then(y=>{if(y instanceof H.ResponseError)return y;let S=y;S||(S={capabilities:{}});let M=S.capabilities;M||(M={},S.capabilities=M),M.textDocumentSync===void 0||M.textDocumentSync===null?M.textDocumentSync=st.number(T.__textDocumentSync)?T.__textDocumentSync:H.TextDocumentSyncKind.None:!st.number(M.textDocumentSync)&&!st.number(M.textDocumentSync.change)&&(M.textDocumentSync.change=st.number(T.__textDocumentSync)?T.__textDocumentSync:H.TextDocumentSyncKind.None);for(let P of l)P.fillServerCapabilities(M);return S})}else{let u={capabilities:{textDocumentSync:H.TextDocumentSyncKind.None}};for(let y of l)y.fillServerCapabilities(u.capabilities);return u}}),i.onRequest(H.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,_)return _(new H.CancellationTokenSource().token)}),i.onNotification(H.ExitNotification.type,()=>{try{if(D)return D()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),i.onNotification(H.SetTraceNotification.type,m=>{o.trace=H.Trace.fromString(m.value)}),T}});var Zn=J(Te=>{"use strict";b();var oh=Te&&Te.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ov=Te&&Te.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sh=Te&&Te.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&oh(n,t,r[i]);return ov(n,t),n}})(),ah=Te&&Te.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&oh(t,e,n)};Object.defineProperty(Te,"__esModule",{value:!0});Te.ProposedFeatures=Te.NotebookDocuments=Te.TextDocuments=Te.SemanticTokensBuilder=void 0;var sv=Dc();Object.defineProperty(Te,"SemanticTokensBuilder",{enumerable:!0,get:function(){return sv.SemanticTokensBuilder}});var av=sh(bp()),cv=sh(_p());ah(De(),Te);var uv=Pc();Object.defineProperty(Te,"TextDocuments",{enumerable:!0,get:function(){return uv.TextDocuments}});var lv=Tc();Object.defineProperty(Te,"NotebookDocuments",{enumerable:!0,get:function(){return lv.NotebookDocuments}});ah(rh(),Te);var ih;(function(e){e.all={__brand:"features",workspace:cv.TextDocumentContentFeature,languages:av.InlineCompletionFeature}})(ih||(Te.ProposedFeatures=ih={}))});var uh=J(gn=>{"use strict";b();Object.defineProperty(gn,"__esModule",{value:!0});gn.PromiseImpl=gn.QueueMicrotaskImpl=void 0;var Dt=Mt(),Vc=class e extends Dt.AbstractMessageBuffer{static emptyBuffer=new Uint8Array(0);asciiDecoder;constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(t,n){return new TextEncoder().encode(t)}toString(t,n){return n==="ascii"?this.asciiDecoder.decode(t):new TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t:t.slice(0,n)}allocNative(t){return new Uint8Array(t)}},Wc=class{socket;_onData;_messageListener;constructor(t){this.socket=t,this._onData=new Dt.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,Dt.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),Dt.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),Dt.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),Dt.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},Uc=class{socket;constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),Dt.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),Dt.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),Dt.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,n){if(typeof t=="string"){if(n!==void 0&&n!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${n}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}},ro=class{isDisposed;constructor(t,...n){this.isDisposed=!1,queueMicrotask(()=>{this.isDisposed||t(...n)})}dispose(){this.isDisposed=!0}};gn.QueueMicrotaskImpl=ro;var io=class{isDisposed;constructor(t,...n){this.isDisposed=!1,Promise.resolve().then(()=>{this.isDisposed||t(...n)},()=>{})}dispose(){this.isDisposed=!0}};gn.PromiseImpl=io;var fv=new TextEncoder,ch=Object.freeze({messageBuffer:Object.freeze({create:e=>new Vc(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if(t.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(fv.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new Wc(e),asWritableStream:e=>new Uc(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){if(typeof globalThis.queueMicrotask=="function")return new ro(e,...t);if(Promise!==void 0)return new io(e,...t);{let n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function Hc(){return ch}(function(e){function t(){Dt.RAL.install(ch)}e.install=t})(Hc||(Hc={}));gn.default=Hc});var Jc=J(Ze=>{"use strict";b();var dv=Ze&&Ze.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),pv=Ze&&Ze.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&dv(t,e,n)},hv=Ze&&Ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.BrowserMessageWriter=Ze.BrowserMessageReader=void 0;Ze.createMessageConnection=mv;var gv=hv(uh());gv.default.install();var Yn=Mt();pv(Mt(),Ze);var Bc=class extends Yn.AbstractMessageReader{_onData;_messageListener;constructor(t){super(),this._onData=new Yn.Emitter,this._messageListener=n=>{this._onData.fire(n.data)},t.addEventListener("error",n=>this.fireError(n)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}};Ze.BrowserMessageReader=Bc;var zc=class extends Yn.AbstractMessageWriter{port;errorCount;constructor(t){super(),this.port=t,this.errorCount=0,t.addEventListener("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};Ze.BrowserMessageWriter=zc;function mv(e,t,n,r){return n===void 0&&(n=Yn.NullLogger),Yn.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Yn.createMessageConnection)(e,t,n,r)}});var fh=J(Ct=>{"use strict";b();var yv=Ct&&Ct.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lh=Ct&&Ct.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&yv(t,e,n)};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.createProtocolConnection=vv;var bv=Jc();lh(Jc(),Ct);lh(De(),Ct);function vv(e,t,n,r){return(0,bv.createMessageConnection)(e,t,n,r)}});var hh=J(jt=>{"use strict";b();var _v=jt&&jt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ph=jt&&jt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_v(t,e,n)};Object.defineProperty(jt,"__esModule",{value:!0});jt.createConnection=Dv;var oo=Zn();ph(fh(),jt);ph(Zn(),jt);var dh=!1,wv={initialize:e=>{},get shutdownReceived(){return dh},set shutdownReceived(e){dh=e},exit:e=>{}};function Dv(e,t,n,r){let i,o,s,a;e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=n,n=r),oo.ConnectionStrategy.is(e)||oo.ConnectionOptions.is(e)?a=e:(o=e,s=t,a=n);let f=c=>(0,oo.createProtocolConnection)(o,s,c,a);return(0,oo.createConnection)(f,wv,i)}});function co(e,t){if(t instanceof Error){let n=t;return`${e}: ${n.message}
12
+ ${n.stack}`}else{if(typeof t=="string")return`${e}: ${t}`;if(t)return`${e}: ${t.toString()}`}return e}function en(e,t,n,r,i){return new Promise(o=>{e.timer.setImmediate(()=>{if(i.isCancellationRequested){o(so());return}return t().then(s=>{if(i.isCancellationRequested){o(so());return}else o(s)},s=>{console.error(co(r,s)),o(n)})})})}function mn(e,t,n,r,i){return new Promise(o=>{e.timer.setImmediate(()=>{if(i.isCancellationRequested)o(so());else try{let s=t();if(i.isCancellationRequested){o(so());return}else o(s)}catch(s){console.error(co(r,s)),o(n)}})})}function so(){return console.log("cancelled"),new ao.ResponseError(ao.LSPErrorCodes.RequestCancelled,"Request cancelled")}var ao,Xc=oe(()=>{"use strict";b();ao=zr(Zn())});function mh(e,t,n,r){let i={},s=[];e.onDidChangeContent(c=>{f(c.document)},void 0,s),e.onDidClose(c=>{a(c.document),t.sendDiagnostics({uri:c.document.uri,diagnostics:[]})},void 0,s);function a(c){let d=i[c.uri];d&&(d.dispose(),delete i[c.uri])}function f(c){a(c);let d=i[c.uri]=n.timer.setTimeout(async()=>{if(d===i[c.uri])try{let v=await r(c);d===i[c.uri]&&t.sendDiagnostics({uri:c.uri,diagnostics:v}),delete i[c.uri]}catch(v){t.console.error(co(`Error while validating ${c.uri}`,v))}},500)}return{requestRefresh:()=>{e.all().forEach(f)},dispose:()=>{s.forEach(d=>d.dispose()),s.length=0;let c=Object.keys(i);for(let d of c)i[d].dispose(),delete i[d]}}}function yh(e,t,n,r){function i(a){return{kind:gh.DocumentDiagnosticReportKind.Full,items:a}}let o=t.languages.diagnostics.on(async(a,f)=>en(n,async()=>{let c=e.get(a.textDocument.uri);return i(c?await r(c):[])},i([]),`Error while computing diagnostics for ${a.textDocument.uri}`,f));function s(){t.languages.diagnostics.refresh()}return{requestRefresh:s,dispose:()=>{o.dispose()}}}var gh,bh=oe(()=>{"use strict";b();gh=zr(Zn());Xc()});function er(e,t=!1){let n=e.length,r=0,i="",o=0,s=16,a=0,f=0,c=0,d=0,v=0;function l(u,y){let S=0,M=0;for(;S<u||!y;){let P=e.charCodeAt(r);if(P>=48&&P<=57)M=M*16+P-48;else if(P>=65&&P<=70)M=M*16+P-65+10;else if(P>=97&&P<=102)M=M*16+P-97+10;else break;r++,S++}return S<u&&(M=-1),M}function h(u){r=u,i="",o=0,s=16,v=0}function _(){let u=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&Kn(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&Kn(e.charCodeAt(r)))for(r++;r<e.length&&Kn(e.charCodeAt(r));)r++;else return v=3,e.substring(u,r);let y=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&Kn(e.charCodeAt(r))){for(r++;r<e.length&&Kn(e.charCodeAt(r));)r++;y=r}else v=3;return e.substring(u,y)}function x(){let u="",y=r;for(;;){if(r>=n){u+=e.substring(y,r),v=2;break}let S=e.charCodeAt(r);if(S===34){u+=e.substring(y,r),r++;break}if(S===92){if(u+=e.substring(y,r),r++,r>=n){v=2;break}switch(e.charCodeAt(r++)){case 34:u+='"';break;case 92:u+="\\";break;case 47:u+="/";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+=`
13
+ `;break;case 114:u+="\r";break;case 116:u+=" ";break;case 117:let P=l(4,!0);P>=0?u+=String.fromCharCode(P):v=4;break;default:v=5}y=r;continue}if(S>=0&&S<=31)if(jr(S)){u+=e.substring(y,r),v=2;break}else v=6;r++}return u}function D(){if(i="",v=0,o=r,f=a,d=c,r>=n)return o=n,s=17;let u=e.charCodeAt(r);if(Gc(u)){do r++,i+=String.fromCharCode(u),u=e.charCodeAt(r);while(Gc(u));return s=15}if(jr(u))return r++,i+=String.fromCharCode(u),u===13&&e.charCodeAt(r)===10&&(r++,i+=`
14
+ `),a++,c=r,s=14;switch(u){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,i=x(),s=10;case 47:let y=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!jr(e.charCodeAt(r));)r++;return i=e.substring(y,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;let S=n-1,M=!1;for(;r<S;){let P=e.charCodeAt(r);if(P===42&&e.charCodeAt(r+1)===47){r+=2,M=!0;break}r++,jr(P)&&(P===13&&e.charCodeAt(r)===10&&r++,a++,c=r)}return M||(r++,v=1),i=e.substring(y,r),s=13}return i+=String.fromCharCode(u),r++,s=16;case 45:if(i+=String.fromCharCode(u),r++,r===n||!Kn(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=_(),s=11;default:for(;r<n&&T(u);)r++,u=e.charCodeAt(r);if(o!==r){switch(i=e.substring(o,r),i){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return i+=String.fromCharCode(u),r++,s=16}}function T(u){if(Gc(u)||jr(u))return!1;switch(u){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function m(){let u;do u=D();while(u>=12&&u<=15);return u}return{setPosition:h,getPosition:()=>r,scan:t?m:D,getToken:()=>s,getTokenValue:()=>i,getTokenOffset:()=>o,getTokenLength:()=>r-o,getTokenStartLine:()=>f,getTokenStartCharacter:()=>o-d,getTokenError:()=>v}}function Gc(e){return e===32||e===9}function jr(e){return e===10||e===13}function Kn(e){return e>=48&&e<=57}var vh,uo=oe(()=>{"use strict";b();(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(vh||(vh={}))});var tt,tr,Qc,_h,wh=oe(()=>{"use strict";b();tt=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),tr=200,Qc={" ":{"\n":new Array(tr).fill(0).map((e,t)=>`
15
+ `+" ".repeat(t)),"\r":new Array(tr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(tr).fill(0).map((e,t)=>`\r
16
+ `+" ".repeat(t))}," ":{"\n":new Array(tr).fill(0).map((e,t)=>`
17
+ `+" ".repeat(t)),"\r":new Array(tr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(tr).fill(0).map((e,t)=>`\r
18
+ `+" ".repeat(t))}},_h=[`
19
+ `,"\r",`\r
20
+ `]});function Yc(e,t,n){let r,i,o,s,a;if(t){for(s=t.offset,a=s+t.length,o=s;o>0&&!Zc(e,o-1);)o--;let S=a;for(;S<e.length&&!Zc(e,S);)S++;i=e.substring(o,S),r=Pv(i,n)}else i=e,r=0,o=0,s=0,a=e.length;let f=Sv(n,e),c=_h.includes(f),d=0,v=0,l;n.insertSpaces?l=tt[n.tabSize||4]??nr(tt[1],n.tabSize||4):l=" ";let h=l===" "?" ":" ",_=er(i,!1),x=!1;function D(){if(d>1)return nr(f,d)+nr(l,r+v);let S=l.length*(r+v);return!c||S>Qc[h][f].length?f+nr(l,r+v):S<=0?f:Qc[h][f][S]}function T(){let S=_.scan();for(d=0;S===15||S===14;)S===14&&n.keepLines?d+=1:S===14&&(d=1),S=_.scan();return x=S===16||_.getTokenError()!==0,S}let m=[];function u(S,M,P){!x&&(!t||M<a&&P>s)&&e.substring(M,P)!==S&&m.push({offset:M,length:P-M,content:S})}let y=T();if(n.keepLines&&d>0&&u(nr(f,d),0,0),y!==17){let S=_.getTokenOffset()+o,M=l.length*r<20&&n.insertSpaces?tt[l.length*r]:nr(l,r);u(M,o,S)}for(;y!==17;){let S=_.getTokenOffset()+_.getTokenLength()+o,M=T(),P="",B=!1;for(;d===0&&(M===12||M===13);){let A=_.getTokenOffset()+o;u(tt[1],S,A),S=_.getTokenOffset()+_.getTokenLength()+o,B=M===12,P=B?D():"",M=T()}if(M===2)y!==1&&v--,n.keepLines&&d>0||!n.keepLines&&y!==1?P=D():n.keepLines&&(P=tt[1]);else if(M===4)y!==3&&v--,n.keepLines&&d>0||!n.keepLines&&y!==3?P=D():n.keepLines&&(P=tt[1]);else{switch(y){case 3:case 1:v++,n.keepLines&&d>0||!n.keepLines?P=D():P=tt[1];break;case 5:n.keepLines&&d>0||!n.keepLines?P=D():P=tt[1];break;case 12:P=D();break;case 13:d>0?P=D():B||(P=tt[1]);break;case 6:n.keepLines&&d>0?P=D():B||(P=tt[1]);break;case 10:n.keepLines&&d>0?P=D():M===6&&!B&&(P="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&d>0?P=D():(M===12||M===13)&&!B?P=tt[1]:M!==5&&M!==17&&(x=!0);break;case 16:x=!0;break}d>0&&(M===12||M===13)&&(P=D())}M===17&&(n.keepLines&&d>0?P=D():P=n.insertFinalNewline?f:"");let Z=_.getTokenOffset()+o;u(P,S,Z),y=M}return m}function nr(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function Pv(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let o=e.charAt(n);if(o===tt[1])r++;else if(o===" ")r+=i;else break;n++}return Math.floor(r/i)}function Sv(e,t){for(let n=0;n<t.length;n++){let r=t.charAt(n);if(r==="\r")return n+1<t.length&&t.charAt(n+1)===`
21
+ `?`\r
22
+ `:"\r";if(r===`
23
+ `)return`
24
+ `}return e&&e.eol||`
25
+ `}function Zc(e,t){return`\r
26
+ `.indexOf(e.charAt(t))!==-1}var Kc=oe(()=>{"use strict";b();uo();wh()});function Dh(e,t=[],n=lo.DEFAULT){let r=null,i=[],o=[];function s(f){Array.isArray(i)?i.push(f):r!==null&&(i[r]=f)}return xh(e,{onObjectBegin:()=>{let f={};s(f),o.push(i),i=f,r=null},onObjectProperty:f=>{r=f},onObjectEnd:()=>{i=o.pop()},onArrayBegin:()=>{let f=[];s(f),o.push(i),i=f,r=null},onArrayEnd:()=>{i=o.pop()},onLiteralValue:s,onError:(f,c,d)=>{t.push({error:f,offset:c,length:d})}},n),i[0]}function eu(e){if(!e.parent||!e.parent.children)return[];let t=eu(e.parent);if(e.parent.type==="property"){let n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){let n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function fo(e){switch(e.type){case"array":return e.children.map(fo);case"object":let t=Object.create(null);for(let n of e.children){let r=n.children[1];r&&(t[n.children[0].value]=fo(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Tv(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function tu(e,t,n=!1){if(Tv(e,t,n)){let r=e.children;if(Array.isArray(r))for(let i=0;i<r.length&&r[i].offset<=t;i++){let o=tu(r[i],t,n);if(o)return o}return e}}function xh(e,t,n=lo.DEFAULT){let r=er(e,!1),i=[],o=0;function s(C){return C?()=>o===0&&C(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(C){return C?N=>o===0&&C(N,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function f(C){return C?N=>o===0&&C(N,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function c(C){return C?()=>{o>0?o++:C(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(o=1)}:()=>!0}function d(C){return C?()=>{o>0&&o--,o===0&&C(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let v=c(t.onObjectBegin),l=f(t.onObjectProperty),h=d(t.onObjectEnd),_=c(t.onArrayBegin),x=d(t.onArrayEnd),D=f(t.onLiteralValue),T=a(t.onSeparator),m=s(t.onComment),u=a(t.onError),y=n&&n.disallowComments,S=n&&n.allowTrailingComma;function M(){for(;;){let C=r.scan();switch(r.getTokenError()){case 4:P(14);break;case 5:P(15);break;case 3:P(13);break;case 1:y||P(11);break;case 2:P(12);break;case 6:P(16);break}switch(C){case 12:case 13:y?P(10):m();break;case 16:P(1);break;case 15:case 14:break;default:return C}}}function P(C,N=[],F=[]){if(u(C),N.length+F.length>0){let $=r.getToken();for(;$!==17;){if(N.indexOf($)!==-1){M();break}else if(F.indexOf($)!==-1)break;$=M()}}}function B(C){let N=r.getTokenValue();return C?D(N):(l(N),i.push(N)),M(),!0}function Z(){switch(r.getToken()){case 11:let C=r.getTokenValue(),N=Number(C);isNaN(N)&&(P(2),N=0),D(N);break;case 7:D(null);break;case 8:D(!0);break;case 9:D(!1);break;default:return!1}return M(),!0}function A(){return r.getToken()!==10?(P(3,[],[2,5]),!1):(B(!1),r.getToken()===6?(T(":"),M(),L()||P(4,[],[2,5])):P(5,[],[2,5]),i.pop(),!0)}function k(){v(),M();let C=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(C||P(4,[],[]),T(","),M(),r.getToken()===2&&S)break}else C&&P(6,[],[]);A()||P(4,[],[2,5]),C=!0}return h(),r.getToken()!==2?P(7,[2],[]):M(),!0}function g(){_(),M();let C=!0,N=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(N||P(4,[],[]),T(","),M(),r.getToken()===4&&S)break}else N&&P(6,[],[]);C?(i.push(0),C=!1):i[i.length-1]++,L()||P(4,[],[4,5]),N=!0}return x(),C||i.pop(),r.getToken()!==4?P(8,[4],[]):M(),!0}function L(){switch(r.getToken()){case 3:return g();case 1:return k();case 10:return B(!0);default:return Z()}}return M(),r.getToken()===17?n.allowEmptyContent?!0:(P(4,[],[]),!1):L()?(r.getToken()!==17&&P(9,[],[]),!0):(P(4,[],[]),!1)}var lo,nu=oe(()=>{"use strict";b();uo();(function(e){e.DEFAULT={allowTrailingComma:!1}})(lo||(lo={}))});var Ph=oe(()=>{"use strict";b();Kc();nu()});function Eh(e,t,n){return Yc(e,t,n)}var at,Sh,kh,Rh,Oh,Mh,Nh,Th,tn=oe(()=>{"use strict";b();Kc();Ph();uo();nu();at=er;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Sh||(Sh={}));(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(kh||(kh={}));Rh=Dh,Oh=tu,Mh=eu,Nh=fo;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Th||(Th={}))});function yn(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!yn(e[n],t[n]))return!1}else{let i=[];for(r in e)i.push(r);i.sort();let o=[];for(r in t)o.push(r);if(o.sort(),!yn(i,o))return!1;for(n=0;n<i.length;n++)if(!yn(e[i[n]],t[i[n]]))return!1}return!0}function qe(e){return typeof e=="number"}function nt(e){return typeof e<"u"}function ct(e){return typeof e=="boolean"}function po(e){return typeof e=="string"}function xt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var qr=oe(()=>{"use strict";b()});function Ev(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function nn(e,t){let n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0?e===t:!1}function bn(e){let t="";Ev(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}function iu(e){let t=0;for(let n=0;n<e.length;n++){t++;let r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}var Lr=oe(()=>{"use strict";b()});var ou,su,Ch,ho,fe,Y,rn,jh,go,au,cu,vn,uu,lu,He,qh,Lh,ut,_n,Je,fu,rr,Ih,mo,du,pu,hu,yo,Fh,gu,mu,$h,qt,ir,Be,xe,yu,Vh,Wh,Uh,Ir,bu,Fr,vu,Hh,Bh,_u,wu,lt,zh,Du,Jh,xu,Pu,bo,Su,ku,Xh,Gh,Tu,or,Qh,Zh,Yh,Kh,eg,tg,ng,Ru,Ou,rg,ig,og,sg,ag,cg,ug,lg,fg,Mu,O,Nu=oe(()=>{"use strict";b();(function(e){function t(n){return typeof n=="string"}e.is=t})(ou||(ou={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(su||(su={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Ch||(Ch={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(ho||(ho={}));(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=ho.MAX_VALUE),i===Number.MAX_VALUE&&(i=ho.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.uinteger(i.line)&&O.uinteger(i.character)}e.is=n})(fe||(fe={}));(function(e){function t(r,i,o,s){if(O.uinteger(r)&&O.uinteger(i)&&O.uinteger(o)&&O.uinteger(s))return{start:fe.create(r,i),end:fe.create(o,s)};if(fe.is(r)&&fe.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${o}, ${s}]`)}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&fe.is(i.start)&&fe.is(i.end)}e.is=n})(Y||(Y={}));(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&Y.is(i.range)&&(O.string(i.uri)||O.undefined(i.uri))}e.is=n})(rn||(rn={}));(function(e){function t(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&Y.is(i.targetRange)&&O.string(i.targetUri)&&Y.is(i.targetSelectionRange)&&(Y.is(i.originSelectionRange)||O.undefined(i.originSelectionRange))}e.is=n})(jh||(jh={}));(function(e){function t(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.numberRange(i.red,0,1)&&O.numberRange(i.green,0,1)&&O.numberRange(i.blue,0,1)&&O.numberRange(i.alpha,0,1)}e.is=n})(go||(go={}));(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&Y.is(i.range)&&go.is(i.color)}e.is=n})(au||(au={}));(function(e){function t(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.string(i.label)&&(O.undefined(i.textEdit)||Je.is(i))&&(O.undefined(i.additionalTextEdits)||O.typedArray(i.additionalTextEdits,Je.is))}e.is=n})(cu||(cu={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(vn||(vn={}));(function(e){function t(r,i,o,s,a,f){let c={startLine:r,endLine:i};return O.defined(o)&&(c.startCharacter=o),O.defined(s)&&(c.endCharacter=s),O.defined(a)&&(c.kind=a),O.defined(f)&&(c.collapsedText=f),c}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.uinteger(i.startLine)&&O.uinteger(i.startLine)&&(O.undefined(i.startCharacter)||O.uinteger(i.startCharacter))&&(O.undefined(i.endCharacter)||O.uinteger(i.endCharacter))&&(O.undefined(i.kind)||O.string(i.kind))}e.is=n})(uu||(uu={}));(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&rn.is(i.location)&&O.string(i.message)}e.is=n})(lu||(lu={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(He||(He={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(qh||(qh={}));(function(e){function t(n){let r=n;return O.objectLiteral(r)&&O.string(r.href)}e.is=t})(Lh||(Lh={}));(function(e){function t(r,i,o,s,a,f){let c={range:r,message:i};return O.defined(o)&&(c.severity=o),O.defined(s)&&(c.code=s),O.defined(a)&&(c.source=a),O.defined(f)&&(c.relatedInformation=f),c}e.create=t;function n(r){var i;let o=r;return O.defined(o)&&Y.is(o.range)&&O.string(o.message)&&(O.number(o.severity)||O.undefined(o.severity))&&(O.integer(o.code)||O.string(o.code)||O.undefined(o.code))&&(O.undefined(o.codeDescription)||O.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(O.string(o.source)||O.undefined(o.source))&&(O.undefined(o.relatedInformation)||O.typedArray(o.relatedInformation,lu.is))}e.is=n})(ut||(ut={}));(function(e){function t(r,i,...o){let s={title:r,command:i};return O.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.title)&&O.string(i.command)}e.is=n})(_n||(_n={}));(function(e){function t(o,s){return{range:o,newText:s}}e.replace=t;function n(o,s){return{range:{start:o,end:o},newText:s}}e.insert=n;function r(o){return{range:o,newText:""}}e.del=r;function i(o){let s=o;return O.objectLiteral(s)&&O.string(s.newText)&&Y.is(s.range)}e.is=i})(Je||(Je={}));(function(e){function t(r,i,o){let s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&O.string(i.label)&&(O.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(O.string(i.description)||i.description===void 0)}e.is=n})(fu||(fu={}));(function(e){function t(n){let r=n;return O.string(r)}e.is=t})(rr||(rr={}));(function(e){function t(o,s,a){return{range:o,newText:s,annotationId:a}}e.replace=t;function n(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}e.insert=n;function r(o,s){return{range:o,newText:"",annotationId:s}}e.del=r;function i(o){let s=o;return Je.is(s)&&(fu.is(s.annotationId)||rr.is(s.annotationId))}e.is=i})(Ih||(Ih={}));(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&mu.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(mo||(mo={}));(function(e){function t(r,i,o){let s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&O.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||O.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||O.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||rr.is(i.annotationId))}e.is=n})(du||(du={}));(function(e){function t(r,i,o,s){let a={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&O.string(i.oldUri)&&O.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||O.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||O.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||rr.is(i.annotationId))}e.is=n})(pu||(pu={}));(function(e){function t(r,i,o){let s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&O.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||O.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||O.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||rr.is(i.annotationId))}e.is=n})(hu||(hu={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>O.string(i.kind)?du.is(i)||pu.is(i)||hu.is(i):mo.is(i)))}e.is=t})(yo||(yo={}));(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.uri)}e.is=n})(Fh||(Fh={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.uri)&&O.integer(i.version)}e.is=n})(gu||(gu={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.uri)&&(i.version===null||O.integer(i.version))}e.is=n})(mu||(mu={}));(function(e){function t(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.string(i.uri)&&O.string(i.languageId)&&O.integer(i.version)&&O.string(i.text)}e.is=n})($h||($h={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(qt||(qt={}));(function(e){function t(n){let r=n;return O.objectLiteral(n)&&qt.is(r.kind)&&O.string(r.value)}e.is=t})(ir||(ir={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Be||(Be={}));(function(e){e.PlainText=1,e.Snippet=2})(xe||(xe={}));(function(e){e.Deprecated=1})(yu||(yu={}));(function(e){function t(r,i,o){return{newText:r,insert:i,replace:o}}e.create=t;function n(r){let i=r;return i&&O.string(i.newText)&&Y.is(i.insert)&&Y.is(i.replace)}e.is=n})(Vh||(Vh={}));(function(e){e.asIs=1,e.adjustIndentation=2})(Wh||(Wh={}));(function(e){function t(n){let r=n;return r&&(O.string(r.detail)||r.detail===void 0)&&(O.string(r.description)||r.description===void 0)}e.is=t})(Uh||(Uh={}));(function(e){function t(n){return{label:n}}e.create=t})(Ir||(Ir={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(bu||(bu={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let i=r;return O.string(i)||O.objectLiteral(i)&&O.string(i.language)&&O.string(i.value)}e.is=n})(Fr||(Fr={}));(function(e){function t(n){let r=n;return!!r&&O.objectLiteral(r)&&(ir.is(r.contents)||Fr.is(r.contents)||O.typedArray(r.contents,Fr.is))&&(n.range===void 0||Y.is(n.range))}e.is=t})(vu||(vu={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Hh||(Hh={}));(function(e){function t(n,r,...i){let o={label:n};return O.defined(r)&&(o.documentation=r),O.defined(i)?o.parameters=i:o.parameters=[],o}e.create=t})(Bh||(Bh={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(_u||(_u={}));(function(e){function t(n,r){let i={range:n};return O.number(r)&&(i.kind=r),i}e.create=t})(wu||(wu={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(lt||(lt={}));(function(e){e.Deprecated=1})(zh||(zh={}));(function(e){function t(n,r,i,o,s){let a={name:n,kind:r,location:{uri:o,range:i}};return s&&(a.containerName=s),a}e.create=t})(Du||(Du={}));(function(e){function t(n,r,i,o){return o!==void 0?{name:n,kind:r,location:{uri:i,range:o}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(Jh||(Jh={}));(function(e){function t(r,i,o,s,a,f){let c={name:r,detail:i,kind:o,range:s,selectionRange:a};return f!==void 0&&(c.children=f),c}e.create=t;function n(r){let i=r;return i&&O.string(i.name)&&O.number(i.kind)&&Y.is(i.range)&&Y.is(i.selectionRange)&&(i.detail===void 0||O.string(i.detail))&&(i.deprecated===void 0||O.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(xu||(xu={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Pu||(Pu={}));(function(e){e.Invoked=1,e.Automatic=2})(bo||(bo={}));(function(e){function t(r,i,o){let s={diagnostics:r};return i!=null&&(s.only=i),o!=null&&(s.triggerKind=o),s}e.create=t;function n(r){let i=r;return O.defined(i)&&O.typedArray(i.diagnostics,ut.is)&&(i.only===void 0||O.typedArray(i.only,O.string))&&(i.triggerKind===void 0||i.triggerKind===bo.Invoked||i.triggerKind===bo.Automatic)}e.is=n})(Su||(Su={}));(function(e){function t(r,i,o){let s={title:r},a=!0;return typeof i=="string"?(a=!1,s.kind=i):_n.is(i)?s.command=i:s.edit=i,a&&o!==void 0&&(s.kind=o),s}e.create=t;function n(r){let i=r;return i&&O.string(i.title)&&(i.diagnostics===void 0||O.typedArray(i.diagnostics,ut.is))&&(i.kind===void 0||O.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||_n.is(i.command))&&(i.isPreferred===void 0||O.boolean(i.isPreferred))&&(i.edit===void 0||yo.is(i.edit))}e.is=n})(ku||(ku={}));(function(e){function t(r,i){let o={range:r};return O.defined(i)&&(o.data=i),o}e.create=t;function n(r){let i=r;return O.defined(i)&&Y.is(i.range)&&(O.undefined(i.command)||_n.is(i.command))}e.is=n})(Xh||(Xh={}));(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&O.uinteger(i.tabSize)&&O.boolean(i.insertSpaces)}e.is=n})(Gh||(Gh={}));(function(e){function t(r,i,o){return{range:r,target:i,data:o}}e.create=t;function n(r){let i=r;return O.defined(i)&&Y.is(i.range)&&(O.undefined(i.target)||O.string(i.target))}e.is=n})(Tu||(Tu={}));(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&Y.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(or||(or={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Qh||(Qh={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Zh||(Zh={}));(function(e){function t(n){let r=n;return O.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Yh||(Yh={}));(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){let i=r;return i!=null&&Y.is(i.range)&&O.string(i.text)}e.is=n})(Kh||(Kh={}));(function(e){function t(r,i,o){return{range:r,variableName:i,caseSensitiveLookup:o}}e.create=t;function n(r){let i=r;return i!=null&&Y.is(i.range)&&O.boolean(i.caseSensitiveLookup)&&(O.string(i.variableName)||i.variableName===void 0)}e.is=n})(eg||(eg={}));(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){let i=r;return i!=null&&Y.is(i.range)&&(O.string(i.expression)||i.expression===void 0)}e.is=n})(tg||(tg={}));(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){let i=r;return O.defined(i)&&Y.is(r.stoppedLocation)}e.is=n})(ng||(ng={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Ru||(Ru={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&(i.tooltip===void 0||O.string(i.tooltip)||ir.is(i.tooltip))&&(i.location===void 0||rn.is(i.location))&&(i.command===void 0||_n.is(i.command))}e.is=n})(Ou||(Ou={}));(function(e){function t(r,i,o){let s={position:r,label:i};return o!==void 0&&(s.kind=o),s}e.create=t;function n(r){let i=r;return O.objectLiteral(i)&&fe.is(i.position)&&(O.string(i.label)||O.typedArray(i.label,Ou.is))&&(i.kind===void 0||Ru.is(i.kind))&&i.textEdits===void 0||O.typedArray(i.textEdits,Je.is)&&(i.tooltip===void 0||O.string(i.tooltip)||ir.is(i.tooltip))&&(i.paddingLeft===void 0||O.boolean(i.paddingLeft))&&(i.paddingRight===void 0||O.boolean(i.paddingRight))}e.is=n})(rg||(rg={}));(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(ig||(ig={}));(function(e){function t(n,r,i,o){return{insertText:n,filterText:r,range:i,command:o}}e.create=t})(og||(og={}));(function(e){function t(n){return{items:n}}e.create=t})(sg||(sg={}));(function(e){e.Invoked=0,e.Automatic=1})(ag||(ag={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(cg||(cg={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(ug||(ug={}));(function(e){function t(n){let r=n;return O.objectLiteral(r)&&su.is(r.uri)&&O.string(r.name)}e.is=t})(lg||(lg={}));(function(e){function t(o,s,a,f){return new Mu(o,s,a,f)}e.create=t;function n(o){let s=o;return!!(O.defined(s)&&O.string(s.uri)&&(O.undefined(s.languageId)||O.string(s.languageId))&&O.uinteger(s.lineCount)&&O.func(s.getText)&&O.func(s.positionAt)&&O.func(s.offsetAt))}e.is=n;function r(o,s){let a=o.getText(),f=i(s,(d,v)=>{let l=d.range.start.line-v.range.start.line;return l===0?d.range.start.character-v.range.start.character:l}),c=a.length;for(let d=f.length-1;d>=0;d--){let v=f[d],l=o.offsetAt(v.range.start),h=o.offsetAt(v.range.end);if(h<=c)a=a.substring(0,l)+v.newText+a.substring(h,a.length);else throw new Error("Overlapping edit");c=l}return a}e.applyEdits=r;function i(o,s){if(o.length<=1)return o;let a=o.length/2|0,f=o.slice(0,a),c=o.slice(a);i(f,s),i(c,s);let d=0,v=0,l=0;for(;d<f.length&&v<c.length;)s(f[d],c[v])<=0?o[l++]=f[d++]:o[l++]=c[v++];for(;d<f.length;)o[l++]=f[d++];for(;v<c.length;)o[l++]=c[v++];return o}})(fg||(fg={}));Mu=class{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(t.push(i),r=!1);let o=n.charAt(i);r=o==="\r"||o===`
27
+ `,o==="\r"&&i+1<n.length&&n.charAt(i+1)===`
28
+ `&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return fe.create(0,t);for(;r<i;){let s=Math.floor((r+i)/2);n[s]>t?i=s:r=s+1}let o=r-1;return fe.create(o,t-n[o])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(e){let t=Object.prototype.toString;function n(h){return typeof h<"u"}e.defined=n;function r(h){return typeof h>"u"}e.undefined=r;function i(h){return h===!0||h===!1}e.boolean=i;function o(h){return t.call(h)==="[object String]"}e.string=o;function s(h){return t.call(h)==="[object Number]"}e.number=s;function a(h,_,x){return t.call(h)==="[object Number]"&&_<=h&&h<=x}e.numberRange=a;function f(h){return t.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}e.integer=f;function c(h){return t.call(h)==="[object Number]"&&0<=h&&h<=2147483647}e.uinteger=c;function d(h){return t.call(h)==="[object Function]"}e.func=d;function v(h){return h!==null&&typeof h=="object"}e.objectLiteral=v;function l(h,_){return Array.isArray(h)&&h.every(_)}e.typedArray=l})(O||(O={}))});function Eu(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Eu(r,t),Eu(i,t);let o=0,s=0,a=0;for(;o<r.length&&s<i.length;)t(r[o],i[s])<=0?e[a++]=r[o++]:e[a++]=i[s++];for(;o<r.length;)e[a++]=r[o++];for(;s<i.length;)e[a++]=i[s++];return e}function dg(e,t,n=0){let r=t?[n]:[];for(let i=0;i<e.length;i++){let o=e.charCodeAt(i);pg(o)&&(o===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function pg(e){return e===13||e===10}function hg(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Av(e){let t=hg(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var vo,ze,gg=oe(()=>{"use strict";b();vo=class e{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let i=hg(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let a=Math.max(i.start.line,0),f=Math.max(i.end.line,0),c=this._lineOffsets,d=dg(r.text,!1,o);if(f-a===d.length)for(let l=0,h=d.length;l<h;l++)c[l+a+1]=d[l];else d.length<1e4?c.splice(a+1,f-a,...d):this._lineOffsets=c=c.slice(0,a+1).concat(d,c.slice(f+1));let v=r.text.length-(s-o);if(v!==0)for(let l=a+1+d.length,h=c.length;l<h;l++)c[l]=c[l]+v}else if(e.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=dg(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:t};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>t?i=s:r=s+1}let o=r-1;return t=this.ensureBeforeEOL(t,n[o]),{line:o,character:t-n[o]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let i=t.line+1<n.length?n[t.line+1]:this._content.length,o=Math.min(r+t.character,i);return this.ensureBeforeEOL(o,r)}ensureBeforeEOL(t,n){for(;t>n&&pg(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(i,o,s,a){return new vo(i,o,s,a)}e.create=t;function n(i,o,s){if(i instanceof vo)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,o){let s=i.getText(),a=Eu(o.map(Av),(d,v)=>{let l=d.range.start.line-v.range.start.line;return l===0?d.range.start.character-v.range.start.character:l}),f=0,c=[];for(let d of a){let v=i.offsetAt(d.range.start);if(v<f)throw new Error("Overlapping edit");v>f&&c.push(s.substring(f,v)),d.newText.length&&c.push(d.newText),f=i.offsetAt(d.range.end)}return c.push(s.substr(f)),c.join("")}e.applyEdits=r})(ze||(ze={}))});var ee,Ye,_o,rt=oe(()=>{"use strict";b();Nu();gg();(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",e[e.SchemaResolveError=65536]="SchemaResolveError"})(ee||(ee={}));(function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"})(Ye||(Ye={}));(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[qt.Markdown,qt.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(_o||(_o={}))});var mg,on,yg,wo=oe(()=>{"use strict";b();(()=>{"use strict";var e={975:k=>{function g(N){if(typeof N!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(N))}function L(N,F){for(var $,U="",X=0,z=-1,re=0,ie=0;ie<=N.length;++ie){if(ie<N.length)$=N.charCodeAt(ie);else{if($===47)break;$=47}if($===47){if(!(z===ie-1||re===1))if(z!==ie-1&&re===2){if(U.length<2||X!==2||U.charCodeAt(U.length-1)!==46||U.charCodeAt(U.length-2)!==46){if(U.length>2){var Re=U.lastIndexOf("/");if(Re!==U.length-1){Re===-1?(U="",X=0):X=(U=U.slice(0,Re)).length-1-U.lastIndexOf("/"),z=ie,re=0;continue}}else if(U.length===2||U.length===1){U="",X=0,z=ie,re=0;continue}}F&&(U.length>0?U+="/..":U="..",X=2)}else U.length>0?U+="/"+N.slice(z+1,ie):U=N.slice(z+1,ie),X=ie-z-1;z=ie,re=0}else $===46&&re!==-1?++re:re=-1}return U}var C={resolve:function(){for(var N,F="",$=!1,U=arguments.length-1;U>=-1&&!$;U--){var X;U>=0?X=arguments[U]:(N===void 0&&(N=process.cwd()),X=N),g(X),X.length!==0&&(F=X+"/"+F,$=X.charCodeAt(0)===47)}return F=L(F,!$),$?F.length>0?"/"+F:"/":F.length>0?F:"."},normalize:function(N){if(g(N),N.length===0)return".";var F=N.charCodeAt(0)===47,$=N.charCodeAt(N.length-1)===47;return(N=L(N,!F)).length!==0||F||(N="."),N.length>0&&$&&(N+="/"),F?"/"+N:N},isAbsolute:function(N){return g(N),N.length>0&&N.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var N,F=0;F<arguments.length;++F){var $=arguments[F];g($),$.length>0&&(N===void 0?N=$:N+="/"+$)}return N===void 0?".":C.normalize(N)},relative:function(N,F){if(g(N),g(F),N===F||(N=C.resolve(N))===(F=C.resolve(F)))return"";for(var $=1;$<N.length&&N.charCodeAt($)===47;++$);for(var U=N.length,X=U-$,z=1;z<F.length&&F.charCodeAt(z)===47;++z);for(var re=F.length-z,ie=X<re?X:re,Re=-1,de=0;de<=ie;++de){if(de===ie){if(re>ie){if(F.charCodeAt(z+de)===47)return F.slice(z+de+1);if(de===0)return F.slice(z+de)}else X>ie&&(N.charCodeAt($+de)===47?Re=de:de===0&&(Re=0));break}var mt=N.charCodeAt($+de);if(mt!==F.charCodeAt(z+de))break;mt===47&&(Re=de)}var kt="";for(de=$+Re+1;de<=U;++de)de!==U&&N.charCodeAt(de)!==47||(kt.length===0?kt+="..":kt+="/..");return kt.length>0?kt+F.slice(z+Re):(z+=Re,F.charCodeAt(z)===47&&++z,F.slice(z))},_makeLong:function(N){return N},dirname:function(N){if(g(N),N.length===0)return".";for(var F=N.charCodeAt(0),$=F===47,U=-1,X=!0,z=N.length-1;z>=1;--z)if((F=N.charCodeAt(z))===47){if(!X){U=z;break}}else X=!1;return U===-1?$?"/":".":$&&U===1?"//":N.slice(0,U)},basename:function(N,F){if(F!==void 0&&typeof F!="string")throw new TypeError('"ext" argument must be a string');g(N);var $,U=0,X=-1,z=!0;if(F!==void 0&&F.length>0&&F.length<=N.length){if(F.length===N.length&&F===N)return"";var re=F.length-1,ie=-1;for($=N.length-1;$>=0;--$){var Re=N.charCodeAt($);if(Re===47){if(!z){U=$+1;break}}else ie===-1&&(z=!1,ie=$+1),re>=0&&(Re===F.charCodeAt(re)?--re==-1&&(X=$):(re=-1,X=ie))}return U===X?X=ie:X===-1&&(X=N.length),N.slice(U,X)}for($=N.length-1;$>=0;--$)if(N.charCodeAt($)===47){if(!z){U=$+1;break}}else X===-1&&(z=!1,X=$+1);return X===-1?"":N.slice(U,X)},extname:function(N){g(N);for(var F=-1,$=0,U=-1,X=!0,z=0,re=N.length-1;re>=0;--re){var ie=N.charCodeAt(re);if(ie!==47)U===-1&&(X=!1,U=re+1),ie===46?F===-1?F=re:z!==1&&(z=1):F!==-1&&(z=-1);else if(!X){$=re+1;break}}return F===-1||U===-1||z===0||z===1&&F===U-1&&F===$+1?"":N.slice(F,U)},format:function(N){if(N===null||typeof N!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof N);return(function(F,$){var U=$.dir||$.root,X=$.base||($.name||"")+($.ext||"");return U?U===$.root?U+X:U+"/"+X:X})(0,N)},parse:function(N){g(N);var F={root:"",dir:"",base:"",ext:"",name:""};if(N.length===0)return F;var $,U=N.charCodeAt(0),X=U===47;X?(F.root="/",$=1):$=0;for(var z=-1,re=0,ie=-1,Re=!0,de=N.length-1,mt=0;de>=$;--de)if((U=N.charCodeAt(de))!==47)ie===-1&&(Re=!1,ie=de+1),U===46?z===-1?z=de:mt!==1&&(mt=1):z!==-1&&(mt=-1);else if(!Re){re=de+1;break}return z===-1||ie===-1||mt===0||mt===1&&z===ie-1&&z===re+1?ie!==-1&&(F.base=F.name=re===0&&X?N.slice(1,ie):N.slice(re,ie)):(re===0&&X?(F.name=N.slice(1,z),F.base=N.slice(1,ie)):(F.name=N.slice(re,z),F.base=N.slice(re,ie)),F.ext=N.slice(z,ie)),re>0?F.dir=N.slice(0,re-1):X&&(F.dir="/"),F},sep:"/",delimiter:":",win32:null,posix:null};C.posix=C,k.exports=C}},t={};function n(k){var g=t[k];if(g!==void 0)return g.exports;var L=t[k]={exports:{}};return e[k](L,L.exports,n),L.exports}n.d=(k,g)=>{for(var L in g)n.o(g,L)&&!n.o(k,L)&&Object.defineProperty(k,L,{enumerable:!0,get:g[L]})},n.o=(k,g)=>Object.prototype.hasOwnProperty.call(k,g),n.r=k=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>l,Utils:()=>A}),typeof process=="object"?i=!1:typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let o=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function f(k,g){if(!k.scheme&&g)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${k.authority}", path: "${k.path}", query: "${k.query}", fragment: "${k.fragment}"}`);if(k.scheme&&!o.test(k.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(k.path){if(k.authority){if(!s.test(k.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(k.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let c="",d="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(g){return g instanceof l||!!g&&typeof g.authority=="string"&&typeof g.fragment=="string"&&typeof g.path=="string"&&typeof g.query=="string"&&typeof g.scheme=="string"&&typeof g.fsPath=="string"&&typeof g.with=="function"&&typeof g.toString=="function"}scheme;authority;path;query;fragment;constructor(g,L,C,N,F,$=!1){typeof g=="object"?(this.scheme=g.scheme||c,this.authority=g.authority||c,this.path=g.path||c,this.query=g.query||c,this.fragment=g.fragment||c):(this.scheme=(function(U,X){return U||X?U:"file"})(g,$),this.authority=L||c,this.path=(function(U,X){switch(U){case"https":case"http":case"file":X?X[0]!==d&&(X=d+X):X=d}return X})(this.scheme,C||c),this.query=N||c,this.fragment=F||c,f(this,$))}get fsPath(){return m(this,!1)}with(g){if(!g)return this;let{scheme:L,authority:C,path:N,query:F,fragment:$}=g;return L===void 0?L=this.scheme:L===null&&(L=c),C===void 0?C=this.authority:C===null&&(C=c),N===void 0?N=this.path:N===null&&(N=c),F===void 0?F=this.query:F===null&&(F=c),$===void 0?$=this.fragment:$===null&&($=c),L===this.scheme&&C===this.authority&&N===this.path&&F===this.query&&$===this.fragment?this:new _(L,C,N,F,$)}static parse(g,L=!1){let C=v.exec(g);return C?new _(C[2]||c,M(C[4]||c),M(C[5]||c),M(C[7]||c),M(C[9]||c),L):new _(c,c,c,c,c)}static file(g){let L=c;if(i&&(g=g.replace(/\\/g,d)),g[0]===d&&g[1]===d){let C=g.indexOf(d,2);C===-1?(L=g.substring(2),g=d):(L=g.substring(2,C),g=g.substring(C)||d)}return new _("file",L,g,c,c)}static from(g){let L=new _(g.scheme,g.authority,g.path,g.query,g.fragment);return f(L,!0),L}toString(g=!1){return u(this,g)}toJSON(){return this}static revive(g){if(g){if(g instanceof l)return g;{let L=new _(g);return L._formatted=g.external,L._fsPath=g._sep===h?g.fsPath:null,L}}return g}}let h=i?1:void 0;class _ extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=m(this,!1)),this._fsPath}toString(g=!1){return g?u(this,!0):(this._formatted||(this._formatted=u(this,!1)),this._formatted)}toJSON(){let g={$mid:1};return this._fsPath&&(g.fsPath=this._fsPath,g._sep=h),this._formatted&&(g.external=this._formatted),this.path&&(g.path=this.path),this.scheme&&(g.scheme=this.scheme),this.authority&&(g.authority=this.authority),this.query&&(g.query=this.query),this.fragment&&(g.fragment=this.fragment),g}}let x={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function D(k,g,L){let C,N=-1;for(let F=0;F<k.length;F++){let $=k.charCodeAt(F);if($>=97&&$<=122||$>=65&&$<=90||$>=48&&$<=57||$===45||$===46||$===95||$===126||g&&$===47||L&&$===91||L&&$===93||L&&$===58)N!==-1&&(C+=encodeURIComponent(k.substring(N,F)),N=-1),C!==void 0&&(C+=k.charAt(F));else{C===void 0&&(C=k.substr(0,F));let U=x[$];U!==void 0?(N!==-1&&(C+=encodeURIComponent(k.substring(N,F)),N=-1),C+=U):N===-1&&(N=F)}}return N!==-1&&(C+=encodeURIComponent(k.substring(N))),C!==void 0?C:k}function T(k){let g;for(let L=0;L<k.length;L++){let C=k.charCodeAt(L);C===35||C===63?(g===void 0&&(g=k.substr(0,L)),g+=x[C]):g!==void 0&&(g+=k[L])}return g!==void 0?g:k}function m(k,g){let L;return L=k.authority&&k.path.length>1&&k.scheme==="file"?`//${k.authority}${k.path}`:k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?g?k.path.substr(1):k.path[1].toLowerCase()+k.path.substr(2):k.path,i&&(L=L.replace(/\//g,"\\")),L}function u(k,g){let L=g?T:D,C="",{scheme:N,authority:F,path:$,query:U,fragment:X}=k;if(N&&(C+=N,C+=":"),(F||N==="file")&&(C+=d,C+=d),F){let z=F.indexOf("@");if(z!==-1){let re=F.substr(0,z);F=F.substr(z+1),z=re.lastIndexOf(":"),z===-1?C+=L(re,!1,!1):(C+=L(re.substr(0,z),!1,!1),C+=":",C+=L(re.substr(z+1),!1,!0)),C+="@"}F=F.toLowerCase(),z=F.lastIndexOf(":"),z===-1?C+=L(F,!1,!0):(C+=L(F.substr(0,z),!1,!0),C+=F.substr(z))}if($){if($.length>=3&&$.charCodeAt(0)===47&&$.charCodeAt(2)===58){let z=$.charCodeAt(1);z>=65&&z<=90&&($=`/${String.fromCharCode(z+32)}:${$.substr(3)}`)}else if($.length>=2&&$.charCodeAt(1)===58){let z=$.charCodeAt(0);z>=65&&z<=90&&($=`${String.fromCharCode(z+32)}:${$.substr(2)}`)}C+=L($,!0,!1)}return U&&(C+="?",C+=L(U,!1,!1)),X&&(C+="#",C+=g?X:D(X,!1,!1)),C}function y(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+y(k.substr(3)):k}}let S=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function M(k){return k.match(S)?k.replace(S,(g=>y(g))):k}var P=n(975);let B=P.posix||P,Z="/";var A;(function(k){k.joinPath=function(g,...L){return g.with({path:B.join(g.path,...L)})},k.resolvePath=function(g,...L){let C=g.path,N=!1;C[0]!==Z&&(C=Z+C,N=!0);let F=B.resolve(C,...L);return N&&F[0]===Z&&!g.authority&&(F=F.substring(1)),g.with({path:F})},k.dirname=function(g){if(g.path.length===0||g.path===Z)return g;let L=B.dirname(g.path);return L.length===1&&L.charCodeAt(0)===46&&(L=""),g.with({path:L})},k.basename=function(g){return B.basename(g.path)},k.extname=function(g){return B.extname(g.path)}})(A||(A={})),mg=r})();({URI:on,Utils:yg}=mg)});function Le(e){return ct(e)?e?{}:{not:{}}:e}function It(e){e.startsWith(vg)&&(e=jv+e.substring(vg.length));try{return on.parse(e).toString(!0)}catch{return e}}function Fu(e){return qv[It(e)]??void 0}function wg(e,t=[],n=[]){return new Po(e,t,n)}function Pt(e){return Nh(e)}function Vr(e){return Mh(e)}function $u(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function _g(e,t=Ye.v2020_12){let n=e.$schema;return n?Fu(n)??t:t}function Ce(e,t,n,r,i){if(!e||!r.include(e))return;if(e.type==="property")return Ce(e.valueNode,t,n,r,i);let o=e;switch(s(),o.type){case"object":v(o);break;case"array":d(o);break;case"string":c(o);break;case"number":f(o);break}r.add({node:o,schema:t});function s(){function l(u){return o.type===u||u==="integer"&&o.type==="number"&&o.isInteger}if(Array.isArray(t.type)?t.type.some(l)||n.problems.push({location:{offset:o.offset,length:o.length},message:t.errorMessage||E("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(l(t.type)||n.problems.push({location:{offset:o.offset,length:o.length},message:t.errorMessage||E('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(let u of t.allOf){let y=new je,S=r.newSub();Ce(o,Le(u),y,S,i),n.merge(y),r.merge(S)}let h=Le(t.not);if(h){let u=new je,y=r.newSub();Ce(o,h,u,y,i),u.hasProblems()||n.problems.push({location:{offset:o.offset,length:o.length},message:t.errorMessage||E("Matches a schema that is not allowed.")});for(let S of y.schemas)S.inverted=!S.inverted,r.add(S)}let _=(u,y)=>{let S=[],M=a(u)??u,P;for(let B of M){let Z=Le(B),A=new je,k=r.newSub();if(Ce(o,Z,A,k,i),A.hasProblems()||S.push(Z),!P)P={schema:Z,validationResult:A,matchingSchemas:k};else if(!y&&!A.hasProblems()&&!P.validationResult.hasProblems())P.matchingSchemas.merge(k),P.validationResult.propertiesMatches+=A.propertiesMatches,P.validationResult.propertiesValueMatches+=A.propertiesValueMatches,P.validationResult.mergeProcessedProperties(A);else{let g=A.compare(P.validationResult);g>0?P={schema:Z,validationResult:A,matchingSchemas:k}:g===0&&(P.matchingSchemas.merge(k),P.validationResult.mergeEnumValues(A))}}return S.length>1&&y&&n.problems.push({location:{offset:o.offset,length:1},message:E("Matches multiple schemas when only one must validate.")}),P&&(P.validationResult.updateEnumMismatchProblemMessages(),n.merge(P.validationResult),r.merge(P.matchingSchemas)),S.length};Array.isArray(t.anyOf)&&_(t.anyOf,!1),Array.isArray(t.oneOf)&&_(t.oneOf,!0);let x=u=>{let y=new je,S=r.newSub();Ce(o,Le(u),y,S,i),n.merge(y),r.merge(S)},D=(u,y,S)=>{let M=Le(u),P=new je,B=r.newSub();Ce(o,M,P,B,i),r.merge(B),n.mergeProcessedProperties(P),P.hasProblems()?S&&x(S):y&&x(y)},T=Le(t.if);if(T&&D(T,Le(t.then),Le(t.else)),Array.isArray(t.enum)){let u=Pt(o),y=!1;for(let S of t.enum)if(yn(u,S)){y=!0;break}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:o.offset,length:o.length},code:ee.EnumValueMismatch,message:t.errorMessage||E("Value is not accepted. Valid values: {0}.",t.enum.map(S=>JSON.stringify(S)).join(", "))})}if(nt(t.const)){let u=Pt(o);yn(u,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:o.offset,length:o.length},code:ee.EnumValueMismatch,message:t.errorMessage||E("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let m=t.deprecationMessage;if(m||t.deprecated){m=m||E("Value is deprecated");let u=o.parent?.type==="property"?o.parent:o;n.problems.push({location:{offset:u.offset,length:u.length},severity:He.Warning,message:m,code:ee.Deprecated})}}function a(l){if(l.length<2)return;let h=x=>{let D=new Map;for(let T=0;T<l.length;T++){let m=x(Le(l[T]),T);if(!m)return;m.forEach(([u,y])=>{if(y.const!==void 0){D.has(u)||D.set(u,new Map);let S=D.get(u);S.has(y.const)||S.set(y.const,[]),S.get(y.const).push(T)}})}return D},_=(x,D)=>{for(let[T,m]of x){let u=new Set;if(m.forEach(y=>y.forEach(S=>u.add(S))),u.size===l.length){let y=D(T),S=m.get(y);if(S?.length)return S.map(M=>l[M]);break}}};if(o.type==="object"&&o.properties?.length){let x=h(D=>D.properties?Object.entries(D.properties).map(([T,m])=>[T,Le(m)]):void 0);if(x)return _(x,D=>{let T=o.properties.find(m=>m.keyNode.value===D);return T?.valueNode?.type==="string"?T.valueNode.value:void 0})}else if(o.type==="array"&&o.items?.length){let x=h(D=>{let T=D.prefixItems||(Array.isArray(D.items)?D.items:void 0);return T?T.map((m,u)=>[u,Le(m)]):void 0});if(x)return _(x,D=>{let T=o.items[D];return T?.type==="string"?T.value:void 0})}}function f(l){let h=l.value;function _(S){let M=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(S.toString());return M&&{value:Number(M[1]+(M[2]||"")),multiplier:(M[2]?.length||0)-(parseInt(M[3])||0)}}if(qe(t.multipleOf)){let S=-1;if(Number.isInteger(t.multipleOf))S=h%t.multipleOf;else{let M=_(t.multipleOf),P=_(h);if(M&&P){let B=10**Math.abs(P.multiplier-M.multiplier);P.multiplier<M.multiplier?P.value*=B:M.value*=B,S=P.value%M.value}}S!==0&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Value is not divisible by {0}.",t.multipleOf)})}function x(S,M){if(qe(M))return M;if(ct(M)&&M)return S}function D(S,M){if(!ct(M)||!M)return S}let T=x(t.minimum,t.exclusiveMinimum);qe(T)&&h<=T&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Value is below the exclusive minimum of {0}.",T)});let m=x(t.maximum,t.exclusiveMaximum);qe(m)&&h>=m&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Value is above the exclusive maximum of {0}.",m)});let u=D(t.minimum,t.exclusiveMinimum);qe(u)&&h<u&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Value is below the minimum of {0}.",u)});let y=D(t.maximum,t.exclusiveMaximum);qe(y)&&h>y&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Value is above the maximum of {0}.",y)})}function c(l){if(qe(t.minLength)&&iu(l.value)<t.minLength&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("String is shorter than the minimum length of {0}.",t.minLength)}),qe(t.maxLength)&&iu(l.value)>t.maxLength&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("String is longer than the maximum length of {0}.",t.maxLength)}),po(t.pattern)){let h=bn(t.pattern);h&&!h.test(l.value)&&n.problems.push({location:{offset:l.offset,length:l.length},message:t.patternErrorMessage||t.errorMessage||E('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let _;if(!l.value)_=E("URI expected.");else{let x=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(l.value);x?!x[2]&&t.format==="uri"&&(_=E("URI with a scheme is expected.")):_=E("URI is expected.")}_&&n.problems.push({location:{offset:l.offset,length:l.length},message:t.patternErrorMessage||t.errorMessage||E("String is not a URI: {0}",_)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":let h=Cv[t.format];(!l.value||!h.pattern.exec(l.value))&&n.problems.push({location:{offset:l.offset,length:l.length},message:t.patternErrorMessage||t.errorMessage||h.errorMessage});default:}}function d(l){let h,_;i.schemaDraft>=Ye.v2020_12?(h=t.prefixItems,_=Array.isArray(t.items)?void 0:t.items):(h=Array.isArray(t.items)?t.items:void 0,_=Array.isArray(t.items)?t.additionalItems:t.items);let x=0;if(h!==void 0){let u=Math.min(h.length,l.items.length);for(;x<u;x++){let y=h[x],S=Le(y),M=new je,P=l.items[x];P&&(Ce(P,S,M,r,i),n.mergePropertyMatch(M)),n.processedProperties.add(String(x))}}if(_!==void 0&&x<l.items.length)if(typeof _=="boolean")for(_===!1&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Array has too many items according to schema. Expected {0} or fewer.",x)});x<l.items.length;x++)n.processedProperties.add(String(x)),n.propertiesValueMatches++;else for(;x<l.items.length;x++){let u=new je;Ce(l.items[x],_,u,r,i),n.mergePropertyMatch(u),n.processedProperties.add(String(x))}let D=Le(t.contains);if(D){let u=0;for(let y=0;y<l.items.length;y++){let S=l.items[y],M=new je;Ce(S,D,M,sr.instance,i),M.hasProblems()||(u++,i.schemaDraft>=Ye.v2020_12&&n.processedProperties.add(String(y)))}u===0&&!qe(t.minContains)&&n.problems.push({location:{offset:l.offset,length:l.length},message:t.errorMessage||E("Array does not contain required item.")}),qe(t.minContains)&&u<t.minContains&&n.problems.push({location:{offset:l.offset,length:l.length},message:t.errorMessage||E("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),qe(t.maxContains)&&u>t.maxContains&&n.problems.push({location:{offset:l.offset,length:l.length},message:t.errorMessage||E("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}let T=t.unevaluatedItems;if(T!==void 0)for(let u=0;u<l.items.length;u++){if(!n.processedProperties.has(String(u)))if(T===!1)n.problems.push({location:{offset:l.offset,length:l.length},message:E("Item does not match any validation rule from the array.")});else{let y=new je;Ce(l.items[u],t.unevaluatedItems,y,r,i),n.mergePropertyMatch(y)}n.processedProperties.add(String(u)),n.propertiesValueMatches++}if(qe(t.minItems)&&l.items.length<t.minItems&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Array has too few items. Expected {0} or more.",t.minItems)}),qe(t.maxItems)&&l.items.length>t.maxItems&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Array has too many items. Expected {0} or fewer.",t.maxItems)}),t.uniqueItems===!0){let y=function(){for(let S=0;S<u.length-1;S++){let M=u[S];for(let P=S+1;P<u.length;P++)if(yn(M,u[P]))return!0}return!1};var m=y;let u=Pt(l);y()&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Array has duplicate items.")})}}function v(l){let h=Object.create(null),_=new Set;for(let y of l.properties){let S=y.keyNode.value;h[S]=y.valueNode,_.add(S)}if(Array.isArray(t.required)){for(let y of t.required)if(!h[y]){let S=l.parent&&l.parent.type==="property"&&l.parent.keyNode,M=S?{offset:S.offset,length:S.length}:{offset:l.offset,length:1};n.problems.push({location:M,message:E('Missing property "{0}".',y)})}}let x=y=>{_.delete(y),n.processedProperties.add(y)};if(t.properties)for(let y of Object.keys(t.properties)){x(y);let S=t.properties[y],M=h[y];if(M)if(ct(S))if(S)n.propertiesMatches++,n.propertiesValueMatches++;else{let P=M.parent;n.problems.push({location:{offset:P.keyNode.offset,length:P.keyNode.length},message:t.errorMessage||E("Property {0} is not allowed.",y)})}else{let P=new je;Ce(M,S,P,r,i),n.mergePropertyMatch(P)}}if(t.patternProperties)for(let y of Object.keys(t.patternProperties)){let S=bn(y);if(S){let M=[];for(let P of _)if(S.test(P)){M.push(P);let B=h[P];if(B){let Z=t.patternProperties[y];if(ct(Z))if(Z)n.propertiesMatches++,n.propertiesValueMatches++;else{let A=B.parent;n.problems.push({location:{offset:A.keyNode.offset,length:A.keyNode.length},message:t.errorMessage||E("Property {0} is not allowed.",P)})}else{let A=new je;Ce(B,Z,A,r,i),n.mergePropertyMatch(A)}}}M.forEach(x)}}let D=t.additionalProperties;if(D!==void 0)for(let y of _){x(y);let S=h[y];if(S){if(D===!1){let M=S.parent;n.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:t.errorMessage||E("Property {0} is not allowed.",y)})}else if(D!==!0){let M=new je;Ce(S,D,M,r,i),n.mergePropertyMatch(M)}}}let T=t.unevaluatedProperties;if(T!==void 0){let y=[];for(let S of _)if(!n.processedProperties.has(S)){y.push(S);let M=h[S];if(M){if(T===!1){let P=M.parent;n.problems.push({location:{offset:P.keyNode.offset,length:P.keyNode.length},message:t.errorMessage||E("Property {0} is not allowed.",S)})}else if(T!==!0){let P=new je;Ce(M,T,P,r,i),n.mergePropertyMatch(P)}}}y.forEach(x)}if(qe(t.maxProperties)&&l.properties.length>t.maxProperties&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Object has more properties than limit of {0}.",t.maxProperties)}),qe(t.minProperties)&&l.properties.length<t.minProperties&&n.problems.push({location:{offset:l.offset,length:l.length},message:E("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(let y in t.dependentRequired){let S=h[y],M=t.dependentRequired[y];S&&Array.isArray(M)&&u(y,M)}if(t.dependentSchemas)for(let y in t.dependentSchemas){let S=h[y],M=t.dependentSchemas[y];S&&xt(M)&&u(y,M)}if(t.dependencies)for(let y in t.dependencies)h[y]&&u(y,t.dependencies[y]);let m=Le(t.propertyNames);if(m)for(let y of l.properties){let S=y.keyNode;S&&Ce(S,m,n,r,i)}function u(y,S){if(Array.isArray(S))for(let M of S)h[M]?n.propertiesValueMatches++:n.problems.push({location:{offset:l.offset,length:l.length},message:E("Object is missing property {0} required by property {1}.",M,y)});else{let M=Le(S);if(M){let P=new je;Ce(l,M,P,r,i),n.mergePropertyMatch(P)}}}}}function Dg(e,t){let n=[],r=-1,i=e.getText(),o=at(i,!1),s=t&&t.collectComments?[]:void 0;function a(){for(;;){let P=o.scan();switch(v(),P){case 12:case 13:Array.isArray(s)&&s.push(Y.create(e.positionAt(o.getTokenOffset()),e.positionAt(o.getTokenOffset()+o.getTokenLength())));break;case 15:case 14:break;default:return P}}}function f(P){return o.getToken()===P?(a(),!0):!1}function c(P,B,Z,A,k=He.Error){if(n.length===0||Z!==r){let g=Y.create(e.positionAt(Z),e.positionAt(A));n.push(ut.create(g,P,k,B,e.languageId)),r=Z}}function d(P,B,Z=void 0,A=[],k=[]){let g=o.getTokenOffset(),L=o.getTokenOffset()+o.getTokenLength();if(g===L&&g>0){for(g--;g>0&&/\s/.test(i.charAt(g));)g--;L=g+1}if(c(P,B,g,L),Z&&l(Z,!1),A.length+k.length>0){let C=o.getToken();for(;C!==17;){if(A.indexOf(C)!==-1){a();break}else if(k.indexOf(C)!==-1)break;C=a()}}return Z}function v(){switch(o.getTokenError()){case 4:return d(E("Invalid unicode sequence in string."),ee.InvalidUnicode),!0;case 5:return d(E("Invalid escape character in string."),ee.InvalidEscapeCharacter),!0;case 3:return d(E("Unexpected end of number."),ee.UnexpectedEndOfNumber),!0;case 1:return d(E("Unexpected end of comment."),ee.UnexpectedEndOfComment),!0;case 2:return d(E("Unexpected end of string."),ee.UnexpectedEndOfString),!0;case 6:return d(E("Invalid characters in string. Control characters must be escaped."),ee.InvalidCharacter),!0}return!1}function l(P,B){return P.length=o.getTokenOffset()+o.getTokenLength()-P.offset,B&&a(),P}function h(P){if(o.getToken()!==3)return;let B=new Cu(P,o.getTokenOffset());a();let Z=0,A=!1;for(;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){A||d(E("Value expected"),ee.ValueExpected);let g=o.getTokenOffset();if(a(),o.getToken()===4){A&&c(E("Trailing comma"),ee.TrailingComma,g,g+1);continue}}else A&&d(E("Expected comma"),ee.CommaExpected);let k=y(B);k?B.items.push(k):d(E("Value expected"),ee.ValueExpected,void 0,[],[4,5]),A=!0}return o.getToken()!==4?d(E("Expected comma or closing bracket"),ee.CommaOrCloseBacketExpected,B):l(B,!0)}let _=new $r(void 0,0,0);function x(P,B){let Z=new qu(P,o.getTokenOffset(),_),A=T(Z);if(!A)if(o.getToken()===16){d(E("Property keys must be doublequoted"),ee.PropertyKeysMustBeDoublequoted);let g=new $r(Z,o.getTokenOffset(),o.getTokenLength());g.value=o.getTokenValue(),A=g,a()}else return;if(Z.keyNode=A,A.value!=="//"){let g=B[A.value];g?(c(E("Duplicate object key"),ee.DuplicateKey,Z.keyNode.offset,Z.keyNode.offset+Z.keyNode.length,He.Warning),xt(g)&&c(E("Duplicate object key"),ee.DuplicateKey,g.keyNode.offset,g.keyNode.offset+g.keyNode.length,He.Warning),B[A.value]=!0):B[A.value]=Z}if(o.getToken()===6)Z.colonOffset=o.getTokenOffset(),a();else if(d(E("Colon expected"),ee.ColonExpected),o.getToken()===10&&e.positionAt(A.offset+A.length).line<e.positionAt(o.getTokenOffset()).line)return Z.length=A.length,Z;let k=y(Z);return k?(Z.valueNode=k,Z.length=k.offset+k.length-Z.offset,Z):d(E("Value expected"),ee.ValueExpected,Z,[],[2,5])}function D(P){if(o.getToken()!==1)return;let B=new Lu(P,o.getTokenOffset()),Z=Object.create(null);a();let A=!1;for(;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){A||d(E("Property expected"),ee.PropertyExpected);let g=o.getTokenOffset();if(a(),o.getToken()===2){A&&c(E("Trailing comma"),ee.TrailingComma,g,g+1);continue}}else A&&d(E("Expected comma"),ee.CommaExpected);let k=x(B,Z);k?B.properties.push(k):d(E("Property expected"),ee.PropertyExpected,void 0,[],[2,5]),A=!0}return o.getToken()!==2?d(E("Expected comma or closing brace"),ee.CommaOrCloseBraceExpected,B):l(B,!0)}function T(P){if(o.getToken()!==10)return;let B=new $r(P,o.getTokenOffset());return B.value=o.getTokenValue(),l(B,!0)}function m(P){if(o.getToken()!==11)return;let B=new ju(P,o.getTokenOffset());if(o.getTokenError()===0){let Z=o.getTokenValue();try{let A=JSON.parse(Z);if(!qe(A))return d(E("Invalid number format."),ee.Undefined,B);B.value=A}catch{return d(E("Invalid number format."),ee.Undefined,B)}B.isInteger=Z.indexOf(".")===-1}return l(B,!0)}function u(P){let B;switch(o.getToken()){case 7:return l(new Au(P,o.getTokenOffset()),!0);case 8:return l(new Do(P,!0,o.getTokenOffset()),!0);case 9:return l(new Do(P,!1,o.getTokenOffset()),!0);default:return}}function y(P){return h(P)||D(P)||T(P)||m(P)||u(P)}let S;return a()!==17&&(S=y(S),S?o.getToken()!==17&&d(E("End of file expected."),ee.Undefined):d(E("Expected a JSON object, array or literal."),ee.Undefined)),new Po(S,n,s)}var Cv,Lt,Au,Do,Cu,ju,$r,qu,Lu,bg,vg,jv,qv,xo,Iu,sr,je,Po,ar=oe(()=>{"use strict";b();tn();qr();Lr();rt();wo();Rt();Cv={"color-hex":{errorMessage:E("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:E("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:E("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:E("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:E("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:E("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:E("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:E("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},Lt=class{constructor(t,n,r=0){this.offset=n,this.length=r,this.parent=t}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Au=class extends Lt{constructor(t,n){super(t,n),this.type="null",this.value=null}},Do=class extends Lt{constructor(t,n,r){super(t,r),this.type="boolean",this.value=n}},Cu=class extends Lt{constructor(t,n){super(t,n),this.type="array",this.items=[]}get children(){return this.items}},ju=class extends Lt{constructor(t,n){super(t,n),this.type="number",this.isInteger=!0,this.value=Number.NaN}},$r=class extends Lt{constructor(t,n,r){super(t,n,r),this.type="string",this.value=""}},qu=class extends Lt{constructor(t,n,r){super(t,n),this.type="property",this.colonOffset=-1,this.keyNode=r}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},Lu=class extends Lt{constructor(t,n){super(t,n),this.type="object",this.properties=[]}get children(){return this.properties}};(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(bg||(bg={}));vg="http://json-schema.org/",jv="https://json-schema.org/";qv={"https://json-schema.org/draft-03/schema":Ye.v3,"https://json-schema.org/draft-04/schema":Ye.v4,"https://json-schema.org/draft-06/schema":Ye.v6,"https://json-schema.org/draft-07/schema":Ye.v7,"https://json-schema.org/draft/2019-09/schema":Ye.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ye.v2020_12},xo=class{constructor(t){this.schemaDraft=t}},Iu=class e{constructor(t=-1,n){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){Array.prototype.push.apply(this.schemas,t.schemas)}include(t){return(this.focusOffset===-1||$u(t,this.focusOffset))&&t!==this.exclude}newSub(){return new e(-1,this.exclude)}},sr=class{constructor(){}get schemas(){return[]}add(t){}merge(t){}include(t){return!0}newSub(){return this}};sr.instance=new sr;je=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches+=t.propertiesMatches,this.propertiesValueMatches+=t.propertiesValueMatches,this.mergeProcessedProperties(t)}mergeEnumValues(t){!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues&&(this.enumValues=this.enumValues.concat(t.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(let t of this.problems)t.code===ee.EnumValueMismatch&&(t.message=E("Value is not accepted. Valid values: {0}.",this.enumValues.map(n=>JSON.stringify(n)).join(", ")))}mergePropertyMatch(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(t){t.processedProperties.forEach(n=>this.processedProperties.add(n))}compare(t){let n=this.hasProblems();return n!==t.hasProblems()?n?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches}};Po=class{constructor(t,n=[],r=[]){this.root=t,this.syntaxErrors=n,this.comments=r}getNodeFromOffset(t,n=!1){if(this.root)return Oh(this.root,t,n)}visit(t){if(this.root){let n=r=>{let i=t(r),o=r.children;if(Array.isArray(o))for(let s=0;s<o.length&&i;s++)i=n(o[s]);return i};n(this.root)}}validate(t,n,r=He.Warning,i){if(this.root&&n){let o=new je;return Ce(this.root,n,o,sr.instance,new xo(i??_g(n))),o.problems.map(s=>{let a=Y.create(t.positionAt(s.location.offset),t.positionAt(s.location.offset+s.location.length));return ut.create(a,s.message,s.severity??r,s.code)})}}getMatchingSchemas(t,n=-1,r){if(this.root&&t){let i=new Iu(n,r),o=_g(t),s=new xo(o);return Ce(this.root,t,new je,i,s),i.schemas}return[]}}});function So(e,t,n){if(e!==null&&typeof e=="object"){let r=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";let i=`[
29
+ `;for(let o=0;o<e.length;o++)i+=r+So(e[o],r,n),o<e.length-1&&(i+=","),i+=`
30
+ `;return i+=t+"]",i}else{let i=Object.keys(e);if(i.length===0)return"{}";let o=`{
31
+ `;for(let s=0;s<i.length;s++){let a=i[s];o+=r+JSON.stringify(a)+": "+So(e[a],r,n),s<i.length-1&&(o+=","),o+=`
32
+ `}return o+=t+"}",o}}return n(e)}var xg=oe(()=>{"use strict";b()});var Lv,Iv,ko,Pg=oe(()=>{"use strict";b();ar();tn();xg();Lr();qr();rt();Rt();Lv=[",","}","]"],Iv=[":"],ko=class{constructor(t,n=[],r=Promise,i={}){this.schemaService=t,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=i}doResolve(t){for(let n=this.contributions.length-1;n>=0;n--){let r=this.contributions[n].resolveCompletion;if(r){let i=r(t);if(i)return i}}return this.promiseConstructor.resolve(t)}doComplete(t,n,r){let i={items:[],isIncomplete:!1},o=t.getText(),s=t.offsetAt(n),a=r.getNodeFromOffset(s,!0);if(this.isInComment(t,a?a.offset:0,s))return Promise.resolve(i);if(a&&s===a.offset+a.length&&s>0){let h=o[s-1];(a.type==="object"&&h==="}"||a.type==="array"&&h==="]")&&(a=a.parent)}let f=this.getCurrentWord(t,s),c;if(a&&(a.type==="string"||a.type==="number"||a.type==="boolean"||a.type==="null"))c=Y.create(t.positionAt(a.offset),t.positionAt(a.offset+a.length));else{let h=s-f.length;h>0&&o[h-1]==='"'&&h--,c=Y.create(t.positionAt(h),n)}let d=!1,v=new Map,l={add:h=>{let _=h.label,x=v.get(_);if(x)x.documentation||(x.documentation=h.documentation),x.detail||(x.detail=h.detail),x.labelDetails||(x.labelDetails=h.labelDetails);else{if(_=_.replace(/[\n]/g,"\u21B5"),_.length>60){let D=_.substr(0,57).trim()+"...";v.has(D)||(_=D)}h.textEdit=Je.replace(c,h.insertText),d&&(h.commitCharacters=h.kind===Be.Property?Iv:Lv),h.label=_,v.set(_,h),i.items.push(h)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:h=>{console.error(h)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(t.uri,r).then(h=>{let _=[],x=!0,D="",T;if(a&&a.type==="string"){let u=a.parent;u&&u.type==="property"&&u.keyNode===a&&(x=!u.valueNode,T=u,D=o.substr(a.offset+1,a.length-2),u&&(a=u.parent))}if(a&&a.type==="object"){if(a.offset===s)return i;a.properties.forEach(M=>{(!T||T!==M)&&v.set(M.keyNode.value,Ir.create("__"))});let y="";x&&(y=this.evaluateSeparatorAfter(t,t.offsetAt(c.end))),h?this.getPropertyCompletions(h,r,a,x,y,l):this.getSchemaLessPropertyCompletions(r,a,D,l);let S=Vr(a);this.contributions.forEach(M=>{let P=M.collectPropertyCompletions(t.uri,S,f,x,y==="",l);P&&_.push(P)}),!h&&f.length>0&&o.charAt(s-f.length-1)!=='"'&&(l.add({kind:Be.Property,label:this.getLabelForValue(f),insertText:this.getInsertTextForProperty(f,void 0,!1,y),insertTextFormat:xe.Snippet,documentation:""}),l.setAsIncomplete())}let m={};return h?this.getValueCompletions(h,r,a,s,t,l,m):this.getSchemaLessValueCompletions(r,a,s,t,l),this.contributions.length>0&&this.getContributedValueCompletions(r,a,s,t,l,_),this.promiseConstructor.all(_).then(()=>{if(l.getNumberOfProposals()===0){let u=s;a&&(a.type==="string"||a.type==="number"||a.type==="boolean"||a.type==="null")&&(u=a.offset+a.length);let y=this.evaluateSeparatorAfter(t,u);this.addFillerValueCompletions(m,y,l)}return i})})}getPropertyCompletions(t,n,r,i,o,s){n.getMatchingSchemas(t.schema,r.offset).forEach(f=>{if(f.node===r&&!f.inverted){let c=f.schema.properties;c&&Object.keys(c).forEach(v=>{let l=c[v];if(typeof l=="object"&&!l.deprecationMessage&&!l.doNotSuggest){let h={kind:Be.Property,label:v,insertText:this.getInsertTextForProperty(v,l,i,o),insertTextFormat:xe.Snippet,filterText:this.getFilterTextForValue(v),documentation:this.fromMarkup(l.markdownDescription)||l.description||""};l.completionDetail!==void 0&&(h.detail=l.completionDetail),l.suggestSortText!==void 0&&(h.sortText=l.suggestSortText),h.insertText&&nn(h.insertText,`$1${o}`)&&(h.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(h)}});let d=f.schema.propertyNames;if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){let v=(l,h,_,x)=>{let D={kind:Be.Property,label:l,insertText:this.getInsertTextForProperty(l,void 0,i,o),insertTextFormat:xe.Snippet,filterText:this.getFilterTextForValue(l),documentation:h||this.fromMarkup(d.markdownDescription)||d.description||"",sortText:x,detail:_};D.insertText&&nn(D.insertText,`$1${o}`)&&(D.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(D)};if(d.enum)for(let l=0;l<d.enum.length;l++){let h;d.markdownEnumDescriptions&&l<d.markdownEnumDescriptions.length?h=this.fromMarkup(d.markdownEnumDescriptions[l]):d.enumDescriptions&&l<d.enumDescriptions.length&&(h=d.enumDescriptions[l]);let _=d.enumSortTexts?.[l],x=d.enumDetails?.[l];v(d.enum[l],h,x,_)}if(d.examples)for(let l=0;l<d.examples.length;l++)v(d.examples[l],void 0,void 0,void 0);d.const&&v(d.const,void 0,d.completionDetail,d.suggestSortText)}}})}getSchemaLessPropertyCompletions(t,n,r,i){let o=s=>{s.properties.forEach(a=>{let f=a.keyNode.value;i.add({kind:Be.Property,label:f,insertText:this.getInsertTextForValue(f,""),insertTextFormat:xe.Snippet,filterText:this.getFilterTextForValue(f),documentation:""})})};if(n.parent)if(n.parent.type==="property"){let s=n.parent.keyNode.value;t.visit(a=>(a.type==="property"&&a!==n.parent&&a.keyNode.value===s&&a.valueNode&&a.valueNode.type==="object"&&o(a.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(s=>{s.type==="object"&&s!==n&&o(s)});else n.type==="object"&&i.add({kind:Be.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:xe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(t,n,r,i,o){let s=r;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(s=n.offset+n.length,n=n.parent),!n){o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:xe.Snippet,documentation:""}),o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:xe.Snippet,documentation:""});return}let a=this.evaluateSeparatorAfter(i,s),f=c=>{c.parent&&!$u(c.parent,r,!0)&&o.add({kind:this.getSuggestionKind(c.type),label:this.getLabelTextForMatchingNode(c,i),insertText:this.getInsertTextForMatchingNode(c,i,a),insertTextFormat:xe.Snippet,documentation:""}),c.type==="boolean"&&this.addBooleanValueCompletion(!c.value,a,o)};if(n.type==="property"&&r>(n.colonOffset||0)){let c=n.valueNode;if(c&&(r>c.offset+c.length||c.type==="object"||c.type==="array"))return;let d=n.keyNode.value;t.visit(v=>(v.type==="property"&&v.keyNode.value===d&&v.valueNode&&f(v.valueNode),!0)),d==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(a,o)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){let c=n.parent.keyNode.value;t.visit(d=>(d.type==="property"&&d.keyNode.value===c&&d.valueNode&&d.valueNode.type==="array"&&d.valueNode.items.forEach(f),!0))}else n.items.forEach(f)}getValueCompletions(t,n,r,i,o,s,a){let f=i,c,d;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(f=r.offset+r.length,d=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",s,a);return}if(r.type==="property"&&i>(r.colonOffset||0)){let v=r.valueNode;if(v&&i>v.offset+v.length)return;c=r.keyNode.value,r=r.parent}if(r&&(c!==void 0||r.type==="array")){let v=this.evaluateSeparatorAfter(o,f),l=n.getMatchingSchemas(t.schema,r.offset,d);for(let h of l)if(h.node===r&&!h.inverted&&h.schema){if(r.type==="array"&&h.schema.items){let _=s;if(h.schema.uniqueItems){let x=new Set;r.children.forEach(D=>{D.type!=="array"&&D.type!=="object"&&x.add(this.getLabelForValue(Pt(D)))}),_={...s,add(D){x.has(D.label)||s.add(D)}}}if(Array.isArray(h.schema.items)){let x=this.findItemAtOffset(r,o,i);x<h.schema.items.length&&this.addSchemaValueCompletions(h.schema.items[x],v,_,a)}else this.addSchemaValueCompletions(h.schema.items,v,_,a)}if(c!==void 0){let _=!1;if(h.schema.properties){let x=h.schema.properties[c];x&&(_=!0,this.addSchemaValueCompletions(x,v,s,a))}if(h.schema.patternProperties&&!_){for(let x of Object.keys(h.schema.patternProperties))if(bn(x)?.test(c)){_=!0;let T=h.schema.patternProperties[x];this.addSchemaValueCompletions(T,v,s,a)}}if(h.schema.additionalProperties&&!_){let x=h.schema.additionalProperties;this.addSchemaValueCompletions(x,v,s,a)}}}c==="$schema"&&!r.parent&&this.addDollarSchemaCompletions(v,s),a.boolean&&(this.addBooleanValueCompletion(!0,v,s),this.addBooleanValueCompletion(!1,v,s)),a.null&&this.addNullValueCompletion(v,s)}}getContributedValueCompletions(t,n,r,i,o,s){if(!n)this.contributions.forEach(a=>{let f=a.collectDefaultCompletions(i.uri,o);f&&s.push(f)});else if((n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(n=n.parent),n&&n.type==="property"&&r>(n.colonOffset||0)){let a=n.keyNode.value,f=n.valueNode;if((!f||r<=f.offset+f.length)&&n.parent){let c=Vr(n.parent);this.contributions.forEach(d=>{let v=d.collectValueCompletions(i.uri,c,a,o);v&&s.push(v)})}}}addSchemaValueCompletions(t,n,r,i){typeof t=="object"&&(this.addEnumValueCompletions(t,n,r),this.addDefaultValueCompletions(t,n,r),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(o=>this.addSchemaValueCompletions(o,n,r,i)),Array.isArray(t.anyOf)&&t.anyOf.forEach(o=>this.addSchemaValueCompletions(o,n,r,i)),Array.isArray(t.oneOf)&&t.oneOf.forEach(o=>this.addSchemaValueCompletions(o,n,r,i)))}addDefaultValueCompletions(t,n,r,i=0){let o=!1;if(nt(t.default)){let s=t.type,a=t.default;for(let c=i;c>0;c--)a=[a],s="array";let f={kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,n),insertTextFormat:xe.Snippet};this.doesSupportsLabelDetails()?f.labelDetails={description:E("Default value")}:f.detail=E("Default value"),r.add(f),o=!0}Array.isArray(t.examples)&&t.examples.forEach(s=>{let a=t.type,f=s;for(let c=i;c>0;c--)f=[f],a="array";r.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(f),insertText:this.getInsertTextForValue(f,n),insertTextFormat:xe.Snippet}),o=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(s=>{let a=t.type,f=s.body,c=s.label,d,v;if(nt(f)){let l=t.type;for(let h=i;h>0;h--)f=[f],l="array";d=this.getInsertTextForSnippetValue(f,n),v=this.getFilterTextForSnippetValue(f),c=c||this.getLabelForSnippetValue(f)}else if(typeof s.bodyText=="string"){let l="",h="",_="";for(let x=i;x>0;x--)l=l+_+`[
33
+ `,h=h+`
34
+ `+_+"]",_+=" ",a="array";d=l+_+s.bodyText.split(`
35
+ `).join(`
36
+ `+_)+h+n,c=c||d,v=d.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(a),label:c,documentation:this.fromMarkup(s.markdownDescription)||s.description,insertText:d,insertTextFormat:xe.Snippet,filterText:v}),o=!0}),!o&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,n,r,i+1)}addEnumValueCompletions(t,n,r){if(nt(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:xe.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(let i=0,o=t.enum.length;i<o;i++){let s=t.enum[i],a=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?a=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(a=t.enumDescriptions[i]),r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,n),insertTextFormat:xe.Snippet,sortText:t.enumSortTexts?.[i],detail:t.enumDetails?.[i],documentation:a})}}collectTypes(t,n){if(Array.isArray(t.enum)||nt(t.const))return;let r=t.type;Array.isArray(r)?r.forEach(i=>n[i]=!0):r&&(n[r]=!0)}addFillerValueCompletions(t,n,r){t.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:xe.Snippet,detail:E("New object"),documentation:""}),t.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:xe.Snippet,detail:E("New array"),documentation:""})}addBooleanValueCompletion(t,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,n),insertTextFormat:xe.Snippet,documentation:""})}addNullValueCompletion(t,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:xe.Snippet,documentation:""})}addDollarSchemaCompletions(t,n){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("https://json-schema.org/draft-")&&(i=i+"#"),n.add({kind:Be.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:xe.Snippet,documentation:""})})}getLabelForValue(t){return JSON.stringify(t)}getValueFromLabel(t){return JSON.parse(t)}getFilterTextForValue(t){return JSON.stringify(t)}getFilterTextForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(t){return t.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(t,n){let r=JSON.stringify(t,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(t,n){return So(t,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+n}getInsertTextForGuessedValue(t,n){switch(typeof t){case"object":return t===null?"${1:null}"+n:this.getInsertTextForValue(t,n);case"string":let r=JSON.stringify(t);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+n}return this.getInsertTextForValue(t,n)}getSuggestionKind(t){if(Array.isArray(t)){let n=t;t=n.length>0?n[0]:void 0}if(!t)return Be.Value;switch(t){case"string":return Be.Value;case"object":return Be.Module;case"property":return Be.Property;default:return Be.Value}}getLabelTextForMatchingNode(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(t.offset,t.length)}}getInsertTextForMatchingNode(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:let i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(t,n,r,i){let o=this.getInsertTextForValue(t,"");if(!r)return o;let s=o+": ",a,f=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){let c=n.defaultSnippets[0].body;nt(c)&&(a=this.getInsertTextForSnippetValue(c,""))}f+=n.defaultSnippets.length}if(n.enum&&(!a&&n.enum.length===1&&(a=this.getInsertTextForGuessedValue(n.enum[0],"")),f+=n.enum.length),nt(n.const)&&(a||(a=this.getInsertTextForGuessedValue(n.const,"")),f++),nt(n.default)&&(a||(a=this.getInsertTextForGuessedValue(n.default,"")),f++),Array.isArray(n.examples)&&n.examples.length&&(a||(a=this.getInsertTextForGuessedValue(n.examples[0],"")),f+=n.examples.length),f===0){let c=Array.isArray(n.type)?n.type[0]:n.type;switch(c||(n.properties?c="object":n.items&&(c="array")),c){case"boolean":a="$1";break;case"string":a='"$1"';break;case"object":a="{$1}";break;case"array":a="[$1]";break;case"number":case"integer":a="${1:0}";break;case"null":a="${1:null}";break;default:return o}}}return(!a||f>1)&&(a="$1"),s+a+i}getCurrentWord(t,n){let r=n-1,i=t.getText();for(;r>=0&&`
37
+ \r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}evaluateSeparatorAfter(t,n){let r=at(t.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(t,n,r){let i=at(n.getText(),!0),o=t.items;for(let s=o.length-1;s>=0;s--){let a=o[s];if(r>a.offset+a.length)return i.setPosition(a.offset+a.length),i.scan()===5&&r>=i.getTokenOffset()+i.getTokenLength()?s+1:s;if(r>=a.offset)return s}return 0}isInComment(t,n,r){let i=at(t.getText(),!1);i.setPosition(n);let o=i.scan();for(;o!==17&&i.getTokenOffset()+i.getTokenLength()<r;)o=i.scan();return(o===12||o===13)&&i.getTokenOffset()<=r}fromMarkup(t){if(t&&this.doesSupportMarkdown())return{kind:qt.Markdown,value:t}}doesSupportMarkdown(){if(!nt(this.supportsMarkdown)){let t=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(t)&&t.indexOf(qt.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return nt(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return nt(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}});function Wu(e){if(e)return e.trim().replace(/[\\`*_{}[\]()<>#+\-.!]/g,"\\$&").replace(/(^ +)/mg,(t,n)=>"&nbsp;".repeat(n.length)).replace(/( {2,})/g,(t,n)=>" "+"&nbsp;".repeat(n.length-1)).replace(/(\t+)/g,(t,n)=>"&nbsp;".repeat(n.length*4)).replace(/\n/g,`\\
38
+ `)}function Fv(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var To,Sg=oe(()=>{"use strict";b();ar();rt();To=class{constructor(t,n=[],r){this.schemaService=t,this.contributions=n,this.promise=r||Promise}doHover(t,n,r){let i=t.offsetAt(n),o=r.getNodeFromOffset(i);if(!o||(o.type==="object"||o.type==="array")&&i>o.offset+1&&i<o.offset+o.length-1)return this.promise.resolve(null);let s=o;if(o.type==="string"){let d=o.parent;if(d&&d.type==="property"&&d.keyNode===o&&(o=d.valueNode,!o))return this.promise.resolve(null)}let a=Y.create(t.positionAt(s.offset),t.positionAt(s.offset+s.length)),f=d=>({contents:d,range:a}),c=Vr(o);for(let d=this.contributions.length-1;d>=0;d--){let l=this.contributions[d].getInfoContribution(t.uri,c);if(l)return l.then(h=>f(h))}return this.schemaService.getSchemaForResource(t.uri,r).then(d=>{if(!d)return null;let v,l,h,_,x=r.getMatchingSchemas(d.schema,o.offset).filter(T=>T.node===o&&!T.inverted).map(T=>T.schema);for(let T of x)if(v=v||T.title,l=l||T.markdownDescription||Wu(T.description),T.enum){let m=T.enum.indexOf(Pt(o));T.markdownEnumDescriptions?h=T.markdownEnumDescriptions[m]:T.enumDescriptions&&(h=Wu(T.enumDescriptions[m])),h&&(_=T.enum[m],typeof _!="string"&&(_=JSON.stringify(_)))}let D="";return v&&(D=Wu(v)),l&&(D.length>0&&(D+=`
39
+
40
+ `),D+=l),h&&(D.length>0&&(D+=`
41
+
42
+ `),D+=`\`${Fv(_)}\`: ${h}`),f([D])})}}});function kg(e){if(e&&typeof e=="object"){if(ct(e.allowComments))return e.allowComments;if(e.allOf)for(let t of e.allOf){let n=kg(t);if(ct(n))return n}}}function Tg(e){if(e&&typeof e=="object"){if(ct(e.allowTrailingCommas))return e.allowTrailingCommas;let t=e;if(ct(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(let n of e.allOf){let r=Tg(n);if(ct(r))return r}}}function Ro(e){switch(e){case"error":return He.Error;case"warning":return He.Warning;case"ignore":return}}var Oo,$v,Rg=oe(()=>{"use strict";b();rt();Rt();qr();Oo=class{constructor(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}configure(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:He.Error)}doValidation(t,n,r,i){if(!this.validationEnabled)return this.promise.resolve([]);let o=[],s={},a=c=>{let d=c.range.start.line+" "+c.range.start.character+" "+c.message;s[d]||(s[d]=!0,o.push(c))},f=c=>{let d=r?.trailingCommas?Ro(r.trailingCommas):He.Error,v=r?.comments?Ro(r.comments):this.commentSeverity,l=r?.schemaValidation?Ro(r.schemaValidation):He.Warning,h=r?.schemaRequest?Ro(r.schemaRequest):He.Warning;if(c){let _=(x,D,T)=>{if(n.root&&h){let m=n.root,u=m.type==="object"?m.properties[0]:void 0;if(u&&u.keyNode.value==="$schema"){let y=u.valueNode||u,S=Y.create(t.positionAt(y.offset),t.positionAt(y.offset+y.length));a(ut.create(S,x,h,D,"json",T))}else{let y=Y.create(t.positionAt(m.offset),t.positionAt(m.offset+1));a(ut.create(y,x,h,D,"json",T))}}};if(c.errors.length){let x=c.errors[0];_(x.message,x.code,x.relatedInformation)}else if(l){for(let D of c.warnings)_(D.message,D.code,D.relatedInformation);let x=n.validate(t,c.schema,l,r?.schemaDraft);x&&x.forEach(a)}kg(c.schema)&&(v=void 0),Tg(c.schema)&&(d=void 0)}for(let _ of n.syntaxErrors){if(_.code===ee.TrailingComma){if(typeof d!="number")continue;_.severity=d}a(_)}if(typeof v=="number"){let _=E("Comments are not permitted in JSON.");n.comments.forEach(x=>{a(ut.create(x,_,v,ee.CommentNotPermitted))})}return o};if(i){let c=i.id||"schemaservice://untitled/"+$v++;return this.jsonSchemaService.registerExternalSchema({uri:c,schema:i}).getResolvedSchema().then(v=>f(v))}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(c=>f(c))}getLanguageStatus(t,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(t.uri,n)}}},$v=0});function Pe(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function Og(e){if(e[0]==="#")switch(e.length){case 4:return{red:Pe(e.charCodeAt(1))*17/255,green:Pe(e.charCodeAt(2))*17/255,blue:Pe(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Pe(e.charCodeAt(1))*17/255,green:Pe(e.charCodeAt(2))*17/255,blue:Pe(e.charCodeAt(3))*17/255,alpha:Pe(e.charCodeAt(4))*17/255};case 7:return{red:(Pe(e.charCodeAt(1))*16+Pe(e.charCodeAt(2)))/255,green:(Pe(e.charCodeAt(3))*16+Pe(e.charCodeAt(4)))/255,blue:(Pe(e.charCodeAt(5))*16+Pe(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Pe(e.charCodeAt(1))*16+Pe(e.charCodeAt(2)))/255,green:(Pe(e.charCodeAt(3))*16+Pe(e.charCodeAt(4)))/255,blue:(Pe(e.charCodeAt(5))*16+Pe(e.charCodeAt(6)))/255,alpha:(Pe(e.charCodeAt(7))*16+Pe(e.charCodeAt(8)))/255}}}var Mg=oe(()=>{"use strict";b()});function sn(e,t){return Y.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function Ng(e){return Pt(e)||E("<empty>")}var Mo,Eg=oe(()=>{"use strict";b();ar();Lr();Mg();Rt();rt();Mo=class{constructor(t){this.schemaService=t}findDocumentSymbols(t,n,r={resultLimit:Number.MAX_VALUE}){let i=n.root;if(!i)return[];let o=r.resultLimit||Number.MAX_VALUE,s=t.uri;if((s==="vscode://defaultsettings/keybindings.json"||nn(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let l=[];for(let h of i.items)if(h.type==="object"){for(let _ of h.properties)if(_.keyNode.value==="key"&&_.valueNode){let x=rn.create(t.uri,sn(t,h));if(l.push({name:Ng(_.valueNode),kind:lt.Function,location:x}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}return l}let a=[{node:i,containerName:""}],f=0,c=!1,d=[],v=(l,h)=>{l.type==="array"?l.items.forEach(_=>{_&&a.push({node:_,containerName:h})}):l.type==="object"&&l.properties.forEach(_=>{let x=_.valueNode;if(x)if(o>0){o--;let D=rn.create(t.uri,sn(t,_)),T=h?h+"."+_.keyNode.value:_.keyNode.value;d.push({name:this.getKeyLabel(_),kind:this.getSymbolKind(x.type),location:D,containerName:h}),a.push({node:x,containerName:T})}else c=!0})};for(;f<a.length;){let l=a[f++];v(l.node,l.containerName)}return c&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),d}findDocumentSymbols2(t,n,r={resultLimit:Number.MAX_VALUE}){let i=n.root;if(!i)return[];let o=r.resultLimit||Number.MAX_VALUE,s=t.uri;if((s==="vscode://defaultsettings/keybindings.json"||nn(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let l=[];for(let h of i.items)if(h.type==="object"){for(let _ of h.properties)if(_.keyNode.value==="key"&&_.valueNode){let x=sn(t,h),D=sn(t,_.keyNode);if(l.push({name:Ng(_.valueNode),kind:lt.Function,range:x,selectionRange:D}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}return l}let a=[],f=[{node:i,result:a}],c=0,d=!1,v=(l,h)=>{l.type==="array"?l.items.forEach((_,x)=>{if(_)if(o>0){o--;let D=sn(t,_),T=D,u={name:String(x),kind:this.getSymbolKind(_.type),range:D,selectionRange:T,children:[]};h.push(u),f.push({result:u.children,node:_})}else d=!0}):l.type==="object"&&l.properties.forEach(_=>{let x=_.valueNode;if(x)if(o>0){o--;let D=sn(t,_),T=sn(t,_.keyNode),m=[],u={name:this.getKeyLabel(_),kind:this.getSymbolKind(x.type),range:D,selectionRange:T,children:m,detail:this.getDetail(x)};h.push(u),f.push({result:m,node:x})}else d=!0})};for(;c<f.length;){let l=f[c++];v(l.node,l.result)}return d&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),a}getSymbolKind(t){switch(t){case"object":return lt.Module;case"string":return lt.String;case"number":return lt.Number;case"array":return lt.Array;case"boolean":return lt.Boolean;default:return lt.Variable}}getKeyLabel(t){let n=t.keyNode.value;return n&&(n=n.replace(/[\n]/g,"\u21B5")),n&&n.trim()?n:`"${n}"`}getDetail(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}}findDocumentColors(t,n,r){return this.schemaService.getSchemaForResource(t.uri,n).then(i=>{let o=[];if(i){let s=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,a=n.getMatchingSchemas(i.schema),f={};for(let c of a)if(!c.inverted&&c.schema&&(c.schema.format==="color"||c.schema.format==="color-hex")&&c.node&&c.node.type==="string"){let d=String(c.node.offset);if(!f[d]){let v=Og(Pt(c.node));if(v){let l=sn(t,c.node);o.push({color:v,range:l})}if(f[d]=!0,s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),o}}}return o})}getColorPresentations(t,n,r,i){let o=[],s=Math.round(r.red*255),a=Math.round(r.green*255),f=Math.round(r.blue*255);function c(v){let l=v.toString(16);return l.length!==2?"0"+l:l}let d;return r.alpha===1?d=`#${c(s)}${c(a)}${c(f)}`:d=`#${c(s)}${c(a)}${c(f)}${c(Math.round(r.alpha*255))}`,o.push({label:d,textEdit:Je.replace(i,JSON.stringify(d))}),o}}});var Ag,Cg=oe(()=>{"use strict";b();Ag={$id:"https://json-schema.org/draft/2019-09/schema",$schema:"https://json-schema.org/draft/2019-09/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},additionalItems:{$ref:"#"},unevaluatedItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$ref:"#"},additionalProperties:{$ref:"#"},unevaluatedProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var jg,qg=oe(()=>{"use strict";b();jg={$id:"https://json-schema.org/draft/2020-12/schema",$schema:"https://json-schema.org/draft/2020-12/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},$ref:{type:"string",format:"uri-reference"},$dynamicRef:{type:"string",format:"uri-reference"},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},prefixItems:{$ref:"#/$defs/schemaArray"},items:{$ref:"#"},contains:{$ref:"#"},additionalProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},unevaluatedItems:{$ref:"#"},unevaluatedProperties:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var No,Vv,Lg=oe(()=>{"use strict";b();Cg();qg();Rt();No={schemaAssociations:[],schemas:{"https://json-schema.org/draft-04/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"https://json-schema.org/draft-07/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},"https://json-schema.org/draft/2020-12/schema":jg,"https://json-schema.org/draft/2019-09/schema":Ag}},Vv={id:E("A unique identifier for the schema."),$schema:E("The schema to verify this document against."),title:E("A descriptive title of the schema."),description:E("A long description of the schema. Used in hover menus and suggestions."),default:E("A default value. Used by suggestions."),multipleOf:E("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:E("The maximum numerical value, inclusive by default."),exclusiveMaximum:E("Makes the maximum property exclusive."),minimum:E("The minimum numerical value, inclusive by default."),exclusiveMinimum:E("Makes the minimum property exclusive."),maxLength:E("The maximum length of a string."),minLength:E("The minimum length of a string."),pattern:E("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:E("For arrays, only when items is set as an array. If items are a schema, this schema validates items after the ones specified by the items schema. If false, additional items will cause validation to fail."),items:E("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:E("The maximum number of items that can be inside an array. Inclusive."),minItems:E("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:E("If all of the items in the array must be unique. Defaults to false."),maxProperties:E("The maximum number of properties an object can have. Inclusive."),minProperties:E("The minimum number of properties an object can have. Inclusive."),required:E("An array of strings that lists the names of all properties required on this object."),additionalProperties:E("Either a schema or a boolean. If a schema, used to validate all properties not matched by 'properties', 'propertyNames', or 'patternProperties'. If false, any properties not defined by the adjacent keywords will cause this schema to fail."),definitions:E("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:E("A map of property names to schemas for each property."),patternProperties:E("A map of regular expressions on property names to schemas for matching properties."),dependencies:E("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:E("The set of literal values that are valid."),type:E("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:E("Describes the format expected for the value. By default, not used for validation"),allOf:E("An array of schemas, all of which must match."),anyOf:E("An array of schemas, where at least one must match."),oneOf:E("An array of schemas, exactly one of which must match."),not:E("A schema which must not match."),$id:E("A unique identifier for the schema."),$ref:E("Reference a definition hosted on any location."),$comment:E("Comments from schema authors to readers or maintainers of the schema."),readOnly:E("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:E("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:E('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:E("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:E("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:E("Describes the media type of a string property."),contentEncoding:E("Describes the content encoding of a string property."),if:E('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:E('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:E('The "else" subschema is used for validation when the "if" subschema fails.')};for(let e in No.schemas){let t=No.schemas[e];for(let n in t.properties){let r=t.properties[n];typeof r=="boolean"&&(r=t.properties[n]={});let i=Vv[n];i&&(r.description=i)}}});function Ig(e,t){if(typeof e!="string")throw new TypeError("Expected a string");let n=String(e),r="",i=t?!!t.extended:!1,o=t?!!t.globstar:!1,s=!1,a=t&&typeof t.flags=="string"?t.flags:"",f;for(let c=0,d=n.length;c<d;c++)switch(f=n[c],f){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+f;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=f;break}case"{":if(i){s=!0,r+="(";break}case"}":if(i){s=!1,r+=")";break}case",":if(s){r+="|";break}r+="\\"+f;break;case"*":let v=n[c-1],l=1;for(;n[c+1]==="*";)l++,c++;let h=n[c+1];o?l>1&&(v==="/"||v===void 0||v==="{"||v===",")&&(h==="/"||h===void 0||h===","||h==="}")?(h==="/"?c++:v==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=f}return(!a||!~a.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,a)}var Fg=oe(()=>{"use strict";b()});function St(e,t,n){let r=n?[{location:{uri:n,range:Y.create(0,0,0,0)},message:e}]:void 0;return{message:e,code:t,relatedInformation:r}}function $g(e){try{return on.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function Wr(e){try{let t=on.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var Wv,Uv,Uu,Hu,wn,Eo,Ao,Hv,Vg=oe(()=>{"use strict";b();tn();wo();Lr();ar();rt();Rt();Fg();qr();Nu();Wv="!",Uv="/",Uu=class{constructor(t,n,r){this.folderUri=n,this.uris=r,this.globWrappers=[];try{for(let i of t){let o=i[0]!==Wv;o||(i=i.substring(1)),i.length>0&&(i[0]===Uv&&(i=i.substring(1)),this.globWrappers.push({regexp:Ig("**/"+i,{extended:!0,globstar:!0}),include:o}))}n&&(n=$g(n),n.endsWith("/")||(n=n+"/"),this.folderUri=n)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(t){if(this.folderUri&&!t.startsWith(this.folderUri))return!1;let n=!1;for(let{regexp:r,include:i}of this.globWrappers)r.test(t)&&(n=i);return n}getURIs(){return this.uris}},Hu=class{constructor(t,n,r){this.service=t,this.uri=n,this.dependencies=new Set,this.anchors=void 0,r&&(this.unresolvedSchema=this.service.promise.resolve(new wn(r)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(t=>this.service.resolveSchemaContent(t,this))),this.resolvedSchema}clearSchema(){let t=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,t}},wn=class{constructor(t,n=[]){this.schema=t,this.errors=n}};Eo=class{constructor(t,n=[],r=[],i){this.schema=t,this.errors=n,this.warnings=r,this.schemaDraft=i}getSection(t){let n=this.getSectionRecursive(t,this.schema);if(n)return Le(n)}getSectionRecursive(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;let r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties){for(let i of Object.keys(n.patternProperties))if(bn(i)?.test(r))return this.getSectionRecursive(t,n.patternProperties[i])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(t,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){let i=parseInt(r,10);if(!isNaN(i)&&n.items[i])return this.getSectionRecursive(t,n.items[i])}else if(n.items)return this.getSectionRecursive(t,n.items)}}}},Ao=class{constructor(t,n,r){this.contextService=n,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(t){return Object.keys(this.registeredSchemasIds).filter(n=>{let r=on.parse(n).scheme;return r!=="schemaservice"&&(!t||t(r))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(t){this.cachedSchemaForResource=void 0;let n=!1;t=It(t);let r=[t],i=Object.keys(this.schemasById).map(o=>this.schemasById[o]);for(;r.length;){let o=r.pop();for(let s=0;s<i.length;s++){let a=i[s];a&&(a.uri===o||a.dependencies.has(o))&&(a.uri!==o&&r.push(a.uri),a.clearSchema()&&(n=!0),i[s]=void 0)}}return n}setSchemaContributions(t){if(t.schemas){let n=t.schemas;for(let r in n){let i=It(r);this.contributionSchemas[i]=this.addSchemaHandle(i,n[r])}}if(Array.isArray(t.schemaAssociations)){let n=t.schemaAssociations;for(let r of n){let i=r.uris.map(It),o=this.addFilePatternAssociation(r.pattern,r.folderUri,i);this.contributionAssociations.push(o)}}}addSchemaHandle(t,n){let r=new Hu(this,t,n);return this.schemasById[t]=r,r}getOrAddSchemaHandle(t,n){return this.schemasById[t]||this.addSchemaHandle(t,n)}addFilePatternAssociation(t,n,r){let i=new Uu(t,n,r);return this.filePatternAssociations.push(i),i}registerExternalSchema(t){let n=It(t.uri);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,t.fileMatch&&t.fileMatch.length&&this.addFilePatternAssociation(t.fileMatch,t.folderUri,[n]),t.schema?this.addSchemaHandle(n,t.schema):this.getOrAddSchemaHandle(n)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(let t of this.contributionAssociations)this.filePatternAssociations.push(t)}getResolvedSchema(t){let n=It(t),r=this.schemasById[n];return r?r.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(t){if(!this.requestService){let n=E("Unable to load schema from '{0}'. No schema request service available",Wr(t));return this.promise.resolve(new wn({},[St(n,ee.SchemaResolveError,t)]))}return this.requestService(t).then(n=>{if(!n){let s=E("Unable to load schema from '{0}': No content.",Wr(t));return new wn({},[St(s,ee.SchemaResolveError,t)])}let r=[];n.charCodeAt(0)===65279&&(r.push(St(E("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Wr(t)),ee.SchemaResolveError,t)),n=n.trimStart());let i={},o=[];return i=Rh(n,o),o.length&&r.push(St(E("Unable to parse content from '{0}': Parse error at offset {1}.",Wr(t),o[0].offset),ee.SchemaResolveError,t)),new wn(i,r)},n=>{let{message:r,code:i}=n;if(typeof r!="string"){let a=n.toString(),f=n.toString().split("Error: ");f.length>1&&(a=f[1]),nn(a,".")&&(a=a.substr(0,a.length-1)),r=a}let o=ee.SchemaResolveError;typeof i=="number"&&i<65536&&(o+=i);let s=E("Unable to load schema from '{0}': {1}.",Wr(t),r);return new wn({},[St(s,o,t)])})}resolveSchemaContent(t,n){let r=t.errors.slice(0),i=t.schema,o=i.$schema?Fu(i.$schema):void 0;if(o===Ye.v3)return this.promise.resolve(new Eo({},[St(E("Draft-03 schemas are not supported."),ee.SchemaUnsupportedFeature)],[],o));let s=new Set,a=this.contextService,f=(x,D)=>{D=decodeURIComponent(D);let T=x;return D[0]==="/"&&(D=D.substring(1)),D.split("/").some(m=>(m=m.replace(/~1/g,"/").replace(/~0/g,"~"),T=T[m],!T)),T},c=(x,D,T)=>(D.anchors||(D.anchors=_(x)),D.anchors.get(T)),d=(x,D)=>{for(let T in D)D.hasOwnProperty(T)&&T!=="id"&&T!=="$id"&&(x[T]=D[T])},v=(x,D,T,m)=>{let u;if(m===void 0||m.length===0?u=D:m.charAt(0)==="/"?u=f(D,m):u=c(D,T,m),u)d(x,u);else{let y=E("$ref '{0}' in '{1}' can not be resolved.",m||"",T.uri);r.push(St(y,ee.SchemaResolveError))}},l=(x,D,T,m)=>{a&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(D)&&(D=a.resolveRelativePath(D,m.uri)),D=It(D);let u=this.getOrAddSchemaHandle(D);return u.getUnresolvedSchema().then(y=>{if(m.dependencies.add(D),y.errors.length){let S=y.errors[0],M=T?D+"#"+T:D,P=T?E("Problems loading reference '{0}': {1}",T,S.message):S.message;r.push(St(P,S.code,D))}return v(x,y.schema,u,T),h(x,y.schema,u)})},h=(x,D,T)=>{let m=[];return this.traverseNodes(x,u=>{let y=new Set;for(;u.$ref;){let S=u.$ref,M=S.split("#",2);if(delete u.$ref,M[0].length>0){m.push(l(u,M[0],M[1],T));return}else if(!y.has(S)){let P=M[1];v(u,D,T,P),y.add(S)}}u.$recursiveRef&&s.add("$recursiveRef"),u.$dynamicRef&&s.add("$dynamicRef")}),this.promise.all(m)},_=x=>{let D=new Map;return this.traverseNodes(x,T=>{let m=T.$id||T.id,u=po(m)&&m.charAt(0)==="#"?m.substring(1):T.$anchor;u&&(D.has(u)?r.push(St(E("Duplicate anchor declaration: '{0}'",u),ee.SchemaResolveError)):D.set(u,T)),T.$recursiveAnchor&&s.add("$recursiveAnchor"),T.$dynamicAnchor&&s.add("$dynamicAnchor")}),D};return h(i,i,n).then(x=>{let D=[];return s.size&&D.push(St(E("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(s.keys()).join(", ")),ee.SchemaUnsupportedFeature)),new Eo(i,r,D,o)})}traverseNodes(t,n){if(!t||typeof t!="object")return Promise.resolve(null);let r=new Set,i=(...d)=>{for(let v of d)xt(v)&&f.push(v)},o=(...d)=>{for(let v of d)if(xt(v))for(let l in v){let _=v[l];xt(_)&&f.push(_)}},s=(...d)=>{for(let v of d)if(Array.isArray(v))for(let l of v)xt(l)&&f.push(l)},a=d=>{if(Array.isArray(d))for(let v of d)xt(v)&&f.push(v);else xt(d)&&f.push(d)},f=[t],c=f.pop();for(;c;)r.has(c)||(r.add(c),n(c),i(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),o(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),s(c.anyOf,c.allOf,c.oneOf,c.prefixItems),a(c.items)),c=f.pop()}getSchemaFromProperty(t,n){if(n.root?.type==="object"){for(let r of n.root.properties)if(r.keyNode.value==="$schema"&&r.valueNode?.type==="string"){let i=r.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(i)&&(i=this.contextService.resolveRelativePath(i,t)),i}}}getAssociatedSchemas(t){let n=Object.create(null),r=[],i=$g(t);for(let o of this.filePatternAssociations)if(o.matchesPattern(i))for(let s of o.getURIs())n[s]||(r.push(s),n[s]=!0);return r}getSchemaURIsForResource(t,n){let r=n&&this.getSchemaFromProperty(t,n);return r?[r]:this.getAssociatedSchemas(t)}getSchemaForResource(t,n){if(n){let o=this.getSchemaFromProperty(t,n);if(o){let s=It(o);return this.getOrAddSchemaHandle(s).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;let r=this.getAssociatedSchemas(t),i=r.length>0?this.createCombinedSchema(t,r).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:i},i}createCombinedSchema(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);{let r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(o=>({$ref:o}))};return this.addSchemaHandle(r,i)}}getMatchingSchemas(t,n,r){if(r){let i=r.id||"schemaservice://untitled/matchingSchemas/"+Hv++;return this.addSchemaHandle(i,r).getResolvedSchema().then(s=>n.getMatchingSchemas(s.schema).filter(a=>!a.inverted))}return this.getSchemaForResource(t.uri,n).then(i=>i?n.getMatchingSchemas(i.schema).filter(o=>!o.inverted):[])}},Hv=0});function Wg(e,t){let n=[],r=[],i=[],o=-1,s=at(e.getText(),!1),a=s.scan();function f(_){n.push(_),r.push(i.length)}for(;a!==17;){switch(a){case 1:case 3:{let _=e.positionAt(s.getTokenOffset()).line,x={startLine:_,endLine:_,kind:a===1?"object":"array"};i.push(x);break}case 2:case 4:{let _=a===2?"object":"array";if(i.length>0&&i[i.length-1].kind===_){let x=i.pop(),D=e.positionAt(s.getTokenOffset()).line;x&&D>x.startLine+1&&o!==x.startLine&&(x.endLine=D-1,f(x),o=x.startLine)}break}case 13:{let _=e.positionAt(s.getTokenOffset()).line,x=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;s.getTokenError()===1&&_+1<e.lineCount?s.setPosition(e.offsetAt(fe.create(_+1,0))):_<x&&(f({startLine:_,endLine:x,kind:vn.Comment}),o=_);break}case 12:{let x=e.getText().substr(s.getTokenOffset(),s.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(x){let D=e.positionAt(s.getTokenOffset()).line;if(x[1]){let T={startLine:D,endLine:D,kind:vn.Region};i.push(T)}else{let T=i.length-1;for(;T>=0&&i[T].kind!==vn.Region;)T--;if(T>=0){let m=i[T];i.length=T,D>m.startLine&&o!==m.startLine&&(m.endLine=D,f(m),o=m.startLine)}}}break}}a=s.scan()}let c=t&&t.rangeLimit;if(typeof c!="number"||n.length<=c)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);let d=[];for(let _ of r)_<30&&(d[_]=(d[_]||0)+1);let v=0,l=0;for(let _=0;_<d.length;_++){let x=d[_];if(x){if(x+v>c){l=_;break}v+=x}}let h=[];for(let _=0;_<n.length;_++){let x=r[_];typeof x=="number"&&(x<l||x===l&&v++<c)&&h.push(n[_])}return h}var Ug=oe(()=>{"use strict";b();tn();rt()});function Hg(e,t,n){function r(a){let f=e.offsetAt(a),c=n.getNodeFromOffset(f,!0),d=[];for(;c;){switch(c.type){case"string":case"object":case"array":let l=c.offset+1,h=c.offset+c.length-1;l<h&&f>=l&&f<=h&&d.push(i(l,h)),d.push(i(c.offset,c.offset+c.length));break;case"number":case"boolean":case"null":case"property":d.push(i(c.offset,c.offset+c.length));break}if(c.type==="property"||c.parent&&c.parent.type==="array"){let l=s(c.offset+c.length,5);l!==-1&&d.push(i(c.offset,l))}c=c.parent}let v;for(let l=d.length-1;l>=0;l--)v=or.create(d[l],v);return v||(v=or.create(Y.create(a,a))),v}function i(a,f){return Y.create(e.positionAt(a),e.positionAt(f))}let o=at(e.getText(),!0);function s(a,f){return o.setPosition(a),o.scan()===f?o.getTokenOffset()+o.getTokenLength():-1}return t.map(r)}var Bg=oe(()=>{"use strict";b();rt();tn()});function Ur(e,t,n){let r;if(n){let o=e.offsetAt(n.start),s=e.offsetAt(n.end)-o;r={offset:o,length:s}}let i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
43
+ `,keepLines:t?.keepLines===!0};return Eh(e.getText(),r,i).map(o=>Je.replace(Y.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length)),o.content))}var Bu=oe(()=>{"use strict";b();tn();rt()});function Bv(e,t){let n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function zv(e,t,n){let r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),o=e[e.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>o)return e.length;let s=0,a=e.length-1;for(;s<=a;){let f=a+s>>1,c=n(t,e[f]);if(c>0)s=f+1;else if(c<0)a=f-1;else return f}return-s-1}var Se,Dn,zg=oe(()=>{"use strict";b();(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(Se||(Se={}));Dn=class{constructor(t,n){this.propertyName=t??"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(t){if(t.parent=this,this.childrenProperties.length>0){let n=0;t.noKeyName?n=this.childrenProperties.length:n=zv(this.childrenProperties,t,Bv),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,t)}else this.childrenProperties.push(t);return t}}});function Xg(e,t){let n={...t,keepLines:!1},r=ze.applyEdits(e,Ur(e,n,void 0)),i=ze.create("test://test.json","json",0,r),o=Jv(i),s=Xv(i,o),a=Ur(s,n,void 0),f=ze.applyEdits(s,a);return[Je.replace(Y.create(fe.create(0,0),e.positionAt(e.getText().length)),f)]}function Jv(e){let t=e.getText(),n=at(t,!1),r=new Dn,i=r,o=r,s=r,a,f=0,c=0,d,v,l=-1,h=-1,_=0,x=0,D=[],T=!1,m=!1;for(;(a=n.scan())!==17;){if(T===!0&&a!==14&&a!==15&&a!==12&&a!==13&&o.endLineNumber===void 0){let u=n.getTokenStartLine();v===2||v===4?s.endLineNumber=u-1:o.endLineNumber=u-1,_=u,T=!1}if(m===!0&&a!==14&&a!==15&&a!==12&&a!==13&&(_=n.getTokenStartLine(),m=!1),n.getTokenStartLine()!==f){for(let u=f;u<n.getTokenStartLine();u++){let y=e.getText(Y.create(fe.create(u,0),fe.create(u+1,0))).length;c=c+y}f=n.getTokenStartLine()}switch(a){case 10:{if(d===void 0||d===1||d===5&&D[D.length-1]===Se.Object){let u=new Dn(n.getTokenValue(),_);s=o,o=i.addChildProperty(u)}break}case 3:{if(r.beginningLineNumber===void 0&&(r.beginningLineNumber=n.getTokenStartLine()),D[D.length-1]===Se.Object)i=o;else if(D[D.length-1]===Se.Array){let u=new Dn(n.getTokenValue(),_);u.noKeyName=!0,s=o,o=i.addChildProperty(u),i=o}D.push(Se.Array),o.type=Se.Array,_=n.getTokenStartLine(),_++;break}case 1:{if(r.beginningLineNumber===void 0)r.beginningLineNumber=n.getTokenStartLine();else if(D[D.length-1]===Se.Array){let u=new Dn(n.getTokenValue(),_);u.noKeyName=!0,s=o,o=i.addChildProperty(u)}o.type=Se.Object,D.push(Se.Object),i=o,_=n.getTokenStartLine(),_++;break}case 4:{x=n.getTokenStartLine(),D.pop(),o.endLineNumber===void 0&&(d===2||d===4)&&(o.endLineNumber=x-1,o.lastProperty=!0,o.lineWhereToAddComma=l,o.indexWhereToAddComa=h,s=o,o=o?o.parent:void 0,i=o),r.endLineNumber=x,_=x+1;break}case 2:{x=n.getTokenStartLine(),D.pop(),d!==1&&(o.endLineNumber===void 0&&(o.endLineNumber=x-1,o.lastProperty=!0,o.lineWhereToAddComma=l,o.indexWhereToAddComa=h),s=o,o=o?o.parent:void 0,i=o),r.endLineNumber=n.getTokenStartLine(),_=x+1;break}case 5:{x=n.getTokenStartLine(),o.endLineNumber===void 0&&(D[D.length-1]===Se.Object||D[D.length-1]===Se.Array&&(d===2||d===4))&&(o.endLineNumber=x,o.commaIndex=n.getTokenOffset()-c,o.commaLine=x),(d===2||d===4)&&(s=o,o=o?o.parent:void 0,i=o),_=x+1;break}case 13:{d===5&&l===n.getTokenStartLine()&&(D[D.length-1]===Se.Array&&(v===2||v===4)||D[D.length-1]===Se.Object)&&(D[D.length-1]===Se.Array&&(v===2||v===4)||D[D.length-1]===Se.Object)&&(o.endLineNumber=void 0,T=!0),(d===1||d===3)&&l===n.getTokenStartLine()&&(m=!0);break}}a!==14&&a!==13&&a!==12&&a!==15&&(v=d,d=a,l=n.getTokenStartLine(),h=n.getTokenOffset()+n.getTokenLength()-c)}return r}function Xv(e,t){if(t.childrenProperties.length===0)return e;let n=ze.create("test://test.json","json",0,e.getText()),r=[];for(Jg(r,t,t.beginningLineNumber);r.length>0;){let i=r.shift(),o=i.propertyTreeArray,s=i.beginningLineNumber;for(let a=0;a<o.length;a++){let f=o[a],c=Y.create(fe.create(f.beginningLineNumber,0),fe.create(f.endLineNumber+1,0)),d=e.getText(c),v=ze.create("test://test.json","json",0,d);if(f.lastProperty===!0&&a!==o.length-1){let _=f.lineWhereToAddComma-f.beginningLineNumber,x=f.indexWhereToAddComa,D={range:Y.create(fe.create(_,x),fe.create(_,x)),text:","};ze.update(v,[D],1)}else if(f.lastProperty===!1&&a===o.length-1){let _=f.commaIndex,D=f.commaLine-f.beginningLineNumber,T={range:Y.create(fe.create(D,_),fe.create(D,_+1)),text:""};ze.update(v,[T],1)}let l=f.endLineNumber-f.beginningLineNumber+1,h={range:Y.create(fe.create(s,0),fe.create(s+l,0)),text:v.getText()};ze.update(n,[h],1),Jg(r,f,s),s=s+l}}return n}function Gv(e){e.sort((t,n)=>t.propertyName.localeCompare(n.propertyName))}function Jg(e,t,n){if(t.childrenProperties.length!==0)if(t.type===Se.Object){let r=1/0;for(let o of t.childrenProperties)o.beginningLineNumber<r&&(r=o.beginningLineNumber);let i=r-t.beginningLineNumber;n=n+i,Gv(t.childrenProperties),e.push(new Co(n,t.childrenProperties))}else t.type===Se.Array&&Gg(e,t,n)}function Gg(e,t,n){for(let r of t.childrenProperties){if(r.type===Se.Object){let i=1/0;for(let s of r.childrenProperties)s.beginningLineNumber<i&&(i=s.beginningLineNumber);let o=i-r.beginningLineNumber;e.push(new Co(n+r.beginningLineNumber-t.beginningLineNumber+o,r.childrenProperties))}r.type===Se.Array&&Gg(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}var Co,Qg=oe(()=>{"use strict";b();tn();rt();Bu();zg();Co=class{constructor(t,n){this.beginningLineNumber=t,this.propertyTreeArray=n}}});function Zg(e,t){let n=[];return t.visit(r=>{if(r.type==="property"&&r.keyNode.value==="$ref"&&r.valueNode?.type==="string"){let i=r.valueNode.value,o=Zv(t,i);if(o){let s=e.positionAt(o.offset);n.push({target:`${e.uri}#${s.line+1},${s.character+1}`,range:Qv(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function Qv(e,t){return Y.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Zv(e,t){let n=Yv(t);return n?zu(n,e.root):null}function zu(e,t){if(!t)return null;if(e.length===0)return t;let n=e.shift();if(t&&t.type==="object"){let r=t.properties.find(i=>i.keyNode.value===n);return r?zu(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){let r=Number.parseInt(n),i=t.items[r];return i?zu(e,i):null}return null}function Yv(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(Kv)}function Kv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var Yg=oe(()=>{"use strict";b();rt()});function Ju(e){let t=e.promiseConstructor||Promise,n=new Ao(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(No);let r=new ko(n,e.contributions,t,e.clientCapabilities),i=new To(n,e.contributions,t),o=new Mo(n),s=new Oo(n,t);return{configure:a=>{n.clearExternalSchemas(),a.schemas?.forEach(n.registerExternalSchema.bind(n)),s.configure(a)},resetSchema:a=>n.onResourceChange(a),doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:a=>Dg(a,{collectComments:!0}),newJSONDocument:(a,f,c)=>wg(a,f,c),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:o.findDocumentSymbols.bind(o),findDocumentSymbols2:o.findDocumentSymbols2.bind(o),findDocumentColors:o.findDocumentColors.bind(o),getColorPresentations:o.getColorPresentations.bind(o),doHover:i.doHover.bind(i),getFoldingRanges:Wg,getSelectionRanges:Hg,findDefinition:()=>Promise.resolve([]),findLinks:Zg,format:(a,f,c)=>Ur(a,c,f),sort:(a,f)=>Xg(a,f)}}var Kg=oe(()=>{"use strict";b();Pg();Sg();Rg();Eg();ar();Lg();Vg();Ug();Bg();Qg();Bu();Yg();rt()});function em(e,t,n){let r={},i=0,o;return t>0&&(o=setInterval(()=>{let s=Date.now()-t*1e3,a=Object.keys(r);for(let f of a)r[f].cTime<s&&(delete r[f],i--)},t*1e3)),{get(s){let a=s.version,f=s.languageId,c=r[s.uri];if(c&&c.version===a&&c.languageId===f)return c.cTime=Date.now(),c.languageModel;let d=n(s);if(r[s.uri]={languageModel:d,version:a,languageId:f,cTime:Date.now()},c||i++,i===e){let v=Number.MAX_VALUE,l=null;for(let h in r){let _=r[h];_.cTime<v&&(l=h,v=_.cTime)}l&&(delete r[l],i--)}return d},onDocumentRemoved(s){let a=s.uri;r[a]&&(delete r[a],i--)},dispose(){typeof o<"u"&&(clearInterval(o),o=void 0,r={},i=0)}}}var tm=oe(()=>{"use strict";b()});function pm(e,t){function n(A=["https","http","file"]){let k={};for(let g of A)g==="file"?k[g]=t.file:(g==="http"||g==="https")&&(k[g]=t.http);return g=>{let L=g.substr(0,g.indexOf(":")),C=k[L];return C?C.getContent(g):e.sendRequest(sm.type,g).then(N=>N,N=>Promise.reject(N))}}let r=Ju({workspaceContext:nm,contributions:[],clientCapabilities:_o.LATEST}),i=new me.TextDocuments(ze);i.listen(e);let o=!1,s=!1,a=!1,f=Number.MAX_VALUE,c=Number.MAX_VALUE,d=Number.MAX_VALUE,v=Number.MAX_VALUE,l=Number.MAX_VALUE,h=Number.MAX_VALUE,_=Number.MAX_VALUE,x;e.onInitialize(A=>{let k=A.initializationOptions||{},g=k?.handledSchemaProtocols;r=Ju({schemaRequestService:n(g),workspaceContext:nm,contributions:[],clientCapabilities:A.capabilities});function L(F,$){let U=F.split("."),X=A.capabilities;for(let z=0;X&&z<U.length;z++){if(!X.hasOwnProperty(U[z]))return $;X=X[U[z]]}return X}return o=L("textDocument.completion.completionItem.snippetSupport",!1),s=L("textDocument.rangeFormatting.dynamicRegistration",!1)&&typeof k.provideFormatter!="boolean",f=L("textDocument.foldingRange.rangeLimit",Number.MAX_VALUE),a=L("textDocument.documentSymbol.hierarchicalDocumentSymbolSupport",!1),_=k.customCapabilities?.rangeFormatting?.editLimit||Number.MAX_VALUE,L("textDocument.diagnostic",void 0)===void 0?x=mh(i,e,t,M):x=yh(i,e,t,M),{capabilities:{textDocumentSync:me.TextDocumentSyncKind.Incremental,completionProvider:o?{resolveProvider:!1,triggerCharacters:['"',":"]}:void 0,hoverProvider:!0,documentSymbolProvider:!0,documentRangeFormattingProvider:k.provideFormatter===!0,documentFormattingProvider:k.provideFormatter===!0,colorProvider:{},foldingRangeProvider:!0,selectionRangeProvider:!0,documentLinkProvider:{},diagnosticProvider:{documentSelector:null,interFileDependencies:!1,workspaceDiagnostics:!1},codeActionProvider:{codeActionKinds:[rm]}}}});let D,T,m=null,u=!0,y=!1;e.onDidChangeConfiguration(A=>{let k=A.settings;t.configureHttpRequests?.(k?.http?.proxy,!!k.http?.proxyStrictSSL),D=k.json?.schemas,u=!!k.json?.validate?.enable,y=k.json?.keepLines?.enable||!1,S();let g=L=>Math.trunc(Math.max(L,0));if(c=g(k.json?.resultLimit||Number.MAX_VALUE),d=g(k.json?.jsonFoldingLimit||f),v=g(k.json?.jsoncFoldingLimit||f),l=g(k.json?.jsonColorDecoratorLimit||Number.MAX_VALUE),h=g(k.json?.jsoncColorDecoratorLimit||Number.MAX_VALUE),s)if(k.json?.format?.enable){if(!m){let C=[{language:"json"},{language:"jsonc"}];m=[e.client.register(me.DocumentRangeFormattingRequest.type,{documentSelector:C}),e.client.register(me.DocumentFormattingRequest.type,{documentSelector:C})]}}else m&&(m.forEach(C=>C.then(N=>N.dispose())),m=null)}),e.onNotification(om.type,A=>{T=A,S()}),e.onNotification(am.type,A=>{let k=!1;if(Array.isArray(A))for(let g of A)r.resetSchema(g)&&(k=!0);else k=r.resetSchema(A);k&&x?.requestRefresh()}),e.onRequest(um.type,async()=>{x?.requestRefresh()}),e.onRequest(cm.type,async A=>{let k=i.get(A);return k?(S(),await M(k)):[]}),e.onRequest(fm.type,async({schemaUri:A,content:k})=>{let g="vscode://schemas/temp/"+new Date().getTime(),L=ze.create(g,"json",1,k);return S([{uri:A,fileMatch:[g]}]),await M(L)}),e.onRequest(lm.type,async A=>{let k=i.get(A);if(k){let g=B(k);return r.getLanguageStatus(k,g)}else return{schemas:[]}}),e.onRequest(dm.type,async A=>{let k=A.uri,g=A.options,L=i.get(k);return L?r.sort(L,g):[]});function S(A){let k={validate:u,allowComments:!0,schemas:new Array};if(T)if(Array.isArray(T))Array.prototype.push.apply(k.schemas,T);else for(let g in T){let L=T[g];Array.isArray(L)&&L.forEach(C=>{k.schemas.push({uri:C,fileMatch:[g]})})}D&&D.forEach((g,L)=>{let C=g.url;!C&&g.schema&&(C=g.schema.id||`vscode://schemas/custom/${L}`),C&&k.schemas.push({uri:C,fileMatch:g.fileMatch,schema:g.schema,folderUri:g.folderUri})}),A&&k.schemas.push(...A),r.configure(k),x?.requestRefresh()}async function M(A){if(A.getText().length===0)return[];let k=B(A),g=A.languageId==="jsonc"?{comments:"ignore",trailingCommas:"warning"}:{comments:"error",trailingCommas:"error"};return await r.doValidation(A,k,g)}e.onDidChangeWatchedFiles(A=>{let k=!1;for(let g of A.changes)r.resetSchema(g.uri)&&(k=!0);k&&x?.requestRefresh()});let P=em(10,60,A=>r.parseJSONDocument(A));i.onDidClose(A=>{P.onDocumentRemoved(A.document)}),e.onShutdown(()=>{P.dispose()});function B(A){return P.get(A)}e.onCompletion((A,k)=>en(t,async()=>{let g=i.get(A.textDocument.uri);if(g){let L=B(g);return r.doComplete(g,A.position,L)}return null},null,`Error while computing completions for ${A.textDocument.uri}`,k)),e.onHover((A,k)=>en(t,async()=>{let g=i.get(A.textDocument.uri);if(g){let L=B(g);return r.doHover(g,A.position,L)}return null},null,`Error while computing hover for ${A.textDocument.uri}`,k)),e.onDocumentSymbol((A,k)=>mn(t,()=>{let g=i.get(A.textDocument.uri);if(g){let L=B(g);return a?r.findDocumentSymbols2(g,L,{resultLimit:c}):r.findDocumentSymbols(g,L,{resultLimit:c})}return[]},[],`Error while computing document symbols for ${A.textDocument.uri}`,k)),e.onCodeAction((A,k)=>en(t,async()=>{if(i.get(A.textDocument.uri)){let L=me.CodeAction.create("Sort JSON",rm);return L.command={command:"json.sort",title:E("Sort JSON")},[L]}return[]},[],`Error while computing code actions for ${A.textDocument.uri}`,k));function Z(A,k,g){g.keepLines=y;let L=i.get(A.uri);if(L){let C=r.format(L,k??im(L),g);if(C.length>_){let N=ze.applyEdits(L,C);return[me.TextEdit.replace(im(L),N)]}return C}return[]}e.onDocumentRangeFormatting((A,k)=>mn(t,()=>Z(A.textDocument,A.range,A.options),[],`Error while formatting range for ${A.textDocument.uri}`,k)),e.onDocumentFormatting((A,k)=>mn(t,()=>Z(A.textDocument,void 0,A.options),[],`Error while formatting ${A.textDocument.uri}`,k)),e.onDocumentColor((A,k)=>en(t,async()=>{let g=i.get(A.textDocument.uri);if(g){let L=B(g),C=g.languageId==="jsonc"?h:l;return r.findDocumentColors(g,L,{resultLimit:C})}return[]},[],`Error while computing document colors for ${A.textDocument.uri}`,k)),e.onColorPresentation((A,k)=>mn(t,()=>{let g=i.get(A.textDocument.uri);if(g){let L=B(g);return r.getColorPresentations(g,L,A.color,A.range)}return[]},[],`Error while computing color presentations for ${A.textDocument.uri}`,k)),e.onFoldingRanges((A,k)=>mn(t,()=>{let g=i.get(A.textDocument.uri);if(g){let L=g.languageId==="jsonc"?v:d;return r.getFoldingRanges(g,{rangeLimit:L})}return null},null,`Error while computing folding ranges for ${A.textDocument.uri}`,k)),e.onSelectionRanges((A,k)=>mn(t,()=>{let g=i.get(A.textDocument.uri);if(g){let L=B(g);return r.getSelectionRanges(g,A.positions,L)}return[]},[],`Error while computing selection ranges for ${A.textDocument.uri}`,k)),e.onDocumentLinks((A,k)=>en(t,async()=>{let g=i.get(A.textDocument.uri);if(g){let L=B(g);return r.findLinks(g,L)}return[]},[],`Error while computing links for ${A.textDocument.uri}`,k)),e.listen()}function im(e){return Y.create(fe.create(0,0),e.positionAt(e.getText().length))}var me,om,sm,am,cm,um,lm,fm,dm,nm,rm,hm=oe(()=>{"use strict";b();me=zr(Zn());Xc();bh();Kg();tm();wo();Rt();(t=>t.type=new me.NotificationType("json/schemaAssociations"))(om||={});(t=>t.type=new me.RequestType("vscode/content"))(sm||={});(t=>t.type=new me.NotificationType("json/schemaContent"))(am||={});(t=>t.type=new me.RequestType("json/validate"))(cm||={});(t=>t.type=new me.RequestType("json/validateAll"))(um||={});(t=>t.type=new me.RequestType("json/languageStatus"))(lm||={});(t=>t.type=new me.RequestType("json/validateContent"))(fm||={});(t=>t.type=new me.RequestType("json/sort"))(dm||={});nm={resolveRelativePath:(e,t)=>{let n=t.substring(0,t.lastIndexOf("/")+1);return yg.resolvePath(on.parse(n),e).toString()}},rm=me.CodeActionKind.Source.concat(".sort",".json")});var r_={};var cr,e_,t_,Hr,n_,gm=oe(()=>{"use strict";b();cr=zr(hh());hm();e_=new cr.BrowserMessageReader(self),t_=new cr.BrowserMessageWriter(self),Hr=(0,cr.createConnection)(e_,t_);console.log=Hr.console.log.bind(Hr.console);console.error=Hr.console.error.bind(Hr.console);n_={timer:{setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}}}};pm(Hr,n_)});b();Rt();var mm=!1,Xu=[],ym=async e=>{if(mm)Xu.push(e);else{let t=[];mm=!0;let n=e.data.i10lLocation;if(n)try{await nl({uri:n}),t.push(`l10n: Configured to ${n.toString()}.`)}catch(r){t.push(`l10n: Problems loading ${n.toString()} : ${r}.`)}else t.push("l10n: No bundle configured.");await Promise.resolve().then(()=>(gm(),r_)),self.onmessage!==ym&&(Xu.forEach(r=>self.onmessage?.(r)),Xu.length=0),t.forEach(console.log)}};self.onmessage=ym;
44
+ //# sourceMappingURL=jsonServerMain.js.map