![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/.cursor-server/extensions/anysphere.cursorpyright-1.0.10/dist/ |
(()=>{var e={138:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=function(e,t,n,i){const o=e||(e=>c.Uri.parse(e));function r(e){return o(e)}function s(e){const t=new m.ProtocolDiagnostic(S(e.range),e.message,T(e.severity),e.data);if(void 0!==e.code)if("string"==typeof e.code||"number"==typeof e.code)u.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:r(e.codeDescription.href)}:t.code=e.code;else if(m.DiagnosticCode.is(e.code)){t.hasDiagnosticCode=!0;const n=e.code;t.code={value:n.value,target:r(n.target)}}return e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const i=e[n];t[n]=new c.DiagnosticRelatedInformation(L(i.location),i.message)}return t}(e.relatedInformation)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;const t=[];for(const n of e){const e=a(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function a(e){switch(e){case u.DiagnosticTag.Unnecessary:return c.DiagnosticTag.Unnecessary;case u.DiagnosticTag.Deprecated:return c.DiagnosticTag.Deprecated;default:return}}function w(e){return e?new c.Position(e.line,e.character):void 0}function S(e){return e?new c.Range(e.start.line,e.start.character,e.end.line,e.end.character):void 0}async function R(e,t){return d.map(e,(e=>new c.Range(e.start.line,e.start.character,e.end.line,e.end.character)),t)}function T(e){if(null==e)return c.DiagnosticSeverity.Error;switch(e){case u.DiagnosticSeverity.Error:return c.DiagnosticSeverity.Error;case u.DiagnosticSeverity.Warning:return c.DiagnosticSeverity.Warning;case u.DiagnosticSeverity.Information:return c.DiagnosticSeverity.Information;case u.DiagnosticSeverity.Hint:return c.DiagnosticSeverity.Hint}return c.DiagnosticSeverity.Error}function P(e){if(l.string(e))return e;switch(e.kind){case u.MarkupKind.Markdown:return k(e.value);case u.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function k(e){let o;if(void 0===e||"string"==typeof e)o=new c.MarkdownString(e);else switch(e.kind){case u.MarkupKind.Markdown:o=new c.MarkdownString(e.value);break;case u.MarkupKind.PlainText:o=new c.MarkdownString,o.appendText(e.value);break;default:o=new c.MarkdownString,o.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`)}return o.isTrusted=t,o.supportHtml=n,o.supportThemeIcons=i,o}function O(e){if(e===u.CompletionItemTag.Deprecated)return c.CompletionItemTag.Deprecated}function x(e,t,n,i,o,r,s,a){const d=function(e){if(null==e)return[];const t=[];for(const n of e){const e=O(n);void 0!==e&&t.push(e)}return t}(e.tags),p=function(e){return u.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}(e),f=new h.default(p);e.detail&&(f.detail=e.detail),e.documentation&&(f.documentation=P(e.documentation),f.documentationFormat=l.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(f.filterText=e.filterText);const g=function(e,t,n){const i=e.insertTextFormat??n;if(void 0!==e.textEdit||void 0!==t){const[n,r]=void 0!==e.textEdit?(o=e.textEdit,u.InsertReplaceEdit.is(o)?[{inserting:S(o.insert),replacing:S(o.replace)},o.newText]:[S(o.range),o.newText]):[t,e.textEditText??e.label];return i===u.InsertTextFormat.Snippet?{text:new c.SnippetString(r),range:n,fromEdit:!0}:{text:r,range:n,fromEdit:!0}}return e.insertText?i===u.InsertTextFormat.Snippet?{text:new c.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0;var o}(e,i,r);if(g&&(f.insertText=g.text,f.range=g.range,f.fromEdit=g.fromEdit),l.number(e.kind)){const[t,n]=(m=e.kind,u.CompletionItemKind.Text<=m&&m<=u.CompletionItemKind.TypeParameter?[m-1,void 0]:[c.CompletionItemKind.Text,m]);f.kind=t,n&&(f.originalItemKind=n)}var m;e.sortText&&(f.sortText=e.sortText),e.additionalTextEdits&&(f.additionalTextEdits=N(e.additionalTextEdits));const v=function(e,t,n){if(n===u.ApplyKind.Merge){if(!t&&!e.commitCharacters)return;const n=new Set;if(t)for(const e of t)n.add(e);if(l.stringArray(e.commitCharacters))for(const t of e.commitCharacters)n.add(t);return Array.from(n)}return void 0!==e.commitCharacters?l.stringArray(e.commitCharacters)?e.commitCharacters:void 0:t}(e,t,n);v&&(f.commitCharacters=v.slice()),e.command&&(f.command=X(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(f.deprecated=e.deprecated,!0===e.deprecated&&d.push(c.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(f.preselect=e.preselect);const y=function(e,t,n){if(n===u.ApplyKind.Merge){const n={...t};return e.data&&Object.entries(e.data).forEach((([e,t])=>{null!=t&&(n[e]=t)})),n}return e.data??t}(e,s,a);void 0!==y&&(f.data=y),d.length>0&&(f.tags=d);const b=e.insertTextMode??o;return void 0!==b&&(f.insertTextMode=b,b===u.InsertTextMode.asIs&&(f.keepWhitespace=!0)),f}function E(e){if(e)return new c.TextEdit(S(e.range),e.newText)}async function M(e,t){if(e)return d.map(e,E,t)}function N(e){if(!e)return;const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=E(e[n]);return t}async function F(e,t){return d.mapAsync(e,q,t)}async function q(e,t){const n=new c.SignatureInformation(e.label);return void 0!==e.documentation&&(n.documentation=P(e.documentation)),void 0!==e.parameters&&(n.parameters=await j(e.parameters,t)),void 0!==e.activeParameter&&(n.activeParameter=e.activeParameter??-1),n}function j(e,t){return d.map(e,I,t)}function I(e){const t=new c.ParameterInformation(e.label);return e.documentation&&(t.documentation=P(e.documentation)),t}function L(e){return e?new c.Location(o(e.uri),S(e.range)):void 0}function A(e){if(!e)return;const t={targetUri:o(e.targetUri),targetRange:S(e.targetRange),originSelectionRange:S(e.originSelectionRange),targetSelectionRange:S(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}async function $(e,t){if(e){if(l.array(e)){if(0===e.length)return[];if(u.LocationLink.is(e[0])){const n=e;return d.map(n,A,t)}{const n=e;return d.map(n,L,t)}}return u.LocationLink.is(e)?[A(e)]:L(e)}}function W(e){const t=new c.DocumentHighlight(S(e.range));return l.number(e.kind)&&(t.kind=H(e.kind)),t}function H(e){switch(e){case u.DocumentHighlightKind.Text:return c.DocumentHighlightKind.Text;case u.DocumentHighlightKind.Read:return c.DocumentHighlightKind.Read;case u.DocumentHighlightKind.Write:return c.DocumentHighlightKind.Write}return c.DocumentHighlightKind.Text}function U(e){return e<=u.SymbolKind.TypeParameter?e-1:c.SymbolKind.Property}function K(e){if(e===u.SymbolTag.Deprecated)return c.SymbolTag.Deprecated}function z(e){if(null==e)return;const t=[];for(const n of e){const e=K(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function B(e){const t=e.data,n=e.location,i=void 0===n.range||void 0!==t?new b.default(e.name,U(e.kind),e.containerName??"",void 0===n.range?o(n.uri):new c.Location(o(e.location.uri),S(n.range)),t):new c.SymbolInformation(e.name,U(e.kind),e.containerName??"",new c.Location(o(e.location.uri),S(n.range)));return G(i,e),i}function V(e){const t=new c.DocumentSymbol(e.name,e.detail||"",U(e.kind),S(e.range),S(e.selectionRange));if(G(t,e),void 0!==e.children&&e.children.length>0){const n=[];for(const t of e.children)n.push(V(t));t.children=n}return t}function G(e,t){e.tags=z(t.tags),t.deprecated&&(e.tags?e.tags.includes(c.SymbolTag.Deprecated)||(e.tags=e.tags.concat(c.SymbolTag.Deprecated)):e.tags=[c.SymbolTag.Deprecated])}function X(e){const t={title:e.title,command:e.command};return e.tooltip&&(t.tooltip=e.tooltip),e.arguments&&(t.arguments=e.arguments),t}const J=new Map;function Q(e){if(null==e)return;let t=J.get(e);if(t)return t;const n=e.split(".");t=c.CodeActionKind.Empty;for(const e of n)t=t.append(e);return t}async function Y(e,t){if(null==e)return;const n=new g.default(e.title,e.data);return void 0!==e.kind&&(n.kind=Q(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=s(e[n]);return t}(e.diagnostics)),void 0!==e.edit&&(n.edit=await ee(e.edit,t)),void 0!==e.command&&(n.command=X(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),e.tags?.includes(u.CodeActionTag.LLMGenerated)&&(n.isAI=!0),n}function Z(e){if(!e)return;const t=new p.default(S(e.range));return e.command&&(t.command=X(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}async function ee(e,t){if(!e)return;const n=new Map;if(void 0!==e.changeAnnotations){const i=e.changeAnnotations;await d.forEach(Object.keys(i),(e=>{const t=function(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}(i[e]);n.set(e,t)}),t)}const i=e=>void 0===e?void 0:n.get(e),r=new c.WorkspaceEdit;if(e.documentChanges){const n=e.documentChanges;await d.forEach(n,(e=>{if(u.CreateFile.is(e))r.createFile(o(e.uri),e.options,i(e.annotationId));else if(u.RenameFile.is(e))r.renameFile(o(e.oldUri),o(e.newUri),e.options,i(e.annotationId));else if(u.DeleteFile.is(e))r.deleteFile(o(e.uri),e.options,i(e.annotationId));else{if(!u.TextDocumentEdit.is(e))throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`);{const t=o(e.textDocument.uri),n=[];for(const t of e.edits)u.AnnotatedTextEdit.is(t)?n.push([new c.TextEdit(S(t.range),t.newText),i(t.annotationId)]):u.SnippetTextEdit.is(t)?n.push([new c.SnippetTextEdit(S(t.range),new c.SnippetString(t.snippet.value)),i(t.annotationId)]):n.push([new c.TextEdit(S(t.range),t.newText),void 0]);r.set(t,n)}}}),t)}else if(e.changes){const n=e.changes;await d.forEach(Object.keys(n),(e=>{r.set(o(e),N(n[e]))}),t)}return r}function te(e){const t=S(e.range),n=e.target?r(e.target):void 0,i=new f.default(t,n);return void 0!==e.tooltip&&(i.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function ne(e){return new c.Color(e.red,e.green,e.blue,e.alpha)}function ie(e){return new c.ColorInformation(S(e.range),ne(e.color))}function oe(e){const t=new c.ColorPresentation(e.label);return t.additionalTextEdits=N(e.additionalTextEdits),e.textEdit&&(t.textEdit=E(e.textEdit)),t}function re(e){if(e)switch(e){case u.FoldingRangeKind.Comment:return c.FoldingRangeKind.Comment;case u.FoldingRangeKind.Imports:return c.FoldingRangeKind.Imports;case u.FoldingRangeKind.Region:return c.FoldingRangeKind.Region}}function se(e){return new c.FoldingRange(e.startLine,e.endLine,re(e.kind))}function ae(e){return new c.SelectionRange(S(e.range),e.parent?ae(e.parent):void 0)}function ce(e){return u.InlineValueText.is(e)?new c.InlineValueText(S(e.range),e.text):u.InlineValueVariableLookup.is(e)?new c.InlineValueVariableLookup(S(e.range),e.variableName,e.caseSensitiveLookup):new c.InlineValueEvaluatableExpression(S(e.range),e.expression)}async function ue(e,t){const n="string"==typeof e.label?e.label:await d.map(e.label,le,t),i=new _.default(w(e.position),n);return void 0!==e.kind&&(i.kind=e.kind),void 0!==e.textEdits&&(i.textEdits=await M(e.textEdits,t)),void 0!==e.tooltip&&(i.tooltip=de(e.tooltip)),void 0!==e.paddingLeft&&(i.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(i.paddingRight=e.paddingRight),void 0!==e.data&&(i.data=e.data),i}function le(e){const t=new c.InlayHintLabelPart(e.value);return void 0!==e.location&&(t.location=L(e.location)),void 0!==e.tooltip&&(t.tooltip=de(e.tooltip)),void 0!==e.command&&(t.command=X(e.command)),t}function de(e){return"string"==typeof e?e:k(e)}function he(e){if(null===e)return;const t=new v.default(U(e.kind),e.name,e.detail||"",r(e.uri),S(e.range),S(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=z(e.tags)),t}async function pe(e,t){return new c.CallHierarchyIncomingCall(he(e.from),await R(e.fromRanges,t))}async function fe(e,t){return new c.CallHierarchyOutgoingCall(he(e.to),await R(e.fromRanges,t))}function ge(e){return new c.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}function me(e){if(null===e)return;const t=new y.default(U(e.kind),e.name,e.detail||"",r(e.uri),S(e.range),S(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=z(e.tags)),t}function ve(e){if(l.string(e))return e;if(u.RelativePattern.is(e)){if(u.URI.is(e.baseUri))return new c.RelativePattern(r(e.baseUri),e.pattern);if(u.WorkspaceFolder.is(e.baseUri)){const t=c.workspace.getWorkspaceFolder(r(e.baseUri.uri));return void 0!==t?new c.RelativePattern(t,e.pattern):void 0}}}function ye(e){let t,n;t="string"==typeof e.insertText?e.insertText:new c.SnippetString(e.insertText.value),e.command&&(n=X(e.command));const i=new c.InlineCompletionItem(t,S(e.range),n);return e.filterText&&(i.filterText=e.filterText),i}return J.set(u.CodeActionKind.Empty,c.CodeActionKind.Empty),J.set(u.CodeActionKind.QuickFix,c.CodeActionKind.QuickFix),J.set(u.CodeActionKind.Refactor,c.CodeActionKind.Refactor),J.set(u.CodeActionKind.RefactorExtract,c.CodeActionKind.RefactorExtract),J.set(u.CodeActionKind.RefactorInline,c.CodeActionKind.RefactorInline),J.set(u.CodeActionKind.RefactorRewrite,c.CodeActionKind.RefactorRewrite),J.set(u.CodeActionKind.Source,c.CodeActionKind.Source),J.set(u.CodeActionKind.SourceOrganizeImports,c.CodeActionKind.SourceOrganizeImports),{asUri:r,asDocumentSelector:function(e){const t=[];for(const n of e)if("string"==typeof n)t.push(n);else if(C.NotebookCellTextDocumentFilter.is(n))if("string"==typeof n.notebook)t.push({notebookType:n.notebook,language:n.language});else{const e=n.notebook.notebookType??"*";t.push({notebookType:e,scheme:n.notebook.scheme,pattern:ve(n.notebook.pattern),language:n.language})}else C.TextDocumentFilter.is(n)&&t.push({language:n.language,scheme:n.scheme,pattern:ve(n.pattern)});return t},asDiagnostics:async function(e,t){return d.map(e,s,t)},asDiagnostic:s,asRange:S,asRanges:R,asPosition:w,asDiagnosticSeverity:T,asDiagnosticTag:a,asHover:function(e){if(e)return new c.Hover(function(e){if(l.string(e))return k(e);if(D.is(e))return k().appendCodeblock(e.value,e.language);if(Array.isArray(e)){const t=[];for(const n of e){const e=k();D.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}return k(e)}(e.contents),S(e.range))},asCompletionResult:async function(e,t,n){if(!e)return;if(Array.isArray(e))return d.map(e,(e=>x(e,t)),n);const i=e,{defaultRange:o,commitCharacters:r}=function(e,t){const n=e.itemDefaults?.editRange,i=e.itemDefaults?.commitCharacters??t;return u.Range.is(n)?{defaultRange:S(n),commitCharacters:i}:void 0!==n?{defaultRange:{inserting:S(n.insert),replacing:S(n.replace)},commitCharacters:i}:{defaultRange:void 0,commitCharacters:i}}(i,t),s=await d.map(i.items,(e=>x(e,r,i.applyKind?.commitCharacters,o,i.itemDefaults?.insertTextMode,i.itemDefaults?.insertTextFormat,i.itemDefaults?.data,i.applyKind?.data)),n);return new c.CompletionList(s,i.isIncomplete)},asCompletionItem:x,asTextEdit:E,asTextEdits:M,asSignatureHelp:async function(e,t){if(!e)return;const n=new c.SignatureHelp;return l.number(e.activeSignature)?n.activeSignature=e.activeSignature:n.activeSignature=0,l.number(e.activeParameter)?n.activeParameter=e.activeParameter:null===e.activeParameter?n.activeParameter=-1:n.activeParameter=0,e.signatures&&(n.signatures=await F(e.signatures,t)),n},asSignatureInformations:F,asSignatureInformation:q,asParameterInformations:j,asParameterInformation:I,asDeclarationResult:async function(e,t){if(e)return $(e,t)},asDefinitionResult:async function(e,t){if(e)return $(e,t)},asLocation:L,asReferences:async function(e,t){if(e)return d.map(e,L,t)},asDocumentHighlights:async function(e,t){if(e)return d.map(e,W,t)},asDocumentHighlight:W,asDocumentHighlightKind:H,asSymbolKind:U,asSymbolTag:K,asSymbolTags:z,asSymbolInformations:async function(e,t){if(e)return d.map(e,B,t)},asSymbolInformation:B,asDocumentSymbols:async function(e,t){if(null!=e)return d.map(e,V,t)},asDocumentSymbol:V,asCommand:X,asCommands:async function(e,t){if(e)return d.map(e,X,t)},asCodeAction:Y,asCodeActionKind:Q,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>Q(e)))},asCodeActionDocumentations:function(e){if(null!=e)return e.map((e=>({kind:Q(e.kind),command:X(e.command)})))},asCodeActionResult:function(e,t){return d.mapAsync(e,(async e=>u.Command.is(e)?X(e):Y(e,t)),t)},asCodeLens:Z,asCodeLenses:async function(e,t){if(e)return d.map(e,Z,t)},asWorkspaceEdit:ee,asDocumentLink:te,asDocumentLinks:async function(e,t){if(e)return d.map(e,te,t)},asFoldingRangeKind:re,asFoldingRange:se,asFoldingRanges:async function(e,t){if(e)return d.map(e,se,t)},asColor:ne,asColorInformation:ie,asColorInformations:async function(e,t){if(e)return d.map(e,ie,t)},asColorPresentation:oe,asColorPresentations:async function(e,t){if(e)return d.map(e,oe,t)},asSelectionRange:ae,asSelectionRanges:async function(e,t){return Array.isArray(e)?d.map(e,ae,t):[]},asInlineValue:ce,asInlineValues:async function(e,t){return Array.isArray(e)?d.map(e,ce,t):[]},asInlayHint:ue,asInlayHints:async function(e,t){if(Array.isArray(e))return d.mapAsync(e,ue,t)},asSemanticTokensLegend:function(e){return e},asSemanticTokens:async function(e,t){if(null!=e)return new c.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:ge,asSemanticTokensEdits:async function(e,t){if(null!=e)return new c.SemanticTokensEdits(e.edits.map(ge),e.resultId)},asCallHierarchyItem:he,asCallHierarchyItems:async function(e,t){if(null!==e)return d.map(e,he,t)},asCallHierarchyIncomingCall:pe,asCallHierarchyIncomingCalls:async function(e,t){if(null!==e)return d.mapAsync(e,pe,t)},asCallHierarchyOutgoingCall:fe,asCallHierarchyOutgoingCalls:async function(e,t){if(null!==e)return d.mapAsync(e,fe,t)},asLinkedEditingRanges:async function(e,t){if(null!=e)return new c.LinkedEditingRanges(await R(e.ranges,t),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))},asTypeHierarchyItem:me,asTypeHierarchyItems:async function(e,t){if(null!==e)return d.map(e,me,t)},asGlobPattern:ve,asInlineCompletionResult:async function(e,t){if(!e)return;if(Array.isArray(e))return d.map(e,(e=>ye(e)),t);const n=e,i=await d.map(n.items,(e=>ye(e)),t);return new c.InlineCompletionList(i)},asInlineCompletionItem:ye}};const c=s(n(1398)),u=s(n(3147)),l=s(n(5590)),d=s(n(7516)),h=a(n(649)),p=a(n(8321)),f=a(n(6353)),g=a(n(9191)),m=n(8807),v=a(n(5838)),y=a(n(6182)),b=a(n(5259)),_=a(n(9028)),C=n(3147);var D;!function(e){e.is=function(e){const t=e;return t&&l.string(t.language)&&l.string(t.value)}}(D||(D={}))},271:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureHelpFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.SignatureHelpRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[c.MarkupKind.Markdown,c.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.signatureInformation.noActiveParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>o.sendRequest(c.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asSignatureHelp(e,i)),(e=>o.handleFailedRequest(c.SignatureHelpRequest.type,i,e,null))),s=o.middleware;return s.provideSignatureHelp?s.provideSignatureHelp(e,t,i,n,r):r(e,t,i,n)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){const n=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(void 0===e.retriggerCharacters){const i=e.triggerCharacters||[];return a.languages.registerSignatureHelpProvider(n,t,...i)}{const i={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return a.languages.registerSignatureHelpProvider(n,t,i)}}}t.SignatureHelpFeature=d},291:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,n,o){return i.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,i.createMessageConnection)(e,t,n,o)};const i=n(7672)},293:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=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}),r=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)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.FileBasedCancellationStrategy=void 0;const s=r(n(9896)),a=r(n(857)),c=r(n(6928)),u=n(4202),l=n(1878);function d(e){return c.join(a.tmpdir(),"python-languageserver-cancellation",e)}function h(e,t){return c.join(d(e),`cancellation-${String(t)}.tmp`)}function p(e){try{e()}catch(e){}}class f{constructor(e){this.folderName=e;const t=d(e);p((()=>s.mkdirSync(t,{recursive:!0})))}sendCancellation(e,t){const n=h(this.folderName,t);return p((()=>s.writeFileSync(n,"",{flag:"w"}))),Promise.resolve()}cleanup(e){p((()=>s.unlinkSync(h(this.folderName,e))))}dispose(){const e=d(this.folderName);function t(e){const n=s.lstatSync(e);if(n)if(n.isDirectory()&&!n.isSymbolicLink()){for(const n of s.readdirSync(e))t(c.join(e,n));s.rmdirSync(e)}else s.unlinkSync(e)}p((()=>t(e)))}}t.FileBasedCancellationStrategy=class{constructor(){const e=(0,l.randomBytesHex)(21);this._sender=new f(e)}get receiver(){return u.CancellationReceiverStrategy.Message}get sender(){return this._sender}getCommandLineArguments(){return[`--cancellationReceive=file:${this._sender.folderName}`]}dispose(){this._sender.dispose()}}},367:e=>{"use strict";e.exports="1.32.1"},418:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const o=i(n(5091));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("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},473:(e,t,n)=>{var i=n(9986);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),m(function(e){return e.split("\\\\").join(o).split("\\{").join(r).split("\\}").join(s).split("\\,").join(a).split("\\.").join(c)}(e),!0).map(l)):[]};var o="\0SLASH"+Math.random()+"\0",r="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(o).join("\\").split(r).join("{").split(s).join("}").split(a).join(",").split(c).join(".")}function d(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var o=n.pre,r=n.body,s=n.post,a=o.split(",");a[a.length-1]+="{"+r+"}";var c=d(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function h(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function f(e,t){return e<=t}function g(e,t){return e>=t}function m(e,t){var n=[],o=i("{","}",e);if(!o)return[e];var r=o.pre,a=o.post.length?m(o.post,!1):[""];if(/\$$/.test(o.pre))for(var c=0;c<a.length;c++){var l=r+"{"+o.body+"}"+a[c];n.push(l)}else{var v,y,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),_=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),C=b||_,D=o.body.indexOf(",")>=0;if(!C&&!D)return o.post.match(/,.*\}/)?m(e=o.pre+"{"+o.body+s+o.post):[e];if(C)v=o.body.split(/\.\./);else if(1===(v=d(o.body)).length&&1===(v=m(v[0],!1).map(h)).length)return a.map((function(e){return o.pre+v[0]+e}));if(C){var w=u(v[0]),S=u(v[1]),R=Math.max(v[0].length,v[1].length),T=3==v.length?Math.abs(u(v[2])):1,P=f;S<w&&(T*=-1,P=g);var k=v.some(p);y=[];for(var O=w;P(O,S);O+=T){var x;if(_)"\\"===(x=String.fromCharCode(O))&&(x="");else if(x=String(O),k){var E=R-x.length;if(E>0){var M=new Array(E+1).join("0");x=O<0?"-"+M+x.slice(1):M+x}}y.push(x)}}else{y=[];for(var N=0;N<v.length;N++)y.push.apply(y,m(v[N],!1))}for(N=0;N<y.length;N++)for(c=0;c<a.length;c++)l=r+y[N]+a[c],(!t||C||l)&&n.push(l)}return n}},535:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0,t.arrayDiff=d;const a=s(n(4429)),c=n(1398),u=n(3147);function l(e,t){if(null!=e)return e[t]}function d(e,t){return e.filter((e=>t.indexOf(e)<0))}t.WorkspaceFoldersFeature=class{_client;_listeners;_initialFolders;constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return u.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=c.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(u.WorkspaceFoldersRequest.type,(e=>{const n=()=>{const e=c.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},i=t.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()}));const n=l(l(l(e,"workspace"),"workspaceFolders"),"changeNotifications");let i;"string"==typeof n?i=n:!0===n&&(i=a.generateUuid()),i&&this.register({id:i,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){const n=d(this._initialFolders,e),i=d(e,this._initialFolders);(i.length>0||n.length>0)&&(t=this.doSendEvent(i,n))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));void 0!==t&&t.catch((e=>{this._client.error(`Sending notification ${u.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}doSendEvent(e,t){const n={event:{added:e.map((e=>this.asProtocol(e))),removed:t.map((e=>this.asProtocol(e)))}};return this._client.sendNotification(u.DidChangeWorkspaceFoldersNotification.type,n)}register(e){const t=e.id,n=this._client,i=c.workspace.onDidChangeWorkspaceFolders((e=>{const t=e=>this.doSendEvent(e.added,e.removed),i=n.middleware.workspace;(i&&i.didChangeWorkspaceFolders?i.didChangeWorkspaceFolders(e,t):t(e)).catch((e=>{this._client.error(`Sending notification ${u.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}));this._listeners.set(t,i),this.sendInitialEvent(c.workspace.workspaceFolders)}unregister(e){const t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}clear(){for(const e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},575:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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=W,t.combineTracerFeatures=H,t.combineClientFeatures=U,t.combineWindowFeatures=K,t.combineWorkspaceFeatures=z,t.combineLanguagesFeatures=B,t.combineNotebooksFeatures=V,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,H),telemetry:n(e.telemetry,t.telemetry,W),client:n(e.client,t.client,U),window:n(e.window,t.window,K),workspace:n(e.workspace,t.workspace,z),languages:n(e.languages,t.languages,B),notebooks:n(e.notebooks,t.notebooks,V)}},t.createConnection=function(e,t,n){const i=n&&n.console?new(n.console(T)):new T,o=e(i);i.rawAttach(o);const r=n&&n.tracer?new(n.tracer(F)):new F,s=n&&n.telemetry?new(n.telemetry(q)):new q,u=n&&n.client?new(n.client(M)):new M,d=n&&n.window?new(n.window(P)):new P,h=n&&n.workspace?new(n.workspace(N)):new N,p=n&&n.languages?new(n.languages(I)):new I,f=n&&n.notebooks?new(n.notebooks(A)):new A,g=[i,r,s,u,d,h,p,f];let m,v,y;const b={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=>(v=e,{dispose:()=>{v=void 0}}),onInitialized:e=>o.onNotification(a.InitializedNotification.type,e),onShutdown:e=>(m=e,{dispose:()=>{m=void 0}}),onExit:e=>(y=e,{dispose:()=>{y=void 0}}),get console(){return i},get telemetry(){return s},get tracer(){return r},get client(){return u},get window(){return d},get workspace(){return h},get languages(){return p},get notebooks(){return f},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 g)e.attach(b);return o.onRequest(a.InitializeRequest.type,(e=>{t.initialize(e),c.string(e.trace)&&(r.trace=a.Trace.fromString(e.trace));for(const t of g)t.initialize(e.capabilities);if(v){const t=v(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(b.__textDocumentSync)?b.__textDocumentSync:a.TextDocumentSyncKind.None:c.number(n.textDocumentSync)||c.number(n.textDocumentSync.change)||(n.textDocumentSync.change=c.number(b.__textDocumentSync)?b.__textDocumentSync:a.TextDocumentSyncKind.None);for(const e of g)e.fillServerCapabilities(n);return t}))}{const e={capabilities:{textDocumentSync:a.TextDocumentSyncKind.None}};for(const t of g)t.fillServerCapabilities(e.capabilities);return e}var n})),o.onRequest(a.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,m?m((new a.CancellationTokenSource).token):void 0))),o.onNotification(a.ExitNotification.type,(()=>{try{if(y)return y()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),o.onNotification(a.SetTraceNotification.type,(e=>{r.trace=a.Trace.fromString(e.value)})),b};const a=n(3147),c=s(n(1930)),u=s(n(8329)),l=n(7091),d=n(9216),h=n(7187),p=n(1913),f=n(9994),g=n(992),m=n(2636),v=n(7824),y=n(657),b=n(9336),_=n(8286),C=n(588),D=n(8671),w=n(8993),S=n(6475);function R(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 T{_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 P=(0,g.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(R)}showWarningMessage(e,...t){const n={type:a.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,n).then(R)}showInformationMessage(e,...t){const n={type:a.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(a.ShowMessageRequest.type,n).then(R)}}));var k,O;!function(e){e.create=function(){return new x}}(k||(t.BulkRegistration=k={}));class x{_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 i=u.generateUuid();this._registrations.push({id:i,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function(){return new E(void 0,[])}}(O||(t.BulkUnregistration=O={}));class E{_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 i={unregisterations:[n]};return this._connection.sendRequest(a.UnregistrationRequest.type,i).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class M{_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 x?this.registerMany(e):e instanceof E?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const i=c.string(t)?t:t.method,o=u.generateUuid(),r={registrations:[{id:o,method:i,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(a.RegistrationRequest.type,r).then((t=>(e.add({id:o,method:i}),e)),(e=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(e))))}registerSingle2(e,t){const n=c.string(e)?e:e.method,i=u.generateUuid(),o={registrations:[{id:i,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(a.RegistrationRequest.type,o).then((e=>a.Disposable.create((()=>{this.unregisterSingle(i,n).catch((()=>{this.connection.console.info(`Un-registering capability with id ${i} 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 E(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,m.FileOperationsFeature)((0,h.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 F{_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,_.FoldingRangeFeature)((0,S.MonikerFeature)((0,D.DiagnosticFeature)((0,C.InlayHintFeature)((0,b.InlineValueFeature)((0,y.TypeHierarchyFeature)((0,v.LinkedEditingRangeFeature)((0,f.SemanticTokensFeature)((0,p.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 A=(0,w.NotebookSyncFeature)(L);function $(e,t){return function(n){return t(e(n))}}function W(e,t){return function(n){return t(e(n))}}function H(e,t){return function(n){return t(e(n))}}function U(e,t){return function(n){return t(e(n))}}function K(e,t){return function(n){return t(e(n))}}function z(e,t){return function(n){return t(e(n))}}function B(e,t){return function(n){return t(e(n))}}function V(e,t){return function(n){return t(e(n))}}},588:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const i=n(3147);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(i.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(i.InlayHintRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(i.InlayHintResolveRequest.type,((t,n)=>e(t,n)))}}}},649:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.CompletionItem{data;fromEdit;documentationFormat;originalItemKind;deprecated;insertTextMode;constructor(e){super(e)}}t.default=c},656:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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(5091)),u=s(n(6618)),l=n(2479),d=n(418);var h,p;!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)}}(h||(t.MessageReader=h={}));class f{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=f,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let o;const r=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(o=e.contentTypeDecoder,r.set(o.name,o)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)r.set(t.name,t)}return void 0===o&&(o=(0,c.default)().applicationJson.decoder,r.set(o.name,o)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:o,contentTypeDecoders:r}}}(p||(p={})),t.ReadableStreamMessageReader=class extends f{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super(),this.readable=e,this.options=p.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))}}},657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const i=n(3147);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(i.TypeHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=i.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onSubtypes:e=>{const t=i.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},675:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidPattern=void 0,t.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}},702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unescape=void 0,t.unescape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},774:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const a=n(1398),c=n(3147),u=s(n(5590));t.ProgressPart=class{_client;_token;_infinite;_reported;_lspProgressDisposable;_progress;_cancellationToken;_tokenDisposable;_resolve;_reject;constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(c.WorkDoneProgress.type,this._token,(e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}}))}begin(e){this._infinite=void 0===e.percentage,void 0!==this._lspProgressDisposable&&a.window.withProgress({location:a.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},(async(t,n)=>{if(void 0!==this._lspProgressDisposable)return this._progress=t,this._cancellationToken=n,this._tokenDisposable=this._cancellationToken.onCancellationRequested((()=>{this._client.sendNotification(c.WorkDoneProgressCancelNotification.type,{token:this._token})})),this.report(e),new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}))}report(e){if(this._infinite&&u.string(e.message))void 0!==this._progress&&this._progress.report({message:e.message});else if(u.number(e.percentage)){const t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._reported+=n,void 0!==this._progress&&this._progress.report({message:e.message,increment:n})}}cancel(){this.cleanup(),void 0!==this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),void 0!==this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){void 0!==this._lspProgressDisposable&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),void 0!==this._tokenDisposable&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}}},843:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionFeature=void 0;const a=n(1398),c=n(3147),u=s(n(4429)),l=n(8071);class d extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.CodeActionRequest.type)}fillClientCapabilities(e){const t=(0,l.ensure)((0,l.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit","command"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[c.CodeActionKind.Empty,c.CodeActionKind.QuickFix,c.CodeActionKind.Refactor,c.CodeActionKind.RefactorExtract,c.CodeActionKind.RefactorInline,c.CodeActionKind.RefactorMove,c.CodeActionKind.RefactorRewrite,c.CodeActionKind.Source,c.CodeActionKind.SourceOrganizeImports,c.CodeActionKind.Notebook]}},t.honorsChangeAnnotations=!0,t.documentationSupport=!0,t.tagSupport={valueSet:[c.CodeActionTag.LLMGenerated]}}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideCodeActions:(e,t,n,i)=>{const o=this._client,r=async(e,t,n,i)=>{const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContextSync(n)};return o.sendRequest(c.CodeActionRequest.type,r,i).then((e=>i.isCancellationRequested||null==e?null:o.protocol2CodeConverter.asCodeActionResult(e,i)),(e=>o.handleFailedRequest(c.CodeActionRequest.type,i,e,null)))},s=o.middleware;return s.provideCodeActions?s.provideCodeActions(e,t,n,i,r):r(e,t,n,i)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.middleware,o=async(e,t)=>n.sendRequest(c.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeActionSync(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeAction(i,t)),(i=>n.handleFailedRequest(c.CodeActionResolveRequest.type,t,i,e)));return i.resolveCodeAction?i.resolveCodeAction(e,t,o):o(e,t)}:void 0};return[a.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,this.getMetadata(e)),n]}getMetadata(e){if(void 0!==e.codeActionKinds||void 0!==e.documentation)return{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds),documentation:this._client.protocol2CodeConverter.asCodeActionDocumentations(e.documentation)}}}t.CodeActionFeature=d},851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=t.DiagnosticPullMode=t.vsdiag=void 0;const i=n(1398),o=n(3147),r=n(4429),s=n(1104),a=n(8071);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,h,p;!function(e){let t;!function(e){e.full="full",e.unChanged="unChanged"}(t=e.DocumentDiagnosticReportKind||(e.DocumentDiagnosticReportKind={}))}(u||(t.vsdiag=u={})),function(e){e.onType="onType",e.onSave="onSave",e.onFocus="onFocus"}(l||(t.DiagnosticPullMode=l={})),function(e){e.active="open",e.reschedule="reschedule",e.outDated="drop"}(d||(d={})),function(e){e[e.document=1]="document",e[e.workspace=2]="workspace"}(h||(h={})),function(e){e.asKey=function(e){return e instanceof i.Uri?e.toString():e.uri.toString()}}(p||(p={}));class f{documentPullStates;workspacePullStates;constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,n){const o=e===h.document?this.documentPullStates:this.workspacePullStates,[r,s,a]=t instanceof i.Uri?[t.toString(),t,n]:[t.uri.toString(),t.uri,t.version];let c=o.get(r);return void 0===c&&(c={document:s,pulledVersion:a,resultId:void 0},o.set(r,c)),c}update(e,t,n,o){const r=e===h.document?this.documentPullStates:this.workspacePullStates,[s,a,c,u]=t instanceof i.Uri?[t.toString(),t,n,o]:[t.uri.toString(),t.uri,t.version,n];let l=r.get(s);void 0===l?(l={document:a,pulledVersion:c,resultId:u},r.set(s,l)):(l.pulledVersion=c,l.resultId=u)}unTrack(e,t){const n=p.asKey(t);(e===h.document?this.documentPullStates:this.workspacePullStates).delete(n)}tracks(e,t){const n=p.asKey(t);return(e===h.document?this.documentPullStates:this.workspacePullStates).has(n)}getResultId(e,t){const n=p.asKey(t),i=e===h.document?this.documentPullStates:this.workspacePullStates;return i.get(n)?.resultId}getAllResultIds(){const e=[];for(let[t,n]of this.workspacePullStates)this.documentPullStates.has(t)&&(n=this.documentPullStates.get(t)),void 0!==n.resultId&&e.push({uri:t,value:n.resultId});return e}}class g{isDisposed;client;tabs;options;onDidChangeDiagnosticsEmitter;provider;diagnostics;openRequests;documentStates;workspaceErrorCounter;workspaceCancellation;workspaceTimeout;constructor(e,t,n){this.client=e,this.tabs=t,this.options=n,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new i.EventEmitter,this.provider=this.createProvider(),this.diagnostics=i.languages.createDiagnosticCollection(n.identifier),this.openRequests=new Map,this.documentStates=new f,this.workspaceErrorCounter=0}knows(e,t){const n=t instanceof i.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(n.toString())}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;const n=e instanceof i.Uri?e:e.uri;this.pullAsync(e).then((()=>{t&&t()}),(e=>{this.client.error(`Document pull failed for text document ${n.toString()}`,e,!1)}))}async pullAsync(e,t){if(this.isDisposed)return;const n=e instanceof i.Uri,r=n?e:e.uri,s=r.toString();t=n?t:e.version;const c=this.openRequests.get(s),l=n?this.documentStates.track(h.document,e,t):this.documentStates.track(h.document,e);if(void 0===c){const n=new i.CancellationTokenSource;let c,p;this.openRequests.set(s,{state:d.active,document:e,version:t,tokenSource:n});try{c=await this.provider.provideDiagnostics(e,l.resultId,n.token)??{kind:u.DocumentDiagnosticReportKind.full,items:[]}}catch(t){if(t instanceof a.LSPCancellationError&&o.DiagnosticServerCancellationData.is(t.data)&&!1===t.data.retriggerRequest&&(p={state:d.outDated,document:e}),!(void 0===p&&t instanceof i.CancellationError))throw t;p={state:d.reschedule,document:e}}if(p=p??this.openRequests.get(s),void 0===p)return this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),void this.diagnostics.delete(r);if(this.openRequests.delete(s),!this.tabs.isVisible(e))return void this.documentStates.unTrack(h.document,e);if(p.state===d.outDated)return;void 0!==c&&(c.kind===u.DocumentDiagnosticReportKind.full&&this.diagnostics.set(r,c.items),l.pulledVersion=t,l.resultId=c.resultId),p.state===d.reschedule&&this.pull(e)}else c.state===d.active?(c.tokenSource.cancel(),this.openRequests.set(s,{state:d.reschedule,document:c.document})):c.state===d.outDated&&this.openRequests.set(s,{state:d.reschedule,document:c.document})}forgetDocument(e){const t=e instanceof i.Uri?e:e.uri,n=t.toString(),o=this.openRequests.get(n);this.options.workspaceDiagnostics?void 0!==o?this.openRequests.set(n,{state:d.reschedule,document:e}):this.pull(e,(()=>{this.forget(h.document,e)})):(void 0!==o&&(o.state===d.active&&o.tokenSource.cancel(),this.openRequests.set(n,{state:d.outDated,document:e})),this.diagnostics.delete(t),this.forget(h.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then((()=>{this.workspaceTimeout=(0,o.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3)}),(e=>{e instanceof a.LSPCancellationError||o.DiagnosticServerCancellationData.is(e.data)||(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,o.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3))}))}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;void 0!==this.workspaceCancellation&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new i.CancellationTokenSource;const e=this.documentStates.getAllResultIds().map((e=>({uri:this.client.protocol2CodeConverter.asUri(e.uri),value:e.value})));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,(e=>{if(e&&!this.isDisposed)for(const t of e.items)t.kind===u.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(h.document,t.uri)||this.diagnostics.set(t.uri,t.items)),this.documentStates.update(h.workspace,t.uri,t.version??void 0,t.resultId)}))}createProvider(){const e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(e,t,n)=>{const r=(e,t,n)=>{const r={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(e instanceof i.Uri?e:e.uri)},previousResultId:t};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(o.DocumentDiagnosticRequest.type,r,n).then((async e=>null==e||this.isDisposed||n.isCancellationRequested?{kind:u.DocumentDiagnosticReportKind.full,items:[]}:e.kind===o.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,resultId:e.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,n)}:{kind:u.DocumentDiagnosticReportKind.unChanged,resultId:e.resultId}),(e=>this.client.handleFailedRequest(o.DocumentDiagnosticRequest.type,n,e,{kind:u.DocumentDiagnosticReportKind.full,items:[]},!0,!0))):{kind:u.DocumentDiagnosticReportKind.full,items:[]}},s=this.client.middleware;return s.provideDiagnostics?s.provideDiagnostics(e,t,n,r):r(e,t,n)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(e,t,n)=>{const i=async e=>e.kind===o.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,t)}:{kind:u.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version},s=e=>{const t=[];for(const n of e)t.push({uri:this.client.code2ProtocolConverter.asUri(n.uri),value:n.value});return t},a=(e,t,n)=>{const a=(0,r.generateUuid)(),c=this.client.onProgress(o.WorkspaceDiagnosticRequest.partialResult,a,(async e=>{if(null==e)return void n(null);const t={items:[]};for(const n of e.items)try{t.items.push(await i(n))}catch(e){this.client.error("Converting workspace diagnostics failed.",e)}n(t)})),u={identifier:this.options.identifier,previousResultIds:s(e),partialResultToken:a};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(o.WorkspaceDiagnosticRequest.type,u,t).then((async e=>{if(t.isCancellationRequested)return{items:[]};const o={items:[]};for(const t of e.items)o.items.push(await i(t));return c.dispose(),n(o),{items:[]}}),(e=>(c.dispose(),this.client.handleFailedRequest(o.DocumentDiagnosticRequest.type,t,e,{items:[]})))):{items:[]}},c=this.client.middleware;return c.provideWorkspaceDiagnostics?c.provideWorkspaceDiagnostics(e,t,n,a):a(e,t,n)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(const[e,t]of this.openRequests)t.state===d.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:d.outDated,document:t.document});this.diagnostics.dispose()}}class m{client;diagnosticRequestor;lastDocumentToPull;documents;timeoutHandle;isDisposed;constructor(e,t){this.client=e,this.diagnosticRequestor=t,this.documents=new o.LinkedMap,this.isDisposed=!1}add(e){if(!0===this.isDisposed)return;const t=p.asKey(e);this.documents.has(t)||(this.documents.set(t,e,o.Touch.Last),this.lastDocumentToPull=e)}remove(e){const t=p.asKey(e);if(this.documents.delete(t),0!==this.documents.size){if(t===this.lastDocumentToPullKey()){const e=this.documents.before(t);void 0===e?this.stop():this.lastDocumentToPull=e}}else this.stop()}trigger(){this.lastDocumentToPull=this.documents.last,this.runLoop()}runLoop(){!0!==this.isDisposed&&(0!==this.documents.size?void 0!==this.lastDocumentToPull&&void 0===this.timeoutHandle&&(this.timeoutHandle=(0,o.RAL)().timer.setTimeout((()=>{const e=this.documents.first;if(void 0===e)return;const t=p.asKey(e);this.diagnosticRequestor.pullAsync(e).catch((e=>{this.client.error(`Document pull failed for text document ${t}`,e,!1)})).finally((()=>{this.timeoutHandle=void 0,this.documents.set(t,e,o.Touch.Last),t!==this.lastDocumentToPullKey()&&this.runLoop()}))}),500)):this.stop())}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear(),this.lastDocumentToPull=void 0}stop(){this.timeoutHandle?.dispose(),this.timeoutHandle=void 0,this.lastDocumentToPull=void 0}lastDocumentToPullKey(){return void 0!==this.lastDocumentToPull?p.asKey(this.lastDocumentToPull):void 0}}class v{disposable;diagnosticRequestor;activeTextDocument;backgroundScheduler;constructor(e,t,n){const r=Object.assign({onChange:!1,onSave:!1,onFocus:!1},e.clientOptions.diagnosticPullOptions),a=e.protocol2CodeConverter.asDocumentSelector(n.documentSelector),c=[],u=(e,t)=>!("string"==typeof e||void 0!==e.language&&"*"!==e.language||void 0!==e.scheme&&"*"!==e.scheme&&e.scheme!==t.scheme||void 0!==e.pattern&&!(0,s.matchGlobPattern)(e.pattern,t)),d=e=>e instanceof i.Uri?(e=>{const t=n.documentSelector;if(void 0!==r.match)return r.match(t,e);for(const n of t)if(o.TextDocumentFilter.is(n)&&u(n,e))return!0;return!1})(e):i.languages.match(a,e)>0&&t.isVisible(e),p=e=>i.languages.match(a,e.document)>0&&t.isVisible(e.notebook.uri),f=e=>e instanceof i.Uri?this.activeTextDocument?.uri.toString()===e.toString():this.activeTextDocument===e;this.diagnosticRequestor=new g(e,t,n),this.backgroundScheduler=new m(e,this.diagnosticRequestor);const v=e=>{d(e)&&n.interFileDependencies&&!f(e)&&!1!==r.onChange&&this.backgroundScheduler.add(e)},y=(e,t)=>(void 0===r.filter||!r.filter(e,t))&&this.diagnosticRequestor.knows(h.document,e);this.activeTextDocument=i.window.activeTextEditor?.document,c.push(i.window.onDidChangeActiveTextEditor((e=>{const t=this.activeTextDocument;this.activeTextDocument=e?.document,void 0!==t&&v(t),void 0!==this.activeTextDocument&&(this.backgroundScheduler.remove(this.activeTextDocument),!0===r.onFocus&&d(this.activeTextDocument)&&y(this.activeTextDocument,l.onFocus)&&this.diagnosticRequestor.pull(this.activeTextDocument))})));const b=e.getFeature(o.DidOpenTextDocumentNotification.method);c.push(b.onNotificationSent((e=>{const t=e.textDocument;this.diagnosticRequestor.knows(h.document,t)||d(t)&&this.diagnosticRequestor.pull(t,(()=>{v(t)}))})));const _=e.getFeature(o.NotebookDocumentSyncRegistrationType.method);c.push(_.onOpenNotificationSent((e=>{for(const t of e.getCells())p(t)&&this.diagnosticRequestor.pull(t.document,(()=>{v(t.document)}))}))),c.push(t.onOpen((e=>{for(const t of e){if(this.diagnosticRequestor.knows(h.document,t))continue;const e=t.toString();let n;for(const t of i.workspace.textDocuments)if(e===t.uri.toString()){n=t;break}void 0!==n&&d(n)&&this.diagnosticRequestor.pull(n,(()=>{v(n)}))}})));const C=new Set;for(const e of i.workspace.textDocuments)d(e)&&(this.diagnosticRequestor.pull(e,(()=>{v(e)})),C.add(e.uri.toString()));for(const e of i.workspace.notebookDocuments)for(const t of e.getCells())p(t)&&(this.diagnosticRequestor.pull(t.document,(()=>{v(t.document)})),C.add(t.document.uri.toString()));if(!0===r.onTabs)for(const e of t.getTabResources())!C.has(e.toString())&&d(e)&&this.diagnosticRequestor.pull(e,(()=>{v(e)}));if(!0===r.onChange){const t=e.getFeature(o.DidChangeTextDocumentNotification.method);c.push(t.onNotificationSent((async e=>{const t=e.textDocument;y(t,l.onType)&&this.diagnosticRequestor.pull(t,(()=>{this.backgroundScheduler.trigger()}))}))),c.push(_.onChangeNotificationSent((async e=>{const t=(e.cells?.textContent||[]).map((t=>e.notebook.getCells().find((e=>e.document.uri.toString()===t.document.uri.toString()))));for(const e of t)e&&p(e)&&this.diagnosticRequestor.pull(e.document,(()=>{this.backgroundScheduler.trigger()}));const n=e.cells?.structure?.didClose||[];for(const e of n)this.diagnosticRequestor.forgetDocument(e.document);const i=e.cells?.structure?.didOpen||[];for(const e of i)p(e)&&this.diagnosticRequestor.pull(e.document,(()=>{this.backgroundScheduler.trigger()}))})))}if(!0===r.onSave){const t=e.getFeature(o.DidSaveTextDocumentNotification.method);c.push(t.onNotificationSent((e=>{const t=e.textDocument;y(t,l.onSave)&&this.diagnosticRequestor.pull(e.textDocument)}))),c.push(_.onSaveNotificationSent((e=>{for(const t of e.getCells())p(t)&&this.diagnosticRequestor.pull(t.document)})))}const D=e.getFeature(o.DidCloseTextDocumentNotification.method);c.push(D.onNotificationSent((e=>{this.cleanUpDocument(e.textDocument)}))),c.push(_.onCloseNotificationSent((e=>{for(const t of e.getCells())this.cleanUpDocument(t.document)}))),t.onClose((e=>{for(const t of e)this.cleanUpDocument(t)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event((()=>{for(const e of i.workspace.textDocuments)d(e)&&this.diagnosticRequestor.pull(e)})),!0===n.workspaceDiagnostics&&"da348dc5-c30a-4515-9d98-31ff3be38d14"!==n.identifier&&this.diagnosticRequestor.pullWorkspace(),this.disposable=i.Disposable.from(...c,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}forget(e){this.cleanUpDocument(e)}cleanUpDocument(e){this.backgroundScheduler.remove(e),this.diagnosticRequestor.knows(h.document,e)&&this.diagnosticRequestor.forgetDocument(e)}}class y extends a.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){const t=c(c(e,"textDocument"),"diagnostic");t.relatedInformation=!0,t.tagSupport={valueSet:[o.DiagnosticTag.Unnecessary,o.DiagnosticTag.Deprecated]},t.codeDescriptionSupport=!0,t.dataSupport=!0,t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,c(c(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.DiagnosticRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}));const[n,i]=this.getRegistration(t,e.diagnosticProvider);n&&i&&this.register({id:n,registerOptions:i})}clear(){super.clear()}refresh(){for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}registerLanguageProvider(e){const t=new v(this._client,this._client.tabsModel,e);return[t.disposable,t]}}t.DiagnosticFeature=y},857:e=>{"use strict";e.exports=require("os")},956:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseClass=void 0;const n={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},i=e=>e.replace(/[[\]\\-]/g,"\\$&"),o=e=>e.join("");t.parseClass=(e,t)=>{const r=t;if("["!==e.charAt(r))throw new Error("not in a brace expression");const s=[],a=[];let c=r+1,u=!1,l=!1,d=!1,h=!1,p=r,f="";e:for(;c<e.length;){const t=e.charAt(c);if("!"!==t&&"^"!==t||c!==r+1){if("]"===t&&u&&!d){p=c+1;break}if(u=!0,"\\"!==t||d){if("["===t&&!d)for(const[t,[i,o,u]]of Object.entries(n))if(e.startsWith(t,c)){if(f)return["$.",!1,e.length-r,!0];c+=t.length,u?a.push(i):s.push(i),l=l||o;continue e}d=!1,f?(t>f?s.push(i(f)+"-"+i(t)):t===f&&s.push(i(t)),f="",c++):e.startsWith("-]",c+1)?(s.push(i(t+"-")),c+=2):e.startsWith("-",c+1)?(f=t,c+=2):(s.push(i(t)),c++)}else d=!0,c++}else h=!0,c++}if(p<c)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-r,!0];if(0===a.length&&1===s.length&&/^\\?.$/.test(s[0])&&!h){return[(g=2===s[0].length?s[0].slice(-1):s[0],g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,p-r,!1]}var g;const m="["+(h?"^":"")+o(s)+"]",v="["+(h?"":"^")+o(a)+"]";return[s.length&&a.length?"("+m+"|"+v+")":s.length?m:v,l,p-r,!0]}},992:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const i=n(3147);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(i.ShowDocumentRequest.type,e)}}},1005:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentLinks:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(c.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asDocumentLinks(e,t)),(e=>n.handleFailedRequest(c.DocumentLinkRequest.type,t,e,null))),o=n.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,i):i(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(c.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asDocumentLink(i)),(i=>n.handleFailedRequest(c.DocumentLinkResolveRequest.type,t,i,e))),o=n.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,i):i(e,t)}:void 0};return[a.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentLinkFeature=d},1104:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.matchGlobPattern=function(e,t){let n;if("string"==typeof e)n=e.replace(/\\/g,"/");else try{const t=c.Uri.parse("string"==typeof e.baseUri?e.baseUri:e.baseUri.uri);n=t.with({path:t.path+"/"+e.pattern}).fsPath.replace(/\\/g,"/")}catch(e){return!1}const i=new a.Minimatch(n,{noext:!0});return!!i.makeRe()&&i.match(t.fsPath)};const a=s(n(3277)),c=n(1398)},1109:(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 i{[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 i=this._map.get(e);if(i)return t!==n.None&&this.touch(i,t),i.value}set(e,t,i=n.None){let o=this._map.get(e);if(o)o.value=t,i!==n.None&&this.touch(o,i);else{switch(o={key:e,value:t,next:void 0,previous:void 0},i){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.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=i,t.LRUCache=class extends i{_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))}}},1138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escape=void 0,t.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},1203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const i=n(8431);var o,r;!function(e){e.method="textDocument/foldingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.FoldingRangeRequest=o={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(r||(t.FoldingRangeRefreshRequest=r={}))},1262:(e,t,n)=>{const i=n(7851);e.exports=(e,t,n)=>i(e,t,n)<0},1361:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1398:e=>{"use strict";e.exports=require("vscode")},1494:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const a=n(7672),c=s(n(8633)),u=n(8431);var l,d,h,p,f;!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}(h||(t.DocumentDiagnosticRequest=h={})),function(e){e.method="workspace/diagnostic",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolRequestType(e.method),e.partialResult=new a.ProgressType}(p||(t.WorkspaceDiagnosticRequest=p={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=u.MessageDirection.serverToClient,e.type=new u.ProtocolRequestType0(e.method)}(f||(t.DiagnosticRefreshRequest=f={}))},1530:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const i=n(8431);var o;!function(e){e.method="textDocument/selectionRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.SelectionRangeRequest=o={}))},1565:(e,t,n)=>{const i=Symbol("SemVer ANY");class o{static get ANY(){return i}constructor(e,t){if(t=r(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===i?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=i}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=r(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=o;const r=n(3990),{safeRe:s,t:a}=n(2841),c=n(4004),u=n(1361),l=n(4517),d=n(7476)},1815:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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(8431),c=n(2852),u=s(n(8633)),l=n(7287);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return l.ImplementationRequest}});const d=n(9264);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return d.TypeDefinitionRequest}});const h=n(6860);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return h.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return h.DidChangeWorkspaceFoldersNotification}});const p=n(7639);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return p.ConfigurationRequest}});const f=n(3747);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return f.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return f.ColorPresentationRequest}});const g=n(1203);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return g.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return g.FoldingRangeRefreshRequest}});const m=n(5581);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return m.DeclarationRequest}});const v=n(1530);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return v.SelectionRangeRequest}});const y=n(4166);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return y.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return y.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return y.WorkDoneProgressCancelNotification}});const b=n(7602);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return b.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return b.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return b.CallHierarchyPrepareRequest}});const _=n(2067);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return _.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return _.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return _.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return _.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return _.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return _.SemanticTokensRegistrationType}});const C=n(4333);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return C.ShowDocumentRequest}});const D=n(2249);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return D.LinkedEditingRangeRequest}});const w=n(4781);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return w.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return w.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return w.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return w.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return w.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return w.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return w.WillDeleteFilesRequest}});const S=n(7684);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return S.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return S.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return S.MonikerRequest}});const R=n(7062);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return R.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySupertypesRequest}});const T=n(3491);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return T.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return T.InlineValueRefreshRequest}});const P=n(9383);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return P.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return P.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return P.InlayHintRefreshRequest}});const k=n(1494);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return k.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return k.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return k.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return k.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return k.DiagnosticRefreshRequest}});const O=n(4792);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return O.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return O.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return O.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return O.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return O.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return O.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return O.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return O.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return O.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return O.DidCloseNotebookDocumentNotification}});const x=n(2322);Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return x.InlineCompletionRequest}});const E=n(2878);var M,N,F,q,j,I,L,A,$,W,H,U,K,z,B,V,G,X,J,Q,Y,Z,ee,te,ne,ie,oe,re,se,ae,ce,ue,le,de,he,pe,fe,ge,me,ve,ye,be,_e,Ce,De,we,Se,Re,Te,Pe,ke,Oe,xe,Ee,Me,Ne,Fe,qe,je,Ie,Le,Ae,$e,We,He,Ue,Ke;Object.defineProperty(t,"TextDocumentContentRequest",{enumerable:!0,get:function(){return E.TextDocumentContentRequest}}),Object.defineProperty(t,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return E.TextDocumentContentRefreshRequest}}),function(e){e.is=function(e){const t=e;return u.string(t)||u.string(t.language)||u.string(t.scheme)||fe.is(t.pattern)}}(M||(t.TextDocumentFilter=M={})),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))}}(F||(t.NotebookCellTextDocumentFilter=F={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(const t of e)if(!u.string(t)&&!M.is(t)&&!F.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"}(A||(t.FailureHandlingKind=A={})),function(e){e.ES2020="ES2020"}($||(t.RegularExpressionEngineKind=$={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(W||(t.PositionEncodingKind=W={})),function(e){e.hasId=function(e){const t=e;return t&&u.string(t.id)&&t.id.length>0}}(H||(t.StaticRegistrationOptions=H={})),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)}}(K||(t.WorkDoneProgressOptions=K={})),function(e){e.method="initialize",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(z||(t.InitializeRequest=z={})),function(e){e.unknownProtocolVersion=1}(B||(t.InitializeErrorCodes=B={})),function(e){e.method="initialized",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method)}(V||(t.InitializedNotification=V={})),function(e){e.method="shutdown",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType0(e.method)}(G||(t.ShutdownRequest=G={})),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)}(J||(t.DidChangeConfigurationNotification=J={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(Q||(t.MessageType=Q={})),function(e){e.method="window/showMessage",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(Y||(t.ShowMessageNotification=Y={})),function(e){e.method="window/showMessageRequest",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType(e.method)}(Z||(t.ShowMessageRequest=Z={})),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)}(ie||(t.DidOpenTextDocumentNotification=ie={})),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)}(re||(t.DidChangeTextDocumentNotification=re={})),function(e){e.method="textDocument/didClose",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method)}(se||(t.DidCloseTextDocumentNotification=se={})),function(e){e.method="textDocument/didSave",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method)}(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)}(ue||(t.WillSaveTextDocumentNotification=ue={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(le||(t.WillSaveTextDocumentWaitUntilRequest=le={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolNotificationType(e.method)}(de||(t.DidChangeWatchedFilesNotification=de={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(he||(t.FileChangeType=he={})),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)}}(pe||(t.RelativePattern=pe={})),function(e){e.is=function(e){const t=e;return u.string(t)||pe.is(t)}}(fe||(t.GlobPattern=fe={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ge||(t.WatchKind=ge={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolNotificationType(e.method)}(me||(t.PublishDiagnosticsNotification=me={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ve||(t.CompletionTriggerKind=ve={})),function(e){e.method="textDocument/completion",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(ye||(t.CompletionRequest=ye={})),function(e){e.method="completionItem/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(be||(t.CompletionResolveRequest=be={})),function(e){e.method="textDocument/hover",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(_e||(t.HoverRequest=_e={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(Ce||(t.SignatureHelpTriggerKind=Ce={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(De||(t.SignatureHelpRequest=De={})),function(e){e.method="textDocument/definition",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(we||(t.DefinitionRequest=we={})),function(e){e.method="textDocument/references",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Se||(t.ReferencesRequest=Se={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Re||(t.DocumentHighlightRequest=Re={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Te||(t.DocumentSymbolRequest=Te={})),function(e){e.method="textDocument/codeAction",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Pe||(t.CodeActionRequest=Pe={})),function(e){e.method="codeAction/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(ke||(t.CodeActionResolveRequest=ke={})),function(e){e.method="workspace/symbol",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Oe||(t.WorkspaceSymbolRequest=Oe={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(xe||(t.WorkspaceSymbolResolveRequest=xe={})),function(e){e.method="textDocument/codeLens",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Ee||(t.CodeLensRequest=Ee={})),function(e){e.method="codeLens/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Me||(t.CodeLensResolveRequest=Me={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType0(e.method)}(Ne||(t.CodeLensRefreshRequest=Ne={})),function(e){e.method="textDocument/documentLink",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Fe||(t.DocumentLinkRequest=Fe={})),function(e){e.method="documentLink/resolve",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(qe||(t.DocumentLinkResolveRequest=qe={})),function(e){e.method="textDocument/formatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(je||(t.DocumentFormattingRequest=je={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Ie||(t.DocumentRangeFormattingRequest=Ie={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Le||(t.DocumentRangesFormattingRequest=Le={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Ae||(t.DocumentOnTypeFormattingRequest=Ae={})),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)}(We||(t.RenameRequest=We={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(He||(t.PrepareRenameRequest=He={})),function(e){e.method="workspace/executeCommand",e.messageDirection=a.MessageDirection.clientToServer,e.type=new a.ProtocolRequestType(e.method)}(Ue||(t.ExecuteCommandRequest=Ue={})),function(e){e.method="workspace/applyEdit",e.messageDirection=a.MessageDirection.serverToClient,e.type=new a.ProtocolRequestType("workspace/applyEdit")}(Ke||(t.ApplyWorkspaceEditRequest=Ke={}))},1878:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytesHex=function(e){if(o)return o.randomBytes(e).toString("hex");if(crypto){return t=crypto.getRandomValues(new Uint8Array(e)),[...t].map((e=>e.toString(16).padStart(2,"0"))).join("")}var t;(0,i.fail)("crypto library not found")};const i=n(9164);let o;try{o=n(6982),o?.randomBytes||(o=void 0)}catch{}},1913:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(3147);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(i.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=i.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=i.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},1930:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(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=i,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&&i(e.then)}},1943:e=>{"use strict";e.exports=require("fs/promises")},1946:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9023),o=n(7672);class r extends o.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return r.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new i.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}class s{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),o.Disposable.create((()=>this.stream.off("data",e)))}}class a{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,i)=>{const o=e=>{null==e?n():i(e)};"string"==typeof e?this.stream.write(e,t,o):this.stream.write(e,o)}))}end(){this.stream.end()}}const c=Object.freeze({messageBuffer:Object.freeze({create:e=>new r(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new i.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new a(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const i=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(i)}},setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){const i=setInterval(e,t,...n);return{dispose:()=>clearInterval(i)}}})});function u(){return c}!function(e){e.install=function(){o.RAL.install(c)}}(u||(u={})),t.default=u},1959:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.SelectionRangeRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.selectionRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideSelectionRanges:(e,t,n)=>{const i=this._client,r=async(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:i.code2ProtocolConverter.asPositionsSync(t,n)};return i.sendRequest(o.SelectionRangeRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSelectionRanges(e,n)),(e=>i.handleFailedRequest(o.SelectionRangeRequest.type,n,e,null)))},s=i.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.SelectionRangeFeature=s},2067:(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 i=n(8431);var o,r,s,a,c,u;!function(e){e.Relative="relative"}(o||(t.TokenFormat=o={})),function(e){e.method="textDocument/semanticTokens",e.type=new i.RegistrationType(e.method)}(r||(t.SemanticTokensRegistrationType=r={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=r.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(u||(t.SemanticTokensRefreshRequest=u={}))},2249:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const i=n(8431);var o;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.LinkedEditingRangeRequest=o={}))},2322:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const i=n(8431);var o;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlineCompletionRequest=o={}))},2328:(e,t,n)=>{"use strict";function i(e,t=!1){const n=e.length;let i=0,a="",c=0,u=16,l=0,d=0,h=0,p=0,f=0;function g(t,n){let o=0,r=0;for(;o<t||!n;){let t=e.charCodeAt(i);if(t>=48&&t<=57)r=16*r+t-48;else if(t>=65&&t<=70)r=16*r+t-65+10;else{if(!(t>=97&&t<=102))break;r=16*r+t-97+10}i++,o++}return o<t&&(r=-1),r}function m(){if(a="",f=0,c=i,d=l,p=h,i>=n)return c=n,u=17;let t=e.charCodeAt(i);if(o(t)){do{i++,a+=String.fromCharCode(t),t=e.charCodeAt(i)}while(o(t));return u=15}if(r(t))return i++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(i)&&(i++,a+="\n"),l++,h=i,u=14;switch(t){case 123:return i++,u=1;case 125:return i++,u=2;case 91:return i++,u=3;case 93:return i++,u=4;case 58:return i++,u=6;case 44:return i++,u=5;case 34:return i++,a=function(){let t="",o=i;for(;;){if(i>=n){t+=e.substring(o,i),f=2;break}const s=e.charCodeAt(i);if(34===s){t+=e.substring(o,i),i++;break}if(92!==s){if(s>=0&&s<=31){if(r(s)){t+=e.substring(o,i),f=2;break}f=6}i++}else{if(t+=e.substring(o,i),i++,i>=n){f=2;break}switch(e.charCodeAt(i++)){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=g(4,!0);e>=0?t+=String.fromCharCode(e):f=4;break;default:f=5}o=i}}return t}(),u=10;case 47:const o=i-1;if(47===e.charCodeAt(i+1)){for(i+=2;i<n&&!r(e.charCodeAt(i));)i++;return a=e.substring(o,i),u=12}if(42===e.charCodeAt(i+1)){i+=2;const t=n-1;let s=!1;for(;i<t;){const t=e.charCodeAt(i);if(42===t&&47===e.charCodeAt(i+1)){i+=2,s=!0;break}i++,r(t)&&(13===t&&10===e.charCodeAt(i)&&i++,l++,h=i)}return s||(i++,f=1),a=e.substring(o,i),u=13}return a+=String.fromCharCode(t),i++,u=16;case 45:if(a+=String.fromCharCode(t),i++,i===n||!s(e.charCodeAt(i)))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=i;if(48===e.charCodeAt(i))i++;else for(i++;i<e.length&&s(e.charCodeAt(i));)i++;if(i<e.length&&46===e.charCodeAt(i)){if(i++,!(i<e.length&&s(e.charCodeAt(i))))return f=3,e.substring(t,i);for(i++;i<e.length&&s(e.charCodeAt(i));)i++}let n=i;if(i<e.length&&(69===e.charCodeAt(i)||101===e.charCodeAt(i)))if(i++,(i<e.length&&43===e.charCodeAt(i)||45===e.charCodeAt(i))&&i++,i<e.length&&s(e.charCodeAt(i))){for(i++;i<e.length&&s(e.charCodeAt(i));)i++;n=i}else f=3;return e.substring(t,n)}(),u=11;default:for(;i<n&&v(t);)i++,t=e.charCodeAt(i);if(c!==i){switch(a=e.substring(c,i),a){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),i++,u=16}}function v(e){if(o(e)||r(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){i=e,a="",c=0,u=16,f=0},getPosition:()=>i,scan:t?function(){let e;do{e=m()}while(e>=12&&e<=15);return e}:m,getToken:()=>u,getTokenValue:()=>a,getTokenOffset:()=>c,getTokenLength:()=>i-c,getTokenStartLine:()=>d,getTokenStartCharacter:()=>c-p,getTokenError:()=>f}}function o(e){return 32===e||9===e}function r(e){return 10===e||13===e}function s(e){return e>=48&&e<=57}var a;n.r(t),n.d(t,{ParseErrorCode:()=>F,ScanError:()=>w,SyntaxKind:()=>S,applyEdits:()=>L,createScanner:()=>D,findNodeAtLocation:()=>k,findNodeAtOffset:()=>O,format:()=>j,getLocation:()=>R,getNodePath:()=>x,getNodeValue:()=>E,modify:()=>I,parse:()=>T,parseTree:()=>P,printParseErrorCode:()=>q,stripComments:()=>N,visit:()=>M}),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 h(e,t,n){let o,r,s,a,u;if(t){for(a=t.offset,u=a+t.length,s=a;s>0&&!f(e,s-1);)s--;let i=u;for(;i<e.length&&!f(e,i);)i++;r=e.substring(s,i),o=function(e,t){let n=0,i=0;const o=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===c[1])i++;else{if("\t"!==t)break;i+=o}n++}return Math.floor(i/o)}(r,n)}else r=e,o=0,s=0,a=0,u=e.length;const h=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),g=d.includes(h);let m,v=0,y=0;m=n.insertSpaces?c[n.tabSize||4]??p(c[1],n.tabSize||4):"\t";const b="\t"===m?"\t":" ";let _=i(r,!1),C=!1;function D(){if(v>1)return p(h,v)+p(m,o+y);const e=m.length*(o+y);return!g||e>l[b][h].length?h+p(m,o+y):e<=0?h:l[b][h][e]}function w(){let e=_.scan();for(v=0;15===e||14===e;)14===e&&n.keepLines?v+=1:14===e&&(v=1),e=_.scan();return C=16===e||0!==_.getTokenError(),e}const S=[];function R(n,i,o){C||t&&!(i<u&&o>a)||e.substring(i,o)===n||S.push({offset:i,length:o-i,content:n})}let T=w();if(n.keepLines&&v>0&&R(p(h,v),0,0),17!==T){let e=_.getTokenOffset()+s;R(m.length*o<20&&n.insertSpaces?c[m.length*o]:p(m,o),s,e)}for(;17!==T;){let e=_.getTokenOffset()+_.getTokenLength()+s,t=w(),i="",o=!1;for(;0===v&&(12===t||13===t);){let n=_.getTokenOffset()+s;R(c[1],e,n),e=_.getTokenOffset()+_.getTokenLength()+s,o=12===t,i=o?D():"",t=w()}if(2===t)1!==T&&y--,n.keepLines&&v>0||!n.keepLines&&1!==T?i=D():n.keepLines&&(i=c[1]);else if(4===t)3!==T&&y--,n.keepLines&&v>0||!n.keepLines&&3!==T?i=D():n.keepLines&&(i=c[1]);else{switch(T){case 3:case 1:y++,i=n.keepLines&&v>0||!n.keepLines?D():c[1];break;case 5:i=n.keepLines&&v>0||!n.keepLines?D():c[1];break;case 12:i=D();break;case 13:v>0?i=D():o||(i=c[1]);break;case 6:n.keepLines&&v>0?i=D():o||(i=c[1]);break;case 10:n.keepLines&&v>0?i=D():6!==t||o||(i="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&v>0?i=D():12!==t&&13!==t||o?5!==t&&17!==t&&(C=!0):i=c[1];break;case 16:C=!0}v>0&&(12===t||13===t)&&(i=D())}17===t&&(i=n.keepLines&&v>0?D():n.insertFinalNewline?h:""),R(i,e,_.getTokenOffset()+s),T=t}return S}function p(e,t){let n="";for(let i=0;i<t;i++)n+=e;return n}function f(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var g;function m(e,t=[],n=g.DEFAULT){let i={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(e){"property"===i.type&&(i.length=e-i.offset,i=i.parent)}function r(e){return i.children.push(e),e}y(e,{onObjectBegin:e=>{i=r({type:"object",offset:e,length:-1,parent:i,children:[]})},onObjectProperty:(e,t,n)=>{i=r({type:"property",offset:t,length:-1,parent:i,children:[]}),i.children.push({type:"string",value:e,offset:t,length:n,parent:i})},onObjectEnd:(e,t)=>{o(e+t),i.length=e+t-i.offset,i=i.parent,o(e+t)},onArrayBegin:(e,t)=>{i=r({type:"array",offset:e,length:-1,parent:i,children:[]})},onArrayEnd:(e,t)=>{i.length=e+t-i.offset,i=i.parent,o(e+t)},onLiteralValue:(e,t,n)=>{r({type:b(e),offset:t,length:n,parent:i,value:e}),o(t+n)},onSeparator:(e,t,n)=>{"property"===i.type&&(":"===e?i.colonOffset=t:","===e&&o(t))},onError:(e,n,i)=>{t.push({error:e,offset:n,length:i})}},n);const s=i.children[0];return s&&delete s.parent,s}function v(e,t){if(!e)return;let n=e;for(let e of t)if("string"==typeof e){if("object"!==n.type||!Array.isArray(n.children))return;let t=!1;for(const i of n.children)if(Array.isArray(i.children)&&i.children[0].value===e&&2===i.children.length){n=i.children[1],t=!0;break}if(!t)return}else{const t=e;if("array"!==n.type||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n}function y(e,t,n=g.DEFAULT){const o=i(e,!1),r=[];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(),(()=>r.slice())):()=>!0}function u(e){return e?()=>{s>0?s++:!1===e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(()=>r.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),h=c(t.onObjectProperty),p=l(t.onObjectEnd),f=u(t.onArrayBegin),m=l(t.onArrayEnd),v=c(t.onLiteralValue),y=a(t.onSeparator),b=(C=t.onComment)?()=>0===s&&C(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0,_=a(t.onError);var C;const D=n&&n.disallowComments,w=n&&n.allowTrailingComma;function S(){for(;;){const e=o.scan();switch(o.getTokenError()){case 4:R(14);break;case 5:R(15);break;case 3:R(13);break;case 1:D||R(11);break;case 2:R(12);break;case 6:R(16)}switch(e){case 12:case 13:D?R(10):b();break;case 16:R(1);break;case 15:case 14:break;default:return e}}}function R(e,t=[],n=[]){if(_(e),t.length+n.length>0){let e=o.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){S();break}if(-1!==n.indexOf(e))break;e=S()}}}function T(e){const t=o.getTokenValue();return e?v(t):(h(t),r.push(t)),S(),!0}return S(),17===o.getToken()?!!n.allowEmptyContent||(R(4,[],[]),!1):function e(){switch(o.getToken()){case 3:return function(){f(),S();let t=!0,n=!1;for(;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(n||R(4,[],[]),y(","),S(),4===o.getToken()&&w)break}else n&&R(6,[],[]);t?(r.push(0),t=!1):r[r.length-1]++,e()||R(4,[],[4,5]),n=!0}return m(),t||r.pop(),4!==o.getToken()?R(8,[4],[]):S(),!0}();case 1:return function(){d(),S();let t=!1;for(;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||R(4,[],[]),y(","),S(),2===o.getToken()&&w)break}else t&&R(6,[],[]);(10!==o.getToken()?(R(3,[],[2,5]),0):(T(!1),6===o.getToken()?(y(":"),S(),e()||R(4,[],[2,5])):R(5,[],[2,5]),r.pop(),1))||R(4,[],[2,5]),t=!0}return p(),2!==o.getToken()?R(7,[2],[]):S(),!0}();case 10:return T(!0);default:return function(){switch(o.getToken()){case 11:const e=o.getTokenValue();let t=Number(e);isNaN(t)&&(R(2),t=0),v(t);break;case 7:v(null);break;case 8:v(!0);break;case 9:v(!1);break;default:return!1}return S(),!0}()}}()?(17!==o.getToken()&&R(9,[],[]),!0):(R(4,[],[]),!1)}function b(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":return e?Array.isArray(e)?"array":"object":"null";default:return"null"}}function _(e,t,n){if(!n.formattingOptions)return[t];let i=C(e,t),o=t.offset,r=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;o>0&&!f(i,o-1);)o--;for(;r<i.length&&!f(i,r);)r++}const s=h(i,{offset:o,length:r-o},{...n.formattingOptions,keepLines:!1});for(let e=s.length-1;e>=0;e--){const t=s[e];i=C(i,t),o=Math.min(o,t.offset),r=Math.max(r,t.offset+t.length),r+=t.content.length-t.length}return[{offset:o,length:e.length-(i.length-r)-o,content:i.substring(o,r)}]}function C(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}!function(e){e.DEFAULT={allowTrailingComma:!1}}(g||(g={}));const D=i;var w,S;!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"}(w||(w={})),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"}(S||(S={}));const R=function(e,t){const n=[],i=new Object;let o;const r={value:{},offset:0,length:0,type:"object",parent:void 0};let s=!1;function a(e,t,n,i){r.value=e,r.offset=t,r.length=n,r.type=i,r.colonOffset=void 0,o=r}try{y(e,{onObjectBegin:(e,r)=>{if(t<=e)throw i;o=void 0,s=t>e,n.push("")},onObjectProperty:(e,o,r)=>{if(t<o)throw i;if(a(e,o,r,"property"),n[n.length-1]=e,t<=o+r)throw i},onObjectEnd:(e,r)=>{if(t<=e)throw i;o=void 0,n.pop()},onArrayBegin:(e,r)=>{if(t<=e)throw i;o=void 0,n.push(0)},onArrayEnd:(e,r)=>{if(t<=e)throw i;o=void 0,n.pop()},onLiteralValue:(e,n,o)=>{if(t<n)throw i;if(a(e,n,o,b(e)),t<=n+o)throw i},onSeparator:(e,r,a)=>{if(t<=r)throw i;if(":"===e&&o&&"property"===o.type)o.colonOffset=r,s=!1,o=void 0;else if(","===e){const e=n[n.length-1];"number"==typeof e?n[n.length-1]=e+1:(s=!0,n[n.length-1]=""),o=void 0}}})}catch(e){if(e!==i)throw e}return{path:n,previousNode:o,isAtPropertyKey:s,matches:e=>{let t=0;for(let i=0;t<e.length&&i<n.length;i++)if(e[t]===n[i]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},T=function(e,t=[],n=g.DEFAULT){let i=null,o=[];const r=[];function s(e){Array.isArray(o)?o.push(e):null!==i&&(o[i]=e)}return y(e,{onObjectBegin:()=>{const e={};s(e),r.push(o),o=e,i=null},onObjectProperty:e=>{i=e},onObjectEnd:()=>{o=r.pop()},onArrayBegin:()=>{const e=[];s(e),r.push(o),o=e,i=null},onArrayEnd:()=>{o=r.pop()},onLiteralValue:s,onError:(e,n,i)=>{t.push({error:e,offset:n,length:i})}},n),o[0]},P=m,k=v,O=function e(t,n,i=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,i)){const o=t.children;if(Array.isArray(o))for(let t=0;t<o.length&&o[t].offset<=n;t++){const r=e(o[t],n,i);if(r)return r}return t}},x=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},E=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let i of t.children){const t=i.children[1];t&&(n[i.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}},M=y,N=function(e,t){let n,o,r=i(e),s=[],a=0;do{switch(o=r.getPosition(),n=r.scan(),n){case 12:case 13:case 17:a!==o&&s.push(e.substring(a,o)),void 0!==t&&s.push(r.getTokenValue().replace(/[^\r\n]/g,t)),a=r.getPosition()}}while(17!==n);return s.join("")};var F;function q(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function j(e,t,n){return h(e,t,n)}function I(e,t,n,i){return function(e,t,n,i){const o=t.slice(),r=m(e,[]);let s,a;for(;o.length>0&&(a=o.pop(),s=v(r,o),void 0===s&&void 0!==n);)n="string"==typeof a?{[a]:n}:[n];if(s){if("object"===s.type&&"string"==typeof a&&Array.isArray(s.children)){const t=v(s,[a]);if(void 0!==t){if(void 0===n){if(!t.parent)throw new Error("Malformed AST");const n=s.children.indexOf(t.parent);let o,r=t.parent.offset+t.parent.length;if(n>0){let e=s.children[n-1];o=e.offset+e.length}else o=s.offset+1,s.children.length>1&&(r=s.children[1].offset);return _(e,{offset:o,length:r-o,content:""},i)}return _(e,{offset:t.offset,length:t.length,content:JSON.stringify(n)},i)}{if(void 0===n)return[];const t=`${JSON.stringify(a)}: ${JSON.stringify(n)}`,o=i.getInsertionIndex?i.getInsertionIndex(s.children.map((e=>e.children[0].value))):s.children.length;let r;if(o>0){let e=s.children[o-1];r={offset:e.offset+e.length,length:0,content:","+t}}else r=0===s.children.length?{offset:s.offset+1,length:0,content:t}:{offset:s.offset+1,length:0,content:t+","};return _(e,r,i)}}if("array"===s.type&&"number"==typeof a&&Array.isArray(s.children)){const t=a;if(-1===t){const t=`${JSON.stringify(n)}`;let o;if(0===s.children.length)o={offset:s.offset+1,length:0,content:t};else{const e=s.children[s.children.length-1];o={offset:e.offset+e.length,length:0,content:","+t}}return _(e,o,i)}if(void 0===n&&s.children.length>=0){const t=a,n=s.children[t];let o;if(1===s.children.length)o={offset:s.offset+1,length:s.length-2,content:""};else if(s.children.length-1===t){let e=s.children[t-1],n=e.offset+e.length;o={offset:n,length:s.offset+s.length-2-n,content:""}}else o={offset:n.offset,length:s.children[t+1].offset-n.offset,content:""};return _(e,o,i)}if(void 0!==n){let t;const o=`${JSON.stringify(n)}`;if(!i.isArrayInsertion&&s.children.length>a){const e=s.children[a];t={offset:e.offset,length:e.length,content:o}}else if(0===s.children.length||0===a)t={offset:s.offset+1,length:0,content:0===s.children.length?o:o+","};else{const e=a>s.children.length?s.children.length:a,n=s.children[e-1];t={offset:n.offset+n.length,length:0,content:","+o}}return _(e,t,i)}throw new Error(`Can not ${void 0===n?"remove":i.isArrayInsertion?"insert":"modify"} Array index ${t} as length is not sufficient`)}throw new Error(`Can not add ${"number"!=typeof a?"index":"property"} to parent of type ${s.type}`)}if(void 0===n)throw new Error("Can not delete in empty document");return _(e,{offset:r?r.offset:0,length:r?r.length:0,content:JSON.stringify(n)},i)}(e,t,n,i)}function L(e,t){let n=t.slice(0).sort(((e,t)=>{const n=e.offset-t.offset;return 0===n?e.length-t.length:n})),i=e.length;for(let t=n.length-1;t>=0;t--){let o=n[t];if(!(o.offset+o.length<=i))throw new Error("Overlapping edit");e=C(e,o),i=o.offset}return e}!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"}(F||(F={}))},2380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlineValueRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.InlineValueRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlineValues.fire()}));const[n,i]=this.getRegistration(t,e.inlineValueProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeInlineValues:n.event,provideInlineValues:(e,t,n,i)=>{const r=this._client,s=(e,t,n,i)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),range:r.code2ProtocolConverter.asRange(t),context:r.code2ProtocolConverter.asInlineValueContext(n)};return r.sendRequest(o.InlineValueRequest.type,s,i).then((e=>i.isCancellationRequested?null:r.protocol2CodeConverter.asInlineValues(e,i)),(e=>r.handleFailedRequest(o.InlineValueRequest.type,i,e,null)))},a=r.middleware;return a.provideInlineValues?a.provideInlineValues(e,t,n,i,s):s(e,t,n,i)}};return[this.registerProvider(t,r),{provider:r,onDidChangeInlineValues:n}]}registerProvider(e,t){return i.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlineValueFeature=s},2385:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentHighlightFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentHighlights:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(c.DocumentHighlightRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDocumentHighlights(e,n)),(e=>i.handleFailedRequest(c.DocumentHighlightRequest.type,n,e,null))),r=i.middleware;return r.provideDocumentHighlights?r.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[a.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentHighlightFeature=d},2386:(e,t,n)=>{const i=n(7851);e.exports=(e,t,n)=>i(e,t,n)>=0},2479:function(e,t,n){"use strict";var i=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=i(n(5091));var r;!function(e){const t={dispose(){}};e.None=function(){return t}}(r||(t.Event=r={}));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 i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,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),i=this._contexts.slice(0);for(let r=0,s=n.length;r<s;r++)try{t.push(n[r].apply(i[r],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 i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),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},2597:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,n){const i=this.client,r=this.middleware,s=(e,t,n)=>{const r=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(o.CallHierarchyPrepareRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(e,n)),(e=>i.handleFailedRequest(o.CallHierarchyPrepareRequest.type,n,e,null)))};return r.prepareCallHierarchy?r.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(o.CallHierarchyIncomingCallsRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e,t)),(e=>n.handleFailedRequest(o.CallHierarchyIncomingCallsRequest.type,t,e,null)))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,r):r(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(o.CallHierarchyOutgoingCallsRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e,t)),(e=>n.handleFailedRequest(o.CallHierarchyOutgoingCallsRequest.type,t,e,null)))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,r):r(e,t)}}class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){const t=e;(0,r.ensure)((0,r.ensure)(t,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.callHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[i.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.CallHierarchyFeature=a},2604:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.website=t.toolName=void 0;const o=i(n(367));t.toolName="basedpyright",t.website=`https://docs.basedpyright.com/v${o.default}`},2636:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const i=n(3147);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(i.DidCreateFilesNotification.type,(t=>e(t)))}onDidRenameFiles(e){return this.connection.onNotification(i.DidRenameFilesNotification.type,(t=>e(t)))}onDidDeleteFiles(e){return this.connection.onNotification(i.DidDeleteFilesNotification.type,(t=>e(t)))}onWillCreateFiles(e){return this.connection.onRequest(i.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(i.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(i.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},2647:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcherFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);t.FileSystemWatcherFeature=class{_client;_notifyFileEvent;_watchers;constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return o.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,r.ensure)((0,r.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;const t=[];for(const n of e.registerOptions.watchers){const e=this._client.protocol2CodeConverter.asGlobPattern(n.globPattern);if(void 0===e)continue;let r=!0,s=!0,a=!0;void 0!==n.kind&&null!==n.kind&&(r=!!(n.kind&o.WatchKind.Create),s=!!(n.kind&o.WatchKind.Change),a=!!(n.kind&o.WatchKind.Delete));const c=i.workspace.createFileSystemWatcher(e,!r,!s,!a);this.hookListeners(c,r,s,a,t),t.push(c)}this._watchers.set(e.id,t)}registerRaw(e,t){const n=[];for(const e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,i,r){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Created})),null,r),n&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Changed})),null,r),i&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:o.FileChangeType.Deleted})),null,r)}unregister(e){const t=this._watchers.get(e);if(t){this._watchers.delete(e);for(const e of t)e.dispose()}}clear(){this._watchers.forEach((e=>{for(const t of e)t.dispose()})),this._watchers.clear()}}},2702:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.ImplementationRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.implementationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideImplementation:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.ImplementationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(o.ImplementationRequest.type,n,e,null))),s=i.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ImplementationFeature=s},2841:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:r}=n(9543),s=n(1361),a=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.t={};let d=0;const h="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",r],[h,o]],f=(e,t,n)=>{const i=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),o=d++;s(e,o,t),l[e]=o,u[o]=t,a[o]=new RegExp(t,n?"g":void 0),c[o]=new RegExp(i,n?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),f("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${h}+`),f("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),f("FULL",`^${u[l.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),f("LOOSE",`^${u[l.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),f("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),f("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?`+`(?:${u[l.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",u[l.COERCE],!0),f("COERCERTLFULL",u[l.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},2852:(e,t,n)=>{"use strict";var i,o,r,s,a,c,u,l,d,h,p,f,g,m,v,y,b,_,C,D,w,S,R,T,P,k,O,x,E,M,N,F,q,j,I,L,A,$,W,H,U,K,z,B,V,G,X,J,Q,Y,Z,ee,te,ne,ie,oe,re,se,ae,ce,ue,le,de,he,pe,fe,ge,me,ve,ye,be,_e,Ce,De,we,Se,Re,Te,Pe,ke,Oe,xe;n.r(t),n.d(t,{AnnotatedTextEdit:()=>R,ApplyKind:()=>K,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>ue,CodeActionContext:()=>ae,CodeActionKind:()=>re,CodeActionTag:()=>ce,CodeActionTriggerKind:()=>se,CodeDescription:()=>b,CodeLens:()=>le,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>p,Command:()=>C,CompletionItem:()=>B,CompletionItemKind:()=>A,CompletionItemLabelDetails:()=>z,CompletionItemTag:()=>W,CompletionList:()=>V,CreateFile:()=>P,DeleteFile:()=>O,Diagnostic:()=>_,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>v,DiagnosticTag:()=>y,DocumentHighlight:()=>Z,DocumentHighlightKind:()=>Y,DocumentLink:()=>he,DocumentSymbol:()=>oe,DocumentUri:()=>i,EOL:()=>Fe,FoldingRange:()=>g,FoldingRangeKind:()=>f,FormattingOptions:()=>de,Hover:()=>X,InlayHint:()=>we,InlayHintKind:()=>Ce,InlayHintLabelPart:()=>De,InlineCompletionContext:()=>Oe,InlineCompletionItem:()=>Re,InlineCompletionList:()=>Te,InlineCompletionTriggerKind:()=>Pe,InlineValueContext:()=>_e,InlineValueEvaluatableExpression:()=>be,InlineValueText:()=>ve,InlineValueVariableLookup:()=>ye,InsertReplaceEdit:()=>H,InsertTextFormat:()=>$,InsertTextMode:()=>U,LanguageKind:()=>q,Location:()=>u,LocationLink:()=>l,MarkedString:()=>G,MarkupContent:()=>L,MarkupKind:()=>I,OptionalVersionedTextDocumentIdentifier:()=>F,ParameterInformation:()=>J,Position:()=>a,Range:()=>c,RenameFile:()=>k,SelectedCompletionInfo:()=>ke,SelectionRange:()=>pe,SemanticTokenModifiers:()=>ge,SemanticTokenTypes:()=>fe,SemanticTokens:()=>me,SignatureInformation:()=>Q,SnippetTextEdit:()=>E,StringValue:()=>Se,SymbolInformation:()=>ne,SymbolKind:()=>ee,SymbolTag:()=>te,TextDocument:()=>qe,TextDocumentEdit:()=>T,TextDocumentIdentifier:()=>M,TextDocumentItem:()=>j,TextEdit:()=>D,URI:()=>o,VersionedTextDocumentIdentifier:()=>N,WorkspaceChange:()=>Ne,WorkspaceEdit:()=>x,WorkspaceFolder:()=>xe,WorkspaceSymbol:()=>ie,integer:()=>r,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),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}}(r||(r={})),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,i){if(je.uinteger(e)&&je.uinteger(t)&&je.uinteger(n)&&je.uinteger(i))return{start:a.create(e,t),end:a.create(n,i)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},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,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},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,i){return{red:e,green:t,blue:n,alpha:i}},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)}}(h||(h={})),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)||D.is(t))&&(je.undefined(t.additionalTextEdits)||je.typedArray(t.additionalTextEdits,D.is))}}(p||(p={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function(e,t,n,i,o,r){const s={startLine:e,endLine:t};return je.defined(n)&&(s.startCharacter=n),je.defined(i)&&(s.endCharacter=i),je.defined(o)&&(s.kind=o),je.defined(r)&&(s.collapsedText=r),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))}}(g||(g={})),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)}}(m||(m={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(v||(v={})),function(e){e.Unnecessary=1,e.Deprecated=2}(y||(y={})),function(e){e.is=function(e){const t=e;return je.objectLiteral(t)&&je.string(t.href)}}(b||(b={})),function(e){e.create=function(e,t,n,i,o,r){const s={range:e,message:t};return je.defined(n)&&(s.severity=n),je.defined(i)&&(s.code=i),je.defined(o)&&(s.source=o),je.defined(r)&&(s.relatedInformation=r),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,m.is))}}(_||(_={})),function(e){e.create=function(e,t,...n){const i={title:e,command:t};return je.defined(n)&&n.length>0&&(i.arguments=n),i},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)}}(C||(C={})),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)}}(D||(D={})),function(e){e.create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},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)}}(w||(w={})),function(e){e.is=function(e){const t=e;return je.string(t)}}(S||(S={})),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 D.is(t)&&(w.is(t.annotationId)||S.is(t.annotationId))}}(R||(R={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){const t=e;return je.defined(t)&&F.is(t.textDocument)&&Array.isArray(t.edits)}}(T||(T={})),function(e){e.create=function(e,t,n){const i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},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||S.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n,i){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!==i&&(o.annotationId=i),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||S.is(t.annotationId))}}(k||(k={})),function(e){e.create=function(e,t,n){const i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},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||S.is(t.annotationId))}}(O||(O={})),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)?P.is(e)||k.is(e)||O.is(e):T.is(e))))}}(x||(x={}));class Ee{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let i,o;if(void 0===n?i=D.insert(e,t):S.is(n)?(o=n,i=R.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=R.insert(e,t,o)),this.edits.push(i),void 0!==o)return o}replace(e,t,n){let i,o;if(void 0===n?i=D.replace(e,t):S.is(n)?(o=n,i=R.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),i=R.replace(e,t,o)),this.edits.push(i),void 0!==o)return o}delete(e,t){let n,i;if(void 0===t?n=D.del(e):S.is(t)?(i=t,n=R.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=R.del(e,i)),this.edits.push(n),void 0!==i)return i}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)&&Se.isSnippet(t.snippet)&&(void 0===t.annotationId||w.is(t.annotationId)||S.is(t.annotationId))}}(E||(E={}));class Me{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(S.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 Me(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(T.is(e)){const t=new Ee(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new Ee(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(F.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=[],i={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(i),n=new Ee(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 Ee(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Me,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 i,o,r;if(w.is(t)||S.is(t)?i=t:n=t,void 0===i?o=P.create(e,n):(r=S.is(i)?i:this._changeAnnotations.manage(i),o=P.create(e,n,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}renameFile(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let o,r,s;if(w.is(n)||S.is(n)?o=n:i=n,void 0===o?r=k.create(e,t,i):(s=S.is(o)?o:this._changeAnnotations.manage(o),r=k.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(r),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 i,o,r;if(w.is(t)||S.is(t)?i=t:n=t,void 0===i?o=O.create(e,n):(r=S.is(i)?i:this._changeAnnotations.manage(i),o=O.create(e,n,r)),this._workspaceEdit.documentChanges.push(o),void 0!==r)return r}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){const t=e;return je.defined(t)&&je.string(t.uri)}}(M||(M={})),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))}}(F||(F={})),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,i){return{uri:e,languageId:t,version:n,text:i}},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}(A||(A={})),function(e){e.PlainText=1,e.Snippet=2}($||($={})),function(e){e.Deprecated=1}(W||(W={})),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)}}(H||(H={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.Replace=1,e.Merge=2}(K||(K={})),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)}}(z||(z={})),function(e){e.create=function(e){return{label:e}}}(B||(B={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(V||(V={})),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)}}(G||(G={})),function(e){e.is=function(e){const t=e;return!!t&&je.objectLiteral(t)&&(L.is(t.contents)||G.is(t.contents)||je.typedArray(t.contents,G.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}}}(J||(J={})),function(e){e.create=function(e,t,...n){const i={label:e};return je.defined(t)&&(i.documentation=t),je.defined(n)?i.parameters=n:i.parameters=[],i}}(Q||(Q={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Y||(Y={})),function(e){e.create=function(e,t){const n={range:e};return je.number(t)&&(n.kind=t),n}}(Z||(Z={})),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,i,o){const r={name:e,kind:t,location:{uri:i,range:n}};return o&&(r.containerName=o),r}}(ne||(ne={})),function(e){e.create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}}(ie||(ie={})),function(e){e.create=function(e,t,n,i,o,r){const s={name:e,detail:t,kind:n,range:i,selectionRange:o};return void 0!==r&&(s.children=r),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"}(re||(re={})),function(e){e.Invoked=1,e.Automatic=2}(se||(se={})),function(e){e.create=function(e,t,n){const i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},e.is=function(e){const 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===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 i={title:e};let o=!0;return"string"==typeof t?(o=!1,i.kind=t):C.is(t)?i.command=t:i.edit=t,o&&void 0!==n&&(i.kind=n),i},e.is=function(e){const 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||C.is(t.command))&&(void 0===t.isPreferred||je.boolean(t.isPreferred))&&(void 0===t.edit||x.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)||C.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))}}(he||(he={})),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))}}(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",e.label="label"}(fe||(fe={})),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"}(ge||(ge={})),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])}}(me||(me={})),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)}}(ve||(ve={})),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)}}(ye||(ye={})),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)}}(be||(be={})),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)}}(_e||(_e={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Ce||(Ce={})),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||C.is(t.command))}}(De||(De={})),function(e){e.create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},e.is=function(e){const t=e;return je.objectLiteral(t)&&a.is(t.position)&&(je.string(t.label)||je.typedArray(t.label,De.is))&&(void 0===t.kind||Ce.is(t.kind))&&void 0===t.textEdits||je.typedArray(t.textEdits,D.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))}}(we||(we={})),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)}}(Se||(Se={})),function(e){e.create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}}}(Re||(Re={})),function(e){e.create=function(e){return{items:e}}}(Te||(Te={})),function(e){e.Invoked=1,e.Automatic=2}(Pe||(Pe={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(ke||(ke={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Oe||(Oe={})),function(e){e.is=function(e){const t=e;return je.objectLiteral(t)&&o.is(t.uri)&&je.string(t.name)}}(xe||(xe={}));const Fe=["\n","\r\n","\r"];var qe,je;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,o=e.slice(0,i),r=e.slice(i);t(o,n),t(r,n);let s=0,a=0,c=0;for(;s<o.length&&a<r.length;){const t=n(o[s],r[a]);e[c++]=t<=0?o[s++]:r[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<r.length;)e[c++]=r[a++];return e}e.create=function(e,t,n,i){return new Ie(e,t,n,i)},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 i=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 r=i.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<=r))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),r=s}return i}}(qe||(qe={}));class Ie{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,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 i=0;i<t.length;i++){n&&(e.push(i),n=!1);const o=t.charAt(i);n="\r"===o||"\n"===o,"\r"===o&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}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,i=t.length;if(0===i)return a.create(0,e);for(;n<i;){const o=Math.floor((n+i)/2);t[o]>e?i=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],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),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,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},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={}))},2878:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=void 0;const i=n(8431);var o,r;!function(e){e.method="workspace/textDocumentContent",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.TextDocumentContentRequest=o={})),function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(r||(t.TextDocumentContentRefreshRequest=r={}))},3120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintsFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.InlayHintRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,r.ensure)((0,r.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.InlayHintRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlayHints.fire()}));const[n,i]=this.getRegistration(t,e.inlayHintProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeInlayHints:n.event,provideInlayHints:(e,t,n)=>{const i=this._client,r=async(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};try{const e=await i.sendRequest(o.InlayHintRequest.type,r,n);return n.isCancellationRequested?null:i.protocol2CodeConverter.asInlayHints(e,n)}catch(e){return i.handleFailedRequest(o.InlayHintRequest.type,n,e,null)}},s=i.middleware;return s.provideInlayHints?s.provideInlayHints(e,t,n,r):r(e,t,n)}};return r.resolveInlayHint=!0===e.resolveProvider?(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(o.InlayHintResolveRequest.type,n.code2ProtocolConverter.asInlayHint(e),t);if(t.isCancellationRequested)return null;const r=n.protocol2CodeConverter.asInlayHint(i,t);return t.isCancellationRequested?null:r}catch(e){return n.handleFailedRequest(o.InlayHintResolveRequest.type,t,e,null)}},r=n.middleware;return r.resolveInlayHint?r.resolveInlayHint(e,t,i):i(e,t)}:void 0,[this.registerProvider(t,r),{provider:r,onDidChangeInlayHints:n}]}registerProvider(e,t){return i.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlayHintsFeature=s},3147:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(n(7672),t),o(n(2852),t),o(n(8431),t),o(n(1815),t);var r,s=n(291);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}(r||(t.LSPErrorCodes=r={}))},3189:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.typeDefinitionProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideTypeDefinition:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.TypeDefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(o.TypeDefinitionRequest.type,n,e,null))),s=i.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.TypeDefinitionFeature=s},3277:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.unescape=t.escape=t.AST=t.Minimatch=t.match=t.makeRe=t.braceExpand=t.defaults=t.filter=t.GLOBSTAR=t.sep=t.minimatch=void 0;const o=i(n(473)),r=n(675),s=n(5029),a=n(1138),c=n(702);t.minimatch=(e,t,n={})=>((0,r.assertValidPattern)(t),!(!n.nocomment&&"#"===t.charAt(0))&&new M(t,n).match(e));const u=/^\*+([^+@!?\*\[\(]*)$/,l=e=>t=>!t.startsWith(".")&&t.endsWith(e),d=e=>t=>t.endsWith(e),h=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),p=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),f=/^\*+\.\*+$/,g=e=>!e.startsWith(".")&&e.includes("."),m=e=>"."!==e&&".."!==e&&e.includes("."),v=/^\.\*+$/,y=e=>"."!==e&&".."!==e&&e.startsWith("."),b=/^\*+$/,_=e=>0!==e.length&&!e.startsWith("."),C=e=>0!==e.length&&"."!==e&&".."!==e,D=/^\?+([^+@!?\*\[\(]*)?$/,w=([e,t=""])=>{const n=P([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},S=([e,t=""])=>{const n=k([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},R=([e,t=""])=>{const n=k([e]);return t?e=>n(e)&&e.endsWith(t):n},T=([e,t=""])=>{const n=P([e]);return t?e=>n(e)&&e.endsWith(t):n},P=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")},k=([e])=>{const t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},O="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";t.sep="win32"===O?"\\":"/",t.minimatch.sep=t.sep,t.GLOBSTAR=Symbol("globstar **"),t.minimatch.GLOBSTAR=t.GLOBSTAR,t.filter=(e,n={})=>i=>(0,t.minimatch)(i,e,n),t.minimatch.filter=t.filter;const x=(e,t={})=>Object.assign({},e,t);t.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return t.minimatch;const n=t.minimatch;return Object.assign(((t,i,o={})=>n(t,i,x(e,o))),{Minimatch:class extends n.Minimatch{constructor(t,n={}){super(t,x(e,n))}static defaults(t){return n.defaults(x(e,t)).Minimatch}},AST:class extends n.AST{constructor(t,n,i={}){super(t,n,x(e,i))}static fromGlob(t,i={}){return n.AST.fromGlob(t,x(e,i))}},unescape:(t,i={})=>n.unescape(t,x(e,i)),escape:(t,i={})=>n.escape(t,x(e,i)),filter:(t,i={})=>n.filter(t,x(e,i)),defaults:t=>n.defaults(x(e,t)),makeRe:(t,i={})=>n.makeRe(t,x(e,i)),braceExpand:(t,i={})=>n.braceExpand(t,x(e,i)),match:(t,i,o={})=>n.match(t,i,x(e,o)),sep:n.sep,GLOBSTAR:t.GLOBSTAR})},t.minimatch.defaults=t.defaults,t.braceExpand=(e,t={})=>((0,r.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,o.default)(e)),t.minimatch.braceExpand=t.braceExpand,t.makeRe=(e,t={})=>new M(e,t).makeRe(),t.minimatch.makeRe=t.makeRe,t.match=(e,t,n={})=>{const i=new M(t,n);return e=e.filter((e=>i.match(e))),i.options.nonull&&!e.length&&e.push(t),e},t.minimatch.match=t.match;const E=/[?*]|[+@!]\(.*?\)|\[|\]/;class M{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,r.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||O,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map(((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&E.test(e[2])||E.test(e[3])),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))];if(n)return[e[0],...e.slice(1).map((e=>this.parse(e)))]}return e.map((e=>this.parse(e)))}));if(this.debug(this.pattern,i),this.set=i.filter((e=>-1===e.indexOf(!1))),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)"**"===e[t][n]&&(e[t][n]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let n=t;for(;"**"===e[n+1];)n++;n!==t&&e.splice(t,n-t)}return e}))}levelOneOptimize(e){return e.map((e=>0===(e=e.reduce(((e,t)=>{const n=e[e.length-1];return"**"===t&&"**"===n?e:".."===t&&n&&".."!==n&&"."!==n&&"**"!==n?(e.pop(),e):(e.push(t),e)}),[])).length?[""]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){const i=e[n];1===n&&""===i&&""===e[0]||"."!==i&&""!==i||(t=!0,e.splice(n,1),n--)}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let n=0;for(;-1!==(n=e.indexOf("..",n+1));){const i=e[n-1];i&&"."!==i&&".."!==i&&"**"!==i&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let i=-1;for(;-1!==(i=n.indexOf("**",i+1));){let o=i;for(;"**"===n[o+1];)o++;o>i&&n.splice(i+1,o-i);let r=n[i+1];const s=n[i+2],a=n[i+3];if(".."!==r)continue;if(!s||"."===s||".."===s||!a||"."===a||".."===a)continue;t=!0,n.splice(i,1);const c=n.slice(0);c[i]="**",e.push(c),i--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){const i=n[e];1===e&&""===i&&""===n[0]||"."!==i&&""!==i||(t=!0,n.splice(e,1),e--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(t=!0,n.pop())}let o=0;for(;-1!==(o=n.indexOf("..",o+1));){const e=n[o-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===o&&"**"===n[o+1]?["."]:[];n.splice(o-1,2,...e),0===n.length&&n.push(""),o-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){const i=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(i){e[t]=[],e[n]=i;break}}return e.filter((e=>e.length))}partsMatch(e,t,n=!1){let i=0,o=0,r=[],s="";for(;i<e.length&&o<t.length;)if(e[i]===t[o])r.push("b"===s?t[o]:e[i]),i++,o++;else if(n&&"**"===e[i]&&t[o]===e[i+1])r.push(e[i]),i++;else if(n&&"**"===t[o]&&e[i]===t[o+1])r.push(t[o]),o++;else if("*"!==e[i]||!t[o]||!this.options.dot&&t[o].startsWith(".")||"**"===t[o]){if("*"!==t[o]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i])return!1;if("a"===s)return!1;s="b",r.push(t[o]),i++,o++}else{if("b"===s)return!1;s="a",r.push(e[i]),i++,o++}return e.length===t.length&&r}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let i=0;i<e.length&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,n,i=!1){const o=this.options;if(this.isWindows){const t="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),i=!t&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),o="string"==typeof n[0]&&/^[a-z]:$/i.test(n[0]),r=i?3:t?0:void 0,s=!o&&""===n[0]&&""===n[1]&&"?"===n[2]&&"string"==typeof n[3]&&/^[a-z]:$/i.test(n[3])?3:o?0:void 0;if("number"==typeof r&&"number"==typeof s){const[t,i]=[e[r],n[s]];t.toLowerCase()===i.toLowerCase()&&(n[s]=t,s>r?n=n.slice(s):r>s&&(e=e.slice(r)))}}const{optimizationLevel:r=1}=this.options;r>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:n}),this.debug("matchOne",e.length,n.length);for(var s=0,a=0,c=e.length,u=n.length;s<c&&a<u;s++,a++){this.debug("matchOne loop");var l=n[a],d=e[s];if(this.debug(n,l,d),!1===l)return!1;if(l===t.GLOBSTAR){this.debug("GLOBSTAR",[n,l,d]);var h=s,p=a+1;if(p===u){for(this.debug("** at the end");s<c;s++)if("."===e[s]||".."===e[s]||!o.dot&&"."===e[s].charAt(0))return!1;return!0}for(;h<c;){var f=e[h];if(this.debug("\nglobstar while",e,h,n,p,f),this.matchOne(e.slice(h),n.slice(p),i))return this.debug("globstar found match!",h,c,f),!0;if("."===f||".."===f||!o.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,h,n,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!i||(this.debug("\n>>> no match, partial?",e,h,n,p),h!==c))}let r;if("string"==typeof l?(r=d===l,this.debug("string match",l,d,r)):(r=l.test(d),this.debug("pattern match",l,d,r)),!r)return!1}if(s===c&&a===u)return!0;if(s===c)return i;if(a===u)return s===c-1&&""===e[s];throw new Error("wtf?")}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(e){(0,r.assertValidPattern)(e);const n=this.options;if("**"===e)return t.GLOBSTAR;if(""===e)return"";let i,o=null;(i=e.match(b))?o=n.dot?C:_:(i=e.match(u))?o=(n.nocase?n.dot?p:h:n.dot?d:l)(i[1]):(i=e.match(D))?o=(n.nocase?n.dot?S:w:n.dot?R:T)(i):(i=e.match(f))?o=n.dot?m:g:(i=e.match(v))&&(o=y);const a=s.AST.fromGlob(e,this.options).toMMPattern();return o&&"object"==typeof a&&Reflect.defineProperty(a,"test",{value:o}),a}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const n=this.options,i=n.noglobstar?"[^/]*?":n.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=new Set(n.nocase?["i"]:[]);let r=e.map((e=>{const n=e.map((e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))o.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===t.GLOBSTAR?t.GLOBSTAR:e._src}));return n.forEach(((e,o)=>{const r=n[o+1],s=n[o-1];e===t.GLOBSTAR&&s!==t.GLOBSTAR&&(void 0===s?void 0!==r&&r!==t.GLOBSTAR?n[o+1]="(?:\\/|"+i+"\\/)?"+r:n[o]=i:void 0===r?n[o-1]=s+"(?:\\/|"+i+")?":r!==t.GLOBSTAR&&(n[o-1]=s+"(?:\\/|\\/"+i+"\\/)"+r,n[o+1]=t.GLOBSTAR))})),n.filter((e=>e!==t.GLOBSTAR)).join("/")})).join("|");const[s,a]=e.length>1?["(?:",")"]:["",""];r="^"+s+r+a+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...o].join(""))}catch(e){this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const i=this.slashSplit(e);this.debug(this.pattern,"split",i);const o=this.set;this.debug(this.pattern,"set",o);let r=i[i.length-1];if(!r)for(let e=i.length-2;!r&&e>=0;e--)r=i[e];for(let e=0;e<o.length;e++){const s=o[e];let a=i;if(n.matchBase&&1===s.length&&(a=[r]),this.matchOne(a,s,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return t.minimatch.defaults(e).Minimatch}}t.Minimatch=M;var N=n(5029);Object.defineProperty(t,"AST",{enumerable:!0,get:function(){return N.AST}});var F=n(1138);Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return F.escape}});var q=n(702);Object.defineProperty(t,"unescape",{enumerable:!0,get:function(){return q.unescape}}),t.minimatch.AST=s.AST,t.minimatch.Minimatch=M,t.minimatch.escape=a.escape,t.minimatch.unescape=c.unescape},3489:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const i=n(6957);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 i=new Int32Array(n,0,1);Atomics.store(i,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class r{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 r(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{kind="request";createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new i.CancellationTokenSource:new s(t)}}},3491:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const i=n(8431);var o,r;!function(e){e.method="textDocument/inlineValue",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlineValueRequest=o={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(r||(t.InlineValueRefreshRequest=r={}))},3503:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.LanguageClient=t.BaseLanguageClient=t.ShutdownMode=t.MessageTransports=t.SuspendMode=t.State=t.CloseAction=t.ErrorAction=t.RevealOutputChannelOn=void 0;const a=n(1398),c=n(3147),u=s(n(9417)),l=s(n(138)),d=s(n(5590)),h=n(7516),p=s(n(4429)),f=n(774),g=n(8071),m=n(851),v=n(7773),y=n(7252),b=n(3923),_=n(8914),C=n(4620),D=n(7165),w=n(271),S=n(2385),R=n(6157),T=n(4311),P=n(4363),k=n(3189),O=n(2702),x=n(4976),E=n(843),M=n(4453),N=n(7955),F=n(7078),q=n(1005),j=n(6136),I=n(7506),L=n(7898),A=n(1959),$=n(2597),W=n(4102),H=n(7484),U=n(4493),K=n(2380),z=n(3120),B=n(535),V=n(9560),G=n(7331),X=n(8409),J=n(2647),Q=n(7159);var Y,Z,ee,te,ne,ie,oe,re,se,ae;!function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(Y||(t.RevealOutputChannelOn=Y={})),function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(Z||(t.ErrorAction=Z={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(ee||(t.CloseAction=ee={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.StartFailed=4]="StartFailed",e[e.Running=2]="Running"}(te||(t.State=te={})),function(e){e.off="off",e.on="on"}(ne||(t.SuspendMode=ne={})),function(e){e.sanitizeIsTrusted=function(e){return null!=e&&!!("boolean"==typeof e||"object"==typeof e&&null!==e&&d.stringArray(e.enabledCommands))&&e}}(ie||(ie={}));class ce{client;maxRestartCount;restarts;constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?{action:Z.Continue}:{action:Z.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:ee.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?{action:ee.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:ee.Restart})}}!function(e){e.Initial="initial",e.Starting="starting",e.StartFailed="startFailed",e.Running="running",e.Stopping="stopping",e.Stopped="stopped"}(oe||(oe={})),function(e){e.is=function(e){return e&&c.MessageReader.is(e.reader)&&c.MessageWriter.is(e.writer)}}(re||(t.MessageTransports=re={})),function(e){e.Restart="restart",e.Stop="stop"}(se||(t.ShutdownMode=se={}));class ue{open;_onOpen;_onClose;disposable;constructor(){this.open=new Set,this._onOpen=new a.EventEmitter,this._onClose=new a.EventEmitter,ue.fillTabResources(this.open);void 0!==a.window.tabGroups.onDidChangeTabs?this.disposable=a.window.tabGroups.onDidChangeTabs((e=>{if(0===e.closed.length&&0===e.opened.length)return;const t=this.open,n=new Set;ue.fillTabResources(n);const i=new Set,o=new Set(n);for(const e of t.values())n.has(e)?o.delete(e):i.add(e);if(this.open=n,i.size>0){const e=new Set;for(const t of i)e.add(a.Uri.parse(t));this._onClose.fire(e)}if(o.size>0){const e=new Set;for(const t of o)e.add(a.Uri.parse(t));this._onOpen.fire(e)}})):this.disposable={dispose:()=>{}}}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposable.dispose()}isActive(e){return e instanceof a.Uri?a.window.activeTextEditor?.document.uri===e:a.window.activeTextEditor?.document===e}isVisible(e){const t=e instanceof a.Uri?e:e.uri;return t.scheme===v.NotebookDocumentSyncFeature.CellScheme?a.workspace.notebookDocuments.some((e=>!!this.open.has(e.uri.toString())&&void 0!==e.getCells().find((e=>e.document.uri.toString()===t.toString())))):this.open.has(t.toString())}getTabResources(){const e=new Set;return ue.fillTabResources(new Set,e),e}static fillTabResources(e,t){const n=e??new Set;for(const e of a.window.tabGroups.all)for(const i of e.tabs){const e=i.input;let o;e instanceof a.TabInputText?o=e.uri:e instanceof a.TabInputTextDiff?o=e.modified:(e instanceof a.TabInputCustom||e instanceof a.TabInputNotebook)&&(o=e.uri),void 0===o||n.has(o.toString())||(n.add(o.toString()),void 0!==t&&t.add(o))}}}class le{_id;_name;_clientOptions;_state;_onStart;_onStop;_connection;_idleInterval;_ignoredRegistrations;_listeners;_disposed;_notificationHandlers;_notificationDisposables;_pendingNotificationHandlers;_requestHandlers;_requestDisposables;_pendingRequestHandlers;_progressHandlers;_pendingProgressHandlers;_progressDisposables;_initializeResult;_outputChannel;_disposeOutputChannel;_traceOutputChannel;_capabilities;_diagnostics;_syncedDocuments;_didChangeTextDocumentFeature;_inFlightOpenNotifications;_pendingChangeSemaphore;_pendingChangeDelayer;_didOpenTextDocumentFeature;_fileEvents;_fileEventDelayer;_telemetryEmitter;_stateChangeEmitter;_trace;_traceFormat=c.TraceFormat.Text;_tracer;_c2p;_p2c;_tabsModel;constructor(e,t,n){this._id=e,this._name=t;const i={isTrusted:!1,supportHtml:!1,supportThemeIcons:!1};void 0!==(n=n||{}).markdown&&(i.isTrusted=ie.sanitizeIsTrusted(n.markdown.isTrusted),i.supportHtml=!0===n.markdown.supportHtml,i.supportThemeIcons=!0===n.markdown.supportThemeIcons),this._clientOptions={documentSelector:n.documentSelector??[],synchronize:n.synchronize??{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName??this._name,revealOutputChannelOn:n.revealOutputChannelOn??Y.Error,stdioEncoding:n.stdioEncoding??"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler??this.createDefaultErrorHandler(n.connectionOptions?.maxRestartCount),middleware:n.middleware??{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:i,diagnosticPullOptions:n.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:n.notebookDocumentOptions??{},textSynchronization:this.createTextSynchronizationOptions(n.textSynchronization)},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=oe.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._diagnostics=void 0,this._inFlightOpenNotifications=new Set,this._pendingChangeSemaphore=new h.Semaphore(1),this._pendingChangeDelayer=new h.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new h.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new c.Emitter,this._stateChangeEmitter=new c.Emitter,this._trace=c.Trace.Off,this._tracer={log:(e,t)=>{d.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=u.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=l.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml,this._clientOptions.markdown.supportThemeIcons),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}createTextSynchronizationOptions(e){return e&&"boolean"==typeof e.delayOpenNotifications?{delayOpenNotifications:e.delayOpenNotifications}:{delayOpenNotifications:!1}}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get tabsModel(){return void 0===this._tabsModel&&(this._tabsModel=new ue),this._tabsModel}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=a.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){const t=this.getPublicState();this._state=e;const n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){switch(this.$state){case oe.Starting:return te.Starting;case oe.Running:return te.Running;case oe.StartFailed:return te.StartFailed;default:return te.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===oe.StartFailed||this.$state===oe.Stopping||this.$state===oe.Stopped)return Promise.reject(new c.ResponseError(c.ErrorCodes.ConnectionInactive,"Client is not running"));const n=await this.$start();let i,o;if(await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(),this._didChangeTextDocumentFeature.syncKind===c.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(n),1===t.length?c.CancellationToken.is(t[0])?o=t[0]:i=t[0]:2===t.length&&(i=t[0],o=t[1]),void 0!==o&&o.isCancellationRequested)return Promise.reject(new c.ResponseError(c.LSPErrorCodes.RequestCancelled,"Request got cancelled"));const r=this._clientOptions.middleware?.sendRequest;return void 0!==r?r(e,i,o,((e,t,i)=>{const o=[];return void 0!==t&&o.push(t),void 0!==i&&o.push(i),n.sendRequest(e,...o)})):n.sendRequest(e,...t)}onRequest(e,t){const n="string"==typeof e?e:e.method;this._requestHandlers.set(n,t);const i=this.activeConnection();let o;return void 0!==i?(this._requestDisposables.set(n,i.onRequest(e,t)),o={dispose:()=>{const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}):(this._pendingRequestHandlers.set(n,t),o={dispose:()=>{this._pendingRequestHandlers.delete(n);const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}),{dispose:()=>{this._requestHandlers.delete(n),o.dispose()}}}async sendNotification(e,t){if(this.$state===oe.StartFailed||this.$state===oe.Stopping||this.$state===oe.Stopped)return Promise.reject(new c.ResponseError(c.ErrorCodes.ConnectionInactive,"Client is not running"));const n=this._didChangeTextDocumentFeature.syncKind===c.TextDocumentSyncKind.Full;let i,o;n&&"string"!=typeof e&&e.method===c.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._inFlightOpenNotifications.add(i)),"string"!=typeof e&&e.method===c.DidCloseTextDocumentNotification.method&&(o=t.textDocument.uri);const r=await this.$start();await this._didOpenTextDocumentFeature.sendPendingOpenNotifications(o),n&&await this.sendPendingFullTextDocumentChanges(r),void 0!==i&&this._inFlightOpenNotifications.delete(i);const s=this._clientOptions.middleware?.sendNotification;return s?s(e,r.sendNotification.bind(r),t):r.sendNotification(e,t)}onNotification(e,t){const n="string"==typeof e?e:e.method;this._notificationHandlers.set(n,t);const i=this.activeConnection();let o;return void 0!==i?(this._notificationDisposables.set(n,i.onNotification(e,t)),o={dispose:()=>{const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}):(this._pendingNotificationHandlers.set(n,t),o={dispose:()=>{this._pendingNotificationHandlers.delete(n);const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}),{dispose:()=>{this._notificationHandlers.delete(n),o.dispose()}}}async sendProgress(e,t,n){if(this.$state===oe.StartFailed||this.$state===oe.Stopping||this.$state===oe.Stopped)return Promise.reject(new c.ResponseError(c.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}onProgress(e,t,n){this._progressHandlers.set(t,{type:e,handler:n});const i=this.activeConnection();let o;const r=this._clientOptions.middleware?.handleWorkDoneProgress,s=c.WorkDoneProgress.is(e)&&void 0!==r?e=>{r(t,e,(()=>n(e)))}:n;return void 0!==i?(this._progressDisposables.set(t,i.onProgress(e,t,s)),o={dispose:()=>{const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:n}),o={dispose:()=>{this._pendingProgressHandlers.delete(t);const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),o.dispose()}}}createDefaultErrorHandler(e){if(void 0!==e&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new ce(this,e??4)}async setTrace(e){this._trace=e;const t=this.activeConnection();void 0!==t&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof c.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?d.string(e.stack)?e.stack:e.message:d.string(e)?e:e.toString()}debug(e,t,n=!0){this.logOutputMessage(c.MessageType.Debug,Y.Debug,"Debug",e,t,n)}info(e,t,n=!0){this.logOutputMessage(c.MessageType.Info,Y.Info,"Info",e,t,n)}warn(e,t,n=!0){this.logOutputMessage(c.MessageType.Warning,Y.Warn,"Warn",e,t,n)}error(e,t,n=!0){this.logOutputMessage(c.MessageType.Error,Y.Error,"Error",e,t,n)}logOutputMessage(e,t,n,i,o,r){this.outputChannel.appendLine(`[${n.padEnd(5)} - ${(new Date).toLocaleTimeString()}] ${i}`),null!=o&&this.outputChannel.appendLine(this.data2String(o)),("force"===r||r&&this._clientOptions.revealOutputChannelOn<=t)&&this.showNotificationMessage(e,i,o)}showNotificationMessage(e,t,n){t=t??"A request has failed. See the output for more information.",n&&(t+="\n"+this.data2String(n)),(e===c.MessageType.Error?a.window.showErrorMessage:e===c.MessageType.Warning?a.window.showWarningMessage:a.window.showInformationMessage)(t,"Go to output").then((e=>{void 0!==e&&this.outputChannel.show(!0)}))}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===oe.Initial||this.$state===oe.Stopping||this.$state===oe.Stopped}needsStop(){return this.$state===oe.Starting||this.$state===oe.Running}activeConnection(){return this.$state===oe.Running&&void 0!==this._connection?this._connection:void 0}isRunning(){return this.$state===oe.Running}async start(){if("disposing"===this._disposed||"disposed"===this._disposed)throw new Error("Client got disposed and can't be restarted.");if(this.$state===oe.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(void 0!==this._onStart)return this._onStart;const[e,t,n]=this.createOnStartPromise();this._onStart=e,void 0===this._diagnostics&&(this._diagnostics=a.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName??this._id));for(const[e,t]of this._notificationHandlers)this._pendingNotificationHandlers.has(e)||this._pendingNotificationHandlers.set(e,t);for(const[e,t]of this._requestHandlers)this._pendingRequestHandlers.has(e)||this._pendingRequestHandlers.set(e,t);for(const[e,t]of this._progressHandlers)this._pendingProgressHandlers.has(e)||this._pendingProgressHandlers.set(e,t);this.$state=oe.Starting;try{const e=await this.createConnection();e.onNotification(c.LogMessageNotification.type,(e=>{switch(e.type){case c.MessageType.Error:this.error(e.message,void 0,!1);break;case c.MessageType.Warning:this.warn(e.message,void 0,!1);break;case c.MessageType.Info:this.info(e.message,void 0,!1);break;case c.MessageType.Debug:this.debug(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}})),e.onNotification(c.ShowMessageNotification.type,(e=>{switch(e.type){case c.MessageType.Error:a.window.showErrorMessage(e.message);break;case c.MessageType.Warning:a.window.showWarningMessage(e.message);break;case c.MessageType.Info:default:a.window.showInformationMessage(e.message)}})),e.onRequest(c.ShowMessageRequest.type,(e=>{let t;switch(e.type){case c.MessageType.Error:t=a.window.showErrorMessage;break;case c.MessageType.Warning:t=a.window.showWarningMessage;break;case c.MessageType.Info:default:t=a.window.showInformationMessage}const n=e.actions||[];return t(e.message,...n)})),e.onNotification(c.TelemetryEventNotification.type,(e=>{this._telemetryEmitter.fire(e)})),e.onRequest(c.ShowDocumentRequest.type,(async(e,t)=>{const n=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external)return{success:await a.env.openExternal(t)};{const n={};return void 0!==e.selection&&(n.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?n.preserveFocus=!0:!0===e.takeFocus&&(n.preserveFocus=!1),await a.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!1}}},i=this._clientOptions.middleware.window?.showDocument;return void 0!==i?i(e,t,n):n(e)})),e.listen(),await this.initialize(e),t()}catch(e){this.$state=oe.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,e,"force"),n(e)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise(((n,i)=>{e=n,t=i})),e,t]}async initialize(e){this.refreshTrace(e,!1);const t=this._clientOptions.initializationOptions,[n,i]=void 0!==this._clientOptions.workspaceFolder?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],o={processId:null,clientInfo:{name:a.env.appName,version:a.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(a.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:d.func(t)?t():t,trace:c.Trace.toString(this._trace),workspaceFolders:i};if(this.fillInitializeParams(o),!this._clientOptions.progressOnInitialization)return this.doInitialize(e,o);{const t=p.generateUuid(),n=new f.ProgressPart(e,t);o.workDoneToken=t;try{const t=await this.doInitialize(e,o);return n.done(),t}catch(e){throw n.cancel(),e}}}async doInitialize(e,t){try{const n=await e.initialize(t);if(void 0!==n.capabilities.positionEncoding&&n.capabilities.positionEncoding!==c.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${n.capabilities.positionEncoding}) received from server ${this.name}`);let i;this._initializeResult=n,this.$state=oe.Running,d.number(n.capabilities.textDocumentSync)?i=n.capabilities.textDocumentSync===c.TextDocumentSyncKind.None?{openClose:!1,change:c.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:n.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==n.capabilities.textDocumentSync&&null!==n.capabilities.textDocumentSync&&(i=n.capabilities.textDocumentSync),this._capabilities=Object.assign({},n.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(c.PublishDiagnosticsNotification.type,(e=>this.handleDiagnostics(e))),e.onRequest(c.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(c.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(c.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e)));for(const[t,n]of this._pendingNotificationHandlers)this._notificationDisposables.set(t,e.onNotification(t,n));this._pendingNotificationHandlers.clear();for(const[t,n]of this._pendingRequestHandlers)this._requestDisposables.set(t,e.onRequest(t,n));this._pendingRequestHandlers.clear();for(const[t,n]of this._pendingProgressHandlers)this._progressDisposables.set(t,e.onProgress(n.type,t,n.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(c.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),n}catch(t){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):this.stop():t instanceof c.ResponseError&&t.data&&t.data.retry?a.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((t=>{t&&"retry"===t.id?this.initialize(e):this.stop()})):(t&&t.message&&a.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop()),t}}_clientGetRootPath(){const e=a.workspace.workspaceFolders;if(!e||0===e.length)return;const t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(e=2e3){return this.shutdown(se.Stop,e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t=2e3){if(this.$state===oe.Stopped||this.$state===oe.Initial)return;if(this.$state===oe.Stopping){if(void 0!==this._onStop)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}const n=this.activeConnection();if(void 0===n||this.$state!==oe.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=oe.Stopping,this.cleanUp(e);const i=new Promise((e=>{(0,c.RAL)().timer.setTimeout(e,t)})),o=(async e=>(await e.shutdown(),await e.exit(),e))(n);return this._onStop=Promise.race([i,o]).then((e=>{if(void 0===e)throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out");e.end(),e.dispose()}),(e=>{throw this.error("Stopping server failed",e,!1),e})).finally((()=>{this.$state=oe.Stopped,e===se.Stop&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()}))}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();const t=this._listeners.splice(0,this._listeners.length);for(const e of t)e.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(const e of Array.from(this._features.entries()).map((e=>e[1])).reverse())e.clear();e!==se.Stop&&e!==se.Restart||void 0===this._diagnostics||(this._diagnostics.dispose(),this._diagnostics=void 0),void 0!==this._idleInterval&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){void 0!==this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){const t=this;async function n(e){return t._fileEvents.push(e),t._fileEventDelayer.trigger((async()=>{const e=t._fileEvents;t._fileEvents=[];try{await t.sendNotification(c.DidChangeWatchedFilesNotification.type,{changes:e})}catch(n){throw t._fileEvents.push(...e),n}}))}const i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,n):n(e)).catch((e=>{t.error("Notifying file events failed.",e)}))}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock((async()=>{try{const t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._inFlightOpenNotifications);if(0===t.length)return;for(const n of t){const t=this.code2ProtocolConverter.asChangeTextDocumentParams(n);await e.sendNotification(c.DidChangeTextDocumentNotification.type,t),this._didChangeTextDocumentFeature.notificationSent(n,c.DidChangeTextDocumentNotification.type,t)}}catch(e){throw this.error("Sending pending changes failed",e,!1),e}}))}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger((async()=>{const e=this.activeConnection();void 0!==e?await this.sendPendingFullTextDocumentChanges(e):this.triggerPendingChangeDelivery()})).catch((e=>this.error("Delivering pending changes failed",e,!1)))}_diagnosticQueue=new Map;_diagnosticQueueState={state:"idle"};handleDiagnostics(e){if(!this._diagnostics)return;const t=e.uri;"busy"===this._diagnosticQueueState.state&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,c.RAL)().timer.setImmediate((()=>{this.workDiagnosticQueue()}))}workDiagnosticQueue(){if("busy"===this._diagnosticQueueState.state)return;const e=this._diagnosticQueue.entries().next();if(!0===e.done)return;const[t,n]=e.value;this._diagnosticQueue.delete(t);const i=new a.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:i},this._p2c.asDiagnostics(n,i.token).then((e=>{if(!i.token.isCancellationRequested){const n=this._p2c.asUri(t),i=this.clientOptions.middleware;i.handleDiagnostics?i.handleDiagnostics(n,e,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(n,e)}})).catch((e=>{this.error("Processing diagnostic queue failed.",e)})).finally((()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()}))}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return a.env.language}async $start(){if(this.$state===oe.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();const e=this.activeConnection();if(void 0===e)throw new Error("Starting server failed");return e}async createConnection(){const e=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=function(e,t,n,i,o){const r=new de,s=(0,c.createProtocolConnection)(e,t,r,o);return s.onError((e=>{n(e[0],e[1],e[2])})),s.onClose(i),{listen:()=>s.listen(),sendRequest:s.sendRequest,onRequest:s.onRequest,hasPendingResponse:s.hasPendingResponse,sendNotification:s.sendNotification,onNotification:s.onNotification,onProgress:s.onProgress,sendProgress:s.sendProgress,trace:(e,t,n)=>{const i={sendNotification:!1,traceFormat:c.TraceFormat.Text};return void 0===n?s.trace(e,t,i):(d.boolean(n),s.trace(e,t,n))},initialize:e=>s.sendRequest(c.InitializeRequest.type,e),shutdown:()=>s.sendRequest(c.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(c.ExitNotification.type),end:()=>s.end(),dispose:()=>s.dispose()}}(e.reader,e.writer,((e,t,n)=>{this.handleConnectionError(e,t,n).catch((e=>this.error("Handling connection error failed",e)))}),(()=>{this.handleConnectionClosed().catch((e=>this.error("Handling connection close failed",e)))}),this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===oe.Stopped)return;try{void 0!==this._connection&&this._connection.dispose()}catch(e){}let e={action:ee.DoNotRestart};if(this.$state!==oe.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch(e){}this._connection=void 0,e.action===ee.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,!0!==e.handled&&"force"),this.cleanUp(se.Stop),this.$state===oe.Starting?this.$state=oe.StartFailed:this.$state=oe.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===ee.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",void 0,!e.handled),this.cleanUp(se.Restart),this.$state=oe.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch((e=>this.error("Restarting server failed",e,"force"))))}async handleConnectionError(e,t,n){const i=await this._clientOptions.errorHandler.error(e,t,n);i.action===Z.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring.\n${e.message}\nShutting down server.`,void 0,!0!==i.handled&&"force"),this.stop().catch((e=>{this.error("Stopping server failed",e,!1)}))):this.error(i.message??`Client ${this._name}: connection to server is erroring.\n${e.message}`,void 0,!0!==i.handled&&"force")}hookConfigurationChanged(e){this._listeners.push(a.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)})))}refreshTrace(e,t=!1){const n=a.workspace.getConfiguration(this._id);let i=c.Trace.Off,o=c.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?i=c.Trace.fromString(e):(i=c.Trace.fromString(n.get("trace.server.verbosity","off")),o=c.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=i,this._traceFormat=o,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch((e=>{this.error("Updating trace failed with error",e,!1)}))}hookFileEvents(e){const t=this._clientOptions.synchronize.fileEvents;if(!t)return;let n;n=d.array(t)?t:[t],n&&this._dynamicFeatures.get(c.DidChangeWatchedFilesNotification.type.method).registerRaw(p.generateUuid(),n)}_features=[];_dynamicFeatures=new Map;registerFeatures(e){for(const t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),g.DynamicFeature.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){const t=this.getFeature(c.NotebookDocumentSyncRegistrationType.method);return void 0!==t&&t instanceof v.NotebookDocumentSyncFeature&&t.handles(e)}registerBuiltinFeatures(){const e=new Map;this.registerFeature(new y.ConfigurationFeature(this)),this._didOpenTextDocumentFeature=new b.DidOpenTextDocumentFeature(this,this._syncedDocuments),this.registerFeature(this._didOpenTextDocumentFeature),this._didChangeTextDocumentFeature=new b.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded((()=>{this.triggerPendingChangeDelivery()})),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new b.WillSaveFeature(this)),this.registerFeature(new b.WillSaveWaitUntilFeature(this)),this.registerFeature(new b.DidSaveTextDocumentFeature(this)),this.registerFeature(new b.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new J.FileSystemWatcherFeature(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new _.CompletionItemFeature(this)),this.registerFeature(new C.HoverFeature(this)),this.registerFeature(new w.SignatureHelpFeature(this)),this.registerFeature(new D.DefinitionFeature(this)),this.registerFeature(new P.ReferencesFeature(this)),this.registerFeature(new S.DocumentHighlightFeature(this)),this.registerFeature(new R.DocumentSymbolFeature(this)),this.registerFeature(new T.WorkspaceSymbolFeature(this)),this.registerFeature(new E.CodeActionFeature(this)),this.registerFeature(new M.CodeLensFeature(this)),this.registerFeature(new N.DocumentFormattingFeature(this)),this.registerFeature(new N.DocumentRangeFormattingFeature(this)),this.registerFeature(new N.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new F.RenameFeature(this)),this.registerFeature(new q.DocumentLinkFeature(this)),this.registerFeature(new j.ExecuteCommandFeature(this)),this.registerFeature(new y.SyncConfigurationFeature(this)),this.registerFeature(new k.TypeDefinitionFeature(this)),this.registerFeature(new O.ImplementationFeature(this)),this.registerFeature(new x.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new B.WorkspaceFoldersFeature(this)),this.registerFeature(new I.FoldingRangeFeature(this)),this.registerFeature(new L.DeclarationFeature(this)),this.registerFeature(new A.SelectionRangeFeature(this)),this.registerFeature(new Q.ProgressFeature(this)),this.registerFeature(new $.CallHierarchyFeature(this)),this.registerFeature(new W.SemanticTokensFeature(this)),this.registerFeature(new H.LinkedEditingFeature(this)),this.registerFeature(new V.DidCreateFilesFeature(this)),this.registerFeature(new V.DidRenameFilesFeature(this)),this.registerFeature(new V.DidDeleteFilesFeature(this)),this.registerFeature(new V.WillCreateFilesFeature(this)),this.registerFeature(new V.WillRenameFilesFeature(this)),this.registerFeature(new V.WillDeleteFilesFeature(this)),this.registerFeature(new U.TypeHierarchyFeature(this)),this.registerFeature(new K.InlineValueFeature(this)),this.registerFeature(new z.InlayHintsFeature(this)),this.registerFeature(new m.DiagnosticFeature(this)),this.registerFeature(new v.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(ae.createAll(this))}fillInitializeParams(e){for(const t of this._features)d.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};(0,g.ensure)(e,"workspace").applyEdit=!0;const t=(0,g.ensure)((0,g.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[c.ResourceOperationKind.Create,c.ResourceOperationKind.Rename,c.ResourceOperationKind.Delete],t.failureHandling=c.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0},t.metadataSupport=!0,t.snippetEditSupport=!0;const n=(0,g.ensure)((0,g.ensure)(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[c.DiagnosticTag.Unnecessary,c.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0,(0,g.ensure)((0,g.ensure)(e,"textDocument"),"filters").relativePatternSupport=!0;const i=(0,g.ensure)(e,"window");(0,g.ensure)(i,"showMessage").messageActionItem={additionalPropertiesSupport:!0},(0,g.ensure)(i,"showDocument").support=!0;const o=(0,g.ensure)(e,"general");o.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(le.RequestsToCancelOnContentModified)},o.regularExpressions={engine:"ECMAScript",version:"ES2020"},o.markdown={parser:"marked",version:"1.1.0"},o.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(o.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(const t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){const t=this._clientOptions.documentSelector;for(const e of this._features)d.func(e.preInitialize)&&e.preInitialize(this._capabilities,t);for(const e of this._features)e.initialize(this._capabilities,t)}async handleRegistrationRequest(e){const t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,(e=>this.doRegisterCapability(e))):this.doRegisterCapability(e)}async doRegisterCapability(e){if(this.isRunning())for(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const n=t.registerOptions??{};n.documentSelector=n.documentSelector??this._clientOptions.documentSelector;const i={id:t.id,registerOptions:n};try{e.register(i)}catch(e){return Promise.reject(e)}}else for(const t of e.registrations)this._ignoredRegistrations.add(t.id)}async handleUnregistrationRequest(e){const t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,(e=>this.doUnregisterCapability(e))):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(const t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;const e=this._dynamicFeatures.get(t.method);if(!e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}}async handleApplyWorkspaceEdit(e){const t=this.clientOptions.middleware?.workspace?.handleApplyEdit;if(t){const n=await t(e,(e=>this.doHandleApplyWorkspaceEdit(e)));return n instanceof c.ResponseError?Promise.reject(n):n}return this.doHandleApplyWorkspaceEdit(e)}workspaceEditLock=new h.Semaphore(1);async doHandleApplyWorkspaceEdit(e){const t=e.edit,n=await this.workspaceEditLock.lock((()=>this._p2c.asWorkspaceEdit(t))),i=new Map;a.workspace.textDocuments.forEach((e=>i.set(e.uri.toString(),e)));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(c.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){const t=this._p2c.asUri(e.textDocument.uri).toString(),n=i.get(t);if(n&&n.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):d.asPromise(a.workspace.applyEdit(n,{isRefactoring:e.metadata?.isRefactoring}).then((e=>({applied:e}))))}static RequestsToCancelOnContentModified=new Set([c.SemanticTokensRequest.method,c.SemanticTokensRangeRequest.method,c.SemanticTokensDeltaRequest.method]);static CancellableResolveCalls=new Set([c.CompletionResolveRequest.method,c.CodeLensResolveRequest.method,c.CodeActionResolveRequest.method,c.InlayHintResolveRequest.method,c.DocumentLinkResolveRequest.method,c.WorkspaceSymbolResolveRequest.method]);handleFailedRequest(e,t,n,i,o=!0,r=!1){if(n instanceof c.ResponseError){if(n.code===c.ErrorCodes.PendingResponseRejected||n.code===c.ErrorCodes.ConnectionInactive)return i;if(n.code===c.LSPErrorCodes.RequestCancelled||n.code===c.LSPErrorCodes.ServerCancelled){if(void 0!==t&&t.isCancellationRequested&&!r)return i;throw void 0!==n.data?new g.LSPCancellationError(n.data):new a.CancellationError}if(n.code===c.LSPErrorCodes.ContentModified){if(le.RequestsToCancelOnContentModified.has(e.method)||le.CancellableResolveCalls.has(e.method))throw new a.CancellationError;return i}}throw this.error(`Request ${e.method} failed.`,n,o),n}}t.BaseLanguageClient=le,t.LanguageClient=class extends le{serverOptions;constructor(e,t,n,i){super(e,t,i),this.serverOptions=n}async createMessageTransports(e){return this.serverOptions()}};class de{error(e){(0,c.RAL)().console.error(e)}warn(e){(0,c.RAL)().console.warn(e)}info(e){(0,c.RAL)().console.info(e)}log(e){(0,c.RAL)().console.log(e)}}!function(e){e.createAll=function(e){return[new G.InlineCompletionItemFeature(e),new X.TextDocumentContentFeature(e)]}}(ae||(t.ProposedFeatures=ae={}))},3747:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const i=n(8431);var o,r;!function(e){e.method="textDocument/documentColor",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.DocumentColorRequest=o={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.ColorPresentationRequest=r={}))},3806:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const i=t.test(e),o=t.test(n);return i&&o&&(e=+e,n=+n),e===n?0:i&&!o?-1:o&&!i?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},3923:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DidSaveTextDocumentFeature=t.WillSaveWaitUntilFeature=t.WillSaveFeature=t.DidChangeTextDocumentFeature=t.DidCloseTextDocumentFeature=t.DidOpenTextDocumentFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));class d extends u.TextDocumentEventFeature{_syncedDocuments;_pendingOpenNotifications;_delayOpen;_pendingOpenListeners;constructor(e,t){super(e,a.workspace.onDidOpenTextDocument,c.DidOpenTextDocumentNotification.type,(()=>e.middleware.didOpen),(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),(e=>e),u.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingOpenNotifications=new Map,this._delayOpen=e.clientOptions.textSynchronization?.delayOpenNotifications??!1}async callback(e){return this._delayOpen?this.matches(e)?this._client.tabsModel.isVisible(e)?super.callback(e):void this._pendingOpenNotifications.set(e.uri.toString(),e):void 0:super.callback(e)}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return c.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;const t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);if(a.workspace.textDocuments.forEach((e=>{const n=e.uri.toString();if(!this._syncedDocuments.has(n)&&a.languages.match(t,e)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e))if(this._client.tabsModel.isVisible(e)){const t=this._client.middleware,i=e=>this._client.sendNotification(this._type,this._createParams(e));(t.didOpen?t.didOpen(e,i):i(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)})),this._syncedDocuments.set(n,e)}else this._pendingOpenNotifications.set(n,e)})),this._delayOpen&&void 0===this._pendingOpenListeners){this._pendingOpenListeners=[];const e=this._client.tabsModel;this._pendingOpenListeners.push(e.onClose((e=>{for(const t of e)this._pendingOpenNotifications.delete(t.toString())}))),this._pendingOpenListeners.push(e.onOpen((e=>{for(const t of e){const e=this._pendingOpenNotifications.get(t.toString());void 0!==e&&(super.callback(e).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)})),this._pendingOpenNotifications.delete(t.toString()))}}))),this._pendingOpenListeners.push(a.workspace.onDidCloseTextDocument((e=>{this._pendingOpenNotifications.delete(e.uri.toString())})))}}async sendPendingOpenNotifications(e){const t=Array.from(this._pendingOpenNotifications.values());this._pendingOpenNotifications.clear();for(const n of t)void 0!==e&&n.uri.toString()===e||await super.callback(n)}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,n)}clear(){if(this._pendingOpenNotifications.clear(),void 0!==this._pendingOpenListeners){for(const e of this._pendingOpenListeners)e.dispose();this._pendingOpenListeners=void 0}super.clear()}}t.DidOpenTextDocumentFeature=d;class h extends u.TextDocumentEventFeature{_syncedDocuments;_pendingTextDocumentChanges;constructor(e,t,n){super(e,a.workspace.onDidCloseTextDocument,c.DidCloseTextDocumentNotification.type,(()=>e.middleware.didClose),(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),(e=>e),u.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=n}get registrationType(){return c.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,n)}unregister(e){const t=this._selectors.get(e);if(void 0===t)return;super.unregister(e);const n=this._selectors.values();this._syncedDocuments.forEach((e=>{if(a.languages.match(t,e)>0&&!this._selectorFilter(n,e)&&!this._client.hasDedicatedTextSynchronizationFeature(e)){const t=this._client.middleware,n=e=>this._client.sendNotification(this._type,this._createParams(e));this._syncedDocuments.delete(e.uri.toString()),(t.didClose?t.didClose(e,n):n(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)}))}}))}}t.DidCloseTextDocumentFeature=h;class p extends u.DynamicDocumentFeature{_listener;_changeData;_onNotificationSent;_onPendingChangeAdded;_pendingTextDocumentChanges;_syncKind;constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new a.EventEmitter,this._onPendingChangeAdded=new a.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=c.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return c.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==c.TextDocumentSyncKind.None&&this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=a.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(const e of this._changeData.values())yield e.documentSelector}async callback(e){if(0===e.contentChanges.length)return;const t=e.document.uri,n=e.document.version,i=[];for(const o of this._changeData.values())if(a.languages.match(o.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const r=this._client.middleware;if(o.syncKind===c.TextDocumentSyncKind.Incremental){const o=async e=>{const i=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e,t,n);await this._client.sendNotification(c.DidChangeTextDocumentNotification.type,i),this.notificationSent(e.document,c.DidChangeTextDocumentNotification.type,i)};i.push(r.didChange?r.didChange(e,(e=>o(e))):o(e))}else if(o.syncKind===c.TextDocumentSyncKind.Full){const t=async e=>{const t=e.document.uri.toString();this._pendingTextDocumentChanges.set(t,e.document),this._onPendingChangeAdded.fire()};i.push(r.didChange?r.didChange(e,(e=>t(e))):t(e))}}return Promise.all(i).then(void 0,(e=>{throw this._client.error(`Sending document notification ${c.DidChangeTextDocumentNotification.type.method} failed`,e),e}))}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){if(this._changeData.delete(e),0===this._changeData.size)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=c.TextDocumentSyncKind.None;else{this._syncKind=c.TextDocumentSyncKind.None;for(const e of this._changeData.values())if(this.updateSyncKind(e.syncKind),this._syncKind===c.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=c.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(0===this._pendingTextDocumentChanges.size)return[];let t;if(0===e.size)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(const n of this._pendingTextDocumentChanges)e.has(n[0])||(t.push(n[1]),this._pendingTextDocumentChanges.delete(n[0]))}return t}getProvider(e){for(const t of this._changeData.values())if(a.languages.match(t.documentSelector,e)>0)return{send:e=>this.callback(e)}}updateSyncKind(e){if(this._syncKind!==c.TextDocumentSyncKind.Full)switch(e){case c.TextDocumentSyncKind.Full:this._syncKind=e;break;case c.TextDocumentSyncKind.Incremental:this._syncKind===c.TextDocumentSyncKind.None&&(this._syncKind=c.TextDocumentSyncKind.Incremental)}}}t.DidChangeTextDocumentFeature=p;class f extends u.TextDocumentEventFeature{constructor(e){super(e,a.workspace.onWillSaveTextDocument,c.WillSaveTextDocumentNotification.type,(()=>e.middleware.willSave),(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),(e=>e.document),((e,t)=>u.TextDocumentEventFeature.textDocumentFilter(e,t.document)))}get registrationType(){return c.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}}t.WillSaveFeature=f;class g extends u.DynamicDocumentFeature{_listener;_selectors;constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return c.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:l.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=a.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(u.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const t=this._client.middleware,n=e=>this._client.sendRequest(c.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((async e=>{const t=await this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}t.WillSaveWaitUntilFeature=g;class m extends u.TextDocumentEventFeature{_includeText;constructor(e){super(e,a.workspace.onDidSaveTextDocument,c.DidSaveTextDocumentNotification.type,(()=>e.middleware.didSave),(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),(e=>e),u.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return c.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;if(t&&n&&n.save){const e="boolean"==typeof n.save?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}}t.DidSaveTextDocumentFeature=m},3955:(e,t,n)=>{const i=n(4517);e.exports=(e,t,n=!1)=>{if(e instanceof i)return e;try{return new i(e,t)}catch(e){if(!n)return null;throw e}}},3990:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},4004:(e,t,n)=>{const i=n(8848),o=n(8220),r=n(9761),s=n(2386),a=n(1262),c=n(9639);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return i(e,n,u);case"!=":return o(e,n,u);case">":return r(e,n,u);case">=":return s(e,n,u);case"<":return a(e,n,u);case"<=":return c(e,n,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},4054:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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,i,o){const r=void 0!==i?i:t.NullLogger;let s=0,a=0,b=0;const S="2.0",T=o?.maxParallelism??-1;let P,k=0;const E=new Map;let F;const q=new Map,j=new Map;let I,L,A=new d.LinkedMap,$=new Map,W=new Set,H=new Map,U=y.Off,K=_.Text,z=M.New;const B=new h.Emitter,V=new h.Emitter,G=new h.Emitter,X=new h.Emitter,J=new h.Emitter,Q=o&&o.cancellationStrategy?o.cancellationStrategy:O.Message;function Y(e){}function Z(){return z===M.Listening}function ee(){return z===M.Closed}function te(){return z===M.Disposed}function ne(){z!==M.New&&z!==M.Listening||(z=M.Closed,V.fire(void 0))}function ie(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===A.size||-1!==T&&k>=T||(I=(0,c.default)().timer.setImmediate((async()=>{if(I=void 0,0===A.size)return;if(-1!==T&&k>=T)return;const e=A.shift();let t;try{k++;const n=o?.messageStrategy;t=x.is(n)?n.handleMessage(e,re):re(e)}catch(e){r.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then((()=>{k--,oe()})).catch((e=>{r.error(`Processing message queue failed: ${e.toString()}`)})):k--,oe()}})))}async function re(e){return l.Message.isRequest(e)?async function(e){if(te())return Promise.resolve();function t(t,i,o){const r={jsonrpc:S,id:e.id};return t instanceof l.ResponseError?r.error=t.toJson():r.result=void 0===t?null:t,ue(r,i,o),n.write(r)}function i(t,i,o){const r={jsonrpc:S,id:e.id,error:t.toJson()};return ue(r,i,o),n.write(r)}!function(e){if(U!==y.Off&&L)if(K===_.Text){let t;U!==y.Verbose&&U!==y.Compact||!e.params||(t=`Params: ${ce(e.params)}\n\n`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else de("receive-request",e)}(e);const o=E.get(e.method);let r,s;o&&(r=o.type,s=o.handler);const a=Date.now();if(s||P){const n=e.id??String(Date.now()),o=R.is(Q.receiver)?Q.receiver.createCancellationTokenSource(n):Q.receiver.createCancellationTokenSource(e);null!==e.id&&W.has(e.id)&&o.cancel(),null!==e.id&&H.set(n,o);try{let n;if(s)if(void 0===e.params){if(void 0!==r&&0!==r.numberOfParams)return i(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${e.method} defines ${r.numberOfParams} params but received none.`),e.method,a);n=s(o.token)}else if(Array.isArray(e.params)){if(void 0!==r&&r.parameterStructures===l.ParameterStructures.byName)return i(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!==r&&r.parameterStructures===l.ParameterStructures.byPosition)return i(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 P&&(n=P(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 i(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,a):await i(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)}finally{H.delete(n)}}else await i(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===f.type.method){const t=e.params.id;return W.delete(t),void le(e)}{const i=q.get(e.method);i&&(n=i.handler,t=i.type)}if(n||F)try{if(le(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==l.ParameterStructures.byName&&r.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await n();else if(Array.isArray(e.params)){const i=e.params;e.method===m.type.method&&2===i.length&&g.is(i[0])?await n({token:i[0],value:i[1]}):(void 0!==t&&(t.parameterStructures===l.ParameterStructures.byName&&r.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&r.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),await n(...i))}else void 0!==t&&t.parameterStructures===l.ParameterStructures.byPosition&&r.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await n(e.params);else F&&await F(e.method,e.params)}catch(t){t.message?r.error(`Notification handler '${e.method}' failed with message: ${t.message}`):r.error(`Notification handler '${e.method}' failed unexpectedly.`)}else G.fire(e)}(e):l.Message.isResponse(e)?ae(e):function(e){if(!e)return void r.error("Received empty message.");r.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){B.fire([e,void 0,void 0])})),n.onClose(ne),n.onError((function(e){B.fire(e)}));const se=e=>{try{if(l.Message.isNotification(e)&&e.method===f.type.method){const t=e.params.id,i=ie(t),s=A.get(i);if(l.Message.isRequest(s)){const a=o?.connectionStrategy,c=a&&a.cancelUndispatched?a.cancelUndispatched(s,Y):void 0;if(c&&(void 0!==c.error||void 0!==c.result))return A.delete(i),H.delete(t),c.id=s.id,ue(c,e.method,Date.now()),void n.write(c).catch((()=>r.error("Sending response for canceled message failed.")))}const a=H.get(t);if(void 0!==a)return a.cancel(),void le(e);W.add(t)}!function(e,t){var n;l.Message.isRequest(t)?e.set(ie(t.id),t):l.Message.isResponse(t)?-1===T?e.set(null===(n=t.id)?"res-unknown-"+(++b).toString():"res-"+n.toString(),t):ae(t):e.set("not-"+(++a).toString(),t)}(A,e)}finally{oe()}};function ae(e){if(!te())if(null===e.id)e.error?r.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):r.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!==y.Off&&L)if(K===_.Text){let n;if(U!==y.Verbose&&U!==y.Compact||(e.error&&e.error.data?n=`Error data: ${ce(e.error.data)}\n\n`:e.result?n=`Result: ${ce(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,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?r.error(`Response handler '${n.method}' failed with message: ${e.message}`):r.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function ce(e){if(null!=e)switch(U){case y.Verbose:return JSON.stringify(e,null,4);case y.Compact:return JSON.stringify(e);default:return}}function ue(e,t,n){if(U!==y.Off&&L)if(K===_.Text){let i;U!==y.Verbose&&U!==y.Compact||(e.error&&e.error.data?i=`Error data: ${ce(e.error.data)}\n\n`:e.result?i=`Result: ${ce(e.result)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else de("send-response",e)}function le(e){if(U!==y.Off&&L&&e.method!==D.type.method)if(K===_.Text){let t;U!==y.Verbose&&U!==y.Compact||(t=e.params?`Params: ${ce(e.params)}\n\n`:"No parameters provided.\n\n"),L.log(`Received notification '${e.method}'.`,t)}else de("receive-notification",e)}function de(e,t){if(!L||U===y.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(n)}function he(){if(ee())throw new N(w.Closed,"Connection is closed.");if(te())throw new N(w.Disposed,"Connection is disposed.")}function pe(e){return void 0===e?null:e}function fe(e){return null===e?void 0:e}function ge(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function me(e,t){switch(e){case l.ParameterStructures.auto:return ge(t)?fe(t):[pe(t)];case l.ParameterStructures.byName:if(!ge(t))throw new Error("Received parameters by name but param is not an object literal.");return fe(t);case l.ParameterStructures.byPosition:return[pe(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ve(e,t){let n;const i=e.numberOfParams;switch(i){case 0:n=void 0;break;case 1:n=me(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<i;e++)n.push(pe(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)n.push(null)}return n}const ye={sendNotification:(e,...t)=>{let i,o;if(he(),u.string(e)){i=e;const n=t[0];let r=0,s=l.ParameterStructures.auto;l.ParameterStructures.is(n)&&(r=1,s=n);const a=t.length,c=a-r;switch(c){case 0:o=void 0;break;case 1:o=me(s,t[r]);break;default:if(s===l.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);o=t.slice(r,a).map((e=>pe(e)))}}else{const n=t;i=e.method,o=ve(e,n)}const s={jsonrpc:S,method:i,params:o};return function(e){if(U!==y.Off&&L)if(K===_.Text){let t;U!==y.Verbose&&U!==y.Compact||(t=e.params?`Params: ${ce(e.params)}\n\n`:"No parameters provided.\n\n"),L.log(`Sending notification '${e.method}'.`,t)}else de("send-notification",e)}(s),n.write(s).catch((e=>{throw r.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return he(),u.func(e)?F=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.delete(n):F=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.delete(t)}}},sendProgress:(e,t,n)=>ye.sendNotification(m.type,{token:t,value:n}),onUnhandledProgress:X.event,sendRequest:(e,...t)=>{function i(e,t){const n=Q.sender.sendCancellation(e,t);void 0===n?r.log(`Received no promise from cancellation strategy when cancelling id ${t}`):n.catch((()=>{r.log(`Sending cancellation messages for id ${t} failed.`)}))}let o,a,c;if(he(),function(){if(!Z())throw new Error("Call listen() first.")}(),u.string(e)){o=e;const n=t[0],i=t[t.length-1];let r=0,s=l.ParameterStructures.auto;l.ParameterStructures.is(n)&&(r=1,s=n);let u=t.length;p.CancellationToken.is(i)&&(u-=1,c=i);const d=u-r;switch(d){case 0:a=void 0;break;case 1:a=me(s,t[r]);break;default:if(s===l.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);a=t.slice(r,u).map((e=>pe(e)))}}else{const n=t;o=e.method,a=ve(e,n);const i=e.numberOfParams;c=p.CancellationToken.is(n[i])?n[i]:void 0}const d=s++;let h,f=!1;void 0!==c&&(c.isCancellationRequested?f=!0:h=c.onCancellationRequested((()=>{i(ye,d)})));const g={jsonrpc:S,id:d,method:o,params:a};return function(e){if(U!==y.Off&&L)if(K===_.Text){let t;U!==y.Verbose&&U!==y.Compact||!e.params||(t=`Params: ${ce(e.params)}\n\n`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else de("send-request",e)}(g),"function"==typeof Q.sender.enableCancellation&&Q.sender.enableCancellation(g),new Promise((async(e,t)=>{const s={method:o,timerStart:Date.now(),resolve:t=>{e(t),Q.sender.cleanup(d),h?.dispose()},reject:e=>{t(e),Q.sender.cleanup(d),h?.dispose()}};try{$.set(d,s),await n.write(g),f&&i(ye,d)}catch(e){throw $.delete(d),s.reject(new l.ResponseError(l.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),r.error("Sending request failed."),e}}))},onRequest:(e,t)=>{he();let n=null;return v.is(e)?(n=void 0,P=e):u.string(e)?(n=null,void 0!==t&&(n=e,E.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,E.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?E.delete(n):P=void 0)}}},hasPendingResponse:()=>$.size>0,trace:async(e,t,n)=>{let i=!1,o=_.Text;void 0!==n&&(u.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||_.Text)),U=e,K=o,L=U===y.Off?void 0:t,!i||ee()||te()||await ye.sendNotification(C.type,{value:y.toString(e)})},onError:B.event,onClose:V.event,onUnhandledNotification:G.event,onDispose:J.event,end:()=>{n.end()},dispose:()=>{if(te())return;z=M.Disposed,J.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,H=new Map,W=new Set,A=new d.LinkedMap,u.func(n.dispose)&&n.dispose(),u.func(e.dispose)&&e.dispose()},listen:()=>{he(),function(){if(Z())throw new N(w.AlreadyListening,"Connection is already listening")}(),z=M.Listening,e.listen(se)},inspect:()=>{(0,c.default)().console.log("inspect")}};return ye.onNotification(D.type,(e=>{if(U===y.Off||!L)return;const t=U===y.Verbose||U===y.Compact;L.log(e.message,t?e.verbose:void 0)})),ye.onNotification(m.type,(async e=>{const t=j.get(e.token);t?await t(e.value):X.fire(e)})),ye};const c=a(n(5091)),u=s(n(6618)),l=n(7162),d=n(1109),h=n(2479),p=n(6957);var f,g,m,v,y,b,_,C,D,w,S,R,T,P,k,O,x,E,M;!function(e){e.type=new l.NotificationType("$/cancelRequest")}(f||(f={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(g||(t.ProgressToken=g={})),function(e){e.type=new l.NotificationType("$/progress")}(m||(m={})),t.ProgressType=class{__;_pr;constructor(){}},function(e){e.is=function(e){return u.func(e)}}(v||(v={})),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"}(y||(t.Trace=y={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(b||(t.TraceValue=b={})),t.TraceValues=b,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"}}}(y||(t.Trace=y={})),function(e){e.Text="text",e.JSON="json"}(_||(t.TraceFormat=_={})),function(e){e.fromString=function(t){return u.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(_||(t.TraceFormat=_={})),function(e){e.type=new l.NotificationType("$/setTrace")}(C||(t.SetTraceNotification=C={})),function(e){e.type=new l.NotificationType("$/logTrace")}(D||(t.LogTraceNotification=D={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(w||(t.ConnectionErrors=w={}));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)}}(S||(t.ConnectionStrategy=S={})),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))}}(R||(t.IdCancellationReceiverStrategy=R={})),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))}}(T||(t.RequestCancellationReceiverStrategy=T={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new p.CancellationTokenSource}),e.is=function(e){return R.is(e)||T.is(e)}}(P||(t.CancellationReceiverStrategy=P={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(f.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&u.func(t.sendCancellation)&&u.func(t.cleanup)}}(k||(t.CancellationSenderStrategy=k={})),function(e){e.Message=Object.freeze({receiver:P.Message,sender:k.Message}),e.is=function(e){const t=e;return t&&P.is(t.receiver)&&k.is(t.sender)}}(O||(t.CancellationStrategy=O={})),function(e){e.is=function(e){const t=e;return t&&u.func(t.handleMessage)}}(x||(t.MessageStrategy=x={})),function(e){e.is=function(e){const t=e;return t&&(O.is(t.cancellationStrategy)||S.is(t.connectionStrategy)||x.is(t.messageStrategy)||u.number(t.maxParallelism))}}(E||(t.ConnectionOptions=E={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(M||(M={}))},4102:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const a=s(n(1398)),c=n(3147),u=n(8071),l=s(n(5590));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[c.SemanticTokenTypes.namespace,c.SemanticTokenTypes.type,c.SemanticTokenTypes.class,c.SemanticTokenTypes.enum,c.SemanticTokenTypes.interface,c.SemanticTokenTypes.struct,c.SemanticTokenTypes.typeParameter,c.SemanticTokenTypes.parameter,c.SemanticTokenTypes.variable,c.SemanticTokenTypes.property,c.SemanticTokenTypes.enumMember,c.SemanticTokenTypes.event,c.SemanticTokenTypes.function,c.SemanticTokenTypes.method,c.SemanticTokenTypes.macro,c.SemanticTokenTypes.keyword,c.SemanticTokenTypes.modifier,c.SemanticTokenTypes.comment,c.SemanticTokenTypes.string,c.SemanticTokenTypes.number,c.SemanticTokenTypes.regexp,c.SemanticTokenTypes.operator,c.SemanticTokenTypes.decorator,c.SemanticTokenTypes.label],t.tokenModifiers=[c.SemanticTokenModifiers.declaration,c.SemanticTokenModifiers.definition,c.SemanticTokenModifiers.readonly,c.SemanticTokenModifiers.static,c.SemanticTokenModifiers.deprecated,c.SemanticTokenModifiers.abstract,c.SemanticTokenModifiers.async,c.SemanticTokenModifiers.modification,c.SemanticTokenModifiers.documentation,c.SemanticTokenModifiers.defaultLibrary],t.formats=[c.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,u.ensure)((0,u.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(c.SemanticTokensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()}));const[n,i]=this.getRegistration(t,e.semanticTokensProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=l.boolean(e.full)?e.full:void 0!==e.full,i=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,o=new a.EventEmitter,r=n?{onDidChangeSemanticTokens:o.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,i=n.middleware,o=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(c.SemanticTokensRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSemanticTokens(e,t)),(e=>n.handleFailedRequest(c.SemanticTokensRequest.type,t,e,null)))};return i.provideDocumentSemanticTokens?i.provideDocumentSemanticTokens(e,t,o):o(e,t)},provideDocumentSemanticTokensEdits:i?(e,t,n)=>{const i=this._client,o=i.middleware,r=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return i.sendRequest(c.SemanticTokensDeltaRequest.type,o,n).then((async e=>n.isCancellationRequested?null:c.SemanticTokens.is(e)?await i.protocol2CodeConverter.asSemanticTokens(e,n):await i.protocol2CodeConverter.asSemanticTokensEdits(e,n)),(e=>i.handleFailedRequest(c.SemanticTokensDeltaRequest.type,n,e,null)))};return o.provideDocumentSemanticTokensEdits?o.provideDocumentSemanticTokensEdits(e,t,n,r):r(e,t,n)}:void 0}:void 0,s=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const i=this._client,o=i.middleware,r=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};return i.sendRequest(c.SemanticTokensRangeRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSemanticTokens(e,n)),(e=>i.handleFailedRequest(c.SemanticTokensRangeRequest.type,n,e,null)))};return o.provideDocumentRangeSemanticTokens?o.provideDocumentRangeSemanticTokens(e,t,n,r):r(e,t,n)}}:void 0,u=[],d=this._client,h=d.protocol2CodeConverter.asSemanticTokensLegend(e.legend),p=d.protocol2CodeConverter.asDocumentSelector(t);return void 0!==r&&u.push(a.languages.registerDocumentSemanticTokensProvider(p,r,h)),void 0!==s&&u.push(a.languages.registerDocumentRangeSemanticTokensProvider(p,s,h)),[new a.Disposable((()=>u.forEach((e=>e.dispose())))),{range:s,full:r,onDidChangeSemanticTokensEmitter:o}]}}t.SemanticTokensFeature=d},4166:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const i=n(7672),o=n(8431);var r,s,a;!function(e){e.type=new i.ProgressType,e.is=function(t){return t===e.type}}(r||(t.WorkDoneProgress=r={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(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={}))},4202:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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(9994);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return c.SemanticTokensBuilder}});const u=s(n(6755)),l=s(n(9461));a(n(3147),t);const d=n(5109);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return d.TextDocuments}});const h=n(8993);var p;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return h.NotebookDocuments}}),a(n(575),t),function(e){e.all={__brand:"features",workspace:l.TextDocumentContentFeature,languages:u.InlineCompletionFeature}}(p||(t.ProposedFeatures=p={}))},4311:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=n(6157),d=s(n(4429));class h extends u.WorkspaceFeature{constructor(e){super(e,c.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:l.SupportedSymbolKinds},t.tagSupport={valueSet:l.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:d.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(c.WorkspaceSymbolRequest.type,{query:e},t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformations(e,t)),(e=>n.handleFailedRequest(c.WorkspaceSymbolRequest.type,t,e,null))),o=n.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,i):i(e,t)},resolveWorkspaceSymbol:!0===e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(c.WorkspaceSymbolResolveRequest.type,n.code2ProtocolConverter.asWorkspaceSymbol(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformation(e)),(e=>n.handleFailedRequest(c.WorkspaceSymbolResolveRequest.type,t,e,null))),o=n.middleware;return o.resolveWorkspaceSymbol?o.resolveWorkspaceSymbol(e,t,i):i(e,t)}:void 0};return[a.languages.registerWorkspaceSymbolProvider(t),t]}}t.WorkspaceSymbolFeature=h},4333:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const i=n(8431);var o;!function(e){e.method="window/showDocument",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ShowDocumentRequest=o={}))},4363:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.ReferencesRequest.type)}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideReferences:(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>o.sendRequest(c.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asReferences(e,i)),(e=>o.handleFailedRequest(c.ReferencesRequest.type,i,e,null))),s=o.middleware;return s.provideReferences?s.provideReferences(e,t,n,i,r):r(e,t,n,i)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ReferencesFeature=d},4396:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=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}),r=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)&&i(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.activate=async function(e){const t=new y.default("Cursor - Pyright");N(e,t).catch((e=>{t.error(`Failed to activate Cursor Pyright: ${e}`)}))},t.activateInBackground=N,t.deactivate=function(){_&&(_.dispose(),_=void 0);const e=C;return C=void 0,e?.stop()};const a=n(6407),c=s(n(9896)),u=s(n(857)),l=r(n(6928)),d=n(8876),h=r(n(1398)),p=n(1398),f=n(9146),g=n(293),m=n(2604),v=n(1943),y=s(n(5485)),b=n(2328);let _,C;const D=new Map,w=3072,S={"cursorpyright.analysis.autoImportCompletions":"python.analysis.autoImportCompletions","cursorpyright.analysis.autoSearchPaths":"python.analysis.autoSearchPaths","cursorpyright.analysis.diagnosticMode":"python.analysis.diagnosticMode","cursorpyright.analysis.diagnosticSeverityOverrides":"python.analysis.diagnosticSeverityOverrides","cursorpyright.analysis.disableWorkspaceSymbol":"python.analysis.disableWorkspaceSymbol","cursorpyright.analysis.exclude":"python.analysis.exclude","cursorpyright.analysis.extraPaths":"python.analysis.extraPaths","cursorpyright.analysis.ignore":"python.analysis.ignore","cursorpyright.analysis.include":"python.analysis.include","cursorpyright.analysis.inlayHints.callArgumentNames":"python.analysis.inlayHints.callArgumentNames","cursorpyright.analysis.inlayHints.functionReturnTypes":"python.analysis.inlayHints.functionReturnTypes","cursorpyright.analysis.inlayHints.variableTypes":"python.analysis.inlayHints.variableTypes","cursorpyright.analysis.logLevel":"python.analysis.logLevel","cursorpyright.analysis.stubPath":"python.analysis.stubPath","cursorpyright.analysis.typeCheckingMode":"python.analysis.typeCheckingMode","cursorpyright.analysis.typeshedPaths":"python.analysis.typeshedPaths","cursorpyright.analysis.useLibraryCodeForTypes":"python.analysis.useLibraryCodeForTypes","cursorpyright.disableTaggedHints":"python.analysis.disableTaggedHints","cursorpyright.nodeArguments":"python.analysis.nodeArguments","cursorpyright.nodeExecutable":"python.analysis.nodeExecutable"},R="cursorpyright.importedPylanceSettings:global",T="cursorpyright.importedPylanceSettings:workspaceState",P="cursorpyright.shouldImportPylanceSettings";async function k(e){try{return await c.default.promises.stat(e),!0}catch(e){return!1}}async function O(e,t,{ignoreKeys:n,prompt:i,showReloadButton:o}){const r=p.workspace.getConfiguration(),s=!n&&e.globalState.get(R,!1);s&&t.info("[pylance import] Already imported settings globally");const a=void 0===p.env.remoteName?void 0:`${p.env.remoteName}://${u.default.hostname()}`;let l,d=!1;void 0!==a?(l=`cursorpyright.importedPylanceSettings:global:remote:${a}`,!n&&e.globalState.get(l,!1)?t.info(`[pylance import] Already imported settings for remote ${a}`):d=await async function(e){let t;try{t=await E()}catch(t){return e.info(`[settings migration] Couldn't read and parse remote machine settings at ${x}`,t),!1}for(const[e,n]of Object.entries(S)){const i=t[n],o=t[e];if(void 0!==i&&void 0===o)return!0}return!1}(t)):t.info("[pylance import] No remote authority found, skipping remote settings migration");const h=!n&&e.workspaceState.get(T,!1);h&&t.info(`[pylance import] Already imported settings for workspace ${p.workspace.name}`);const f=n?"always":r.get(P,"ask");if("never"===f)return;const g=[];for(const i of p.workspace.workspaceFolders??[]){const o=`cursorpyright.importedPylanceSettings:${i.uri.fsPath}`;!n&&e.workspaceState.get(o,!1)?t.info(`[pylance import] Already imported settings for workspace folder ${i.uri.fsPath}`):g.push({workspaceFolder:i,workspaceFolderConfig:p.workspace.getConfiguration(void 0,i),key:o})}let m,v=function(e,{workspaceFolderConfigurations:t,importedPylanceSettingsGlobally:n,importedPylanceSettingsForWorkspace:i}){const o=p.workspace.getConfiguration(void 0,{languageId:"python"}),r=[];for(const[s,a]of Object.entries(S)){{const t=o.inspect(a),c=o.inspect(s);void 0===c?e.error(`Cursor Pyright setting ${s} not defined`):void 0===t||(n||void 0!==c.globalValue||void 0===t.globalValue||r.push({config:o,key:s,value:t.globalValue,target:p.ConfigurationTarget.Global}),n||void 0!==c.globalLanguageValue||void 0===t.globalLanguageValue||r.push({config:o,key:s,value:t.globalLanguageValue,target:p.ConfigurationTarget.Global}),i||void 0!==c.workspaceValue||void 0===t.workspaceValue||r.push({config:o,key:s,value:t.workspaceValue,target:p.ConfigurationTarget.Workspace}),i||void 0!==c.workspaceLanguageValue||void 0===t.workspaceLanguageValue||r.push({config:o,key:s,value:t.workspaceLanguageValue,target:p.ConfigurationTarget.Workspace}))}for(const{workspaceFolderConfig:n}of t){const t=n.inspect(s),i=n.inspect(a);void 0===t?e.error(`Cursor Pyright setting ${s} not defined`):void 0!==i&&void 0===t.workspaceFolderValue&&void 0!==i.workspaceFolderValue&&(e.info(`Importing ${s} from Pylance for target WorkspaceFolder`),r.push({config:n,key:s,value:i.workspaceFolderValue,target:p.ConfigurationTarget.WorkspaceFolder}))}}return r}(t,{workspaceFolderConfigurations:g,importedPylanceSettingsGlobally:s,importedPylanceSettingsForWorkspace:h}),y=!0;if(i&&(v.length>0||d)&&"always"!==f){const e="Yes",t="No",n="Never ask again",i=await p.window.showInformationMessage("Would you like Cursor Pyright to import your settings from Pylance?",e,t,n);i!==e&&(i===n&&await r.update(P,"never",p.ConfigurationTarget.Global),y=!1)}await e.globalState.update(R,!0),await e.workspaceState.update(T,!0),void 0!==l&&await e.globalState.update(l,!0);for(const{key:t}of g)await e.workspaceState.update(t,!0);if(y){if(d)try{const e=await async function(e){const t=[],n=await E();for(const[i,o]of Object.entries(S)){const r=n[o],s=n[i];void 0!==r&&void 0===s&&(e.info(`[pylance import] Setting ${i} for target Remote`),n[i]=r,t.push(i))}return await c.default.promises.writeFile(x,JSON.stringify(n,null,2)),t}(t);v=v.filter((t=>!(t.target===p.ConfigurationTarget.Global&&e.includes(t.key))))}catch(e){m=e,t.error("Failed to migrate remote settings",e)}if(v.length>0&&await Promise.all(v.map((e=>{const n=e.config.update(e.key,e.value,e.target);return t.info(`[pylance import] Setting ${e.key} for target ${p.ConfigurationTarget[e.target]}`),n}))),void 0!==m)p.window.showErrorMessage(`Failed to migrate remote Pylance settings: ${m}`);else if(v.length>0||d)if(o){const e="Reload Window";p.window.showInformationMessage("Successfully imported settings from Pylance. Existing settings were not overridden. Please reload the window for these settings to take effect.",e).then((t=>{t===e&&p.commands.executeCommand("workbench.action.reloadWindow")}))}else p.window.showInformationMessage("Successfully imported settings from Pylance. Existing settings were not overridden");else n&&p.window.showInformationMessage("No new settings to import. Existing settings were not overridden.")}}const x=l.join(l.dirname(l.dirname(l.dirname(process.execPath))),"data","Machine","settings.json");async function E(){const e=await c.default.promises.readFile(x,"utf8"),t=[],n=(0,b.parse)(e,t,{allowTrailingComma:!0,allowEmptyContent:!0});if(t.length>0)throw new Error(`Failed to parse remote settings at ${x}`);return n}function M(e){const t=e.split("\n"),n={};for(const e of t){const t=e.trim();t.startsWith("[")&&t.endsWith("]")&&(n[t.slice(1,-1)]=!0)}return n}async function N(e,t){const n="Anysphere Python",i="ms-python.vscode-pylance",o="anysphere.pyright",r=void 0!==p.extensions.getExtension(o),s=void 0!==p.extensions.getExtension(i),y=p.extensions.getExtension("ms-python.python");if(void 0===y){const e="Install";if(await p.window.showErrorMessage("Cursor Pyright depends on the `ms-python.python` extension, which is not installed. Please install this extension.",e)===e){await p.commands.executeCommand("workbench.extensions.installExtension","anysphere.python");const e="Reload Window";return void(await p.window.showInformationMessage("Successfully installed `ms-python.python`. Please reload the window.",e)===e?await p.commands.executeCommand("workbench.action.reloadWindow"):await p.window.showInformationMessage(`${n} has been disabled for this session.`))}return void await p.window.showInformationMessage(`${n} has been disabled for this session.`)}y.isActive||await y.activate();const b=!s&&!r;e.subscriptions.push(p.commands.registerCommand("cursorpyright.importPylanceSettings",(()=>O(e,t,{ignoreKeys:!0,prompt:!1,showReloadButton:b}))));const S=O(e,t,{ignoreKeys:!1,prompt:!0,showReloadButton:b});if(s||r)try{await S}catch(e){t.error(`Failed to import Pylance settings: ${e}`)}else S.catch((e=>{t.error(`Failed to import Pylance settings: ${e}`)}));if(s){const e="Uninstall & Restart Cursor",t="Ignore";if(await p.window.showWarningMessage(`In order to use ${n}, \`${i}\` must be uninstalled.`,e,t)!==e)return void p.window.showInformationMessage(`${n} has been disabled for this session.`);p.commands.executeCommand("workbench.extensions.uninstallExtension",i).then((()=>p.commands.executeCommand("workbench.action.reloadWindow")))}if(r){const e="Uninstall & Restart Cursor",t="Ignore";if(await p.window.showWarningMessage(`In order to use ${n}, \`${o}\` must be uninstalled.`,e,t)!==e)return void p.window.showInformationMessage(`${n} has been disabled for this session.`);p.commands.executeCommand("workbench.extensions.uninstallExtension",o).then((()=>p.commands.executeCommand("workbench.action.reloadWindow")))}const R=!p.workspace.getConfiguration("cursorpyright").get("disableLanguageServices"),T=p.workspace.getConfiguration("python").get("languageServer");R&&T&&"None"!==T&&(p.window.showInformationMessage("Cursor Pyright changed the setting `python.languageServer` to 'None' to prevent conflicts with Jedi and Pylance."),p.workspace.getConfiguration("python").update("languageServer","None",p.ConfigurationTarget.Global),p.workspace.getConfiguration("python").update("languageServer","None",p.ConfigurationTarget.Workspace),p.workspace.getConfiguration("python").update("languageServer","None",p.ConfigurationTarget.WorkspaceFolder));try{await async function(e,t){if(!function(){const e=p.workspace.getConfiguration().get("cursorpyright.analysis.diagnosticSeverityOverrides");return void 0!==e&&Object.keys(e).length>0}())return;const n="cursorpyright.analysis.diagnosticSeverityOverrides.warning.doNotShowAgain",i=await async function(e){const t=[];if(!p.workspace.workspaceFolders)return t;for(const n of p.workspace.workspaceFolders){const i=n.uri.fsPath;let o=!1;const r=l.join(i,"pyrightconfig.json");if(await k(r)&&(e.info(`Found pyrightconfig.json in ${i}`),o=!0),!o){const t=l.join(i,"pyproject.toml");if(await k(t))try{const n=M(await c.default.promises.readFile(t,"utf8"));(n["tool.pyright"]||n["tool.basedpyright"])&&(e.info(`Found pyproject.toml with pyright/basedpyright section in ${i}`),o=!0)}catch(t){e.error(`Error reading pyproject.toml in ${i}:`,t)}}t.push({hasConfigFile:o,workspaceFolderPath:o?i:void 0})}return t}(t),o=i.filter((e=>e.hasConfigFile)).map((e=>e.workspaceFolderPath)).filter((e=>void 0!==e));if(o.length>0){const i=o.map((e=>l.basename(e))).join(", "),r="Ignore this time",s="Do not show again",a=["The 'cursorpyright.analysis.diagnosticSeverityOverrides' setting is ignored because a ","'pyrightconfig.json' or 'pyproject.toml' (with a [tool.pyright]/[tool.basedpyright]) ",`was found in workspace folder(s): ${i}.`,"\n\n","Please migrate your settings to the 'pyrightconfig.json' or 'pyproject.toml' file. ","See [this discussion](https://github.com/DetachHead/basedpyright/issues/513#issuecomment-2364928299)"," for more information."].join(" ");if(t.info(`[config conflict] ${a}`),e.workspaceState.get(n,!1))return;p.window.showWarningMessage(a,r,s).then((t=>{t===s&&e.workspaceState.update(n,!0)}))}}(e,t)}catch(e){t.error("Error checking for diagnosticSeverityOverrides conflicts:",e)}let P;if(_=new g.FileBasedCancellationStrategy,"fromEnvironment"===p.workspace.getConfiguration("cursorpyright").get("importStrategy")){const n=await a.PythonExtension.api(),i="win32"===u.default.platform(),o="basedpyright-langserver"+(i?".exe":""),r=l.join(n.environments.getActiveEnvironmentPath().path,".."),s=l.join(r,o);if(await k(s)){t.info("using pyright executable:",s);let n=l.join(r,`_vscode_copy_${o}`);try{await(0,v.cp)(s,n,{force:!0})}catch(e){t.error(`failed to create copy at ${n}, falling back to using the real one`,e),n=s}P={command:`${e.extensionMode!==p.ExtensionMode.Development||i?"":`"${e.asAbsolutePath("../../.venv/bin/lsp-devtools")}" agent -- `}"${n}"`,transport:f.TransportKind.stdio,args:_.getCommandLineArguments(),options:{shell:!0}}}else t.info("failed to find pyright executable, falling back to bundled:",s)}if(!P){t.info("using bundled pyright");const n=e.asAbsolutePath(l.join("dist","server.js")),i=p.workspace.getConfiguration("cursorpyright").get("nodeArguments",[]),o=p.workspace.getConfiguration("cursorpyright").get("nodeEnvVars",{});void 0!==o&&Object.keys(o).length>0&&t.info(`running node with env vars: ${JSON.stringify(o)}`);const r={...process.env,...o};r.CURSOR_SPAWNED_BY_EXTENSION_ID="anysphere.pyright",r.CURSOR_SPAWN_CHAIN="anysphere.pyright";const s=p.workspace.getConfiguration("cursorpyright").get("nodeMaxOldSpaceSize",-1),a=/--max[-_]old[-_]space[-_]size/,c=i.some((e=>a.test(e))),d=[...i];let g;g=-1===s?function(){const e=u.default.totalmem()/1073741824;let t=Math.floor(1024*Math.min(.5*e,32));return t<w&&(t=w),t}():s>0?s:void 0,c||void 0===g||d.push(`--max-old-space-size=${g}`),t.info(`running node with argzs: ${d.join(" ")}`);const m={execArgv:d,env:r},v={execArgv:["--nolazy","--inspect=6600",...d],env:r};let y=p.workspace.getConfiguration("cursorpyright").get("nodeExecutable");if(y||(y=void 0),!y){const e=h.env.bundledNodePath?.();e&&(y=e)}y?t.info(`using node executable: ${y}`):t.info("using default node executable"),P={run:{module:n,transport:f.TransportKind.ipc,args:_.getCommandLineArguments(),options:m,runtime:y},debug:{module:n,transport:f.TransportKind.ipc,args:_.getCommandLineArguments(),options:v,runtime:y}}}const x={documentSelector:[{scheme:"file",language:"python"},{scheme:"untitled",language:"python"},{notebook:"*",language:"python"}],synchronize:{configurationSection:["python","cursorpyright"]},connectionOptions:{cancellationStrategy:_},middleware:{workspace:{configuration:async(e,t,n)=>{let i=n(e,t);if((0,d.isThenable)(i)&&(i=await i),i instanceof f.ResponseError)return i;for(const[t,n]of e.items.entries())"cursorpyright.analysis"===n.section&&(F(p.workspace.getConfiguration(n.section,n.scopeUri?p.Uri.parse(n.scopeUri):void 0),"stubPath")||delete i[t].stubPath);return(t=>{const n=e.items.map((e=>{if("python"===e.section){const t=e.scopeUri?p.Uri.parse(e.scopeUri):void 0;return async function(e,t){try{const n=p.extensions.getExtension("ms-python.python");if(n){if(n.packageJSON?.featureFlags?.usingNewInterpreterStorage){n.isActive||(e.appendLine("Waiting for Python extension to load"),await n.activate(),e.appendLine("Python extension loaded"));const i=await n.exports.settings.getExecutionDetails(t);let o;return i.execCommand&&i.execCommand.length>0&&(o=i.execCommand[0]),n.exports.settings.onDidChangeExecutionDetails&&function(e,t,n){const i=t?t.toString():"";D.has(i)||(e((()=>{n()})),D.set(i,i))}(n.exports.settings.onDidChangeExecutionDetails,t,(()=>{E.sendNotification(f.DidChangeConfigurationNotification.type,{settings:null})})),o?e.appendLine(`Received pythonPath from Python extension: ${o}`):e.appendLine("No pythonPath provided by Python extension"),o}}else e.appendLine("Python extension not found")}catch(t){e.appendLine(`Exception occurred when attempting to read pythonPath from Python extension: ${JSON.stringify(t)}`)}}(E.outputChannel,t)}return Promise.resolve(void 0)}));return Promise.all(n).then((e=>(e.forEach(((e,n)=>{void 0!==e&&(t[n].pythonPath=e)})),t)))})(i)}}},initializationOptions:{diagnosticMode:p.workspace.getConfiguration("cursorpyright.analysis").get("diagnosticMode"),disablePullDiagnostics:p.workspace.getConfiguration("cursorpyright").get("disablePullDiagnostics")}},E=new f.LanguageClient("basedpyright",m.toolName,P,x);C=E,["cursorpyright.organizeimports"].forEach((t=>{e.subscriptions.push(p.commands.registerTextEditorCommand(t,((e,n,...i)=>{const o={command:t,arguments:[e.document.uri.toString(),...i]};E.sendRequest("workspace/executeCommand",o).then((t=>{t&&t.length>0&&e.edit((e=>{t.forEach((t=>{const n=new p.Position(t.range.start.line,t.range.start.character),i=new p.Position(t.range.end.line,t.range.end.character),o=new p.Range(n,i);e.replace(o,t.newText)}))}))}))}),(()=>{})))})),e.extensionMode===p.ExtensionMode.Development&&(p.commands.executeCommand("setContext","pyright.development",!0),e.subscriptions.push(p.commands.registerCommand("cursorpyright.dumpTokens",(()=>{const e=p.window.activeTextEditor?.document.uri.toString();e&&E.sendRequest("workspace/executeCommand",{command:"cursorpyright.dumpFileDebugInfo",arguments:[e,"tokens"]})}))),e.subscriptions.push(p.commands.registerCommand("cursorpyright.dumpNodes",(()=>{const e=p.window.activeTextEditor?.document.uri.toString();e&&E.sendRequest("workspace/executeCommand",{command:"cursorpyright.dumpFileDebugInfo",arguments:[e,"nodes"]})}))),e.subscriptions.push(p.commands.registerCommand("cursorpyright.dumpTypes",(()=>{const e=p.window.activeTextEditor?.document.uri.toString();if(e){const t=p.window.activeTextEditor.selection.start,n=p.window.activeTextEditor.selection.end,i=p.window.activeTextEditor.document.offsetAt(t),o=p.window.activeTextEditor.document.offsetAt(n);E.sendRequest("workspace/executeCommand",{command:"cursorpyright.dumpFileDebugInfo",arguments:[e,"types",i,o]})}}))),e.subscriptions.push(p.commands.registerCommand("cursorpyright.dumpCachedTypes",(()=>{const e=p.window.activeTextEditor?.document.uri.toString();if(e){const t=p.window.activeTextEditor.selection.start,n=p.window.activeTextEditor.selection.end,i=p.window.activeTextEditor.document.offsetAt(t),o=p.window.activeTextEditor.document.offsetAt(n);E.sendRequest("workspace/executeCommand",{command:"cursorpyright.dumpFileDebugInfo",arguments:[e,"cachedtypes",i,o]})}}))),e.subscriptions.push(p.commands.registerCommand("cursorpyright.dumpCodeFlowGraph",(()=>{const e=p.window.activeTextEditor?.document.uri.toString();if(e){const t=p.window.activeTextEditor.selection.start,n=p.window.activeTextEditor.document.offsetAt(t);E.sendRequest("workspace/executeCommand",{command:"cursorpyright.dumpFileDebugInfo",arguments:[e,"codeflowgraph",n]})}})))),await E.start()}function F(e,t){const n=e.inspect(t);return void 0!==n&&(void 0!==n.globalValue||void 0!==n.workspaceValue||void 0!==n.workspaceFolderValue||void 0!==n.globalLanguageValue||void 0!==n.workspaceLanguageValue||void 0!==n.workspaceFolderLanguageValue)}},4429:(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 i 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 i._oneOf(i._chars)}constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}}function o(){return new i}t.empty=new n("00000000-0000-0000-0000-000000000000");const r=/^[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 r.test(e)}},4453:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensFeature=void 0;const a=n(1398),c=n(3147),u=s(n(4429)),l=n(8071);class d extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.CodeLensRequest.type)}fillClientCapabilities(e){const t=(0,l.ensure)((0,l.ensure)(e,"textDocument"),"codeLens");t.dynamicRegistration=!0,t.resolveSupport={properties:["command"]},(0,l.ensure)((0,l.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(c.CodeLensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()}));const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n=new a.EventEmitter,i={onDidChangeCodeLenses:n.event,provideCodeLenses:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(c.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCodeLenses(e,t)),(e=>n.handleFailedRequest(c.CodeLensRequest.type,t,e,null))),o=n.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,i):i(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(c.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeLens(i)),(i=>n.handleFailedRequest(c.CodeLensResolveRequest.type,t,i,e))),o=n.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,i):i(e,t)}:void 0};return[a.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),i),{provider:i,onDidChangeCodeLensEmitter:n}]}}t.CodeLensFeature=d},4493:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s{client;middleware;constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,n){const i=this.client,r=this.middleware,s=(e,t,n)=>{const r=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(o.TypeHierarchyPrepareRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(e,n)),(e=>i.handleFailedRequest(o.TypeHierarchyPrepareRequest.type,n,e,null)))};return r.prepareTypeHierarchy?r.prepareTypeHierarchy(e,t,n,s):s(e,t,n)}provideTypeHierarchySupertypes(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(o.TypeHierarchySupertypesRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(o.TypeHierarchySupertypesRequest.type,t,e,null)))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,r):r(e,t)}provideTypeHierarchySubtypes(e,t){const n=this.client,i=this.middleware,r=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(o.TypeHierarchySubtypesRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(o.TypeHierarchySubtypesRequest.type,t,e,null)))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,r):r(e,t)}}class a extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"typeHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.typeHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[i.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.TypeHierarchyFeature=a},4517:(e,t,n)=>{const i=n(1361),{MAX_LENGTH:o,MAX_SAFE_INTEGER:r}=n(9543),{safeRe:s,t:a}=n(2841),c=n(3990),{compareIdentifiers:u}=n(3806);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],o=e.prerelease[t];if(i("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return u(n,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],o=e.build[t];if(i("build compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return u(n,o)}while(++t)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===n&&(i=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},4620:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.HoverFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.HoverRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[c.MarkupKind.Markdown,c.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideHover:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(c.HoverRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asHover(e)),(e=>i.handleFailedRequest(c.HoverRequest.type,n,e,null))),r=i.middleware;return r.provideHover?r.provideHover(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.HoverFeature=d},4781:(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 i=n(8431);var o,r,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=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.WillCreateFilesRequest=r={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(l||(t.WillDeleteFilesRequest=l={}))},4792:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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(2852),c=s(n(8633)),u=n(8431);var l,d,h,p,f,g,m,v,y,b;!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 i=Array.isArray(e),o=Array.isArray(n);if(i!==o)return!1;if(i&&o){if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(!t(e[i],n[i]))return!1}if(c.objectLiteral(e)&&c.objectLiteral(n)){const i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;if(i.sort(),o.sort(),!t(i,o))return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!t(e[r],n[r]))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 i=new Set;return e.document!==n.document&&i.add("document"),e.kind!==n.kind&&i.add("kind"),e.executionSummary!==n.executionSummary&&i.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||i.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||d.equals(e.executionSummary,n.executionSummary)||i.add("executionSummary"),i}}(h||(t.NotebookCell=h={})),function(e){e.create=function(e,t,n,i){return{uri:e,notebookType:t,version:n,cells:i}},e.is=function(e){const t=e;return c.objectLiteral(t)&&c.string(t.uri)&&a.integer.is(t.version)&&c.typedArray(t.cells,h.is)}}(p||(t.NotebookDocument=p={})),function(e){e.method="notebookDocument/sync",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.RegistrationType(e.method)}(f||(t.NotebookDocumentSyncRegistrationType=f={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(g||(t.DidOpenNotebookDocumentNotification=g={})),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,h.is))},e.create=function(e,t,n){const i={start:e,deleteCount:t};return void 0!==n&&(i.cells=n),i}}(m||(t.NotebookCellArrayChange=m={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(v||(t.DidChangeNotebookDocumentNotification=v={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(y||(t.DidSaveNotebookDocumentNotification=y={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=u.MessageDirection.clientToServer,e.type=new u.ProtocolNotificationType(e.method),e.registrationMethod=f.method}(b||(t.DidCloseNotebookDocumentNotification=b={}))},4870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allCombinations=t.sorter=t.emptyArray=void 0,t.contains=o,t.append=function(e,t){return void 0===t?e:void 0===e?[t]:(e.push(t),e)},t.appendArray=function(e,t){if(t.length<256)e.push(...t);else for(const n of t)e.push(n)},t.partition=function(e,t){const n=[],i=[];for(const o of e)t(o)?n.push(o):i.push(o);return[n,i]},t.find=function(e,t){for(let n=0;n<e.length;n++){const i=e[n];if(t(i,n))return i}},t.addRange=s,t.insertAt=function(e,t,n){if(0===t)e.unshift(n);else if(t===e.length)e.push(n);else{for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}return e},t.cloneAndSort=function(e,t){return 0===e.length?e:e.slice().sort(t)},t.stableSort=function(e,t){const n=function(e){return e.map(a)}(e);return function(e,t,n){t.sort(((t,o)=>n(e[t],e[o])||(0,i.compareValues)(t,o)))}(e,n,t),n.map((t=>e[t]))},t.map=function(e,t){if(e)return e.map(t)},t.some=c,t.every=function(e,t){return!e||e.every(t)},t.binarySearch=function(e,t,n,i,o){return u(e,n(t),n,i,o)},t.binarySearchKey=u,t.flatten=function(e){const t=[];for(const n of e)n&&((0,i.isArray)(n)?s(t,n):t.push(n));return t},t.getNestedProperty=function(e,t){return t.split(".").reduce(((e,t)=>e&&e[t]),e)},t.getOrAdd=function(e,t,n){const i=e.get(t);if(void 0!==i)return i;const o=n();return e.set(t,o),o},t.removeArrayElements=function(e,t){for(let n=0;n<e.length;n++)t(e[n])&&(e.splice(n,1),n--);return e},t.createMapFromItems=function(e,t){return e.map((e=>t(e))).reduce(((t,n,i)=>(t.set(n,(t.get(n)||[]).concat(e[i])),t)),new Map)},t.addIfUnique=function(e,t,n=i.equateValues){return o(e,t,n)||e.push(t),e},t.getMapValues=function(e,t){const n=[];return e.forEach(((e,i)=>{t(i,e)&&n.push(e)})),n},t.addIfNotNull=function(e,t){return void 0===t||e.push(t),e},t.arrayEquals=function(e,t,n){return e.length===t.length&&e.every(((e,i)=>n(e,t[i])))};const i=n(8876);function o(e,t,n=i.equateValues){if(e)for(const i of e)if(n(i,t))return!0;return!1}function r(e,t){return t<0?e.length+t:t}function s(e,t,n,i){if(void 0===t||0===t.length)return e;if(void 0===e)return t.slice(n,i);n=void 0===n?0:r(t,n),i=void 0===i?t.length:r(t,i);for(let o=n;o<i&&o<t.length;o++)void 0!==t[o]&&e.push(t[o]);return e}function a(e,t){return t}function c(e,t){return!!e&&(t?e.some(t):e.length>0)}function u(e,t,n,i,o){if(!c(e))return-1;let r=o||0,s=e.length-1;for(;r<=s;){const o=r+(s-r>>1);switch(i(n(e[o]),t)){case-1:r=o+1;break;case 0:return o;case 1:s=o-1}}return~r}t.emptyArray=[],t.sorter=(e,t,n)=>n(e,t)?-1:n(t,e)?1:0,t.allCombinations=e=>{const[n,...i]=e;if(!i.length)return n.map((e=>[e]));const o=[];for(const e of n)for(const n of(0,t.allCombinations)(i))o.push([e,...n]);return o}},4976:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentColorRequest.type)}fillClientCapabilities(e){(0,r.ensure)((0,r.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.colorProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideColorPresentations:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={color:e,textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:i.code2ProtocolConverter.asRange(t.range)};return i.sendRequest(o.ColorPresentationRequest.type,r,n).then((e=>n.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(e,n)),(e=>i.handleFailedRequest(o.ColorPresentationRequest.type,n,e,null)))},s=i.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,r):r(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,i=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(o.DocumentColorRequest.type,i,t).then((e=>t.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(e,t)),(e=>n.handleFailedRequest(o.DocumentColorRequest.type,t,e,null)))},r=n.middleware;return r.provideDocumentColors?r.provideDocumentColors(e,t,i):i(e,t)}};return[i.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.ColorProviderFeature=s},5029:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const i=n(956),o=n(702),r=new Set(["!","?","+","*","@"]),s=e=>r.has(e),a="(?!\\.)",c=new Set(["[","."]),u=new Set(["..","."]),l=new Set("().*{}+?[]^$\\!"),d="[^/]",h=d+"*?",p=d+"+?";class f{type;#e;#t;#n=!1;#i=[];#o;#r;#s;#a=!1;#c;#u;#l=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#s=this.#e===this?[]:this.#e.#s,"!"!==e||this.#e.#a||this.#s.push(this),this.#r=this.#o?this.#o.#i.length:0}get hasMagic(){if(void 0!==this.#t)return this.#t;for(const e of this.#i)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return void 0!==this.#u?this.#u:this.type?this.#u=this.type+"("+this.#i.map((e=>String(e))).join("|")+")":this.#u=this.#i.map((e=>String(e))).join("")}#d(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;let e;for(this.toString(),this.#a=!0;e=this.#s.pop();){if("!"!==e.type)continue;let t=e,n=t.#o;for(;n;){for(let i=t.#r+1;!n.type&&i<n.#i.length;i++)for(const t of e.#i){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(n.#i[i])}t=n,n=t.#o}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof f&&t.#o===this))throw new Error("invalid part: "+t);this.#i.push(t)}}toJSON(){const e=null===this.type?this.#i.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#i.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#a&&"!"===this.#o?.type)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(0===this.#r)return!0;const e=this.#o;for(let t=0;t<this.#r;t++){const n=e.#i[t];if(!(n instanceof f&&"!"===n.type))return!1}return!0}isEnd(){if(this.#e===this)return!0;if("!"===this.#o?.type)return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();const e=this.#o?this.#o.#i.length:0;return this.#r===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new f(this.type,e);for(const e of this.#i)t.copyIn(e);return t}static#h(e,t,n,i){let o=!1,r=!1,a=-1,c=!1;if(null===t.type){let u=n,l="";for(;u<e.length;){const n=e.charAt(u++);if(o||"\\"===n)o=!o,l+=n;else if(r)u===a+1?"^"!==n&&"!"!==n||(c=!0):"]"!==n||u===a+2&&c||(r=!1),l+=n;else if("["!==n)if(i.noext||!s(n)||"("!==e.charAt(u))l+=n;else{t.push(l),l="";const o=new f(n,t);u=f.#h(e,o,u,i),t.push(o)}else r=!0,a=u,c=!1,l+=n}return t.push(l),u}let u=n+1,l=new f(null,t);const d=[];let h="";for(;u<e.length;){const n=e.charAt(u++);if(o||"\\"===n)o=!o,h+=n;else if(r)u===a+1?"^"!==n&&"!"!==n||(c=!0):"]"!==n||u===a+2&&c||(r=!1),h+=n;else if("["!==n)if(s(n)&&"("===e.charAt(u)){l.push(h),h="";const t=new f(n,l);l.push(t),u=f.#h(e,t,u,i)}else if("|"!==n){if(")"===n)return""===h&&0===t.#i.length&&(t.#l=!0),l.push(h),h="",t.push(...d,l),u;h+=n}else l.push(h),h="",d.push(l),l=new f(null,t);else r=!0,a=u,c=!1,h+=n}return t.type=null,t.#t=void 0,t.#i=[e.substring(n-1)],u}static fromGlob(e,t={}){const n=new f(null,void 0,t);return f.#h(e,n,0,t),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString(),[t,n,i,o]=this.toRegExpSource();if(!(i||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const r=(this.#c.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${t}$`,r),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){const t=e??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){const n=this.isStart()&&this.isEnd(),i=this.#i.map((t=>{const[i,o,r,s]="string"==typeof t?f.#p(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||r,this.#n=this.#n||s,i})).join("");let r="";if(this.isStart()&&"string"==typeof this.#i[0]&&(1!==this.#i.length||!u.has(this.#i[0]))){const n=c,o=t&&n.has(i.charAt(0))||i.startsWith("\\.")&&n.has(i.charAt(2))||i.startsWith("\\.\\.")&&n.has(i.charAt(4)),s=!t&&!e&&n.has(i.charAt(0));r=o?"(?!(?:^|/)\\.\\.?(?:$|/))":s?a:""}let s="";return this.isEnd()&&this.#e.#a&&"!"===this.#o?.type&&(s="(?:$|\\/)"),[r+i+s,(0,o.unescape)(i),this.#t=!!this.#t,this.#n]}const n="*"===this.type||"+"===this.type,i="!"===this.type?"(?:(?!(?:":"(?:";let r=this.#f(t);if(this.isStart()&&this.isEnd()&&!r&&"!"!==this.type){const e=this.toString();return this.#i=[e],this.type=null,this.#t=void 0,[e,(0,o.unescape)(this.toString()),!1,!1]}let s=!n||e||t?"":this.#f(!0);s===r&&(s=""),s&&(r=`(?:${r})(?:${s})*?`);let l="";return l="!"===this.type&&this.#l?(this.isStart()&&!t?a:"")+p:i+r+("!"===this.type?"))"+(!this.isStart()||t||e?"":a)+h+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&s?")":"*"===this.type&&s?")?":`)${this.type}`),[l,(0,o.unescape)(r),this.#t=!!this.#t,this.#n]}#f(e){return this.#i.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[n,i,o,r]=t.toRegExpSource(e);return this.#n=this.#n||r,n})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#p(e,t,n=!1){let r=!1,s="",a=!1;for(let o=0;o<e.length;o++){const c=e.charAt(o);if(r)r=!1,s+=(l.has(c)?"\\":"")+c;else if("\\"!==c){if("["===c){const[n,r,c,u]=(0,i.parseClass)(e,o);if(c){s+=n,a=a||r,o+=c-1,t=t||u;continue}}"*"!==c?"?"!==c?s+=c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=d,t=!0):(s+=n&&"*"===e?p:h,t=!0)}else o===e.length-1?s+="\\\\":r=!0}return[s,(0,o.unescape)(e),!!t,a]}}t.AST=f},5091:(e,t)=>{"use strict";let n;function i(){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}}(i||(i={})),t.default=i},5109:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const i=n(3147);t.TextDocuments=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new i.Emitter,this._onDidOpen=new i.Emitter,this._onDidClose=new i.Emitter,this._onDidSave=new i.Emitter,this._onWillSave=new i.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=i.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 i=Object.freeze({document:n});this._onDidOpen.fire(i),this._onDidChangeContent.fire(i)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:i}=t;if(null==i)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,i),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}))}))),i.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},5118:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticPullMode=t.vsdiag=void 0,o(n(3147),t),o(n(8071),t);var r=n(851);Object.defineProperty(t,"vsdiag",{enumerable:!0,get:function(){return r.vsdiag}}),Object.defineProperty(t,"DiagnosticPullMode",{enumerable:!0,get:function(){return r.DiagnosticPullMode}}),o(n(3503),t)},5259:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.SymbolInformation{data;hasRange;constructor(e,t,n,i,o){const r=!(i instanceof a.Uri);super(e,t,n,r?i:new a.Location(i,new a.Range(0,0,0,0))),this.hasRange=r,void 0!==o&&(this.data=o)}}t.default=c},5317:e=>{"use strict";e.exports=require("child_process")},5485:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=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}),r=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)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(1398));function a(e,t,n=" "){return n.repeat(Math.max(0,t-e.length))+e}t.default=class{constructor(e){this._output=s.window.createOutputChannel(e)}trace(e,t){this.logLevel("Trace",e,t)}info(e,t){this.logLevel("Info",e,t)}error(e,t){this.logLevel("Error",e,t)}logLevel(e,t,n){this._output.appendLine(`[${e} - ${this._now()}] ${t}`),n&&this._output.appendLine(this._data2String(n))}show(){this._output.show()}dispose(){this._output.dispose()}_data2String(e){return e instanceof Error?e.stack||e.message:!1===e.success&&e.message?e.message:e.toString()}_now(){const e=new Date;return a(e.getUTCHours()+"",2,"0")+":"+a(e.getMinutes()+"",2,"0")+":"+a(e.getUTCSeconds()+"",2,"0")+"."+e.getMilliseconds()}}},5581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const i=n(8431);var o;!function(e){e.method="textDocument/declaration",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.DeclarationRequest=o={}))},5590:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function r(e){return e&&i(e.then)}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=i,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=r,t.asPromise=function(e){return e instanceof Promise?e:r(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}},5838:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.CallHierarchyItem{data;constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),void 0!==s&&(this.data=s)}}t.default=c},6132:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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)},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0,t.generateRandomPipeName=function(){if("win32"===process.platform)return`\\\\.\\pipe\\lsp-${(0,p.randomBytes)(16).toString("hex")}-sock`;let e=32;const t=h.realpathSync(S??d.tmpdir()),n=R.get(process.platform);if(void 0!==n&&(e=Math.min(n-t.length-9,e)),e<16)throw new Error(`Unable to generate a random pipe name with ${e} characters.`);const i=(0,p.randomBytes)(Math.floor(e/2)).toString("hex");return l.join(t,`lsp-${i}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let n;const i=new Promise(((e,t)=>{n=e}));return new Promise(((o,r)=>{const s=(0,f.createServer)((e=>{s.close(),n([new _(e,t),new C(e,t)])}));s.on("error",r),s.listen(e,(()=>{s.removeListener("error",r),o({onConnected:()=>i})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=(0,f.createConnection)(e);return[new _(n,t),new C(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const i=new Promise(((e,t)=>{n=e}));return new Promise(((o,r)=>{const s=(0,f.createServer)((e=>{s.close(),n([new _(e,t),new C(e,t)])}));s.on("error",r),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",r),o({onConnected:()=>i})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=(0,f.createConnection)(e,"127.0.0.1");return[new _(n,t),new C(n,t)]},t.createMessageConnection=function(e,t,n,i){n||(n=g.NullLogger);const o=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new D(e):e,r=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new w(t):t;return g.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,g.createMessageConnection)(o,r,n,i)};const u=c(n(1946));u.default.install();const l=s(n(6928)),d=s(n(857)),h=s(n(9896)),p=n(6982),f=n(9278),g=n(7672);a(n(7672),t);class m extends g.AbstractMessageReader{process;constructor(e){super(),this.process=e;const t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),g.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=m;class v extends g.AbstractMessageWriter{process;errorCount;constructor(e){super(),this.process=e,this.errorCount=0;const t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),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.IPCMessageWriter=v;class y extends g.AbstractMessageReader{onData;constructor(e){super(),this.onData=new g.Emitter,e.on("close",(()=>this.fireClose)),e.on("error",(e=>this.fireError(e))),e.on("message",(e=>{this.onData.fire(e)}))}listen(e){return this.onData.event(e)}}t.PortMessageReader=y;class b extends g.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",(()=>this.fireClose())),e.on("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.PortMessageWriter=b;class _ extends g.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,u.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=_;class C extends g.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,u.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=C;class D extends g.ReadableStreamMessageReader{constructor(e,t){super((0,u.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=D;class w extends g.WriteableStreamMessageWriter{constructor(e,t){super((0,u.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=w;const S=process.env.XDG_RUNTIME_DIR,R=new Map([["linux",107],["darwin",103]])},6136:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteCommandFeature=void 0;const a=n(1398),c=n(3147),u=s(n(4429)),l=n(8071);t.ExecuteCommandFeature=class{_client;_commands;constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return c.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,l.ensure)((0,l.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:u.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.middleware,i=(e,n)=>{const i={command:e,arguments:n};return t.sendRequest(c.ExecuteCommandRequest.type,i).then(void 0,(e=>t.handleFailedRequest(c.ExecuteCommandRequest.type,void 0,e,void 0)))};if(e.registerOptions.commands){const t=[];for(const o of e.registerOptions.commands)t.push(a.commands.registerCommand(o,((...e)=>n.executeCommand?n.executeCommand(o,e,i):i(o,e))));this._commands.set(e.id,t)}}unregister(e){const t=this._commands.get(e);t&&(this._commands.delete(e),t.forEach((e=>e.dispose())))}clear(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}},6157:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSymbolFeature=t.SupportedSymbolTags=t.SupportedSymbolKinds=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));t.SupportedSymbolKinds=[c.SymbolKind.File,c.SymbolKind.Module,c.SymbolKind.Namespace,c.SymbolKind.Package,c.SymbolKind.Class,c.SymbolKind.Method,c.SymbolKind.Property,c.SymbolKind.Field,c.SymbolKind.Constructor,c.SymbolKind.Enum,c.SymbolKind.Interface,c.SymbolKind.Function,c.SymbolKind.Variable,c.SymbolKind.Constant,c.SymbolKind.String,c.SymbolKind.Number,c.SymbolKind.Boolean,c.SymbolKind.Array,c.SymbolKind.Object,c.SymbolKind.Key,c.SymbolKind.Null,c.SymbolKind.EnumMember,c.SymbolKind.Struct,c.SymbolKind.Event,c.SymbolKind.Operator,c.SymbolKind.TypeParameter],t.SupportedSymbolTags=[c.SymbolTag.Deprecated];class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentSymbolRequest.type)}fillClientCapabilities(e){const n=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"documentSymbol");n.dynamicRegistration=!0,n.symbolKind={valueSet:t.SupportedSymbolKinds},n.hierarchicalDocumentSymbolSupport=!0,n.tagSupport={valueSet:t.SupportedSymbolTags},n.labelSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentSymbols:(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(c.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t);if(t.isCancellationRequested||null==i)return null;if(0===i.length)return[];{const e=i[0];return c.DocumentSymbol.is(e)?await n.protocol2CodeConverter.asDocumentSymbols(i,t):await n.protocol2CodeConverter.asSymbolInformations(i,t)}}catch(e){return n.handleFailedRequest(c.DocumentSymbolRequest.type,t,e,null)}},o=n.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,i):i(e,t)}},i=void 0!==e.label?{label:e.label}:void 0;return[a.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,i),n]}}t.DocumentSymbolFeature=d},6182:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.TypeHierarchyItem{data;constructor(e,t,n,i,o,r,s){super(e,t,n,i,o,r),void 0!==s&&(this.data=s)}}t.default=c},6353:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.DocumentLink{data;constructor(e,t){super(e,t)}}t.default=c},6407:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PythonExtension=t.PVSC_EXTENSION_ID=void 0;const i=n(1398);t.PVSC_EXTENSION_ID="ms-python.python",(t.PythonExtension||(t.PythonExtension={})).api=async function(){const e=i.extensions.getExtension(t.PVSC_EXTENSION_ID);if(void 0===e)throw new Error("Python extension is not installed or is disabled");return e.isActive||await e.activate(),e.exports}},6475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const i=n(3147);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=i.MonikerRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},6618:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(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=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))}},6755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionFeature=void 0;const i=n(3147);t.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(i.InlineCompletionRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},6860:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const i=n(8431);var o,r;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(o||(t.WorkspaceFoldersRequest=o={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(r||(t.DidChangeWorkspaceFoldersNotification=r={}))},6928:e=>{"use strict";e.exports=require("path")},6957:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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(5091)),u=s(n(6618)),l=n(2479);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 h=Object.freeze((function(e,t){const n=(0,c.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class p{_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?h:(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 p),this._token}cancel(){this._token?this._token.cancel():this._token=d.Cancelled}dispose(){this._token?this._token instanceof p&&this._token.dispose():this._token=d.None}}},6982:e=>{"use strict";e.exports=require("crypto")},7062:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const i=n(8431);var o,r,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.TypeHierarchyPrepareRequest=o={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.TypeHierarchySupertypesRequest=r={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},7078:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.RenameFeature=void 0;const a=n(1398),c=n(3147),u=s(n(4429)),l=s(n(5590)),d=n(8071);class h extends d.TextDocumentLanguageFeature{constructor(e){super(e,c.RenameRequest.type)}fillClientCapabilities(e){const t=(0,d.ensure)((0,d.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=c.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(l.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:u.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t=e.documentSelector,n={provideRenameEdits:(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>{const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(c.RenameRequest.type,r,i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asWorkspaceEdit(e,i)),(e=>o.handleFailedRequest(c.RenameRequest.type,i,e,null,!1)))},s=o.middleware;return s.provideRenameEdits?s.provideRenameEdits(e,t,n,i,r):r(e,t,n,i)},prepareRename:e.prepareProvider?(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),position:i.code2ProtocolConverter.asPosition(t)};return i.sendRequest(c.PrepareRenameRequest.type,o,n).then((e=>n.isCancellationRequested?null:c.Range.is(e)?i.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&c.Range.is(e.range)?{range:i.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed."))),(e=>{throw"string"==typeof e.message?new Error(e.message):new Error("The element can't be renamed.")}))},r=i.middleware;return r.prepareRename?r.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){const t=e;return t&&l.boolean(t.defaultBehavior)}}t.RenameFeature=h},7091:(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 r(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 i=n(3147),o=n(8329);class r{_connection;_token;static Instances=new Map;constructor(e,t){this._connection=e,this._token=t,r.Instances.set(this._token,this)}begin(e,t,n,o){const r={kind:"begin",title:e,message:n,cancellable:o};"number"==typeof t&&(r.percentage=Math.round(t)),this._connection.sendProgress(i.WorkDoneProgress.type,this._token,r)}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(i.WorkDoneProgress.type,this._token,n)}done(){r.Instances.delete(this._token),this._connection.sendProgress(i.WorkDoneProgress.type,this._token,{kind:"end"})}}class s extends r{_source;constructor(e,t){super(e,t),this._source=new i.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 i.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(i.WorkDoneProgressCancelNotification.type,(e=>{const t=r.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new r(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,o.generateUuid)();return this.connection.sendRequest(i.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new i.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)}}},7159:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const i=n(3147),o=n(774);t.ProgressFeature=class{_client;activeParts;constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:i.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){var t,n;(t=e,n="window",void 0===t[n]&&(t[n]=Object.create(null)),t[n]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(i.WorkDoneProgressCreateRequest.type,(e=>{this.activeParts.add(new o.ProgressPart(this._client,e.token,t))}))}clear(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},7162:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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(6618));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 h{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return d.auto}}t.AbstractMessageSignature=h,t.RequestType0=class extends h{_;constructor(e){super(e,0)}},t.RequestType=class extends h{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends h{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends h{_;constructor(e){super(e,2)}},t.RequestType3=class extends h{_;constructor(e){super(e,3)}},t.RequestType4=class extends h{_;constructor(e){super(e,4)}},t.RequestType5=class extends h{_;constructor(e){super(e,5)}},t.RequestType6=class extends h{_;constructor(e){super(e,6)}},t.RequestType7=class extends h{_;constructor(e){super(e,7)}},t.RequestType8=class extends h{_;constructor(e){super(e,8)}},t.RequestType9=class extends h{_;constructor(e){super(e,9)}},t.NotificationType=class extends h{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends h{_;constructor(e){super(e,0)}},t.NotificationType1=class extends h{_parameterStructures;_;constructor(e,t=d.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends h{_;constructor(e){super(e,2)}},t.NotificationType3=class extends h{_;constructor(e){super(e,3)}},t.NotificationType4=class extends h{_;constructor(e){super(e,4)}},t.NotificationType5=class extends h{_;constructor(e){super(e,5)}},t.NotificationType6=class extends h{_;constructor(e){super(e,6)}},t.NotificationType7=class extends h{_;constructor(e){super(e,7)}},t.NotificationType8=class extends h{_;constructor(e){super(e,8)}},t.NotificationType9=class extends h{_;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={}))},7165:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.DefinitionRequest.type)}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(c.DefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(c.DefinitionRequest.type,n,e,null))),r=i.middleware;return r.provideDefinition?r.provideDefinition(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DefinitionFeature=d},7187:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const i=n(3147);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 i.Emitter,this.connection.onNotification(i.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(i.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(i.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},7229:(e,t,n)=>{const i=n(7476);e.exports=(e,t,n)=>{try{t=new i(t,n)}catch(e){return!1}return t.test(e)}},7252:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SyncConfigurationFeature=t.ConfigurationFeature=void 0,t.toJSONObject=h;const a=n(1398),c=n(3147),u=s(n(5590)),l=s(n(4429)),d=n(8071);function h(e){if(e){if(Array.isArray(e))return e.map(h);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=h(e[n]));return t}}return e}t.ConfigurationFeature=class{_client;constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){const e=this._client;e.onRequest(c.ConfigurationRequest.type,((t,n)=>{const i=e=>{const t=[];for(const n of e.items){const e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},o=e.middleware.workspace;return o&&o.configuration?o.configuration(t,n,i):i(t)}))}getConfiguration(e,t){let n=null;if(t){const i=t.lastIndexOf(".");if(-1===i)n=h(a.workspace.getConfiguration(void 0,e).get(t));else{const o=a.workspace.getConfiguration(t.substr(0,i),e);o&&(n=h(o.get(t.substr(i+1))))}}else{const t=a.workspace.getConfiguration(void 0,e);n={};for(const e of Object.keys(t))t.has(e)&&(n[e]=h(t.get(e)))}return void 0===n&&(n=null),n}clear(){}},t.SyncConfigurationFeature=class{_client;isCleared;_listeners;constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return c.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,d.ensure)((0,d.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;const e=this._client.clientOptions.synchronize?.configurationSection;void 0!==e&&this.register({id:l.generateUuid(),registerOptions:{section:e}})}register(e){const t=a.workspace.onDidChangeConfiguration((t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)}));this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){const t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(const e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let n;if(n=u.string(e)?[e]:e,void 0!==n&&void 0!==t&&!n.some((e=>t.affectsConfiguration(e))))return;const i=async e=>void 0===e?this._client.sendNotification(c.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(c.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}),o=this._client.middleware.workspace?.didChangeConfiguration;(o?o(n,i):i(n)).catch((e=>{this._client.error(`Sending notification ${c.DidChangeConfigurationNotification.type.method} failed`,e)}))}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let i=n[t[e]];i||(i=Object.create(null),n[t[e]]=i),n=i}return n}const n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let o=0;o<e.length;o++){const r=e[o],s=r.indexOf(".");let c=null;if(c=s>=0?a.workspace.getConfiguration(r.substr(0,s),n).get(r.substr(s+1)):a.workspace.getConfiguration(void 0,n).get(r),c){const n=e[o].split(".");t(i,n)[n[n.length-1]]=h(c)}}return i}}},7287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const i=n(8431);var o;!function(e){e.method="textDocument/implementation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ImplementationRequest=o={}))},7331:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionItemFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429));class d extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.InlineCompletionRequest.type)}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"inlineCompletion").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.inlineCompletionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideInlineCompletionItems:(e,t,n,i)=>{const o=this._client,r=this._client.middleware,s=(e,t,n,i)=>o.sendRequest(c.InlineCompletionRequest.type,o.code2ProtocolConverter.asInlineCompletionParams(e,t,n),i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asInlineCompletionResult(e,i)),(e=>o.handleFailedRequest(c.InlineCompletionRequest.type,i,e,null)));return r.provideInlineCompletionItems?r.provideInlineCompletionItems(e,t,n,i,s):s(e,t,n,i)}};return[a.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.InlineCompletionItemFeature=d},7476:(e,t,n)=>{const i=/\s+/g;class o{constructor(e,t){if(t=s(t),e instanceof o)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new o(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(i," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!v(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&g)|(this.options.loose&&m))+":"+e,n=r.get(t);if(n)return n;const i=this.options.loose,o=i?l[d.HYPHENRANGELOOSE]:l[d.HYPHENRANGE];e=e.replace(o,x(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(l[d.COMPARATORTRIM],h),c("comparator trim",e),e=e.replace(l[d.TILDETRIM],p),c("tilde trim",e),e=e.replace(l[d.CARETTRIM],f),c("caret trim",e);let s=e.split(" ").map((e=>_(e,this.options))).join(" ").split(/\s+/).map((e=>O(e,this.options)));i&&(s=s.filter((e=>(c("loose invalid filter",e,this.options),!!e.match(l[d.COMPARATORLOOSE]))))),c("range list",s);const u=new Map,y=s.map((e=>new a(e,this.options)));for(const e of y){if(v(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");const b=[...u.values()];return r.set(t,b),b}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Range is required");return this.set.some((n=>b(n,t)&&e.set.some((e=>b(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(E(this.set[t],e,this.options))return!0;return!1}}e.exports=o;const r=new(n(8953)),s=n(3990),a=n(1565),c=n(1361),u=n(4517),{safeRe:l,t:d,comparatorTrimReplace:h,tildeTrimReplace:p,caretTrimReplace:f}=n(2841),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:m}=n(9543),v=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,b=(e,t)=>{let n=!0;const i=e.slice();let o=i.pop();for(;n&&i.length;)n=i.every((e=>o.intersects(e,t))),o=i.pop();return n},_=(e,t)=>(c("comp",e,t),e=S(e,t),c("caret",e),e=D(e,t),c("tildes",e),e=T(e,t),c("xrange",e),e=k(e,t),c("stars",e),e),C=e=>!e||"x"===e.toLowerCase()||"*"===e,D=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{const n=t.loose?l[d.TILDELOOSE]:l[d.TILDE];return e.replace(n,((t,n,i,o,r)=>{let s;return c("tilde",e,t,n,i,o,r),C(n)?s="":C(i)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:C(o)?s=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:r?(c("replaceTilde pr",r),s=`>=${n}.${i}.${o}-${r} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,c("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>R(e,t))).join(" "),R=(e,t)=>{c("caret",e,t);const n=t.loose?l[d.CARETLOOSE]:l[d.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,r,s)=>{let a;return c("caret",e,t,n,o,r,s),C(n)?a="":C(o)?a=`>=${n}.0.0${i} <${+n+1}.0.0-0`:C(r)?a="0"===n?`>=${n}.${o}.0${i} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${i} <${+n+1}.0.0-0`:s?(c("replaceCaret pr",s),a="0"===n?"0"===o?`>=${n}.${o}.${r}-${s} <${n}.${o}.${+r+1}-0`:`>=${n}.${o}.${r}-${s} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${r}-${s} <${+n+1}.0.0-0`):(c("no pr"),a="0"===n?"0"===o?`>=${n}.${o}.${r}${i} <${n}.${o}.${+r+1}-0`:`>=${n}.${o}.${r}${i} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${r} <${+n+1}.0.0-0`),c("caret return",a),a}))},T=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map((e=>P(e,t))).join(" ")),P=(e,t)=>{e=e.trim();const n=t.loose?l[d.XRANGELOOSE]:l[d.XRANGE];return e.replace(n,((n,i,o,r,s,a)=>{c("xRange",e,n,i,o,r,s,a);const u=C(o),l=u||C(r),d=l||C(s),h=d;return"="===i&&h&&(i=""),a=t.includePrerelease?"-0":"",u?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&h?(l&&(r=0),s=0,">"===i?(i=">=",l?(o=+o+1,r=0,s=0):(r=+r+1,s=0)):"<="===i&&(i="<",l?o=+o+1:r=+r+1),"<"===i&&(a="-0"),n=`${i+o}.${r}.${s}${a}`):l?n=`>=${o}.0.0${a} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${r}.0${a} <${o}.${+r+1}.0-0`),c("xRange return",n),n}))},k=(e,t)=>(c("replaceStars",e,t),e.trim().replace(l[d.STAR],"")),O=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),x=e=>(t,n,i,o,r,s,a,c,u,l,d,h)=>`${n=C(i)?"":C(o)?`>=${i}.0.0${e?"-0":""}`:C(r)?`>=${i}.${o}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=C(u)?"":C(l)?`<${+u+1}.0.0-0`:C(d)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${d}-${h}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),E=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(c(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},7484:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const a=s(n(1398)),c=s(n(3147)),u=n(8071);class l extends u.TextDocumentLanguageFeature{constructor(e){super(e,c.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideLinkedEditingRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(c.LinkedEditingRangeRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asLinkedEditingRanges(e,n)),(e=>i.handleFailedRequest(c.LinkedEditingRangeRequest.type,n,e,null))),r=i.middleware;return r.provideLinkedEditingRange?r.provideLinkedEditingRange(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return a.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.LinkedEditingFeature=l},7506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.FoldingRangeRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[o.FoldingRangeKind.Comment,o.FoldingRangeKind.Imports,o.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,r.ensure)((0,r.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.FoldingRangeRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeFoldingRange.fire()}));const[n,i]=this.getRegistration(t,e.foldingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,r={onDidChangeFoldingRanges:n.event,provideFoldingRanges:(e,t,n)=>{const i=this._client,r=(e,t,n)=>{const r={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(o.FoldingRangeRequest.type,r,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asFoldingRanges(e,n)),(e=>i.handleFailedRequest(o.FoldingRangeRequest.type,n,e,null)))},s=i.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,r):r(e,0,n)}};return[i.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),r),{provider:r,onDidChangeFoldingRange:n}]}}t.FoldingRangeFeature=s},7516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=t.Delayer=void 0,t.setTestMode=function(){o=!0},t.clearTestMode=function(){o=!1},t.map=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new r(o?.yieldAfter);function c(n){a.start();for(let i=n;i<e.length;i++)if(s[i]=t(e[i]),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),i+1;return-1}let u=c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.mapAsync=async function(e,t,n,o){if(0===e.length)return[];const s=new Array(e.length),a=new r(o?.yieldAfter);async function c(i){a.start();for(let r=i;r<e.length;r++)if(s[r]=await t(e[r],n),a.shouldYield())return o?.yieldCallback&&o.yieldCallback(),r+1;return-1}let u=await c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.forEach=async function(e,t,n,o){if(0===e.length)return;const s=new r(o?.yieldAfter);function a(n){s.start();for(let i=n;i<e.length;i++)if(t(e[i]),s.shouldYield())return o?.yieldCallback&&o.yieldCallback(),i+1;return-1}let c=a(0);for(;-1!==c&&(void 0===n||!n.isCancellationRequested);)c=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(a(c))}))}))};const i=n(3147);t.Delayer=class{defaultDelay;timeout;completionPromise;onSuccess;task;constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;const e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=(0,i.RAL)().timer.setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();const e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(this.timeout.dispose(),this.timeout=void 0)}},t.Semaphore=class{_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,i.RAL)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};let o=!1;class r{yieldAfter;startTime;counter;total;counterInterval;constructor(e=15){this.yieldAfter=!0===o?Math.max(e,2):Math.max(e,15),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){const e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=2*this.total}}return!1}}},7602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const i=n(8431);var o,r,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.CallHierarchyPrepareRequest=o={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.CallHierarchyIncomingCallsRequest=r={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},7639:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const i=n(8431);var o;!function(e){e.method="workspace/configuration",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ConfigurationRequest=o={}))},7672:function(e,t,n){"use strict";var i=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(7162);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 r=n(1109);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return r.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return r.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return r.Touch}});const s=n(8844);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const a=n(2479);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(6957);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(3489);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(656);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(9036);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 h=n(9805);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return h.AbstractMessageBuffer}});const p=n(4054);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return p.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return p.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return p.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return p.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return p.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return p.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return p.Trace}}),Object.defineProperty(t,"TraceValue",{enumerable:!0,get:function(){return p.TraceValue}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return p.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return p.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return p.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return p.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return p.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return p.CancellationReceiverStrategy}}),Object.defineProperty(t,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return p.IdCancellationReceiverStrategy}}),Object.defineProperty(t,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return p.RequestCancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return p.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return p.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return p.MessageStrategy}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return p.TraceValues}});const f=i(n(5091));t.RAL=f.default},7684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const i=n(8431);var o,r,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"}(r||(t.MonikerKind=r={})),function(e){e.method="textDocument/moniker",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.MonikerRequest=s={}))},7773:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocumentSyncFeature=void 0;const a=s(n(1398)),c=s(n(3147)),u=s(n(4429)),l=s(n(5590)),d=n(1104);function h(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var p,f,g,m,v;!function(e){let t;!function(t){function n(e,t){return e.map((e=>o(e,t)))}function i(e){return r(new Set,e)}function o(e,t){const n=c.NotebookCell.create(function(e){switch(e){case a.NotebookCellKind.Markup:return c.NotebookCellKind.Markup;case a.NotebookCellKind.Code:return c.NotebookCellKind.Code}}(e.kind),t.asUri(e.document.uri));return Object.keys(e.metadata).length>0&&(n.metadata=i(e.metadata)),void 0!==e.executionSummary&&l.number(e.executionSummary.executionOrder)&&l.boolean(e.executionSummary.success)&&(n.executionSummary={executionOrder:e.executionSummary.executionOrder,success:e.executionSummary.success}),n}function r(e,t){if(e.has(t))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(t)){const n=[];for(const i of t)if(null!==i&&"object"==typeof i||Array.isArray(i))n.push(r(e,i));else{if(i instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");n.push(i)}return n}{const n=Object.keys(t),i=Object.create(null);for(const o of n){const n=t[o];if(null!==n&&"object"==typeof n||Array.isArray(n))i[o]=r(e,n);else{if(n instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");i[o]=n}}return i}}t.asVersionedNotebookDocumentIdentifier=function(e,t){return{version:e.version,uri:t.asUri(e.uri)}},t.asNotebookDocument=function(e,t,o){const r=c.NotebookDocument.create(o.asUri(e.uri),e.notebookType,e.version,n(t,o));return Object.keys(e.metadata).length>0&&(r.metadata=i(e.metadata)),r},t.asNotebookCells=n,t.asMetadata=i,t.asNotebookCell=o,t.asTextContentChange=function(e,t){const n=t.asChangeTextDocumentParams(e,e.document.uri,e.document.version);return{document:n.textDocument,changes:n.contentChanges}},t.asNotebookDocumentChangeEvent=function(t,n){const i=Object.create(null);if(t.metadata&&(i.metadata=e.c2p.asMetadata(t.metadata)),void 0!==t.cells){const o=Object.create(null),r=t.cells;r.structure&&(o.structure={array:{start:r.structure.array.start,deleteCount:r.structure.array.deleteCount,cells:void 0!==r.structure.array.cells?r.structure.array.cells.map((t=>e.c2p.asNotebookCell(t,n))):void 0},didOpen:void 0!==r.structure.didOpen?r.structure.didOpen.map((e=>n.asOpenTextDocumentParams(e.document).textDocument)):void 0,didClose:void 0!==r.structure.didClose?r.structure.didClose.map((e=>n.asCloseTextDocumentParams(e.document).textDocument)):void 0}),void 0!==r.data&&(o.data=r.data.map((t=>e.c2p.asNotebookCell(t,n)))),void 0!==r.textContent&&(o.textContent=r.textContent.map((t=>e.c2p.asTextContentChange(t,n)))),Object.keys(o).length>0&&(i.cells=o)}return i}}(t=e.c2p||(e.c2p={}))}(p||(p={})),function(e){function t(e,t,i=!0){return!(e.kind!==t.kind||e.document.uri.toString()!==t.document.uri.toString()||e.document.languageId!==t.document.languageId||!function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.executionOrder===t.executionOrder&&e.success===t.success&&function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.startTime===t.startTime&&e.endTime===t.endTime)}(e.timing,t.timing))}(e.executionSummary,t.executionSummary))&&(!i||i&&n(e.metadata,t.metadata))}function n(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const o=Array.isArray(e),r=Array.isArray(t);if(o!==r)return!1;if(o&&r){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1}if(i(e)&&i(t)){const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;if(i.sort(),o.sort(),!n(i,o))return!1;for(let o=0;o<i.length;o++){const r=i[o];if(!n(e[r],t[r]))return!1}return!0}return!1}function i(e){return null!==e&&"object"==typeof e}e.computeDiff=function(e,n,i){const o=e.length,r=n.length;let s=0;for(;s<r&&s<o&&t(e[s],n[s],i);)s++;if(s<r&&s<o){let a=o-1,c=r-1;for(;a>=0&&c>=0&&t(e[a],n[c],i);)a--,c--;const u=a+1-s,l=s===c+1?void 0:n.slice(s,c+1);return void 0!==l?{start:s,deleteCount:u,cells:l}:{start:s,deleteCount:u}}return s<r?{start:s,deleteCount:0,cells:n.slice(s)}:s<o?{start:s,deleteCount:o-s}:void 0},e.isObjectLiteral=i}(f||(f={})),function(e){e.matchNotebook=function(e,t){if("string"==typeof e)return"*"===e||t.notebookType===e;if(void 0!==e.notebookType&&"*"!==e.notebookType&&t.notebookType!==e.notebookType)return!1;const n=t.uri;return!(void 0!==e.scheme&&"*"!==e.scheme&&n.scheme!==e.scheme||void 0!==e.pattern&&!(0,d.matchGlobPattern)(e.pattern,n))}}(g||(g={})),function(e){function t(e,t,n,i){return void 0===t&&void 0===n?{notebook:e,language:i}:{notebook:{notebookType:e,scheme:t,pattern:n},language:i}}e.asDocumentSelector=function(e){const n=e.notebookSelector,i=[];for(const e of n){const n=("string"==typeof e.notebook?e.notebook:e.notebook?.notebookType)??"*",o="string"==typeof e.notebook?void 0:e.notebook?.scheme,r="string"==typeof e.notebook?void 0:e.notebook?.pattern;if(void 0!==e.cells)for(const s of e.cells)i.push(t(n,o,r,s.language));else i.push(t(n,o,r,void 0))}return i}}(m||(m={})),function(e){e.create=function(e){return{cells:e,uris:new Set(e.map((e=>e.document.uri.toString())))}}}(v||(v={}));class y{client;options;notebookSyncInfo;notebookDidOpen;disposables;selector;onChangeNotificationSent;onOpenNotificationSent;onCloseNotificationSent;onSaveNotificationSent;constructor(e,t,n,i,o,r){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(m.asDocumentSelector(t)),this.onChangeNotificationSent=n,this.onOpenNotificationSent=i,this.onCloseNotificationSent=o,this.onSaveNotificationSent=r,a.workspace.onDidOpenNotebookDocument((e=>{this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e)}),void 0,this.disposables);for(const e of a.workspace.notebookDocuments)this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e);a.workspace.onDidChangeNotebookDocument((e=>this.didChangeNotebookDocument(e)),void 0,this.disposables),!0===this.options.save&&a.workspace.onDidSaveNotebookDocument((e=>this.didSave(e)),void 0,this.disposables),a.workspace.onDidCloseNotebookDocument((e=>{this.didClose(e),this.notebookDidOpen.delete(e.uri.toString())}),void 0,this.disposables)}getState(){for(const e of a.workspace.notebookDocuments)if(void 0!==this.getMatchingCellsConsideringSyncInfo(e))return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){if(a.languages.match(this.selector,e)>0)return!0;const t=e.uri.toString();for(const e of this.notebookSyncInfo.values())if(e.uris.has(t))return!0;return!1}didOpenNotebookCellTextDocument(e,t){if(0===a.languages.match(this.selector,t.document))return;if(!this.notebookDidOpen.has(e.uri.toString()))return;const n=this.getSyncInfo(e),i=this.cellMatches(e,t);if(void 0!==n){const o=n.uris.has(t.document.uri.toString());if(i&&o||!i&&!o)return;if(i){const i=this.mergeCells(e,n,[t]);if(void 0!==i){const t=this.asNotebookDocumentChangeEvent(e,void 0,n,i);void 0!==t&&this.doSendChange(t,i).catch((()=>{}))}}}else i&&this.doSendOpen(e,[t]).catch((()=>{}))}didChangeNotebookCellTextDocument(e,t,n){if(0===a.languages.match(this.selector,n.document))return;const i=this.getSyncInfo(e);void 0!==i&&i.uris.has(t.document.uri.toString())&&this.doSendChange({notebook:e,cells:{textContent:[n]}},i.cells).catch((()=>{}))}didCloseNotebookCellTextDocument(e,t){const n=this.getSyncInfo(e);if(void 0===n)return;const i=t.document.uri,o=n.cells.findIndex((e=>e.document.uri.toString()===i.toString()));if(-1!==o)if(0===o&&1===n.cells.length)this.doSendClose(e,n.cells).catch((()=>{}));else{const t=n.cells.slice(),i=t.splice(o,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:o,deleteCount:1},didClose:i}}},t).catch((()=>{}))}}dispose(){for(const e of this.disposables)e.dispose()}didOpen(e,t,n=this.getSyncInfo(e)){if(void 0!==n)if(void 0===t&&(t=n.cells.slice()),void 0!==t){const i=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==i&&this.doSendChange(i,t).catch((()=>{}))}else this.doSendClose(e,[]).catch((()=>{}));else{if(void 0===(t=this.getMatchingCells(e)))return;this.doSendOpen(e,t).catch((()=>{}))}}didChangeNotebookDocument(e){const t=e.notebook,n=this.getSyncInfo(t);if(void 0===n){if(0===e.contentChanges.length)return;const i=this.getMatchingCells(t);if(void 0===i)return;this.didOpen(t,i,n)}else{const i=this.getMatchingCellsFromEvent(t,n,e);if(void 0===i)return void this.didClose(t,n);const o=this.asNotebookDocumentChangeEvent(e.notebook,e,n,i);void 0!==o&&this.doSendChange(o,i).catch((()=>{}))}}didSave(e){void 0!==this.getSyncInfo(e)&&this.doSendSave(e).catch((()=>{}))}didClose(e,t=this.getSyncInfo(e)){if(void 0===t)return;const n=e.getCells().filter((e=>t.uris.has(e.document.uri.toString())));this.doSendClose(e,n).catch((()=>{}))}async sendDidOpenNotebookDocument(e){if(void 0!==this.getSyncInfo(e))throw new Error(`Notebook document ${e.uri.toString()} is already open`);const t=this.getMatchingCells(e);if(void 0!==t)return this.doSendOpen(e,t)}async doSendOpen(e,t){const n=async(e,t)=>{const n=t.map((e=>this.client.code2ProtocolConverter.asTextDocumentItem(e.document)));try{await this.client.sendNotification(c.DidOpenNotebookDocumentNotification.type,{notebookDocument:p.c2p.asNotebookDocument(e,t,this.client.code2ProtocolConverter),cellTextDocuments:n}),this.onOpenNotificationSent.fire(e)}catch(e){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),v.create(t)),void 0!==i?.didOpen?i.didOpen(e,t,n):n(e,t)}async sendDidChangeNotebookDocument(e){const t=this.getMatchingCellsFromSyncInfo(e.notebook);if(void 0===t)throw new Error(`Received changed event for un-synced notebook ${e.notebook.uri.toString()}`);return this.doSendChange(e,t)}async doSendChange(e,t){const n=async e=>{try{await this.client.sendNotification(c.DidChangeNotebookDocumentNotification.type,{notebookDocument:p.c2p.asVersionedNotebookDocumentIdentifier(e.notebook,this.client.code2ProtocolConverter),change:p.c2p.asNotebookDocumentChangeEvent(e,this.client.code2ProtocolConverter)}),this.onChangeNotificationSent.fire(e)}catch(e){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return void 0!==e.cells?.structure&&this.notebookSyncInfo.set(e.notebook.uri.toString(),v.create(t)),void 0!==i?.didChange?i?.didChange(e,n):n(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){const t=async e=>{try{await this.client.sendNotification(c.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)}}),this.onSaveNotificationSent.fire(e)}catch(e){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return void 0!==n?.didSave?n.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){const t=this.getMatchingCellsFromSyncInfo(e);if(void 0===t)throw new Error(`Received close event for un-synced notebook ${e.uri.toString()}`);return this.doSendClose(e,t)}async doSendClose(e,t){const n=async(e,t)=>{try{await this.client.sendNotification(c.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)},cellTextDocuments:t.map((e=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(e.document)))}),this.onCloseNotificationSent.fire(e)}catch(e){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),void 0!==i?.didClose?i.didClose(e,t,n):n(e,t)}getSynchronizedCells(e){const t=this.getSyncInfo(e);return t?.cells}asNotebookDocumentChangeEvent(e,t,n,i){if(void 0!==t&&t.notebook!==e)throw new Error("Notebook must be identical");const o={notebook:e};let r;if(void 0!==t?.metadata&&(o.metadata=p.c2p.asMetadata(t.metadata)),void 0!==t?.cellChanges&&t.cellChanges.length>0){const e=[];r=new Set(i.map((e=>e.document.uri.toString())));for(const n of t.cellChanges)!r.has(n.cell.document.uri.toString())||void 0===n.executionSummary&&void 0===n.metadata||e.push(n.cell);e.length>0&&(o.cells=o.cells??{},o.cells.data=e)}if((void 0!==t?.contentChanges&&t.contentChanges.length>0||void 0===t)&&void 0!==n&&void 0!==i){const e=n.cells,t=i,r=f.computeDiff(e,t,!1);let s,a;if(void 0!==r){s=void 0===r.cells?new Map:new Map(r.cells.map((e=>[e.document.uri.toString(),e]))),a=0===r.deleteCount?new Map:new Map(e.slice(r.start,r.start+r.deleteCount).map((e=>[e.document.uri.toString(),e])));for(const e of Array.from(a.keys()))s.has(e)&&(a.delete(e),s.delete(e));o.cells=o.cells??{};const t=[],n=[];if(s.size>0||a.size>0){for(const e of s.values())t.push(e);for(const e of a.values())n.push(e)}o.cells.structure={array:r,didOpen:t,didClose:n}}}return Object.keys(o).length>1?o:void 0}getMatchingCells(e,t=e.getCells()){if(void 0!==this.options.notebookSelector)for(const n of this.options.notebookSelector)if(void 0===n.notebook||g.matchNotebook(n.notebook,e)){const i=this.filterCells(e,t,n.cells);return 0===i.length?void 0:i}}getMatchingCellsFromEvent(e,t,n){if(void 0===this.options.notebookSelector)return;let i,o;for(const t of this.options.notebookSelector)if(void 0===t.notebook||g.matchNotebook(t.notebook,e)){i=t;break}if(void 0===i)return;if(!(void 0!==n.cellChanges&&0!==n.cellChanges.length||void 0!==n.contentChanges&&0!==n.contentChanges.length))return t.cells;if(void 0!==n.cellChanges&&n.cellChanges.length>0){const r=n.cellChanges.map((e=>e.cell)),s=this.filterCells(e,r,i.cells);if(s.length!==r.length){o=new Set(t.uris);for(const e of r)o.delete(e.document.uri.toString());for(const e of s)o.add(e.document.uri.toString())}}if(void 0!==n.contentChanges&&n.contentChanges.length>0){void 0===o&&(o=new Set(t.uris));for(const t of n.contentChanges){for(const e of t.removedCells)o.delete(e.document.uri.toString());const n=this.filterCells(e,new Array(...t.addedCells),i.cells);for(const e of n)o.add(e.document.uri.toString())}}if(void 0===o)return t.cells;const r=[],s=e.getCells();for(const e of s)o.has(e.document.uri.toString())&&r.push(e);return r}getMatchingCellsFromSyncInfo(e){const t=this.getSyncInfo(e);return void 0!==t?t.cells:void 0}getMatchingCellsConsideringSyncInfo(e){const t=this.getSyncInfo(e);return void 0!==t?t.cells:this.getMatchingCells(e)}mergeCells(e,t,n){const i=[],o=new Set(t.uris);for(const e of n)o.add(e.document.uri.toString());for(const t of e.getCells())o.has(t.document.uri.toString())&&i.push(t);return i}cellMatches(e,t){const n=this.getMatchingCells(e,[t]);return void 0!==n&&n[0]===t}filterCells(e,t,n){const i=void 0!==n?t.filter((e=>{const t=e.document.languageId;return n.some((e=>"*"===e.language||t===e.language))})):t;return"function"==typeof this.client.clientOptions.notebookDocumentOptions?.filterCells?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}getSyncInfo(e){return this.notebookSyncInfo.get(e.uri.toString())}}class b{static CellScheme="vscode-notebook-cell";client;registrations;dedicatedChannel;_onChangeNotificationSent;_onOpenNotificationSent;_onCloseNotificationSent;_onSaveNotificationSent;constructor(e){this.client=e,this.registrations=new Map,this.registrationType=c.NotebookDocumentSyncRegistrationType.type,this._onChangeNotificationSent=new a.EventEmitter,this._onOpenNotificationSent=new a.EventEmitter,this._onCloseNotificationSent=new a.EventEmitter,this._onSaveNotificationSent=new a.EventEmitter,a.workspace.onDidOpenTextDocument((e=>{if(e.uri.scheme!==b.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof y&&e.didOpenNotebookCellTextDocument(t,n)})),a.workspace.onDidChangeTextDocument((e=>{if(0===e.contentChanges.length)return;const t=e.document;if(t.uri.scheme!==b.CellScheme)return;const[n,i]=this.findNotebookDocumentAndCell(t);if(void 0!==n&&void 0!==i)for(const t of this.registrations.values())t instanceof y&&t.didChangeNotebookCellTextDocument(n,i,e)})),a.workspace.onDidCloseTextDocument((e=>{if(e.uri.scheme!==b.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof y&&e.didCloseNotebookCellTextDocument(t,n)}))}getState(){if(0===this.registrations.size)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(const e of this.registrations.values()){const t=e.getState();if("document"===t.kind&&!0===t.registrations&&!0===t.matches)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}registrationType;get onOpenNotificationSent(){return this._onOpenNotificationSent.event}get onChangeNotificationSent(){return this._onChangeNotificationSent.event}get onCloseNotificationSent(){return this._onCloseNotificationSent.event}get onSaveNotificationSent(){return this._onSaveNotificationSent.event}fillClientCapabilities(e){const t=h(h(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){const t=e.notebookDocumentSync;void 0!==t&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(m.asDocumentSelector(t)))}initialize(e){const t=e.notebookDocumentSync;if(void 0===t)return;const n=t.id??u.generateUuid();this.register({id:n,registerOptions:t})}register(e){const t=new y(this.client,e.registerOptions,this._onChangeNotificationSent,this._onOpenNotificationSent,this._onCloseNotificationSent,this._onSaveNotificationSent);this.registrations.set(e.id,t)}unregister(e){const t=this.registrations.get(e);void 0!==t&&(this.registrations.delete(e),t.dispose())}clear(){for(const e of this.registrations.values())e.dispose();this.registrations.clear(),this._onChangeNotificationSent.dispose(),this._onChangeNotificationSent=new a.EventEmitter,this._onOpenNotificationSent.dispose(),this._onOpenNotificationSent=new a.EventEmitter,this._onCloseNotificationSent.dispose(),this._onCloseNotificationSent=new a.EventEmitter,this._onSaveNotificationSent.dispose(),this._onSaveNotificationSent=new a.EventEmitter}handles(e){if(e.uri.scheme!==b.CellScheme)return!1;if(void 0!==this.dedicatedChannel&&a.languages.match(this.dedicatedChannel,e)>0)return!0;for(const t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(const t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){const t=e.uri.toString();for(const e of a.workspace.notebookDocuments)for(const n of e.getCells())if(n.document.uri.toString()===t)return[e,n];return[void 0,void 0]}}t.NotebookDocumentSyncFeature=b},7824:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const i=n(3147);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(i.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},7851:(e,t,n)=>{const i=n(4517);e.exports=(e,t,n)=>new i(e,n).compare(new i(t,n))},7898:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const i=n(1398),o=n(3147),r=n(8071);class s extends r.TextDocumentLanguageFeature{constructor(e){super(e,o.DeclarationRequest.type)}fillClientCapabilities(e){const t=(0,r.ensure)((0,r.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.declarationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDeclaration:(e,t,n)=>{const i=this._client,r=(e,t,n)=>i.sendRequest(o.DeclarationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDeclarationResult(e,n)),(e=>i.handleFailedRequest(o.DeclarationRequest.type,n,e,null))),s=i.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,r):r(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DeclarationFeature=s},7955:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOnTypeFormattingFeature=t.DocumentRangeFormattingFeature=t.DocumentFormattingFeature=void 0;const a=n(1398),c=n(3147),u=s(n(4429)),l=n(8071);var d;!function(e){e.fromConfiguration=function(e){const t=a.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(d||(d={}));class h extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,l.ensure)((0,l.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentFormattingEdits:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),options:i.code2ProtocolConverter.asFormattingOptions(t,d.fromConfiguration(e))};return i.sendRequest(c.DocumentFormattingRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTextEdits(e,n)),(e=>i.handleFailedRequest(c.DocumentFormattingRequest.type,n,e,null)))},r=i.middleware;return r.provideDocumentFormattingEdits?r.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[a.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentFormattingFeature=h;class p extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){const t=(0,l.ensure)((0,l.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentRangeFormattingEdits:(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>{const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n,d.fromConfiguration(e))};return o.sendRequest(c.DocumentRangeFormattingRequest.type,r,i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asTextEdits(e,i)),(e=>o.handleFailedRequest(c.DocumentRangeFormattingRequest.type,i,e,null)))},s=o.middleware;return s.provideDocumentRangeFormattingEdits?s.provideDocumentRangeFormattingEdits(e,t,n,i,r):r(e,t,n,i)}};return e.rangesSupport&&(n.provideDocumentRangesFormattingEdits=(e,t,n,i)=>{const o=this._client,r=(e,t,n,i)=>{const r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),ranges:o.code2ProtocolConverter.asRanges(t),options:o.code2ProtocolConverter.asFormattingOptions(n,d.fromConfiguration(e))};return o.sendRequest(c.DocumentRangesFormattingRequest.type,r,i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asTextEdits(e,i)),(e=>o.handleFailedRequest(c.DocumentRangesFormattingRequest.type,i,e,null)))},s=o.middleware;return s.provideDocumentRangesFormattingEdits?s.provideDocumentRangesFormattingEdits(e,t,n,i,r):r(e,t,n,i)}),[a.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentRangeFormattingFeature=p;class f extends l.TextDocumentLanguageFeature{constructor(e){super(e,c.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,l.ensure)((0,l.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideOnTypeFormattingEdits:(e,t,n,i,o)=>{const r=this._client,s=(e,t,n,i,o)=>{const s={textDocument:r.code2ProtocolConverter.asTextDocumentIdentifier(e),position:r.code2ProtocolConverter.asPosition(t),ch:n,options:r.code2ProtocolConverter.asFormattingOptions(i,d.fromConfiguration(e))};return r.sendRequest(c.DocumentOnTypeFormattingRequest.type,s,o).then((e=>o.isCancellationRequested?null:r.protocol2CodeConverter.asTextEdits(e,o)),(e=>r.handleFailedRequest(c.DocumentOnTypeFormattingRequest.type,o,e,null)))},a=r.middleware;return a.provideOnTypeFormattingEdits?a.provideOnTypeFormattingEdits(e,t,n,i,o,s):s(e,t,n,i,o)}},i=e.moreTriggerCharacter||[];return[a.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.firstTriggerCharacter,...i),n]}}t.DocumentOnTypeFormattingFeature=f},8071:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFeature=t.TextDocumentLanguageFeature=t.TextDocumentEventFeature=t.DynamicDocumentFeature=t.DynamicFeature=t.StaticFeature=t.LSPCancellationError=void 0,t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]};const a=n(1398),c=n(3147),u=s(n(5590)),l=s(n(4429));class d extends a.CancellationError{data;constructor(e){super(),this.data=e}}var h,p;t.LSPCancellationError=d,function(e){e.is=function(e){const t=e;return null!=t&&u.func(t.fillClientCapabilities)&&u.func(t.initialize)&&u.func(t.getState)&&u.func(t.clear)&&(void 0===t.fillInitializeParams||u.func(t.fillInitializeParams))}}(h||(t.StaticFeature=h={})),function(e){e.is=function(e){const t=e;return null!=t&&u.func(t.fillClientCapabilities)&&u.func(t.initialize)&&u.func(t.getState)&&u.func(t.clear)&&(void 0===t.fillInitializeParams||u.func(t.fillInitializeParams))&&u.func(t.register)&&u.func(t.unregister)&&void 0!==t.registrationType}}(p||(t.DynamicFeature=p={}));class f{_client;constructor(e){this._client=e}getState(){const e=this.getDocumentSelectors();let t=0;for(const n of e){t++;for(const e of a.workspace.textDocuments)if(a.languages.match(n,e)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}const n=t>0;return{kind:"document",id:this.registrationType.method,registrations:n,matches:!1}}}t.DynamicDocumentFeature=f,t.TextDocumentEventFeature=class extends f{_event;_type;_middleware;_createParams;_textDocument;_selectorFilter;_listener;_selectors;_onNotificationSent;static textDocumentFilter(e,t){for(const n of e)if(a.languages.match(n,t)>0)return!0;return!1}constructor(e,t,n,i,o,r,s){super(e),this._event=t,this._type=n,this._middleware=i,this._createParams=o,this._textDocument=r,this._selectorFilter=s,this._selectors=new Map,this._onNotificationSent=new a.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event((e=>{this.callback(e).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed.`,e)}))}))),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){const t=async e=>{const t=this._createParams(e);await this._client.sendNotification(this._type,t),this.notificationSent(this.getTextDocument(e),this._type,t)};if(this.matches(e)){const n=this._middleware();return n?n(e,(e=>t(e))):t(e)}}matches(e){return!this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))&&(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._onNotificationSent=new a.EventEmitter,this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(a.languages.match(t,e)>0)return{send:e=>this.callback(e)}}},t.TextDocumentLanguageFeature=class extends f{_registrationType;_registrations;constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(const e of this._registrations.values()){const t=e.data.registerOptions.documentSelector;null!==t&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;const t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){const t=this._registrations.get(e);void 0!==t&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(c.TextDocumentRegistrationOptions.is(t)){const n=c.StaticRegistrationOptions.hasId(t)?t.id:l.generateUuid(),i=t.documentSelector??e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(u.boolean(t)&&!0===t||c.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];const n=u.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[l.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return u.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){const n=t.data.registerOptions.documentSelector;if(null!==n&&a.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(n),e)>0)return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}},t.WorkspaceFeature=class{_client;_registrationType;_registrations;constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){const t=this._registrations.get(e);void 0!==t&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}},8220:(e,t,n)=>{const i=n(7851);e.exports=(e,t,n)=>0!==i(e,t,n)},8286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const i=n(3147);t.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(i.FoldingRangeRefreshRequest.type),on:e=>{const t=i.FoldingRangeRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},8321:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.CodeLens{data;constructor(e){super(e)}}t.default=c},8329:(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 i 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 i._oneOf(i._chars)}constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}}function o(){return new i}t.empty=new n("00000000-0000-0000-0000-000000000000");const r=/^[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 r.test(e)}},8409:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentFeature=void 0;const a=s(n(1398)),c=n(3147),u=n(8071),l=s(n(4429));t.TextDocumentContentFeature=class{_client;_registrations=new Map;constructor(e){this._client=e}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:c.TextDocumentContentRequest.method,registrations:e}}get registrationType(){return c.TextDocumentContentRequest.type}getProviders(){const e=[];for(const t of this._registrations.values())e.push(...t.providers);return e}fillClientCapabilities(e){(0,u.ensure)((0,u.ensure)(e,"workspace"),"textDocumentContent").dynamicRegistration=!0}initialize(e){const t=this._client;if(t.onRequest(c.TextDocumentContentRefreshRequest.type,(async e=>{const n=t.protocol2CodeConverter.asUri(e.uri);for(const e of this._registrations.values())for(const t of e.providers)t.scheme!==n.scheme&&t.onDidChangeEmitter.fire(n)})),!e?.workspace?.textDocumentContent)return;const n=e.workspace.textDocumentContent,i=c.StaticRegistrationOptions.hasId(n)?n.id:l.generateUuid();this.register({id:i,registerOptions:n})}register(e){const t=[],n=[];for(const i of e.registerOptions.schemes){const[e,o]=this.registerTextDocumentContentProvider(i);t.push(o),n.push(e)}this._registrations.set(e.id,{disposable:a.Disposable.from(...n),providers:t})}registerTextDocumentContentProvider(e){const t=new a.EventEmitter,n={onDidChange:t.event,provideTextDocumentContent:(e,t)=>{const n=this._client,i=(e,t)=>{const i={uri:n.code2ProtocolConverter.asUri(e)};return n.sendRequest(c.TextDocumentContentRequest.type,i,t).then((e=>t.isCancellationRequested?null:e.text),(e=>n.handleFailedRequest(c.TextDocumentContentRequest.type,t,e,null)))},o=n.middleware;return o.provideTextDocumentContent?o.provideTextDocumentContent(e,t,i):i(e,t)}};return[a.workspace.registerTextDocumentContentProvider(e,n),{scheme:e,onDidChangeEmitter:t,provider:n}]}unregister(e){const t=this._registrations.get(e);void 0!==t&&(this._registrations.delete(e),t.disposable.dispose())}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}}},8431:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const i=n(7672);var o;!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 r extends i.RequestType0{__;___;____;_pr;constructor(e){super(e)}}t.ProtocolRequestType0=r;class s extends i.RequestType{__;___;____;_pr;constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends i.NotificationType0{___;____;constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends i.NotificationType{___;____;constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolNotificationType=c},8633:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(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=i,t.stringArray=function(e){return i(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}},8671:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const i=n(3147);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(i.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(i.DocumentDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(i.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(i.WorkspaceDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(i.WorkspaceDiagnosticRequest.partialResult,t))))}}}},8807:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const a=s(n(1398)),c=s(n(5590));var u;!function(e){e.is=function(e){const t=e;return null!=t&&(c.number(t.value)||c.string(t.value))&&c.string(t.target)}}(u||(t.DiagnosticCode=u={}));class l extends a.Diagnostic{data;hasDiagnosticCode;constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=l},8844:(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={}))},8848:(e,t,n)=>{const i=n(7851);e.exports=(e,t,n)=>0===i(e,t,n)},8876:(e,t)=>{"use strict";function n(e,t){return e===t?0:void 0===e?-1:void 0===t?1:e<t?-1:1}Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,t.returnFalse=function(){return!1},t.returnTrue=function(){return!0},t.returnUndefined=function(){},t.identity=function(e){return e},t.toLowerCase=function(e){return e.toLowerCase()},t.equateValues=function(e,t){return e===t},t.compareComparableValues=n,t.compareValues=function(e,t){return n(e,t)},t.isArray=function(e){return Array.isArray?Array.isArray(e):e instanceof Array},t.isString=function(e){return"string"==typeof e},t.isNumber=function(e){return"number"==typeof e},t.isBoolean=function(e){return"boolean"==typeof e},t.hasProperty=function(e,t){return i.call(e,t)},t.toBoolean=function(e){const t=e?.trim().toUpperCase();return"TRUE"===t},t.test_setDebugMode=function(e){const t=o;return o=e,t},t.isDebugMode=function(){if(void 0===o){const e=process.execArgv.join();o=e.includes("inspect")||e.includes("debug")}return o},t.isThenable=function(e){return"function"==typeof e?.then},t.isDefined=function(e){return void 0!==e},t.getEnumNames=function(e){const t=[];for(const n in e)isNaN(Number(n))&&t.push(n);return t},t.containsOnlyWhitespace=function(e,t,n){return void 0!==t&&(e=e.substring(t,n)),/^\s*$/.test(e)},t.cloneStr=function(e){return Buffer.from(e,"utf8").toString("utf8")};const i=Object.prototype.hasOwnProperty;let o;var r;!function(e){e.is=function(e){return e&&"function"==typeof e.dispose}}(r||(t.Disposable=r={}))},8914:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionItemFeature=void 0;const a=n(1398),c=n(3147),u=n(8071),l=s(n(4429)),d=[c.CompletionItemKind.Text,c.CompletionItemKind.Method,c.CompletionItemKind.Function,c.CompletionItemKind.Constructor,c.CompletionItemKind.Field,c.CompletionItemKind.Variable,c.CompletionItemKind.Class,c.CompletionItemKind.Interface,c.CompletionItemKind.Module,c.CompletionItemKind.Property,c.CompletionItemKind.Unit,c.CompletionItemKind.Value,c.CompletionItemKind.Enum,c.CompletionItemKind.Keyword,c.CompletionItemKind.Snippet,c.CompletionItemKind.Color,c.CompletionItemKind.File,c.CompletionItemKind.Reference,c.CompletionItemKind.Folder,c.CompletionItemKind.EnumMember,c.CompletionItemKind.Constant,c.CompletionItemKind.Struct,c.CompletionItemKind.Event,c.CompletionItemKind.Operator,c.CompletionItemKind.TypeParameter];class h extends u.TextDocumentLanguageFeature{labelDetailsSupport;constructor(e){super(e,c.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){const t=(0,u.ensure)((0,u.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[c.MarkupKind.Markdown,c.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[c.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[c.InsertTextMode.asIs,c.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=c.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:d},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode","data"],applyKindSupport:!0}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);const n=e.triggerCharacters??[],i=e.allCommitCharacters,o=e.documentSelector,r={provideCompletionItems:(e,t,n,o)=>{const r=this._client,s=this._client.middleware,a=(e,t,n,o)=>r.sendRequest(c.CompletionRequest.type,r.code2ProtocolConverter.asCompletionParams(e,t,n),o).then((e=>o.isCancellationRequested?null:r.protocol2CodeConverter.asCompletionResult(e,i,o)),(e=>r.handleFailedRequest(c.CompletionRequest.type,o,e,null)));return s.provideCompletionItem?s.provideCompletionItem(e,t,o,n,a):a(e,t,o,n)},resolveCompletionItem:e.resolveProvider?(e,n)=>{const i=this._client,o=this._client.middleware,r=(e,n)=>i.sendRequest(c.CompletionResolveRequest.type,i.code2ProtocolConverter.asCompletionItem(e,!!this.labelDetailsSupport.get(t)),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCompletionItem(e)),(t=>i.handleFailedRequest(c.CompletionResolveRequest.type,n,t,e)));return o.resolveCompletionItem?o.resolveCompletionItem(e,n,r):r(e,n)}:void 0};return[a.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(o),r,...n),r]}}t.CompletionItemFeature=h},8953:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},8993:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const i=n(3147),o=n(5109);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(i.DidOpenNotebookDocumentNotification.type,(t=>e(t))),onDidChangeNotebookDocument:e=>this.connection.onNotification(i.DidChangeNotebookDocumentNotification.type,(t=>e(t))),onDidSaveNotebookDocument:e=>this.connection.onNotification(i.DidSaveNotebookDocumentNotification.type,(t=>e(t))),onDidCloseNotebookDocument:e=>this.connection.onNotification(i.DidCloseNotebookDocumentNotification.type,(t=>e(t)))}}};class r{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(e){return this.openHandler=e,i.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,i.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,i.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return r.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return r.NULL_DISPOSE}onDidSaveTextDocument(){return r.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 i.Emitter,this._onDidChange=new i.Emitter,this._onDidSave=new i.Emitter,this._onDidClose=new i.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 r,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 i=n.metadata;let o=!1;const r=e.change;void 0!==r.metadata&&(o=!0,n.metadata=r.metadata);const s=[],a=[],c=[],u=[];if(void 0!==r.cells){const e=r.cells;if(void 0!==e.structure){const i=e.structure.array;if(n.cells.splice(i.start,i.deleteCount,...void 0!==i.cells?i.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 i=t.get(n.cells[e].document);if(void 0!==i){const o=n.cells.splice(e,1,i);if(c.push({old:o[0],new:i}),t.delete(i.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:i,new:n.metadata});const d=[];for(const e of s)d.push(this.getNotebookCell(e));const h=[];for(const e of a)h.push(this.getNotebookCell(e));const p=[];for(const e of u)p.push(this.getNotebookCell(e));(d.length>0||h.length>0||c.length>0||p.length>0)&&(l.cells={added:d,removed:h,changed:{data:c,textContent:p}}),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)}}))),i.Disposable.create((()=>{n.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},9023:e=>{"use strict";e.exports=require("util")},9028:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.InlayHint{data;constructor(e,t,n){super(e,t,n)}}t.default=c},9036:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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(5091)),u=s(n(6618)),l=n(418),d=n(2479);var h,p;!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)}}(h||(t.MessageWriter=h={}));class f{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=f,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}}}(p||(p={})),t.WriteableStreamMessageWriter=class extends f{writable;options;errorCount;writeSemaphore;constructor(e,t){super(),this.writable=e,this.options=p.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()}}},9146:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(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.SettingMonitor=t.LanguageClient=t.TransportKind=void 0;const c=s(n(5317)),u=s(n(9896)),l=s(n(6928)),d=n(1398),h=s(n(5590)),p=n(3503),f=n(9558),g=n(9813),m=n(3955),v=n(7229);a(n(9813),t),a(n(5118),t);const y="^1.91.0";var b,_,C,D,w,S;!function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(b||(t.TransportKind=b={})),function(e){e.isSocket=function(e){const t=e;return t&&t.kind===b.socket&&h.number(t.port)}}(_||(_={})),function(e){e.is=function(e){return h.string(e.command)}}(C||(C={})),function(e){e.is=function(e){return h.string(e.module)}}(D||(D={})),function(e){e.is=function(e){const t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(w||(w={})),function(e){e.is=function(e){const t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(S||(S={}));class R extends p.BaseLanguageClient{_serverOptions;_forceDebug;_serverProcess;_isDetached;_isInDebugMode;constructor(e,t,n,i,o){let r,s,a,c,u;h.string(t)?(r=e,s=t,a=n,c=i,u=!!o):(r=e.toLowerCase(),s=e,a=t,c=n,u=i),void 0===u&&(u=!1),super(r,s,c),this._serverOptions=a,this._forceDebug=u,this._isInDebugMode=u;try{this.checkVersion()}catch(e){throw h.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){const e=m(d.version);if(!e)throw new Error(`No valid VS Code version detected. Version string is: ${d.version}`);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!v(e,y))throw new Error(`The language client requires VS Code version ${y} but received version ${d.version}`)}get isInDebugMode(){return this._isInDebugMode}async restart(){await this.stop(),this.isInDebugMode?(await new Promise((e=>setTimeout(e,1e3))),await this.start()):await this.start()}shutdown(e,t=2e3){return super.shutdown(e,t).finally((()=>{if(this._serverProcess){const e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}}))}checkProcessDied(e){e&&void 0!==e.pid&&setTimeout((()=>{try{void 0!==e.pid&&(process.kill(e.pid,0),(0,f.terminate)(e))}catch(e){}}),2e3)}handleConnectionClosed(){return this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),null===e.processId&&(e.processId=process.pid)}createMessageTransports(e){function t(e,t){if(!e&&!t)return;const n=Object.create(null);return Object.keys(process.env).forEach((e=>n[e]=process.env[e])),t&&(n.ELECTRON_RUN_AS_NODE="1",n.ELECTRON_NO_ASAR="1"),e&&Object.keys(e).forEach((t=>n[t]=e[t])),n}const n=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function o(e){if(null===e.stdin||null===e.stdout||null===e.stderr)throw new Error("Process created without stdio streams")}const r=this._serverOptions;if(h.func(r))return r().then((t=>{if(p.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(w.is(t))return this._isDetached=!!t.detached,{reader:new g.StreamMessageReader(t.reader),writer:new g.StreamMessageWriter(t.writer)};{let n;return S.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),{reader:new g.StreamMessageReader(n.stdout),writer:new g.StreamMessageWriter(n.stdin)}}}));let s;const a=r;return a.run||a.debug?this._forceDebug||function(){const e=process.execArgv;return!!e&&e.some((e=>n.some((t=>e.startsWith(t)))||i.some((t=>e===t))))}()?(s=a.debug,this._isInDebugMode=!0):(s=a.run,this._isInDebugMode=!1):s=r,this._getServerWorkingDir(s.options).then((n=>{if(D.is(s)&&s.module){const i=s,r=i.transport||b.stdio;if(!i.runtime){let s;return new Promise(((a,u)=>{const l=(i.args&&i.args.slice())??[];r===b.ipc?l.push("--node-ipc"):r===b.stdio?l.push("--stdio"):r===b.pipe?(s=(0,g.generateRandomPipeName)(),l.push(`--pipe=${s}`)):_.isSocket(r)&&l.push(`--socket=${r.port}`),l.push(`--clientProcessId=${process.pid.toString()}`);const d=i.options??Object.create(null);if(d.env=t(d.env,!0),d.execArgv=d.execArgv||[],d.cwd=n,d.silent=!0,r===b.ipc||r===b.stdio){const t=c.fork(i.module,l||[],d);o(t),this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),r===b.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),a({reader:new g.IPCMessageReader(this._serverProcess),writer:new g.IPCMessageWriter(this._serverProcess)})):a({reader:new g.StreamMessageReader(t.stdout),writer:new g.StreamMessageWriter(t.stdin)})}else r===b.pipe?(0,g.createClientPipeTransport)(s).then((t=>{const n=c.fork(i.module,l||[],d);o(n),this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{a({reader:e[0],writer:e[1]})}),u)}),u):_.isSocket(r)&&(0,g.createClientSocketTransport)(r.port).then((t=>{const n=c.fork(i.module,l||[],d);o(n),this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{a({reader:e[0],writer:e[1]})}),u)}),u)}))}{const o=[],s=i.options??Object.create(null);s.execArgv&&s.execArgv.forEach((e=>o.push(e))),o.push(i.module),i.args&&i.args.forEach((e=>o.push(e)));const a=Object.create(null);a.cwd=n,a.env=t(s.env,!1);const u=this._getRuntimePath(i.runtime,n);let l;if(r===b.ipc?(a.stdio=[null,null,null,"ipc"],o.push("--node-ipc")):r===b.stdio?o.push("--stdio"):r===b.pipe?(l=(0,g.generateRandomPipeName)(),o.push(`--pipe=${l}`)):_.isSocket(r)&&o.push(`--socket=${r.port}`),o.push(`--clientProcessId=${process.pid.toString()}`),r===b.ipc||r===b.stdio){const t=c.spawn(u,o,a);return t&&t.pid?(this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),r===b.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),Promise.resolve({reader:new g.IPCMessageReader(t),writer:new g.IPCMessageWriter(t)})):Promise.resolve({reader:new g.StreamMessageReader(t.stdout),writer:new g.StreamMessageWriter(t.stdin)})):T(t,`Launching server using runtime ${u} failed.`)}if(r===b.pipe)return(0,g.createClientPipeTransport)(l).then((t=>{const n=c.spawn(u,o,a);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),t.onConnected().then((e=>({reader:e[0],writer:e[1]})))):T(n,`Launching server using runtime ${u} failed.`)}));if(_.isSocket(r))return(0,g.createClientSocketTransport)(r.port).then((t=>{const n=c.spawn(u,o,a);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),t.onConnected().then((e=>({reader:e[0],writer:e[1]})))):T(n,`Launching server using runtime ${u} failed.`)}))}}else if(C.is(s)&&s.command){const t=s,i=void 0!==s.args?s.args.slice(0):[];let o;const r=s.transport;if(r===b.stdio)i.push("--stdio");else if(r===b.pipe)o=(0,g.generateRandomPipeName)(),i.push(`--pipe=${o}`);else if(_.isSocket(r))i.push(`--socket=${r.port}`);else if(r===b.ipc)throw new Error("Transport kind ipc is not support for command executable");const a=Object.assign({},t.options);if(a.cwd=a.cwd||n,void 0===r||r===b.stdio){const n=c.spawn(t.command,i,a);return n&&n.pid?(n.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),this._serverProcess=n,this._isDetached=!!a.detached,Promise.resolve({reader:new g.StreamMessageReader(n.stdout),writer:new g.StreamMessageWriter(n.stdin)})):T(n,`Launching server using command ${t.command} failed.`)}if(r===b.pipe)return(0,g.createClientPipeTransport)(o).then((n=>{const o=c.spawn(t.command,i,a);return o&&o.pid?(this._serverProcess=o,this._isDetached=!!a.detached,o.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),o.stdout.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),n.onConnected().then((e=>({reader:e[0],writer:e[1]})))):T(o,`Launching server using command ${t.command} failed.`)}));if(_.isSocket(r))return(0,g.createClientSocketTransport)(r.port).then((n=>{const o=c.spawn(t.command,i,a);return o&&o.pid?(this._serverProcess=o,this._isDetached=!!a.detached,o.stderr.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),o.stdout.on("data",(t=>this.outputChannel.append(h.string(t)?t:t.toString(e)))),n.onConnected().then((e=>({reader:e[0],writer:e[1]})))):T(o,`Launching server using command ${t.command} failed.`)}))}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(r,null,4)))})).finally((()=>{void 0!==this._serverProcess&&this._serverProcess.on("exit",((e,t)=>{0===e?this.info("Server process exited successfully",void 0,!1):null!==e&&this.error(`Server process exited with code ${e}.`,void 0,!1),null!==t&&this.error(`Server process exited with signal ${t}.`,void 0,!1)}))}))}_getRuntimePath(e,t){if(l.isAbsolute(e))return e;const n=this._mainGetRootPath();if(void 0!==n){const t=l.join(n,e);if(u.existsSync(t))return t}if(void 0!==t){const n=l.join(t,e);if(u.existsSync(n))return n}return e}_mainGetRootPath(){const e=d.workspace.workspaceFolders;if(!e||0===e.length)return;const t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise((e=>{u.lstat(t,((n,i)=>{e(!n&&i.isDirectory()?t:void 0)}))})):Promise.resolve(void 0)}}function T(e,t){return null===e?Promise.reject(t):new Promise(((n,i)=>{e.on("error",(e=>{i(`${t} ${e}`)})),setImmediate((()=>i(t)))}))}t.LanguageClient=R,t.SettingMonitor=class{_client;_setting;_listeners;constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return d.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new d.Disposable((()=>{this._client.needsStop()&&this._client.stop()}))}onDidChangeConfiguration(){const e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,i=n?d.workspace.getConfiguration(t).get(n,!1):d.workspace.getConfiguration(t);i&&this._client.needsStart()?this._client.start().catch((e=>this._client.error("Start failed after configuration change",e,"force"))):!i&&this._client.needsStop()&&this._client.stop().catch((e=>this._client.error("Stop failed after configuration change",e,"force")))}}},9164:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function e(t,n,i,o){t||(i&&(n+="\r\nVerbose Debug Information: "+("string"==typeof i?i:i())),r(n?"False expression: "+n:"False expression.",o||e))},t.fail=r,t.assertDefined=s,t.assertEachDefined=function e(t,n,i){for(const o of t)s(o,n,i||e)},t.assertNever=function e(t,n="Illegal value:",i){let o="";try{o=JSON.stringify(t)}catch{}r(`${n} ${o}`,i||e)},t.getFunctionName=function(e){if("function"!=typeof e)return"";if((0,o.hasProperty)(e,"name"))return e.name;{const t=Function.prototype.toString.call(e),n=/^function\s+([\w$]+)\s*\(/.exec(t);return n?n[1]:""}},t.formatEnum=function(e=0,t,n){const r=function(e){const t=[];for(const n of Object.keys(e)){const i=e[n];"number"==typeof i&&t.push([i,n])}return(0,i.stableSort)(t,((e,t)=>(0,o.compareValues)(e[0],t[0])))}(t);if(0===e)return r.length>0&&0===r[0][0]?r[0][1]:"0";if(n){let t="",n=e;for(const[i,o]of r){if(i>e)break;0!==i&&i&e&&(t=`${t}${t?"|":""}${o}`,n&=~i)}if(0===n)return t}else for(const[t,n]of r)if(t===e)return n;return e.toString()},t.getErrorString=function(e){return(e.stack?e.stack.toString():void 0)||("string"==typeof e.message?e.message:void 0)||JSON.stringify(e)},t.getSerializableError=function(e){if(!e)return;if(JSON.stringify(e).length>2)return e;return{name:e.name&&(0,o.isString)(e.name)?e.name:"noname",message:e.message&&(0,o.isString)(e.message)?e.message:"nomessage",stack:e.stack&&(0,o.isString)(e.stack)?e.stack:void 0}};const i=n(4870),o=n(8876);function r(e,t){const n=new Error(e?`Debug Failure. ${e}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(n,t||r),n}function s(e,t,n){null==e&&r(t,n||s)}},9191:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0});const a=s(n(1398));class c extends a.CodeAction{data;constructor(e,t){super(e),this.data=t}}t.default=c},9216:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const a=n(3147),c=s(n(1930));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))}}},9264:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const i=n(8431);var o;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.TypeDefinitionRequest=o={}))},9278:e=>{"use strict";e.exports=require("net")},9336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const i=n(3147);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(i.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(i.InlineValueRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},9383:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const i=n(8431);var o,r,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlayHintRequest=o={})),function(e){e.method="inlayHint/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.InlayHintResolveRequest=r={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(s||(t.InlayHintRefreshRequest=s={}))},9417:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function i(e){return{uri:t(e.uri)}}function o(e){return{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}function r(e){switch(e){case c.TextDocumentSaveReason.Manual:return u.TextDocumentSaveReason.Manual;case c.TextDocumentSaveReason.AfterDelay:return u.TextDocumentSaveReason.AfterDelay;case c.TextDocumentSaveReason.FocusOut:return u.TextDocumentSaveReason.FocusOut}return u.TextDocumentSaveReason.Manual}function s(e){switch(e){case c.CompletionTriggerKind.TriggerCharacter:return u.CompletionTriggerKind.TriggerCharacter;case c.CompletionTriggerKind.TriggerForIncompleteCompletions:return u.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return u.CompletionTriggerKind.Invoked}}function a(e){switch(e){case c.SignatureHelpTriggerKind.Invoke:return u.SignatureHelpTriggerKind.Invoked;case c.SignatureHelpTriggerKind.TriggerCharacter:return u.SignatureHelpTriggerKind.TriggerCharacter;case c.SignatureHelpTriggerKind.ContentChange:return u.SignatureHelpTriggerKind.ContentChange}}function D(e){return{label:e.label}}function w(e){return{label:e.label,parameters:(t=e.parameters,t.map(D))};var t}function S(e){return{line:e.line,character:e.character}}function R(e){return null==e?e:{line:e.line>u.uinteger.MAX_VALUE?u.uinteger.MAX_VALUE:e.line,character:e.character>u.uinteger.MAX_VALUE?u.uinteger.MAX_VALUE:e.character}}function T(e){return null==e?e:{start:R(e.start),end:R(e.end)}}function P(e){return null==e?e:u.Location.create(n(e.uri),T(e.range))}function k(e){switch(e){case c.DiagnosticSeverity.Error:return u.DiagnosticSeverity.Error;case c.DiagnosticSeverity.Warning:return u.DiagnosticSeverity.Warning;case c.DiagnosticSeverity.Information:return u.DiagnosticSeverity.Information;case c.DiagnosticSeverity.Hint:return u.DiagnosticSeverity.Hint}}function O(e){switch(e){case c.DiagnosticTag.Unnecessary:return u.DiagnosticTag.Unnecessary;case c.DiagnosticTag.Deprecated:return u.DiagnosticTag.Deprecated;default:return}}function x(e){return{message:e.message,location:P(e.location)}}function E(e){const t=u.Diagnostic.create(T(e.range),e.message),i=e instanceof m.ProtocolDiagnostic?e:void 0;void 0!==i&&void 0!==i.data&&(t.data=i.data);const o=function(e){if(null!=e)return l.number(e)||l.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return m.DiagnosticCode.is(o)?void 0!==i&&i.hasDiagnosticCode?t.code=o:(t.code=o.value,t.codeDescription={href:o.target}):t.code=o,l.number(e.severity)&&(t.severity=k(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;const t=[];for(const n of e){const e=O(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(x)),e.source&&(t.source=e.source),t}function M(e,t){return null==e?e:d.map(e,E,t)}function N(e){return null==e?e:e.map(E)}function F(e){if(e===c.CompletionItemTag.Deprecated)return u.CompletionItemTag.Deprecated}function q(e){return{range:T(e.range),newText:e.newText}}function j(e){return null==e?e:e.map(q)}function I(e){return e<=c.SymbolKind.TypeParameter?e+1:u.SymbolKind.Property}function L(e){return e}function A(e){return e.map(L)}function $(e){switch(e){case c.CodeActionTriggerKind.Invoke:return u.CodeActionTriggerKind.Invoked;case c.CodeActionTriggerKind.Automatic:return u.CodeActionTriggerKind.Automatic;default:return}}function W(e){if(null!=e)return e.value}function H(e){return{triggerKind:U(e.triggerKind),selectedCompletionInfo:K(e.selectedCompletionInfo)}}function U(e){switch(e){case c.InlineCompletionTriggerKind.Invoke:return u.InlineCompletionTriggerKind.Invoked;case c.InlineCompletionTriggerKind.Automatic:return u.InlineCompletionTriggerKind.Automatic}}function K(e){if(null!=e)return{range:T(e.range),text:e.text}}function z(e){const t=u.Command.create(e.title,e.command);return e.tooltip&&(t.tooltip=e.tooltip),e.arguments&&(t.arguments=e.arguments),t}function B(e){const t=u.InlayHintLabelPart.create(e.value);return void 0!==e.location&&(t.location=P(e.location)),void 0!==e.command&&(t.command=z(e.command)),void 0!==e.tooltip&&(t.tooltip=V(e.tooltip)),t}function V(e){return"string"==typeof e?e:{kind:u.MarkupKind.Markdown,value:e.value}}return{asUri:n,asTextDocumentIdentifier:i,asTextDocumentItem:o,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:o(e)}},asChangeTextDocumentParams:function(e,n,i){if(function(e){const t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){const t=e;return!!t.document&&!!t.contentChanges}(e)){const o=i;return{textDocument:{uri:t(n),version:o},contentChanges:e.contentChanges.map((e=>{const t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:i(e)}},asSaveTextDocumentParams:function(e,t=!1){const n={textDocument:i(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:i(e.document),reason:r(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asDidRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asDidDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asWillDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asTextDocumentPositionParams:function(e,t){return{textDocument:i(e),position:S(t)}},asCompletionParams:function(e,t,n){return{textDocument:i(e),position:S(t),context:{triggerKind:s(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:i(e),position:S(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:a(n.triggerKind),activeSignatureHelp:(o=n.activeSignatureHelp,void 0===o?o:{signatures:(r=o.signatures,r.map(w)),activeSignature:o.activeSignature,activeParameter:o.activeParameter})}};var o,r},asWorkerPosition:S,asRange:T,asRanges:function(e){return e.map(T)},asPosition:R,asPositions:function(e,t){return d.map(e,R,t)},asPositionsSync:function(e){return e.map(R)},asLocation:P,asDiagnosticSeverity:k,asDiagnosticTag:O,asDiagnostic:E,asDiagnostics:M,asDiagnosticsSync:N,asCompletionItem:function(e,t=!1){let n,i;l.string(e.label)?n=e.label:(n=e.label.label,!t||void 0===e.label.detail&&void 0===e.label.description||(i={detail:e.label.detail,description:e.label.description}));const o={label:n};void 0!==i&&(o.labelDetails=i);const r=e instanceof h.default?e:void 0;var s,a;e.detail&&(o.detail=e.detail),e.documentation&&(r&&"$string"!==r.documentationFormat?o.documentation=function(e,t){switch(e){case"$string":return t;case u.MarkupKind.PlainText:return{kind:e,value:t};case u.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(r.documentationFormat,e.documentation):o.documentation=e.documentation),e.filterText&&(o.filterText=e.filterText),function(e,t){let n,i,o=u.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,i=t.textEdit.range):t.insertText instanceof c.SnippetString?(o=u.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(i=t.range),e.insertTextFormat=o,t.fromEdit&&void 0!==n&&void 0!==i?e.textEdit=function(e,t){return C.is(t)?u.InsertReplaceEdit.create(e,T(t.inserting),T(t.replacing)):{newText:e,range:T(t)}}(n,i):e.insertText=n}(o,e),l.number(e.kind)&&(o.kind=(s=e.kind,void 0!==(a=r&&r.originalItemKind)?a:s+1)),e.sortText&&(o.sortText=e.sortText),e.additionalTextEdits&&(o.additionalTextEdits=j(e.additionalTextEdits)),e.commitCharacters&&(o.commitCharacters=e.commitCharacters.slice()),e.command&&(o.command=z(e.command)),!0!==e.preselect&&!1!==e.preselect||(o.preselect=e.preselect);const d=function(e){if(void 0===e)return e;const t=[];for(const n of e){const e=F(n);void 0!==e&&t.push(e)}return t}(e.tags);if(r){if(void 0!==r.data&&(o.data=r.data),!0===r.deprecated||!1===r.deprecated){if(!0===r.deprecated&&void 0!==d&&d.length>0){const e=d.indexOf(c.CompletionItemTag.Deprecated);-1!==e&&d.splice(e,1)}o.deprecated=r.deprecated}void 0!==r.insertTextMode&&(o.insertTextMode=r.insertTextMode)}return void 0!==d&&d.length>0&&(o.tags=d),void 0===o.insertTextMode&&!0===e.keepWhitespace&&(o.insertTextMode=u.InsertTextMode.adjustIndentation),o},asTextEdit:q,asSymbolKind:I,asSymbolTag:L,asSymbolTags:A,asReferenceParams:function(e,t,n){return{textDocument:i(e),position:S(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:async function(e,t){const n=u.CodeAction.create(e.title);if(e instanceof g.default&&void 0!==e.data&&(n.data=e.data),void 0!==e.kind&&(n.kind=W(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=await M(e.diagnostics,t)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(n.command=z(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),e.isAI&&(n.tags??=[],n.tags.push(u.CodeActionTag.LLMGenerated)),n},asCodeActionSync:function(e){const t=u.CodeAction.create(e.title);if(e instanceof g.default&&void 0!==e.data&&(t.data=e.data),void 0!==e.kind&&(t.kind=W(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=N(e.diagnostics)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(t.command=z(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),e.isAI&&(t.tags??=[],t.tags.push(u.CodeActionTag.LLMGenerated)),t},asCodeActionContext:async function(e,t){if(null==e)return e;let n;return e.only&&l.string(e.only.value)&&(n=[e.only.value]),u.CodeActionContext.create(await M(e.diagnostics,t),n,$(e.triggerKind))},asCodeActionContextSync:function(e){if(null==e)return e;let t;return e.only&&l.string(e.only.value)&&(t=[e.only.value]),u.CodeActionContext.create(N(e.diagnostics),t,$(e.triggerKind))},asInlineValueContext:function(e){return u.InlineValueContext.create(e.frameId,T(e.stoppedLocation))},asCommand:z,asCodeLens:function(e){const t=u.CodeLens.create(T(e.range));return e.command&&(t.command=z(e.command)),e instanceof p.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const n={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(n.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(n.trimFinalNewlines=!0),t.insertFinalNewline&&(n.insertFinalNewline=!0),n},asDocumentSymbolParams:function(e){return{textDocument:i(e)}},asCodeLensParams:function(e){return{textDocument:i(e)}},asDocumentLink:function(e){const t=u.DocumentLink.create(T(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);const i=e instanceof f.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:i(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:I(e.kind),uri:n(e.uri),range:T(e.range),selectionRange:T(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=A(e.tags)),e instanceof v.default&&void 0!==e.data&&(t.data=e.data),t},asTypeHierarchyItem:function(e){const t={name:e.name,kind:I(e.kind),uri:n(e.uri),range:T(e.range),selectionRange:T(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=A(e.tags)),e instanceof y.default&&void 0!==e.data&&(t.data=e.data),t},asInlayHint:function(e){const t="string"==typeof e.label?e.label:e.label.map(B),n=u.InlayHint.create(R(e.position),t);return void 0!==e.kind&&(n.kind=e.kind),void 0!==e.textEdits&&(n.textEdits=j(e.textEdits)),void 0!==e.tooltip&&(n.tooltip=V(e.tooltip)),void 0!==e.paddingLeft&&(n.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(n.paddingRight=e.paddingRight),e instanceof _.default&&void 0!==e.data&&(n.data=e.data),n},asWorkspaceSymbol:function(e){const n=e instanceof b.default?{name:e.name,kind:I(e.kind),location:e.hasRange?P(e.location):{uri:t(e.location.uri)},data:e.data}:{name:e.name,kind:I(e.kind),location:P(e.location)};return void 0!==e.tags&&(n.tags=A(e.tags)),""!==e.containerName&&(n.containerName=e.containerName),n},asInlineCompletionParams:function(e,t,n){return{textDocument:i(e),position:R(t),context:H(n)}},asInlineCompletionContext:H}};const c=s(n(1398)),u=s(n(3147)),l=s(n(5590)),d=s(n(7516)),h=a(n(649)),p=a(n(8321)),f=a(n(6353)),g=a(n(9191)),m=n(8807),v=a(n(5838)),y=a(n(6182)),b=a(n(5259)),_=a(n(9028));var C;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(C||(C={}))},9461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentFeature=void 0;const i=n(3147);t.TextDocumentContentFeature=e=>class extends e{get textDocumentContent(){return{refresh:e=>this.connection.sendRequest(i.TextDocumentContentRefreshRequest.type,{uri:e}),on:e=>this.connection.onRequest(i.TextDocumentContentRequest.type,((t,n)=>e(t,n)))}}}},9543:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},9558:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.terminate=function(e,t){if(u)try{const n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),a.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!d&&!l)return e.kill("SIGKILL"),!0;try{const t=(0,c.join)(__dirname,"terminateProcess.sh");return!a.spawnSync(t,[e.pid.toString()]).error}catch(e){return!1}}};const a=s(n(5317)),c=n(6928),u="win32"===process.platform,l="darwin"===process.platform,d="linux"===process.platform},9560:function(e,t,n){"use strict";var i,o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=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||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),s=0;s<n.length;s++)"default"!==n[s]&&o(t,e,n[s]);return r(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const a=s(n(1398)),c=s(n(3277)),u=s(n(3147)),l=s(n(4429));function d(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function h(e,t,n){e[t]=n}class p{_client;_event;_registrationType;_clientCapability;_serverCapability;_listener;_filters;constructor(e,t,n,i,o){this._client=e,this._event=t,this._registrationType=n,this._clientCapability=i,this._serverCapability=o,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=d(d(e,"workspace"),"fileOperations");h(t,"dynamicRegistration",!0),h(t,this._clientCapability,!0)}initialize(e){const t=e.workspace?.fileOperations,n=void 0!==t?t[this._serverCapability]:void 0;if(void 0!==n?.filters)try{this.register({id:l.generateUuid(),registerOptions:{filters:n.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map((e=>{const t=new c.Minimatch(e.pattern.glob,p.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}}));this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return p.getFileType(e)}async filter(e,t){const n=await Promise.all(e.files.map((async e=>{const n=t(e),i=n.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===n.scheme)if(t.matcher.match(i)){if(void 0===t.kind)return!0;const e=await this.getFileType(n);if(void 0===e)return this._client.info(`Unable to determine file type for ${n.toString()}. Treating as a match.`),!0;if(e===a.FileType.File&&t.kind===u.FileOperationPatternKind.file||e===a.FileType.Directory&&t.kind===u.FileOperationPatternKind.folder)return!0}else if(t.kind===u.FileOperationPatternKind.folder&&await p.getFileType(n)===a.FileType.Directory&&t.matcher.match(`${i}/`))return!0;return!1}))),i=e.files.filter(((e,t)=>n[t]));return{...e,files:i}}static async getFileType(e){try{return(await a.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){const t={dot:!0};return!0===e?.ignoreCase&&(t.nocase=!0),t}}class f extends p{_notificationType;_accessUri;_createParams;constructor(e,t,n,i,o,r,s){super(e,t,n,i,o),this._notificationType=n,this._accessUri=r,this._createParams=s}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>this._client.sendNotification(this._notificationType,this._createParams(e));return this.doSend(t,e)}}}class g extends f{_willListener;_fsPathFileTypes=new Map;async getFileType(e){const t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);const n=await p.getFileType(e);return n&&this._fsPathFileTypes.set(t,n),n}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),0===this.filterSize()&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}}t.DidCreateFilesFeature=class extends f{constructor(e){super(e,a.workspace.onDidCreateFiles,u.DidCreateFilesNotification.type,"didCreate","didCreate",(e=>e),e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.didCreateFiles?n.didCreateFiles(e,t):t(e)}},t.DidRenameFilesFeature=class extends g{constructor(e){super(e,a.workspace.onDidRenameFiles,u.DidRenameFilesNotification.type,"didRename","didRename",(e=>e.oldUri),e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=a.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,(e=>e.oldUri)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didRenameFiles?n.didRenameFiles(e,t):t(e)}},t.DidDeleteFilesFeature=class extends g{constructor(e){super(e,a.workspace.onDidDeleteFiles,u.DidDeleteFilesNotification.type,"didDelete","didDelete",(e=>e),e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=a.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,(e=>e)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didDeleteFiles?n.didDeleteFiles(e,t):t(e)}};class m extends p{_requestType;_accessUri;_createParams;constructor(e,t,n,i,o,r,s){super(e,t,n,i,o),this._requestType=n,this._accessUri=r,this._createParams=s}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e),e.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends m{constructor(e){super(e,a.workspace.onWillCreateFiles,u.WillCreateFilesRequest.type,"willCreate","willCreate",(e=>e),e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willCreateFiles?n.willCreateFiles(e,t):t(e)}},t.WillRenameFilesFeature=class extends m{constructor(e){super(e,a.workspace.onWillRenameFiles,u.WillRenameFilesRequest.type,"willRename","willRename",(e=>e.oldUri),e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willRenameFiles?n.willRenameFiles(e,t):t(e)}},t.WillDeleteFilesFeature=class extends m{constructor(e){super(e,a.workspace.onWillDeleteFiles,u.WillDeleteFilesRequest.type,"willDelete","willDelete",(e=>e),e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willDeleteFiles?n.willDeleteFiles(e,t):t(e)}}},9639:(e,t,n)=>{const i=n(7851);e.exports=(e,t,n)=>i(e,t,n)<=0},9761:(e,t,n)=>{const i=n(7851);e.exports=(e,t,n)=>i(e,t,n)>0},9805:(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,i=0,o=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(i=0;i<e.length;){switch(e[i]){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,i++;break e;default:t=0}break;default:t=0}i++}o+=e.byteLength,n++}if(4!==t)return;const r=this._read(o+i),s=new Map,a=this.toString(r,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const n=a[t],i=n.indexOf(":");if(-1===i)throw new Error(`Message header must separate key and value using ':'\n${n}`);const o=n.substr(0,i),r=n.substr(i+1).trim();s.set(e?o.toLowerCase():o,r)}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 i=this._chunks[0];if(i.byteLength>e){const o=i.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=i.slice(e),this._totalLength-=e,e-=e}else t.set(i,n),n+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,e-=i.byteLength}return t}}},9813:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=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,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=function(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)};const r=n(6132);o(n(6132),t),o(n(3147),t)},9896:e=>{"use strict";e.exports=require("fs")},9986:e=>{"use strict";function t(e,t,o){e instanceof RegExp&&(e=n(e,o)),t instanceof RegExp&&(t=n(t,o));var r=i(e,t,o);return r&&{start:r[0],end:r[1],pre:o.slice(0,r[0]),body:o.slice(r[0]+e.length,r[1]),post:o.slice(r[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function i(e,t,n){var i,o,r,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){if(e===t)return[c,u];for(i=[],r=n.length;l>=0&&!a;)l==c?(i.push(l),c=n.indexOf(e,l+1)):1==i.length?a=[i.pop(),u]:((o=i.pop())<r&&(r=o,s=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;i.length&&(a=[r,s])}return a}e.exports=t,t.range=i},9994:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const i=n(3147);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(i.SemanticTokensRefreshRequest.type),on:e=>{const t=i.SemanticTokensRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=i.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=i.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((n,i)=>e(n,i,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 i=e-1,o=t-1;for(;i>=n&&o>=n&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<n||o<n)&&(i++,o++);const r=i-n+1,s=this.modifiedSequence.slice(n,o+1);return 1===s.length&&s[0]===this.originalSequence[i]?[{start:n,deleteCount:r-1}]:[{start:n,deleteCount:r,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 r{_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,i,o){this._dataIsSortedAndDeltaEncoded&&(e<this._prevLine||e===this._prevLine&&t<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=r._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++]=i,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,i=0;const o=[];for(let r=0;r<t;r++){const t=5*r;let s=e[t],a=e[t+1];0===s?(s=n,a+=i):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,i=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 i=e[5*t],o=e[5*n];return i===o?e[5*t+1]-e[5*n+1]:i-o}));const i=[];let o=0,r=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],h=a-o,p=0===h?c-r:c,f=5*s;i[f+0]=h,i[f+1]=p,i[f+2]=u,i[f+3]=l,i[f+4]=d,o=a,r=c}return i}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:r._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=r}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},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 i=n(4396);module.exports=i})();
//# sourceMappingURL=extension.js.map