solorice/vscodium/extensions/ms-azuretools.vscode-docker-1.22.0/dist/compose-language-service/lib/server.js
2022-04-28 21:17:01 +03:00

2 lines
283 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

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

/*! For license information please see server.js.LICENSE.txt */
(()=>{"use strict";var e={93340:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSettingsNotification=t.DocumentSettingsRequest=t.CRLF=t.LF=void 0;const r=n(40273);t.LF=1,t.CRLF=2,function(e){e.method="$/textDocument/documentSettings",e.type=new r.RequestType(e.method)}(t.DocumentSettingsRequest||(t.DocumentSettingsRequest={})),function(e){e.method="$/textDocument/documentSettings/didChange",e.type=new r.NotificationType(e.method)}(t.DocumentSettingsNotification||(t.DocumentSettingsNotification={}))},83545:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initEvent=void 0,t.initEvent=function initEvent(e){return{eventName:e,properties:{isActivationEvent:"false",result:"Succeeded"},measurements:{},groupingStrategy:"eventNameAndProperties"}}},59271:function(e,t,n){var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyValueRegex=t.ComposeDocument=void 0;const s=n(35809),a=n(31040),c=n(93419),l=n(93340),u=n(53529),d=n(97797),f=1e6;class ComposeDocument{constructor(e){this.yamlDocument=new d.Lazy((()=>this.buildYamlDocument())),r.set(this,void 0),i(this,r,e,"f")}get textDocument(){return o(this,r,"f")}get id(){return{uri:this.textDocument.uri}}update(e){return i(this,r,e,"f"),this.yamlDocument.clear(),this}lineAt(e){const t="number"==typeof e?s.Position.create(e,0):s.Position.create(e.line,0),n=s.Position.create(t.line,f);if(t.line>this.textDocument.lineCount)throw new Error(`Requested line ${t.line} is out of bounds.`);return this.textDocument.getText(s.Range.create(t,n))}async getSettings(){var e,t,n;if(!this.documentSettings){const r=(0,u.getCurrentContext)();if(null===(n=null===(t=null===(e=r.clientCapabilities)||void 0===e?void 0:e.experimental)||void 0===t?void 0:t.documentSettings)||void 0===n?void 0:n.request){const e=await r.connection.sendRequest(l.DocumentSettingsRequest.type,{textDocument:this.id});e&&(this.documentSettings=e)}}return this.documentSettings||(this.documentSettings=this.guessDocumentSettings()),this.documentSettings}updateSettings(e){this.documentSettings=e}async getPositionInfo(e){const{tabSize:n}=await this.getSettings(),r=this.getFirstLinePositionInfo(e,n),i=[...r.pathParts];let o=r.cursorIndentDepth;for(let r=e.position.line-1;r>=0&&o>0;r--){const e=this.lineAt(r);let s,a=f;(s=h.exec(e))?(a=s.groups.indent.length/n,a<o&&(o=a,i.unshift(b))):(s=t.KeyValueRegex.exec(e))&&(a=s.groups.indent.length/n,(a<o||a===o&&i[0]===b)&&(o=a,i.unshift(s.groups.keyName)))}return{path:"/"+i.join("/"),indentDepth:r.cursorIndentDepth}}buildYamlDocument(){const e=(0,c.parseDocument)(this.textDocument.getText(),{merge:!0,prettyErrors:!0});if(!(0,c.isDocument)(e))throw new s.ResponseError(s.ErrorCodes.ParseError,"Malformed YAML document");return e}guessDocumentSettings(){var e;const t=this.textDocument.getText(),n=/\r/gi.test(t)?l.CRLF:l.LF;let r=2;const i=/^(?<indentation>[ ]+)(?<key>[.\w-]+:\s*)$/im.exec(t);return(null===(e=null==i?void 0:i.groups)||void 0===e?void 0:e.indentation)&&(r=i.groups.indentation.length),{eol:n,tabSize:r}}getFirstLinePositionInfo(e,n){const r=this.lineAt(e.position),i=[];let o,s=0;if(o=y.exec(r)){const t=r.indexOf(o.groups.commentSep);if(e.position.character>t)return{pathParts:[S],cursorIndentDepth:-1}}if(o=p.exec(r)){const t=r.indexOf(o.groups.itemInd),a=r.indexOf(o.groups.keyInd,t),c=o.groups.indent.length,l=o.groups.keyName;s=c/n,e.position.character>a?(i.unshift(v),i.unshift(l),i.unshift(b)):e.position.character===a?(i.unshift(w),i.unshift(l),i.unshift(b)):e.position.character>t?(i.unshift(l),i.unshift(b)):e.position.character===t?(i.unshift(w),i.unshift(b)):e.position.character<c&&(s=e.position.character/n)}else if(o=t.KeyValueRegex.exec(r)){const t=r.indexOf(o.groups.keyInd),a=o.groups.indent.length,c=o.groups.keyName;s=a/n,e.position.character>t?(i.unshift(v),i.unshift(c)):e.position.character===t?(i.unshift(w),i.unshift(c)):e.position.character>=a?i.unshift(c):e.position.character<a&&(s=e.position.character/n)}else if(o=h.exec(r)){const t=r.indexOf(o.groups.itemInd),a=o.groups.indent.length;s=a/n,e.position.character>t?(i.unshift(v),i.unshift(b)):e.position.character===t?(i.unshift(w),i.unshift(b)):e.position.character<a&&(s=e.position.character/n)}else if(o=m.exec(r)){const t=o.groups.indent.length;s=t/n,e.position.character>=t?i.unshift(v):e.position.character<t&&(s=e.position.character/n)}else if(o=g.exec(r)){const t=o.groups.indent.length;s=t/n,e.position.character<t&&(s=e.position.character/n)}return{pathParts:i,cursorIndentDepth:s}}}t.ComposeDocument=ComposeDocument,r=new WeakMap,ComposeDocument.DocumentManagerConfig={create:(e,t,n,r)=>new ComposeDocument(a.TextDocument.create(e,t,n,r)),update:(e,t,n)=>e.update(a.TextDocument.update(e.textDocument,t,n))},t.KeyValueRegex=/^(?<indent> *)(?<key>(?<keyName>[.\w-]+)(?<keyInd>(?<keySep>:) *))(?<value>.*)$/im;const h=/^(?<indent> *)(?<itemInd>(?<itemSep>-) *)(?<value>.*)$/im,p=/^(?<indent> *)(?<itemInd>(?<itemSep>-) *)(?<key>(?<keyName>[.\w-]+)(?<keyInd>(?<keySep>:) *))(?<value>.*)$/im,m=/^(?<indent> *)(?<value>\S+)$/im,g=/^(?<indent> *)$/im,y=/^.*(?<commentSep>#).*$/im,v="<value>",b="<item>",w="<sep>",S="<comment>"},72743:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ComposeLanguageService=void 0;const r=n(35809),i=n(93340),o=n(83545),s=n(59271),a=n(55634),c=n(81220),l=n(67957),u=n(38210),d=n(97900),f=n(53529),h=n(34884);t.ComposeLanguageService=class ComposeLanguageService{constructor(e,t){var n,o;this.connection=e,this.clientParams=t,this.documentManager=new r.TextDocuments(s.ComposeDocument.DocumentManagerConfig),this.subscriptions=[],this.createDocumentManagerHandler(this.documentManager.onDidChangeContent,new c.DiagnosticProvider(null===(n=t.initializationOptions)||void 0===n?void 0:n.diagnosticDelay)),this.createLspHandler(this.connection.onCompletion,new a.MultiCompletionProvider),this.createLspHandler(this.connection.onHover,new d.KeyHoverProvider),this.createLspHandler(this.connection.onDocumentLinks,new u.ImageLinkProvider),this.createLspHandler(this.connection.onDocumentFormatting,new l.DocumentFormattingProvider),this.connection.onNotification(i.DocumentSettingsNotification.method,(e=>this.onDidChangeDocumentSettings(e))),this.documentManager.listen(this.connection),this.subscriptions.push(this.telemetryAggregator=new h.TelemetryAggregator(this.connection,null===(o=t.initializationOptions)||void 0===o?void 0:o.telemetryAggregationInterval))}dispose(){for(const e of this.subscriptions)e.dispose()}get capabilities(){return{textDocumentSync:{openClose:!0,change:r.TextDocumentSyncKind.Incremental,willSave:!1,willSaveWaitUntil:!1,save:!1},completionProvider:{triggerCharacters:["-",":"," ",'"'],resolveProvider:!1},hoverProvider:!0,documentLinkProvider:{resolveProvider:!1},documentFormattingProvider:!0,workspace:{workspaceFolders:{supported:!0}}}}onDidChangeDocumentSettings(e){const t=this.documentManager.get(e.textDocument.uri);t&&t.updateSettings(e)}createLspHandler(e,t){e((async(e,n,i,o)=>await this.callWithTelemetryAndErrorHandling(t.constructor.name,(async()=>{const s=this.documentManager.get(e.textDocument.uri);if(!s)throw new r.ResponseError(r.ErrorCodes.InvalidParams,"Document not found in cache.");const a={...e,document:s};return await Promise.resolve(t.on(a,n,i,o))}))))}createDocumentManagerHandler(e,t){e((async e=>await this.callWithTelemetryAndErrorHandling(t.constructor.name,(async()=>{const n={...e,textDocument:e.document.id};return await Promise.resolve(t.on(n,r.CancellationToken.None))}))),this,this.subscriptions)}async callWithTelemetryAndErrorHandling(e,t){const n={clientCapabilities:this.clientParams.capabilities,connection:this.connection,telemetry:(0,o.initEvent)(e)},i=process.hrtime.bigint();try{return await(0,f.runWithContext)(n,t)}catch(e){let t,i;return e instanceof r.ResponseError?(t=e,i=e.stack):e instanceof Error?(t=new r.ResponseError(r.ErrorCodes.UnknownErrorCode,e.message,e),i=e.stack):t=new r.ResponseError(r.ErrorCodes.InternalError,e.toString?e.toString():"Unknown error"),n.telemetry.properties.result="Failed",n.telemetry.properties.error=t.code.toString(),n.telemetry.properties.errorMessage=t.message,n.telemetry.properties.stack=i,t}finally{const e=process.hrtime.bigint(),t=Number((e-i)/BigInt(1e3));n.telemetry.measurements.duration=t,this.telemetryAggregator.logEvent(n.telemetry)}}}},81220:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticProvider=void 0;const r=n(35809),i=n(53529),o=n(46160),s=n(33105),a=n(84775);class DiagnosticProvider extends a.ProviderBase{constructor(e=1e3){super(),this.diagnosticDelay=e}on(e){var t;const n=(0,i.getCurrentContext)();n.telemetry.suppressAll=!0,n.telemetry.properties.isActivationEvent="true",(null===(t=n.clientCapabilities.textDocument)||void 0===t?void 0:t.publishDiagnostics)&&(0,o.debounce)(this.diagnosticDelay,{uri:e.document.textDocument.uri,callId:"diagnostics"},(()=>{const t=[];for(const n of[...e.document.yamlDocument.value.errors,...e.document.yamlDocument.value.warnings])t.push(r.Diagnostic.create((0,s.yamlRangeToLspRange)(e.document.textDocument,n.pos),n.message,"YAMLWarning"===n.name?r.DiagnosticSeverity.Warning:r.DiagnosticSeverity.Error,n.code));n.connection.sendDiagnostics({uri:e.document.textDocument.uri,diagnostics:t})}),this)}}t.DiagnosticProvider=DiagnosticProvider},67957:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentFormattingProvider=void 0;const r=n(35809),i=n(84775);class DocumentFormattingProvider extends i.ProviderBase{on(e,t){if(e.document.yamlDocument.value.errors.length)return;const n={indent:e.options.tabSize,indentSeq:!0,simpleKeys:!0,nullStr:"",lineWidth:0},i=r.Range.create(e.document.textDocument.positionAt(0),e.document.textDocument.positionAt(e.document.textDocument.getText().length)),o=e.document.yamlDocument.value.toString(n);return[r.TextEdit.replace(i,o)]}}t.DocumentFormattingProvider=DocumentFormattingProvider},38210:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImageLinkProvider=void 0;const r=n(35809),i=n(93419),o=n(53529),s=n(33105),a=n(84775),c=/^(?<imageName>[.\w-]+)(?<tag>:[.\w-]+)?$/i,l=/^(?<namespace>[a-z0-9]+)\/(?<imageName>[.\w-]+)(?<tag>:[.\w-]+)?$/i,u=/^mcr.microsoft.com\/(?<namespace>([a-z0-9]+\/)+)(?<imageName>[.\w-]+)(?<tag>:[.\w-]+)?$/i;class ImageLinkProvider extends a.ProviderBase{on(e,t){const n=(0,o.getCurrentContext)();n.telemetry.properties.isActivationEvent="true";const a=[],c=new Set,l=e.document.yamlDocument.value.getIn(["services"]);if((0,i.isMap)(l))for(const n of l.items){if(t.isCancellationRequested)return;if((0,i.isMap)(n.value)){const t=n.value.getIn(["image"],!0);if(!n.value.has("build")&&(0,i.isScalar)(t)&&"string"==typeof t.value){const n=t.type===i.Scalar.QUOTE_SINGLE||t.type===i.Scalar.QUOTE_DOUBLE?1:0,o=ImageLinkProvider.getLinkForImage(t.value,c);o&&t.range&&a.push(r.DocumentLink.create((0,s.yamlRangeToLspRange)(e.document.textDocument,[n+t.range[0]+o.start,n+t.range[0]+o.start+o.length]),o.uri))}}}return n.telemetry.properties.imageTypes=Array.from(c.values()).sort().join(","),a}static getLinkForImage(e,t){var n,r,i,o,s,a;let d,f,h;return(d=c.exec(e))&&(h=null===(n=d.groups)||void 0===n?void 0:n.imageName)?(t.add("dockerHub"),{uri:`https://hub.docker.com/_/${h}`,start:d.index,length:h.length}):(d=l.exec(e))&&(f=null===(r=d.groups)||void 0===r?void 0:r.namespace)&&(h=null===(i=d.groups)||void 0===i?void 0:i.imageName)?(t.add("dockerHubNamespaced"),{uri:`https://hub.docker.com/r/${f}/${h}`,start:d.index,length:f.length+1+h.length}):(d=u.exec(e))&&(f=null===(s=null===(o=d.groups)||void 0===o?void 0:o.namespace)||void 0===s?void 0:s.replace(/\/$/,""))&&(h=null===(a=d.groups)||void 0===a?void 0:a.imageName)?(t.add("mcr"),{uri:`https://hub.docker.com/_/microsoft-${f.replace("/","-")}-${h}`,start:d.index,length:18+f.length+1+h.length}):void 0}}t.ImageLinkProvider=ImageLinkProvider},97900:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KeyHoverProvider=void 0;const r=n(35809),i=n(59271),o=n(53529),s=n(84775);class KeyHoverProvider extends s.ProviderBase{async on(e,t){var n,s,c;const l=(0,o.getCurrentContext)();l.telemetry.groupingStrategy="eventName";const u=null===(s=null===(n=l.clientCapabilities.textDocument)||void 0===n?void 0:n.hover)||void 0===s?void 0:s.contentFormat,d=!!(null==u?void 0:u.length)&&(null==u?void 0:u[0])===r.MarkupKind.Markdown,f=await e.document.getPositionInfo(e);for(const t of a){const n=t.pathRegex.exec(f.path);if(!n)continue;const o=e.document.lineAt(e.position),s=i.KeyValueRegex.exec(o),a=n.groups.keyName,u=null===(c=null==s?void 0:s.groups)||void 0===c?void 0:c.keyName;if(u===a){const n=o.indexOf(u);return l.telemetry.properties.keyName=u,{contents:{kind:d?r.MarkupKind.Markdown:r.MarkupKind.PlainText,value:d&&t.markdownContents||t.plaintextContents},range:r.Range.create(r.Position.create(e.position.line,n),r.Position.create(e.position.line,n+u.length))}}}}}t.KeyHoverProvider=KeyHoverProvider;const a=[{pathRegex:/^\/(?<keyName>configs)$/i,plaintextContents:"Configurations for services in the project"},{pathRegex:/^\/(?<keyName>networks)$/i,plaintextContents:"Networks that are shared among multiple services"},{pathRegex:/^\/networks\/[.\w-]+\/(?<keyName>driver)$/i,plaintextContents:"The driver used for this network"},{pathRegex:/^\/(?<keyName>secrets)$/i,plaintextContents:"Secrets that are shared among multiple services"},{pathRegex:/^\/(?<keyName>services)$/i,plaintextContents:"The services in your project"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>build)$/i,plaintextContents:"The context used for building the image"},{pathRegex:/^\/services\/[.\w-]+\/build\/(?<keyName>args)$/i,plaintextContents:"Arguments used during the image build process"},{pathRegex:/^\/services\/[.\w-]+\/build\/(?<keyName>context)$/i,plaintextContents:"The context used for building the image"},{pathRegex:/^\/services\/[.\w-]+\/build\/(?<keyName>dockerfile)$/i,plaintextContents:"The Dockerfile used for building the image"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>command)$/i,plaintextContents:"The command that will be run in the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>container_name)$/i,plaintextContents:"The name that will be given to the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>depends_on)$/i,plaintextContents:"Other services that this service depends on, which will be started before this one"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>entrypoint)$/i,plaintextContents:"The entrypoint to the application in the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>env_file)$/i,plaintextContents:"Files containing environment variables that will be included"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>environment)$/i,plaintextContents:"Environment variables that will be included"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>expose)$/i,plaintextContents:"Ports exposed to the other services but not to the host machine"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>healthcheck)$/i,plaintextContents:"A command for checking if the container is healthy"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>image)$/i,plaintextContents:"The image that will be pulled for the service. If `build` is specified, the built image will be given this tag."},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>labels)$/i,plaintextContents:"Labels that will be given to the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>logging)$/i,plaintextContents:"Settings for logging for this service"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>networks)$/i,plaintextContents:"The service will be included in these networks, allowing it to reach other containers on the same network"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>ports)$/i,plaintextContents:"Ports that will be exposed to the host"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>profiles)$/i,plaintextContents:"Profiles that this service is a part of. When the profile is started, this service will be started."},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>secrets)$/i,plaintextContents:"Secrets the service will have access to"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>user)$/i,plaintextContents:"The username under which the app in the container will be started"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>volumes)$/i,plaintextContents:"Named volumes and paths on the host mapped to paths in the container"},{pathRegex:/^\/services\/[.\w-]+\/(?<keyName>working_dir)$/i,plaintextContents:"The working directory in which the entrypoint or command will be run"},{pathRegex:/^\/(?<keyName>version)$/i,plaintextContents:"The version of the Docker Compose document"},{pathRegex:/^\/(?<keyName>volumes)$/i,plaintextContents:"Named volumes that are shared among multiple services"},{pathRegex:/^\/volumes\/[.\w-]+\/(?<keyName>driver)$/i,plaintextContents:"The driver used for this volume"}]},84775:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderBase=void 0;t.ProviderBase=class ProviderBase{}},12819:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BuildCompletionCollection=void 0;const r=n(35809),i=n(67810);t.BuildCompletionCollection=new i.CompletionCollection("build",{logicalPaths:[/^\/services\/[.\w-]+\/build$/i,/^\/services\/[.\w-]+\/build\/<value>$/i],indentationDepth:3},...[{label:"args:",insertText:"args:\n\t- ${1:name}=${2:value}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"context:",insertText:"context: ${1:buildContext}$0",insertTextFormat:r.InsertTextFormat.Snippet},{label:"dockerfile:",insertText:"dockerfile: ${1:dockerfile}$0",insertTextFormat:r.InsertTextFormat.Snippet},{label:"labels:",insertText:"labels:\n\t- ${1:com.host.description}=${2:label}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"network:",insertText:"network: ${1:networkName}$0",insertTextFormat:r.InsertTextFormat.Snippet},{label:"target:",insertText:"target: ${1:targetStage}$0",insertTextFormat:r.InsertTextFormat.Snippet}])},67810:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionCollection=void 0;t.CompletionCollection=class CompletionCollection extends Array{constructor(e,t,...n){super(...n),this.name=e,this.locationRequirements=t}getActiveCompletionItems(e){if(void 0!==this.locationRequirements.logicalPaths&&!this.locationRequirements.logicalPaths.some((t=>{var n;return t.test(null!==(n=e.positionInfo.path)&&void 0!==n?n:"")})))return;if(void 0!==this.locationRequirements.indentationDepth&&this.locationRequirements.indentationDepth!==e.positionInfo.indentDepth)return;const t=e.document.lineAt(e.position);return this.filter((e=>!e.matcher||e.matcher.test(t)))}}},55634:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MultiCompletionProvider=void 0;const r=n(53529),i=n(84775),o=n(12819),s=n(88229),a=n(61311),c=n(59600),l=n(98722);class MultiCompletionProvider extends i.ProviderBase{constructor(){super(),this.completionCollections=[a.RootCompletionCollection,c.ServiceCompletionCollection,o.BuildCompletionCollection,l.VolumesCompletionCollection,s.PortsCompletionCollection]}async on(e,t,n){const i=(0,r.getCurrentContext)(),o={...e,positionInfo:await e.document.getPositionInfo(e)},s=[],a=[];for(const e of this.completionCollections){if(t.isCancellationRequested)return;const n=e.getActiveCompletionItems(o);(null==n?void 0:n.length)&&(a.push(e.name),s.push(...n)),i.telemetry.properties.respondingCollections=a.sort().join(",")}return s.length>0?s:void 0}}t.MultiCompletionProvider=MultiCompletionProvider},88229:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PortsCompletionCollection=void 0;const r=n(35809),i=n(67810),o=/(\s*-\s*)(?<leadingQuote>"|')?\2\s*$/i;t.PortsCompletionCollection=new i.CompletionCollection("ports",{logicalPaths:[/^\/services\/[.\w-]+\/ports\/<item>\/.*$/i],indentationDepth:3},...[{matcher:o,label:"containerPort",insertText:'"${1:80}"$0',insertTextFormat:r.InsertTextFormat.Snippet},{matcher:o,label:"hostPort:containerPort",insertText:'"${1:8080}:${2:80}"$0',insertTextFormat:r.InsertTextFormat.Snippet},{matcher:o,label:"hostPort:containerPort/protocol",insertText:'"${1:8080}:${2:80}/${3|tcp,udp|}"$0',insertTextFormat:r.InsertTextFormat.Snippet},{matcher:o,label:"hostRange:containerRange",insertText:'"${1:8080}-${2:8081}:${3:80}-${4:81}"$0',insertTextFormat:r.InsertTextFormat.Snippet},{matcher:o,label:"(Long form port specification)",insertText:"target: ${1:80}\n published: ${2:8080}\n protocol: ${3|tcp,udp|}\n mode: ${4|host,ingress|}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation,documentation:"target: <containerPort>\n published: <hostPort>\n protocol: <udp, tcp>\n mode: <host, ingress>",sortText:"zzz"}])},61311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RootCompletionCollection=void 0;const r=n(35809),i=n(67810);t.RootCompletionCollection=new i.CompletionCollection("root",{logicalPaths:[/^\/$/i,/^\/<value>$/i],indentationDepth:0},...[{label:"configs:",insertText:"configs:\n",insertTextFormat:r.InsertTextFormat.PlainText},{label:"networks:",insertText:"networks:\n",insertTextFormat:r.InsertTextFormat.PlainText},{label:"secrets:",insertText:"secrets:\n",insertTextFormat:r.InsertTextFormat.PlainText},{label:"services:",insertText:"services:\n",insertTextFormat:r.InsertTextFormat.PlainText},{label:"version:",insertText:"version: '${1:version}'$0",insertTextFormat:r.InsertTextFormat.Snippet},{label:"volumes:",insertText:"volumes:\n",insertTextFormat:r.InsertTextFormat.PlainText}])},59600:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceCompletionCollection=void 0;const r=n(35809),i=n(67810);t.ServiceCompletionCollection=new i.CompletionCollection("service",{logicalPaths:[/^\/services\/[.\w-]+$/i,/^\/services\/[.\w-]+\/<value>$/i],indentationDepth:2},...[{label:"build:",insertText:"build: ${1:path}$0",insertTextFormat:r.InsertTextFormat.Snippet,detail:"Short form",documentation:"build: <path>"},{label:"build:",insertText:"build:\n\tcontext: ${1:contextPath}\n\tdockerfile: ${2:Dockerfile}",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation,detail:"Long form",documentation:"build:\n\tcontext: <contextPath>\n\tdockerfile: <Dockerfile>"},{label:"command:",insertText:"command: ${1:command}$0",insertTextFormat:r.InsertTextFormat.Snippet,detail:"String form",documentation:"command: echo hello"},{label:"command:",insertText:'command: ["${1:executable}", "${2:arg}"]$0',insertTextFormat:r.InsertTextFormat.Snippet,detail:"List form",documentation:'command: ["echo", "hello"]'},{label:"container_name:",insertText:"container_name: ${1:name}$0",insertTextFormat:r.InsertTextFormat.Snippet},{label:"depends_on:",insertText:"depends_on:\n\t- ${1:serviceName}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"entrypoint:",insertText:"entrypoint: ${1:entrypoint}$0",insertTextFormat:r.InsertTextFormat.Snippet,detail:"String form",documentation:"entrypoint: /app/start.sh"},{label:"entrypoint:",insertText:'entrypoint: ["${1:executable}", "${2:arg}"]$0',insertTextFormat:r.InsertTextFormat.Snippet,detail:"List form",documentation:'entrypoint: ["echo", "hello"]'},{label:"env_file:",insertText:"env_file:\n\t- ${1:fileName}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"environment:",insertText:"environment:\n\t- ${1:name}=${2:value}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"expose:",insertText:"expose:\n\t- ${1:1234}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"healthcheck:",insertText:'healthcheck:\n\ttest: ["${1:executable}", "${2:arg}"]\n\tinterval: ${3:1m30s}\n\ttimeout: ${4:30s}\n\tretries: ${5:5}\n\tstart_period: ${6:30s}$0',insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"image:",insertText:"image: ${1:imageName}$0",insertTextFormat:r.InsertTextFormat.Snippet},{label:"labels:",insertText:"labels:\n\t- ${1:com.host.description}=${2:label}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"networks:",insertText:"networks:\n\t- ${1:networkName}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"ports:",insertText:"ports:\n\t-$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"profiles:",insertText:"profiles:\n\t- ${1:profileName}$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation},{label:"volumes:",insertText:"volumes:\n\t-$0",insertTextFormat:r.InsertTextFormat.Snippet,insertTextMode:r.InsertTextMode.adjustIndentation}])},98722:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VolumesCompletionCollection=void 0;const r=n(35809),i=n(67810);t.VolumesCompletionCollection=new i.CompletionCollection("volumes",{logicalPaths:[/^\/services\/[.\w-]+\/volumes\/<item>\/.*$/i],indentationDepth:3},...[{matcher:/(\s*-\s*)(?<leadingQuote>"|')?\2\s*$/i,label:"hostPath:containerPath:mode",insertText:"${1:hostPath}:${2:containerPath}:${3|ro,rw|}$0",insertTextFormat:r.InsertTextFormat.Snippet},{matcher:/(\s*-\s*)(?<leadingQuote>"|')?\2\s*$/i,label:"volumeName:containerPath:mode",insertText:"${1:volumeName}:${2:containerPath}:${3|ro,rw|}$0",insertTextFormat:r.InsertTextFormat.Snippet},{matcher:/(\s*-\s*)(?<leadingQuote>"|')?(([a-z]:\\)?[^:"]+):\2\s*$/i,label:":containerPath:mode",insertText:"${1:containerPath}:${2|ro,rw|}$0",insertTextFormat:r.InsertTextFormat.Snippet},{matcher:/(\s*-\s*)(?<leadingQuote>"|')?(([a-z]:\\)?[^:"]+):(([a-z]:\\)?[^:"]+):\2\s*$/i,label:":ro",insertText:"ro",insertTextFormat:r.InsertTextFormat.PlainText,detail:"Read-only"},{matcher:/(\s*-\s*)(?<leadingQuote>"|')?(([a-z]:\\)?[^:"]+):(([a-z]:\\)?[^:"]+):\2\s*$/i,label:":rw",insertText:"rw",insertTextFormat:r.InsertTextFormat.PlainText,detail:"Read-write"}])},53529:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runWithContext=t.getCurrentContext=void 0;const r=n(50852),i=n(35809),o=new r.AsyncLocalStorage;t.getCurrentContext=function getCurrentContext(){const e=o.getStore();if(!e)throw new i.ResponseError(i.ErrorCodes.InternalError,"Failed to get action context");return e},t.runWithContext=function runWithContext(e,t){return o.run(e,t)}},97797:function(e,t){var n,r=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(t,"__esModule",{value:!0}),t.Lazy=void 0;t.Lazy=class Lazy{constructor(e){this.valueFactory=e,n.set(this,void 0)}get value(){return void 0===r(this,n,"f")&&i(this,n,this.valueFactory(),"f"),r(this,n,"f")}hasValue(){return void 0!==r(this,n,"f")}clear(){i(this,n,void 0,"f")}},n=new WeakMap},46160:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;const n={};t.debounce=function debounce(e,t,r,i){const o=`${t.uri}/${t.callId}`;n[o]&&(n[o].dispose(),delete n[o]);const s=setTimeout((()=>{n[o].dispose(),delete n[o],r.call(i)}),e);n[o]={dispose:()=>clearTimeout(s)}}},34884:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryAggregator=void 0;const r=n(83545),i=n(52947);t.TelemetryAggregator=class TelemetryAggregator{constructor(e,t=6e4){this.connection=e,this.interval=t,this.eventBuffer=[],this.timer=setInterval((()=>this.flush()),this.interval)}dispose(){clearInterval(this.timer),this.flush()}logEvent(e){e.suppressAll||"Succeeded"===e.properties.result&&e.suppressIfSuccessful||("Failed"===e.properties.result?this.connection.telemetry.logEvent(e):this.eventBuffer.push(e))}flush(){try{for(const e of this.getAggregatedEvents())this.connection.telemetry.logEvent(e)}catch(e){const t=e instanceof Error?e:Error(e.toString()),n=(0,r.initEvent)("telemetryaggregatorfailure");n.properties.result="Failed",n.properties.error=t.name,n.properties.errorMessage=t.message,n.properties.stack=t.stack,this.connection.telemetry.logEvent(n)}finally{this.eventBuffer=[]}}getAggregatedEvents(){const e=[],t=new Map;for(const e of this.eventBuffer){let n;if("eventNameAndProperties"===e.groupingStrategy)n=e.eventName+JSON.stringify(e.properties);else n=e.eventName;t.has(n)||t.set(n,[]),t.get(n).push(e)}for(const n of t.values()){const t=n[0].eventName,o=(0,r.initEvent)(t),s=n.map((e=>{var t;return null!==(t=e.measurements.duration)&&void 0!==t?t:void 0})).filter((e=>void 0!==e))||[],a=(0,i.logNormal)(s);o.measurements.count=n.length,o.measurements.durationMu=a.mu,o.measurements.durationSigma=a.sigma,o.measurements.durationMedian=a.median,n.forEach((e=>Object.assign(o.properties,e.properties))),e.push(o)}return e}}},52947:(e,t)=>{function sum(e){return e.reduce(((e,t)=>e+t),0)}function sq(e){return Math.pow(e,2)}function ln(e){return Math.log(e)}function round(e,t=3){const n=Math.pow(10,t);return Math.round(e*n)/n}Object.defineProperty(t,"__esModule",{value:!0}),t.logNormal=void 0,t.logNormal=function logNormal(e){if(!(null==e?void 0:e.length))return{mu:0,sigma:0,median:0};if(1===e.length)return{median:round(e[0],3),mu:round(ln(e[0]),3),sigma:0};const t=e.length,n=e.map((e=>ln(e))),r=n.map((e=>sq(e))),i=sum(n)/t,o=Math.sqrt((t*sum(r)-sq(sum(n)))/(t*(t-1)));return{mu:round(i,3),sigma:round(o,3),median:round(Math.pow(Math.E,i),0)}}},33105:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.yamlRangeToLspRange=void 0,t.yamlRangeToLspRange=function yamlRangeToLspRange(e,t){return{start:e.positionAt(t[0]),end:e.positionAt(t[1])}}},61949:(e,t,n)=>{var r,i,o,s,a,c,l,u,d,f,h,p,m,g,y,v,b,w,S,k,T,R,C,P,_,x;n.r(t),n.d(t,{AnnotatedTextEdit:()=>T,ChangeAnnotation:()=>S,ChangeAnnotationIdentifier:()=>k,CodeAction:()=>ee,CodeActionContext:()=>Z,CodeActionKind:()=>X,CodeDescription:()=>y,CodeLens:()=>te,Color:()=>l,ColorInformation:()=>u,ColorPresentation:()=>d,Command:()=>b,CompletionItem:()=>$,CompletionItemKind:()=>I,CompletionItemTag:()=>L,CompletionList:()=>W,CreateFile:()=>C,DeleteFile:()=>_,Diagnostic:()=>v,DiagnosticRelatedInformation:()=>p,DiagnosticSeverity:()=>m,DiagnosticTag:()=>g,DocumentHighlight:()=>Y,DocumentHighlightKind:()=>V,DocumentLink:()=>re,DocumentSymbol:()=>G,EOL:()=>le,FoldingRange:()=>h,FoldingRangeKind:()=>f,FormattingOptions:()=>ne,Hover:()=>B,InsertReplaceEdit:()=>F,InsertTextFormat:()=>A,InsertTextMode:()=>j,Location:()=>a,LocationLink:()=>c,MarkedString:()=>U,MarkupContent:()=>q,MarkupKind:()=>M,OptionalVersionedTextDocumentIdentifier:()=>D,ParameterInformation:()=>K,Position:()=>o,Range:()=>s,RenameFile:()=>P,SelectionRange:()=>ie,SignatureInformation:()=>H,SymbolInformation:()=>Q,SymbolKind:()=>z,SymbolTag:()=>J,TextDocument:()=>ce,TextDocumentEdit:()=>R,TextDocumentIdentifier:()=>E,TextDocumentItem:()=>O,TextEdit:()=>w,VersionedTextDocumentIdentifier:()=>N,WorkspaceChange:()=>ae,WorkspaceEdit:()=>x,integer:()=>r,uinteger:()=>i}),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(r||(r={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.create=function create(e,t){return e===Number.MAX_VALUE&&(e=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.MAX_VALUE),{line:e,character:t}},e.is=function is(e){var t=e;return ue.objectLiteral(t)&&ue.uinteger(t.line)&&ue.uinteger(t.character)}}(o||(o={})),function(e){e.create=function create(e,t,n,r){if(ue.uinteger(e)&&ue.uinteger(t)&&ue.uinteger(n)&&ue.uinteger(r))return{start:o.create(e,t),end:o.create(n,r)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function is(e){var t=e;return ue.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}}(s||(s={})),function(e){e.create=function create(e,t){return{uri:e,range:t}},e.is=function is(e){var t=e;return ue.defined(t)&&s.is(t.range)&&(ue.string(t.uri)||ue.undefined(t.uri))}}(a||(a={})),function(e){e.create=function create(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function is(e){var t=e;return ue.defined(t)&&s.is(t.targetRange)&&ue.string(t.targetUri)&&(s.is(t.targetSelectionRange)||ue.undefined(t.targetSelectionRange))&&(s.is(t.originSelectionRange)||ue.undefined(t.originSelectionRange))}}(c||(c={})),function(e){e.create=function create(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function is(e){var t=e;return ue.numberRange(t.red,0,1)&&ue.numberRange(t.green,0,1)&&ue.numberRange(t.blue,0,1)&&ue.numberRange(t.alpha,0,1)}}(l||(l={})),function(e){e.create=function create(e,t){return{range:e,color:t}},e.is=function is(e){var t=e;return s.is(t.range)&&l.is(t.color)}}(u||(u={})),function(e){e.create=function create(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function is(e){var t=e;return ue.string(t.label)&&(ue.undefined(t.textEdit)||w.is(t))&&(ue.undefined(t.additionalTextEdits)||ue.typedArray(t.additionalTextEdits,w.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(f||(f={})),function(e){e.create=function create(e,t,n,r,i){var o={startLine:e,endLine:t};return ue.defined(n)&&(o.startCharacter=n),ue.defined(r)&&(o.endCharacter=r),ue.defined(i)&&(o.kind=i),o},e.is=function is(e){var t=e;return ue.uinteger(t.startLine)&&ue.uinteger(t.startLine)&&(ue.undefined(t.startCharacter)||ue.uinteger(t.startCharacter))&&(ue.undefined(t.endCharacter)||ue.uinteger(t.endCharacter))&&(ue.undefined(t.kind)||ue.string(t.kind))}}(h||(h={})),function(e){e.create=function create(e,t){return{location:e,message:t}},e.is=function is(e){var t=e;return ue.defined(t)&&a.is(t.location)&&ue.string(t.message)}}(p||(p={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(m||(m={})),function(e){e.Unnecessary=1,e.Deprecated=2}(g||(g={})),function(e){e.is=function is(e){var t=e;return null!=t&&ue.string(t.href)}}(y||(y={})),function(e){e.create=function create(e,t,n,r,i,o){var s={range:e,message:t};return ue.defined(n)&&(s.severity=n),ue.defined(r)&&(s.code=r),ue.defined(i)&&(s.source=i),ue.defined(o)&&(s.relatedInformation=o),s},e.is=function is(e){var t,n=e;return ue.defined(n)&&s.is(n.range)&&ue.string(n.message)&&(ue.number(n.severity)||ue.undefined(n.severity))&&(ue.integer(n.code)||ue.string(n.code)||ue.undefined(n.code))&&(ue.undefined(n.codeDescription)||ue.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(ue.string(n.source)||ue.undefined(n.source))&&(ue.undefined(n.relatedInformation)||ue.typedArray(n.relatedInformation,p.is))}}(v||(v={})),function(e){e.create=function create(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return ue.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function is(e){var t=e;return ue.defined(t)&&ue.string(t.title)&&ue.string(t.command)}}(b||(b={})),function(e){e.replace=function replace(e,t){return{range:e,newText:t}},e.insert=function insert(e,t){return{range:{start:e,end:e},newText:t}},e.del=function del(e){return{range:e,newText:""}},e.is=function is(e){var t=e;return ue.objectLiteral(t)&&ue.string(t.newText)&&s.is(t.range)}}(w||(w={})),function(e){e.create=function create(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function is(e){var t=e;return void 0!==t&&ue.objectLiteral(t)&&ue.string(t.label)&&(ue.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(ue.string(t.description)||void 0===t.description)}}(S||(S={})),function(e){e.is=function is(e){return"string"==typeof e}}(k||(k={})),function(e){e.replace=function replace(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function insert(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function del(e,t){return{range:e,newText:"",annotationId:t}},e.is=function is(e){var t=e;return w.is(t)&&(S.is(t.annotationId)||k.is(t.annotationId))}}(T||(T={})),function(e){e.create=function create(e,t){return{textDocument:e,edits:t}},e.is=function is(e){var t=e;return ue.defined(t)&&D.is(t.textDocument)&&Array.isArray(t.edits)}}(R||(R={})),function(e){e.create=function create(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function is(e){var t=e;return t&&"create"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||k.is(t.annotationId))}}(C||(C={})),function(e){e.create=function create(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function is(e){var t=e;return t&&"rename"===t.kind&&ue.string(t.oldUri)&&ue.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||k.is(t.annotationId))}}(P||(P={})),function(e){e.create=function create(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function is(e){var t=e;return t&&"delete"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ue.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ue.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||k.is(t.annotationId))}}(_||(_={})),function(e){e.is=function is(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return ue.string(e.kind)?C.is(e)||P.is(e)||_.is(e):R.is(e)})))}}(x||(x={}));var E,N,D,O,M,q,I,A,L,F,j,$,W,U,B,K,H,V,Y,z,J,Q,G,X,Z,ee,te,ne,re,ie,oe=function(){function TextEditChangeImpl(e,t){this.edits=e,this.changeAnnotations=t}return TextEditChangeImpl.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=w.insert(e,t):k.is(n)?(i=n,r=T.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=T.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},TextEditChangeImpl.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=w.replace(e,t):k.is(n)?(i=n,r=T.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=T.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},TextEditChangeImpl.prototype.delete=function(e,t){var n,r;if(void 0===t?n=w.del(e):k.is(t)?(r=t,n=T.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=T.del(e,r)),this.edits.push(n),void 0!==r)return r},TextEditChangeImpl.prototype.add=function(e){this.edits.push(e)},TextEditChangeImpl.prototype.all=function(){return this.edits},TextEditChangeImpl.prototype.clear=function(){this.edits.splice(0,this.edits.length)},TextEditChangeImpl.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},TextEditChangeImpl}(),se=function(){function ChangeAnnotations(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return ChangeAnnotations.prototype.all=function(){return this._annotations},Object.defineProperty(ChangeAnnotations.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),ChangeAnnotations.prototype.manage=function(e,t){var n;if(k.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},ChangeAnnotations.prototype.nextId=function(){return this._counter++,this._counter.toString()},ChangeAnnotations}(),ae=function(){function WorkspaceChange(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new se(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(R.is(e)){var n=new oe(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new oe(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}return Object.defineProperty(WorkspaceChange.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),WorkspaceChange.prototype.getTextEditChange=function(e){if(D.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new oe(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new oe(i),this._textEditChanges[e]=r}return r},WorkspaceChange.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new se,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},WorkspaceChange.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},WorkspaceChange.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(S.is(t)||k.is(t)?r=t:n=t,void 0===r?i=C.create(e,n):(o=k.is(r)?r:this._changeAnnotations.manage(r),i=C.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},WorkspaceChange.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(S.is(n)||k.is(n)?i=n:r=n,void 0===i?o=P.create(e,t,r):(s=k.is(i)?i:this._changeAnnotations.manage(i),o=P.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},WorkspaceChange.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(S.is(t)||k.is(t)?r=t:n=t,void 0===r?i=_.create(e,n):(o=k.is(r)?r:this._changeAnnotations.manage(r),i=_.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},WorkspaceChange}();!function(e){e.create=function create(e){return{uri:e}},e.is=function is(e){var t=e;return ue.defined(t)&&ue.string(t.uri)}}(E||(E={})),function(e){e.create=function create(e,t){return{uri:e,version:t}},e.is=function is(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&ue.integer(t.version)}}(N||(N={})),function(e){e.create=function create(e,t){return{uri:e,version:t}},e.is=function is(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&(null===t.version||ue.integer(t.version))}}(D||(D={})),function(e){e.create=function create(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function is(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&ue.string(t.languageId)&&ue.integer(t.version)&&ue.string(t.text)}}(O||(O={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(M||(M={})),function(e){e.is=function is(t){var n=t;return n===e.PlainText||n===e.Markdown}}(M||(M={})),function(e){e.is=function is(e){var t=e;return ue.objectLiteral(e)&&M.is(t.kind)&&ue.string(t.value)}}(q||(q={})),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}(I||(I={})),function(e){e.PlainText=1,e.Snippet=2}(A||(A={})),function(e){e.Deprecated=1}(L||(L={})),function(e){e.create=function create(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function is(e){var t=e;return t&&ue.string(t.newText)&&s.is(t.insert)&&s.is(t.replace)}}(F||(F={})),function(e){e.asIs=1,e.adjustIndentation=2}(j||(j={})),function(e){e.create=function create(e){return{label:e}}}($||($={})),function(e){e.create=function create(e,t){return{items:e||[],isIncomplete:!!t}}}(W||(W={})),function(e){e.fromPlainText=function fromPlainText(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function is(e){var t=e;return ue.string(t)||ue.objectLiteral(t)&&ue.string(t.language)&&ue.string(t.value)}}(U||(U={})),function(e){e.is=function is(e){var t=e;return!!t&&ue.objectLiteral(t)&&(q.is(t.contents)||U.is(t.contents)||ue.typedArray(t.contents,U.is))&&(void 0===e.range||s.is(e.range))}}(B||(B={})),function(e){e.create=function create(e,t){return t?{label:e,documentation:t}:{label:e}}}(K||(K={})),function(e){e.create=function create(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return ue.defined(t)&&(i.documentation=t),ue.defined(n)?i.parameters=n:i.parameters=[],i}}(H||(H={})),function(e){e.Text=1,e.Read=2,e.Write=3}(V||(V={})),function(e){e.create=function create(e,t){var n={range:e};return ue.number(t)&&(n.kind=t),n}}(Y||(Y={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(z||(z={})),function(e){e.Deprecated=1}(J||(J={})),function(e){e.create=function create(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o}}(Q||(Q={})),function(e){e.create=function create(e,t,n,r,i,o){var s={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(s.children=o),s},e.is=function is(e){var t=e;return t&&ue.string(t.name)&&ue.number(t.kind)&&s.is(t.range)&&s.is(t.selectionRange)&&(void 0===t.detail||ue.string(t.detail))&&(void 0===t.deprecated||ue.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(G||(G={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(X||(X={})),function(e){e.create=function create(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},e.is=function is(e){var t=e;return ue.defined(t)&&ue.typedArray(t.diagnostics,v.is)&&(void 0===t.only||ue.typedArray(t.only,ue.string))}}(Z||(Z={})),function(e){e.create=function create(e,t,n){var r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):b.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function is(e){var t=e;return t&&ue.string(t.title)&&(void 0===t.diagnostics||ue.typedArray(t.diagnostics,v.is))&&(void 0===t.kind||ue.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||b.is(t.command))&&(void 0===t.isPreferred||ue.boolean(t.isPreferred))&&(void 0===t.edit||x.is(t.edit))}}(ee||(ee={})),function(e){e.create=function create(e,t){var n={range:e};return ue.defined(t)&&(n.data=t),n},e.is=function is(e){var t=e;return ue.defined(t)&&s.is(t.range)&&(ue.undefined(t.command)||b.is(t.command))}}(te||(te={})),function(e){e.create=function create(e,t){return{tabSize:e,insertSpaces:t}},e.is=function is(e){var t=e;return ue.defined(t)&&ue.uinteger(t.tabSize)&&ue.boolean(t.insertSpaces)}}(ne||(ne={})),function(e){e.create=function create(e,t,n){return{range:e,target:t,data:n}},e.is=function is(e){var t=e;return ue.defined(t)&&s.is(t.range)&&(ue.undefined(t.target)||ue.string(t.target))}}(re||(re={})),function(e){e.create=function create(e,t){return{range:e,parent:t}},e.is=function is(t){var n=t;return void 0!==n&&s.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ie||(ie={}));var ce,le=["\n","\r\n","\r"];!function(e){function mergeSort(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);mergeSort(r,t),mergeSort(i,t);for(var o=0,s=0,a=0;o<r.length&&s<i.length;){var c=t(r[o],i[s]);e[a++]=c<=0?r[o++]:i[s++]}for(;o<r.length;)e[a++]=r[o++];for(;s<i.length;)e[a++]=i[s++];return e}e.create=function create(e,t,n,r){return new de(e,t,n,r)},e.is=function is(e){var t=e;return!!(ue.defined(t)&&ue.string(t.uri)&&(ue.undefined(t.languageId)||ue.string(t.languageId))&&ue.uinteger(t.lineCount)&&ue.func(t.getText)&&ue.func(t.positionAt)&&ue.func(t.offsetAt))},e.applyEdits=function applyEdits(e,t){for(var n=e.getText(),r=mergeSort(t,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=n.length,o=r.length-1;o>=0;o--){var s=r[o],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=i))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),i=a}return n}}(ce||(ce={}));var ue,de=function(){function FullTextDocument(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(FullTextDocument.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(FullTextDocument.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(FullTextDocument.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),FullTextDocument.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},FullTextDocument.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},FullTextDocument.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},FullTextDocument.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return o.create(0,e);for(;n<r;){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var s=n-1;return o.create(s,e-t[s])},FullTextDocument.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(FullTextDocument.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),FullTextDocument}();!function(e){var t=Object.prototype.toString;e.defined=function defined(e){return void 0!==e},e.undefined=function undefined(e){return void 0===e},e.boolean=function boolean(e){return!0===e||!1===e},e.string=function string(e){return"[object String]"===t.call(e)},e.number=function number(e){return"[object Number]"===t.call(e)},e.numberRange=function numberRange(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function integer(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function uinteger(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function func(e){return"[object Function]"===t.call(e)},e.objectLiteral=function objectLiteral(e){return null!==e&&"object"==typeof e},e.typedArray=function typedArray(e,t){return Array.isArray(e)&&e.every(t)}}(ue||(ue={}))},23870:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.ProgressType=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=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.RAL=void 0,t.CancellationStrategy=void 0;const r=n(20839);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(83911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const o=n(27135);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const s=n(13881);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=n(56525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return a.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return a.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return a.ReadableStreamMessageReader}});const c=n(96654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const l=n(61343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}});const u=n(30147);t.RAL=u.default},13881:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(30147),i=n(67574),o=n(27135);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function is(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const n=r.default().timer.setTimeout(e.bind(t),0);return{dispose(){r.default().timer.clearTimeout(n)}}}));class MutableToken{constructor(){this._isCancelled=!1}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?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class CancellationTokenSource{get token(){return this._token||(this._token=new MutableToken),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof MutableToken&&this._token.dispose():this._token=s.None}}},61343:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.NullLogger=t.ProgressType=void 0;const r=n(30147),i=n(67574),o=n(20839),s=n(96184),a=n(27135),c=n(13881);var l,u,d,f,h,p,m,g,y,v,b,w,S;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.type=new o.NotificationType("$/progress")}(u||(u={}));t.ProgressType=class ProgressType{constructor(){}},function(e){e.is=function is(e){return i.func(e)}}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(f=t.Trace||(t.Trace={})),function(e){e.fromString=function fromString(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function toString(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(f=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function fromString(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(h=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(p=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(g=t.ConnectionErrors||(t.ConnectionErrors={}));class ConnectionError extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,ConnectionError.prototype)}}t.ConnectionError=ConnectionError,function(e){e.is=function is(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(y=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function is(e){const t=e;return t&&i.func(t.createCancellationTokenSource)}}(v=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation(e,t){e.sendNotification(l.type,{id:t})},cleanup(e){}}),e.is=function is(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(b=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:v.Message,sender:b.Message}),e.is=function is(e){const t=e;return t&&v.is(t.receiver)&&b.is(t.sender)}}(w=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function is(e){const t=e;return t&&(w.is(t.cancellationStrategy)||y.is(t.connectionStrategy))}}(t.ConnectionOptions||(t.ConnectionOptions={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(S||(S={})),t.createMessageConnection=function createMessageConnection(e,n,y,v){const b=void 0!==y?y:t.NullLogger;let k=0,T=0,R=0;const C="2.0";let P;const _=Object.create(null);let x;const E=Object.create(null),N=new Map;let D,O,M=new s.LinkedMap,q=Object.create(null),I=Object.create(null),A=f.Off,L=h.Text,F=S.New;const j=new a.Emitter,$=new a.Emitter,W=new a.Emitter,U=new a.Emitter,B=new a.Emitter,K=v&&v.cancellationStrategy?v.cancellationStrategy:w.Message;function createRequestQueueKey(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 addMessageToQueue(e,t){o.isRequestMessage(t)?e.set(createRequestQueueKey(t.id),t):o.isResponseMessage(t)?e.set(function createResponseQueueKey(e){return null===e?"res-unknown-"+(++R).toString():"res-"+e.toString()}(t.id),t):e.set(function createNotificationQueueKey(){return"not-"+(++T).toString()}(),t)}function cancelUndispatched(e){}function isListening(){return F===S.Listening}function isClosed(){return F===S.Closed}function isDisposed(){return F===S.Disposed}function closeHandler(){F!==S.New&&F!==S.Listening||(F=S.Closed,$.fire(void 0))}function triggerMessageQueue(){D||0===M.size||(D=r.default().timer.setImmediate((()=>{D=void 0,function processMessageQueue(){if(0===M.size)return;const e=M.shift();try{o.isRequestMessage(e)?function handleRequest(e){if(isDisposed())return;function reply(t,r,i){const s={jsonrpc:C,id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,traceSendingResponse(s,r,i),n.write(s)}function replyError(t,r,i){const o={jsonrpc:C,id:e.id,error:t.toJson()};traceSendingResponse(o,r,i),n.write(o)}function replySuccess(t,r,i){void 0===t&&(t=null);const o={jsonrpc:C,id:e.id,result:t};traceSendingResponse(o,r,i),n.write(o)}!function traceReceivedRequest(e){if(A===f.Off||!O)return;if(L===h.Text){let t;A===f.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),O.log(`Received request '${e.method} - (${e.id})'.`,t)}else logLSPMessage("receive-request",e)}(e);const t=_[e.method];let r,s;t&&(r=t.type,s=t.handler);const a=Date.now();if(s||P){const t=String(e.id),n=K.receiver.createCancellationTokenSource(t);I[t]=n;try{let c;if(s)if(void 0===e.params){if(void 0!==r&&0!==r.numberOfParams)return void replyError(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${r.numberOfParams} params but recevied none.`),e.method,a);c=s(n.token)}else if(Array.isArray(e.params)){if(void 0!==r&&r.parameterStructures===o.ParameterStructures.byName)return void replyError(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,a);c=s(...e.params,n.token)}else{if(void 0!==r&&r.parameterStructures===o.ParameterStructures.byPosition)return void replyError(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,a);c=s(e.params,n.token)}else P&&(c=P(e.method,e.params,n.token));const l=c;c?l.then?l.then((n=>{delete I[t],reply(n,e.method,a)}),(n=>{delete I[t],n instanceof o.ResponseError?replyError(n,e.method,a):n&&i.string(n.message)?replyError(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,a):replyError(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)})):(delete I[t],reply(c,e.method,a)):(delete I[t],replySuccess(c,e.method,a))}catch(n){delete I[t],n instanceof o.ResponseError?reply(n,e.method,a):n&&i.string(n.message)?replyError(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,a):replyError(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)}}else replyError(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,a)}(e):o.isNotificationMessage(e)?function handleNotification(e){if(isDisposed())return;let t,n;if(e.method===l.type.method)n=e=>{const t=e.id,n=I[String(t)];n&&n.cancel()};else{const r=E[e.method];r&&(n=r.handler,t=r.type)}if(n||x)try{!function traceReceivedNotification(e){if(A===f.Off||!O||e.method===m.type.method)return;if(L===h.Text){let t;A===f.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),O.log(`Received notification '${e.method}'.`,t)}else logLSPMessage("receive-notification",e)}(e),n?void 0===e.params?(void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but recevied none.`),n()):Array.isArray(e.params)?(void 0!==t&&(t.parameterStructures===o.ParameterStructures.byName&&b.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${e.params.length} argumennts`)),n(...e.params)):(void 0!==t&&t.parameterStructures===o.ParameterStructures.byPosition&&b.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params)):x&&x(e.method,e.params)}catch(t){t.message?b.error(`Notification handler '${e.method}' failed with message: ${t.message}`):b.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):o.isResponseMessage(e)?function handleResponse(e){if(isDisposed())return;if(null===e.id)e.error?b.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const t=String(e.id),n=q[t];if(function traceReceivedResponse(e,t){if(A===f.Off||!O)return;if(L===h.Text){let n;if(A===f.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";O.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else O.log(`Received response ${e.id} without active response promise.`,n)}else logLSPMessage("receive-response",e)}(e,n),n){delete q[t];try{if(e.error){const t=e.error;n.reject(new o.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?b.error(`Response handler '${n.method}' failed with message: ${e.message}`):b.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function handleInvalidMessage(e){if(!e)return void b.error("Received empty message.");b.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=String(t.id),n=q[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{triggerMessageQueue()}}()})))}e.onClose(closeHandler),e.onError((function readErrorHandler(e){j.fire([e,void 0,void 0])})),n.onClose(closeHandler),n.onError((function writeErrorHandler(e){j.fire(e)}));const callback=e=>{try{if(o.isNotificationMessage(e)&&e.method===l.type.method){const t=createRequestQueueKey(e.params.id),r=M.get(t);if(o.isRequestMessage(r)){const i=null==v?void 0:v.connectionStrategy,o=i&&i.cancelUndispatched?i.cancelUndispatched(r,cancelUndispatched):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return M.delete(t),o.id=r.id,traceSendingResponse(o,e.method,Date.now()),void n.write(o)}}addMessageToQueue(M,e)}finally{triggerMessageQueue()}};function traceSendingResponse(e,t,n){if(A!==f.Off&&O)if(L===h.Text){let r;A===f.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),O.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else logLSPMessage("send-response",e)}function logLSPMessage(e,t){if(!O||A===f.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};O.log(n)}function throwIfClosedOrDisposed(){if(isClosed())throw new ConnectionError(g.Closed,"Connection is closed.");if(isDisposed())throw new ConnectionError(g.Disposed,"Connection is disposed.")}function undefinedToNull(e){return void 0===e?null:e}function nullToUndefined(e){return null===e?void 0:e}function isNamedParam(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function computeSingleParam(e,t){switch(e){case o.ParameterStructures.auto:return isNamedParam(t)?nullToUndefined(t):[undefinedToNull(t)];case o.ParameterStructures.byName:if(!isNamedParam(t))throw new Error("Recevied parameters by name but param is not an object literal.");return nullToUndefined(t);case o.ParameterStructures.byPosition:return[undefinedToNull(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function computeMessageParams(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=computeSingleParam(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(undefinedToNull(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const H={sendNotification:(e,...t)=>{let r,s;if(throwIfClosedOrDisposed(),i.string(e)){r=e;const n=t[0];let i=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const l=c-i;switch(l){case 0:s=void 0;break;case 1:s=computeSingleParam(a,t[i]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${l} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map((e=>undefinedToNull(e)))}}else{const n=t;r=e.method,s=computeMessageParams(e,n)}const a={jsonrpc:C,method:r,params:s};!function traceSendingNotification(e){if(A!==f.Off&&O)if(L===h.Text){let t;A===f.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),O.log(`Sending notification '${e.method}'.`,t)}else logLSPMessage("send-notification",e)}(a),n.write(a)},onNotification:(e,t)=>{let n;return throwIfClosedOrDisposed(),i.func(e)?x=e:t&&(i.string(e)?(n=e,E[e]={type:void 0,handler:t}):(n=e.method,E[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==n?delete E[n]:x=void 0}}},onProgress:(e,t,n)=>{if(N.has(t))throw new Error(`Progress handler for token ${t} already registered`);return N.set(t,n),{dispose:()=>{N.delete(t)}}},sendProgress:(e,t,n)=>{H.sendNotification(u.type,{token:t,value:n})},onUnhandledProgress:U.event,sendRequest:(e,...t)=>{let r,s,a;if(throwIfClosedOrDisposed(),function throwIfNotListening(){if(!isListening())throw new Error("Call listen() first.")}(),i.string(e)){r=e;const n=t[0],i=t[t.length-1];let l=0,u=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;c.CancellationToken.is(i)&&(d-=1,a=i);const f=d-l;switch(f){case 0:s=void 0;break;case 1:s=computeSingleParam(u,t[l]);break;default:if(u===o.ParameterStructures.byName)throw new Error(`Recevied ${f} parameters for 'by Name' request parameter structure.`);s=t.slice(l,d).map((e=>undefinedToNull(e)))}}else{const n=t;r=e.method,s=computeMessageParams(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const l=k++;let u;a&&(u=a.onCancellationRequested((()=>{K.sender.sendCancellation(H,l)})));return new Promise(((e,t)=>{const i={jsonrpc:C,id:l,method:r,params:s};let a={method:r,timerStart:Date.now(),resolve:t=>{e(t),K.sender.cleanup(l),null==u||u.dispose()},reject:e=>{t(e),K.sender.cleanup(l),null==u||u.dispose()}};!function traceSendingRequest(e){if(A!==f.Off&&O)if(L===h.Text){let t;A===f.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),O.log(`Sending request '${e.method} - (${e.id})'.`,t)}else logLSPMessage("send-request",e)}(i);try{n.write(i)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(q[String(l)]=a)}))},onRequest:(e,t)=>{throwIfClosedOrDisposed();let n=null;return d.is(e)?(n=void 0,P=e):i.string(e)?(n=null,void 0!==t&&(n=e,_[e]={handler:t,type:void 0})):void 0!==t&&(n=e.method,_[e.method]={type:e,handler:t}),{dispose:()=>{null!==n&&(void 0!==n?delete _[n]:P=void 0)}}},trace:(e,t,n)=>{let r=!1,o=h.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||h.Text)),A=e,L=o,O=A===f.Off?void 0:t,!r||isClosed()||isDisposed()||H.sendNotification(p.type,{value:f.toString(e)})},onError:j.event,onClose:$.event,onUnhandledNotification:W.event,onDispose:B.event,end:()=>{n.end()},dispose:()=>{if(isDisposed())return;F=S.Disposed,B.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(q).forEach((e=>{q[e].reject(t)})),q=Object.create(null),I=Object.create(null),M=new s.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{throwIfClosedOrDisposed(),function throwIfListening(){if(isListening())throw new ConnectionError(g.AlreadyListening,"Connection is already listening")}(),F=S.Listening,e.listen(callback)},inspect:()=>{r.default().console.log("inspect")}};return H.onNotification(m.type,(e=>{A!==f.Off&&O&&O.log(e.message,A===f.Verbose?e.verbose:void 0)})),H.onNotification(u.type,(e=>{const t=N.get(e.token);t?t(e.value):U.fire(e)})),H}},83911:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function create(e){return{dispose:e}}}(t.Disposable||(t.Disposable={}))},27135:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(30147);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class CallbackList{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{t.push(n[o].apply(i[o],e))}catch(e){r.default().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class Emitter{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new CallbackList),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=Emitter._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=Emitter,Emitter._noop=function(){}},67574:(e,t)=>{function string(e){return"string"==typeof e||e instanceof String}function array(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function boolean(e){return!0===e||!1===e},t.string=string,t.number=function number(e){return"number"==typeof e||e instanceof Number},t.error=function error(e){return e instanceof Error},t.func=function func(e){return"function"==typeof e},t.array=array,t.stringArray=function stringArray(e){return array(e)&&e.every((e=>string(e)))}},96184:(e,t)=>{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||(t.Touch={}));class LinkedMap{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=n.None){const r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.key,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}values(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:n.value,done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this._state;let n=this._head;const r={[Symbol.iterator]:()=>r,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const e={value:[n.key,n.value],done:!1};return n=n.next,e}return{value:void 0,done:!0}}};return r}[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=LinkedMap;t.LRUCache=class LRUCache extends LinkedMap{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))}}},75530:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;t.AbstractMessageBuffer=class AbstractMessageBuffer{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(){if(0===this._chunks.length)return;let e=0,t=0,n=0,r=0;e:for(;t<this._chunks.length;){const i=this._chunks[t];for(n=0;n<i.length;){switch(i[n]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,n++;break e;default:e=0}break;default:e=0}n++}r+=i.byteLength,t++}if(4!==e)return;const i=this._read(r+n),o=new Map,s=this.toString(i,"ascii").split("\r\n");if(s.length<2)return o;for(let e=0;e<s.length-2;e++){const t=s[e],n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");const r=t.substr(0,n),i=t.substr(n+1).trim();o.set(r,i)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},56525:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(30147),i=n(67574),o=n(27135);var s;!function(e){e.is=function is(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(t.MessageReader||(t.MessageReader={}));class AbstractMessageReader{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.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: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=AbstractMessageReader,function(e){e.fromOptions=function fromOptions(e){var t;let n,i;const o=new Map;let s;const a=new Map;if(void 0===e||"string"==typeof e)n=null!=e?e:"utf-8";else{if(n=null!==(t=e.charset)&&void 0!==t?t:"utf-8",void 0!==e.contentDecoder&&(i=e.contentDecoder,o.set(i.name,i)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,a.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)a.set(t.name,t)}return void 0===s&&(s=r.default().applicationJson.decoder,a.set(s.name,s)),{charset:n,contentDecoder:i,contentDecoders:o,contentTypeDecoder:s,contentTypeDecoders:a}}}(s||(s={}));t.ReadableStreamMessageReader=class ReadableStreamMessageReader extends AbstractMessageReader{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=r.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}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){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then((e=>{this.options.contentTypeDecoder.decode(e,this.options).then((e=>{this.callback(e)}),(e=>{this.fireError(e)}))}),(e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(r.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=r.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))}}},96654:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(30147),i=n(67574),o=n(80142),s=n(27135);var a;!function(e){e.is=function is(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class AbstractMessageWriter{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.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: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=AbstractMessageWriter,function(e){e.fromOptions=function fromOptions(e){var t,n;return void 0===e||"string"==typeof e?{charset:null!=e?e:"utf-8",contentTypeEncoder:r.default().applicationJson.encoder}:{charset:null!==(t=e.charset)&&void 0!==t?t:"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:null!==(n=e.contentTypeEncoder)&&void 0!==n?n:r.default().applicationJson.encoder}}}(a||(a={}));t.WriteableStreamMessageWriter=class WriteableStreamMessageWriter extends AbstractMessageWriter{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.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()}}},20839:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isResponseMessage=t.isNotificationMessage=t.isRequestMessage=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 r=n(67574);var i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=e.jsonrpcReservedErrorRangeStart,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=e.jsonrpcReservedErrorRangeEnd}(i=t.ErrorCodes||(t.ErrorCodes={}));class ResponseError extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,ResponseError.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=ResponseError;class ParameterStructures{constructor(e){this.kind=e}static is(e){return e===ParameterStructures.auto||e===ParameterStructures.byName||e===ParameterStructures.byPosition}toString(){return this.kind}}t.ParameterStructures=ParameterStructures,ParameterStructures.auto=new ParameterStructures("auto"),ParameterStructures.byPosition=new ParameterStructures("byPosition"),ParameterStructures.byName=new ParameterStructures("byName");class AbstractMessageSignature{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return ParameterStructures.auto}}t.AbstractMessageSignature=AbstractMessageSignature;t.RequestType0=class RequestType0 extends AbstractMessageSignature{constructor(e){super(e,0)}};t.RequestType=class RequestType extends AbstractMessageSignature{constructor(e,t=ParameterStructures.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType1=class RequestType1 extends AbstractMessageSignature{constructor(e,t=ParameterStructures.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType2=class RequestType2 extends AbstractMessageSignature{constructor(e){super(e,2)}};t.RequestType3=class RequestType3 extends AbstractMessageSignature{constructor(e){super(e,3)}};t.RequestType4=class RequestType4 extends AbstractMessageSignature{constructor(e){super(e,4)}};t.RequestType5=class RequestType5 extends AbstractMessageSignature{constructor(e){super(e,5)}};t.RequestType6=class RequestType6 extends AbstractMessageSignature{constructor(e){super(e,6)}};t.RequestType7=class RequestType7 extends AbstractMessageSignature{constructor(e){super(e,7)}};t.RequestType8=class RequestType8 extends AbstractMessageSignature{constructor(e){super(e,8)}};t.RequestType9=class RequestType9 extends AbstractMessageSignature{constructor(e){super(e,9)}};t.NotificationType=class NotificationType extends AbstractMessageSignature{constructor(e,t=ParameterStructures.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType0=class NotificationType0 extends AbstractMessageSignature{constructor(e){super(e,0)}};t.NotificationType1=class NotificationType1 extends AbstractMessageSignature{constructor(e,t=ParameterStructures.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType2=class NotificationType2 extends AbstractMessageSignature{constructor(e){super(e,2)}};t.NotificationType3=class NotificationType3 extends AbstractMessageSignature{constructor(e){super(e,3)}};t.NotificationType4=class NotificationType4 extends AbstractMessageSignature{constructor(e){super(e,4)}};t.NotificationType5=class NotificationType5 extends AbstractMessageSignature{constructor(e){super(e,5)}};t.NotificationType6=class NotificationType6 extends AbstractMessageSignature{constructor(e){super(e,6)}};t.NotificationType7=class NotificationType7 extends AbstractMessageSignature{constructor(e){super(e,7)}};t.NotificationType8=class NotificationType8 extends AbstractMessageSignature{constructor(e){super(e,8)}};t.NotificationType9=class NotificationType9 extends AbstractMessageSignature{constructor(e){super(e,9)}},t.isRequestMessage=function isRequestMessage(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},t.isNotificationMessage=function isNotificationMessage(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},t.isResponseMessage=function isResponseMessage(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},30147:(e,t)=>{let n;function RAL(){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 install(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(RAL||(RAL={})),t.default=RAL},80142:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(30147);t.Semaphore=class Semaphore{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&&r.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()}}}},74389:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=n(23034);o.default.install();const s=n(23870),a=n(71017),c=n(22037),l=n(6113),u=n(41808);i(n(23870),t);class IPCMessageReader extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),s.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=IPCMessageReader;class IPCMessageWriter extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let 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=IPCMessageWriter;class SocketMessageReader extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(o.default().stream.asReadableStream(e),t)}}t.SocketMessageReader=SocketMessageReader;class SocketMessageWriter extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=SocketMessageWriter;class StreamMessageReader extends s.ReadableStreamMessageReader{constructor(e,t){super(o.default().stream.asReadableStream(e),t)}}t.StreamMessageReader=StreamMessageReader;class StreamMessageWriter extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t)}}t.StreamMessageWriter=StreamMessageWriter;const d=process.env.XDG_RUNTIME_DIR,f=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function generateRandomPipeName(){const e=l.randomBytes(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=d?a.join(d,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const n=f.get(process.platform);return void 0!==n&&t.length>=n&&o.default().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function createClientPipeTransport(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((i,o)=>{let s=u.createServer((e=>{s.close(),n([new SocketMessageReader(e,t),new SocketMessageWriter(e,t)])}));s.on("error",o),s.listen(e,(()=>{s.removeListener("error",o),i({onConnected:()=>r})}))}))},t.createServerPipeTransport=function createServerPipeTransport(e,t="utf-8"){const n=u.createConnection(e);return[new SocketMessageReader(n,t),new SocketMessageWriter(n,t)]},t.createClientSocketTransport=function createClientSocketTransport(e,t="utf-8"){let n;const r=new Promise(((e,t)=>{n=e}));return new Promise(((i,o)=>{const s=u.createServer((e=>{s.close(),n([new SocketMessageReader(e,t),new SocketMessageWriter(e,t)])}));s.on("error",o),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",o),i({onConnected:()=>r})}))}))},t.createServerSocketTransport=function createServerSocketTransport(e,t="utf-8"){const n=u.createConnection(e,"127.0.0.1");return[new SocketMessageReader(n,t),new SocketMessageWriter(n,t)]},t.createMessageConnection=function createMessageConnection(e,t,n,r){n||(n=s.NullLogger);const i=function isReadableStream(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new StreamMessageReader(e):e,o=function isWritableStream(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new StreamMessageWriter(t):t;return s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),s.createMessageConnection(i,o,n,r)}},23034:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(30147),i=n(73837),o=n(83911),s=n(75530);class MessageBuffer extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return MessageBuffer.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)}}MessageBuffer.emptyBuffer=Buffer.allocUnsafe(0);class ReadableStreamWrapper{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 WritableStreamWrapper{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,r)=>{const callback=e=>{null==e?n():r(e)};"string"==typeof e?this.stream.write(e,t,callback):this.stream.write(e,callback)}))}end(){this.stream.end()}}const a=Object.freeze({messageBuffer:Object.freeze({create:e=>new MessageBuffer(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 ReadableStreamWrapper(e),asWritableStream:e=>new WritableStreamWrapper(e)}),console,timer:Object.freeze({setTimeout:(e,t,...n)=>setTimeout(e,t,...n),clearTimeout(e){clearTimeout(e)},setImmediate:(e,...t)=>setImmediate(e,...t),clearImmediate(e){clearImmediate(e)}})});function RIL(){return a}!function(e){e.install=function install(){r.default.install(a)}}(RIL||(RIL={})),t.default=RIL},95028:(e,t,n)=>{e.exports=n(74389)},51661:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(74389),t),i(n(61949),t),i(n(66140),t),i(n(10542),t);var o=n(73767);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(t.LSPErrorCodes||(t.LSPErrorCodes={}))},73767:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(74389);t.createProtocolConnection=function createProtocolConnection(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),r.createMessageConnection(e,t,n,i)}},66140:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const r=n(74389);t.RegistrationType=class RegistrationType{constructor(e){this.method=e}};class ProtocolRequestType0 extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=ProtocolRequestType0;class ProtocolRequestType extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=ProtocolRequestType;class ProtocolNotificationType0 extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=ProtocolNotificationType0;class ProtocolNotificationType extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=ProtocolNotificationType},82918:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(66140);!function(e){e.method="textDocument/prepareCallHierarchy",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.type=new r.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},79891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(66140);!function(e){e.method="textDocument/documentColor",e.type=new r.ProtocolRequestType(e.method)}(t.DocumentColorRequest||(t.DocumentColorRequest={})),function(e){e.type=new r.ProtocolRequestType("textDocument/colorPresentation")}(t.ColorPresentationRequest||(t.ColorPresentationRequest={}))},85934:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(66140);!function(e){e.type=new r.ProtocolRequestType("workspace/configuration")}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},40764:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(66140);!function(e){e.method="textDocument/declaration",e.type=new r.ProtocolRequestType(e.method)}(t.DeclarationRequest||(t.DeclarationRequest={}))},37846:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(66140);!function(e){e.file="file",e.folder="folder"}(t.FileOperationPatternKind||(t.FileOperationPatternKind={})),function(e){e.method="workspace/willCreateFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})),function(e){e.method="workspace/didCreateFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})),function(e){e.method="workspace/willRenameFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})),function(e){e.method="workspace/didRenameFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})),function(e){e.method="workspace/didDeleteFiles",e.type=new r.ProtocolNotificationType(e.method)}(t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})),function(e){e.method="workspace/willDeleteFiles",e.type=new r.ProtocolRequestType(e.method)}(t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={}))},13394:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=t.FoldingRangeKind=void 0;const r=n(66140);!function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(t.FoldingRangeKind||(t.FoldingRangeKind={})),function(e){e.method="textDocument/foldingRange",e.type=new r.ProtocolRequestType(e.method)}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},82122:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(66140);!function(e){e.method="textDocument/implementation",e.type=new r.ProtocolRequestType(e.method)}(t.ImplementationRequest||(t.ImplementationRequest={}))},10542:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=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.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.InitializeError=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.DocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=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.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=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.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=void 0;const r=n(69533),i=n(66140),o=n(82122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const s=n(71589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=n(53589);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const c=n(85934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const l=n(79891);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const u=n(13394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return u.FoldingRangeRequest}});const d=n(40764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const f=n(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const h=n(21862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return h.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return h.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return h.WorkDoneProgressCancelNotification}});const p=n(82918);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return p.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return p.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return p.CallHierarchyPrepareRequest}});const m=n(39434);Object.defineProperty(t,"SemanticTokenTypes",{enumerable:!0,get:function(){return m.SemanticTokenTypes}}),Object.defineProperty(t,"SemanticTokenModifiers",{enumerable:!0,get:function(){return m.SemanticTokenModifiers}}),Object.defineProperty(t,"SemanticTokens",{enumerable:!0,get:function(){return m.SemanticTokens}}),Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return m.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return m.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return m.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return m.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return m.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return m.SemanticTokensRegistrationType}});const g=n(75726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return g.ShowDocumentRequest}});const y=n(26305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return y.LinkedEditingRangeRequest}});const v=n(37846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const b=n(73443);var w,S;Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return b.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return b.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return b.MonikerRequest}}),function(e){e.is=function is(e){const t=e;return r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}}(w=t.DocumentFilter||(t.DocumentFilter={})),function(e){e.is=function is(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!w.is(t))return!1;return!0}}(S=t.DocumentSelector||(t.DocumentSelector={})),function(e){e.type=new i.ProtocolRequestType("client/registerCapability")}(t.RegistrationRequest||(t.RegistrationRequest={})),function(e){e.type=new i.ProtocolRequestType("client/unregisterCapability")}(t.UnregistrationRequest||(t.UnregistrationRequest={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(t.ResourceOperationKind||(t.ResourceOperationKind={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(t.FailureHandlingKind||(t.FailureHandlingKind={})),function(e){e.hasId=function hasId(e){const t=e;return t&&r.string(t.id)&&t.id.length>0}}(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})),function(e){e.is=function is(e){const t=e;return t&&(null===t.documentSelector||S.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function is(e){const t=e;return r.objectLiteral(t)&&(void 0===t.workDoneProgress||r.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function hasWorkDoneProgress(e){const t=e;return t&&r.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.type=new i.ProtocolRequestType("initialize")}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeError||(t.InitializeError={})),function(e){e.type=new i.ProtocolNotificationType("initialized")}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.type=new i.ProtocolRequestType0("shutdown")}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.type=new i.ProtocolNotificationType0("exit")}(t.ExitNotification||(t.ExitNotification={})),function(e){e.type=new i.ProtocolNotificationType("workspace/didChangeConfiguration")}(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4}(t.MessageType||(t.MessageType={})),function(e){e.type=new i.ProtocolNotificationType("window/showMessage")}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.type=new i.ProtocolRequestType("window/showMessageRequest")}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/logMessage")}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.type=new i.ProtocolNotificationType("telemetry/event")}(t.TelemetryEventNotification||(t.TelemetryEventNotification={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})),function(e){e.method="textDocument/didOpen",e.type=new i.ProtocolNotificationType(e.method)}(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})),function(e){e.isIncremental=function isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})),function(e){e.method="textDocument/didChange",e.type=new i.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.type=new i.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.type=new i.ProtocolNotificationType(e.method)}(t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})),function(e){e.method="textDocument/willSave",e.type=new i.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.type=new i.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.type=new i.ProtocolNotificationType("workspace/didChangeWatchedFiles")}(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(t.FileChangeType||(t.FileChangeType={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(t.WatchKind||(t.WatchKind={})),function(e){e.type=new i.ProtocolNotificationType("textDocument/publishDiagnostics")}(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(t.CompletionTriggerKind||(t.CompletionTriggerKind={})),function(e){e.method="textDocument/completion",e.type=new i.ProtocolRequestType(e.method)}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.type=new i.ProtocolRequestType(e.method)}(t.HoverRequest||(t.HoverRequest={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})),function(e){e.method="textDocument/signatureHelp",e.type=new i.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.type=new i.ProtocolRequestType(e.method)}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.type=new i.ProtocolRequestType(e.method)}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.type=new i.ProtocolRequestType(e.method)}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="codeAction/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})),function(e){e.method="workspace/symbol",e.type=new i.ProtocolRequestType(e.method)}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.method="textDocument/codeLens",e.type=new i.ProtocolRequestType(e.method)}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.method="codeLens/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="workspace/codeLens/refresh",e.type=new i.ProtocolRequestType0(e.method)}(t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})),function(e){e.method="textDocument/documentLink",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.method="documentLink/resolve",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.type=new i.ProtocolRequestType(e.method)}(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})),function(e){e.Identifier=1}(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})),function(e){e.method="textDocument/rename",e.type=new i.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.type=new i.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.type=new i.ProtocolRequestType("workspace/executeCommand")}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.type=new i.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},26305:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(66140);!function(e){e.method="textDocument/linkedEditingRange",e.type=new r.ProtocolRequestType(e.method)}(t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={}))},73443:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(66140);!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(t.UniquenessLevel||(t.UniquenessLevel={})),function(e){e.import="import",e.export="export",e.local="local"}(t.MonikerKind||(t.MonikerKind={})),function(e){e.method="textDocument/moniker",e.type=new r.ProtocolRequestType(e.method)}(t.MonikerRequest||(t.MonikerRequest={}))},21862:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(74389),i=n(66140);!function(e){e.type=new r.ProgressType,e.is=function is(t){return t===e.type}}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.type=new i.ProtocolRequestType("window/workDoneProgress/create")}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.type=new i.ProtocolNotificationType("window/workDoneProgress/cancel")}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},5206:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(66140);!function(e){e.method="textDocument/selectionRange",e.type=new r.ProtocolRequestType(e.method)}(t.SelectionRangeRequest||(t.SelectionRangeRequest={}))},39434:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const r=n(66140);!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"}(t.SemanticTokenTypes||(t.SemanticTokenTypes={})),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"}(t.SemanticTokenModifiers||(t.SemanticTokenModifiers={})),function(e){e.is=function is(e){const t=e;return void 0!==t&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(t.SemanticTokens||(t.SemanticTokens={})),function(e){e.Relative="relative"}(t.TokenFormat||(t.TokenFormat={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),function(e){e.method="textDocument/semanticTokens/full",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.type=new r.ProtocolRequestType(e.method)}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})),function(e){e.method="workspace/semanticTokens/refresh",e.type=new r.ProtocolRequestType0(e.method)}(t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={}))},75726:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(66140);!function(e){e.method="window/showDocument",e.type=new r.ProtocolRequestType(e.method)}(t.ShowDocumentRequest||(t.ShowDocumentRequest={}))},71589:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(66140);!function(e){e.method="textDocument/typeDefinition",e.type=new r.ProtocolRequestType(e.method)}(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={}))},53589:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(66140);!function(e){e.type=new r.ProtocolRequestType0("workspace/workspaceFolders")}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.type=new r.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},69533:(e,t)=>{function string(e){return"string"==typeof e||e instanceof String}function array(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function boolean(e){return!0===e||!1===e},t.string=string,t.number=function number(e){return"number"==typeof e||e instanceof Number},t.error=function error(e){return e instanceof Error},t.func=function func(e){return"function"==typeof e},t.array=array,t.stringArray=function stringArray(e){return array(e)&&e.every((e=>string(e)))},t.typedArray=function typedArray(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function objectLiteral(e){return null!==e&&"object"==typeof e}},40273:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(95028);i(n(95028),t),i(n(51661),t),t.createProtocolConnection=function createProtocolConnection(e,t,n,r){return o.createMessageConnection(e,t,n,r)}},96560:(e,t,n)=>{e.exports=n(40273)},31040:(e,t,n)=>{n.r(t),n.d(t,{TextDocument:()=>r});class FullTextDocument{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(let t of e)if(FullTextDocument.isIncremental(t)){const e=getWellformedRange(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let s=this._lineOffsets;const a=computeLineOffsets(t.text,!1,n);if(o-i===a.length)for(let e=0,t=a.length;e<t;e++)s[e+i+1]=a[e];else a.length<1e4?s.splice(i+1,o-i,...a):this._lineOffsets=s=s.slice(0,i+1).concat(a,s.slice(o+1));const c=t.text.length-(r-n);if(0!==c)for(let e=i+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+c}else{if(!FullTextDocument.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=computeLineOffsets(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var r;function mergeSort(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);mergeSort(r,t),mergeSort(i,t);let o=0,s=0,a=0;for(;o<r.length&&s<i.length;){let n=t(r[o],i[s]);e[a++]=n<=0?r[o++]:i[s++]}for(;o<r.length;)e[a++]=r[o++];for(;s<i.length;)e[a++]=i[s++];return e}function computeLineOffsets(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);13!==i&&10!==i||(13===i&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function getWellformedRange(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function getWellformedEdit(e){const t=getWellformedRange(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function create(e,t,n,r){return new FullTextDocument(e,t,n,r)},e.update=function update(e,t,n){if(e instanceof FullTextDocument)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function applyEdits(e,t){let n=e.getText(),r=mergeSort(t.map(getWellformedEdit),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=0;const o=[];for(const t of r){let r=e.offsetAt(t.range.start);if(r<i)throw new Error("Overlapping edit");r>i&&o.push(n.substring(i,r)),t.newText.length&&o.push(t.newText),i=e.offsetAt(t.range.end)}return o.push(n.substr(i)),o.join("")}}(r||(r={}))},76265:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.SemanticTokensBuilder=void 0;const o=n(59817);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return o.SemanticTokensBuilder}}),i(n(40273),t),i(n(49891),t),function(e){e.all={__brand:"features"}}(t.ProposedFeatures||(t.ProposedFeatures={}))},47985:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(40273);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>{this.connection.onRequest(r.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))},onIncomingCalls:e=>{const t=r.CallHierarchyIncomingCallsRequest.type;this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=r.CallHierarchyOutgoingCallsRequest.type;this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},52507:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const r=n(40273),i=n(40289);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?i.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(r.ConfigurationRequest.type,t).then((t=>Array.isArray(e)?t:t[0]))}}},50828:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const r=n(40273);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){this.connection.onNotification(r.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){this.connection.onNotification(r.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){this.connection.onNotification(r.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(r.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(r.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(r.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},22776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const r=n(40273);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){this.connection.onRequest(r.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},8120:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const r=n(40273);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=r.MonikerRequest.type;this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},42731:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const r=n(40273),i=n(37560);class WorkDoneProgressReporterImpl{constructor(e,t){this._connection=e,this._token=t,WorkDoneProgressReporterImpl.Instances.set(this._token,this)}begin(e,t,n,i){let o={kind:"begin",title:e,percentage:t,message:n,cancellable:i};this._connection.sendProgress(r.WorkDoneProgress.type,this._token,o)}report(e,t){let n={kind:"report"};"number"==typeof e?(n.percentage=e,void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(r.WorkDoneProgress.type,this._token,n)}done(){WorkDoneProgressReporterImpl.Instances.delete(this._token),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,{kind:"end"})}}WorkDoneProgressReporterImpl.Instances=new Map;class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl{constructor(e,t){super(e,t),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class NullProgressReporter{constructor(){}begin(){}report(){}done(){}}class NullProgressServerReporter extends NullProgressReporter{constructor(){super(),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}t.attachWorkDone=function attachWorkDone(e,t){if(void 0===t||void 0===t.workDoneToken)return new NullProgressReporter;const n=t.workDoneToken;return delete t.workDoneToken,new WorkDoneProgressReporterImpl(e,n)};var o;t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){var t;!0===(null===(t=null==e?void 0:e.window)||void 0===t?void 0:t.workDoneProgress)&&(this._progressSupported=!0,this.connection.onNotification(r.WorkDoneProgressCancelNotification.type,(e=>{let t=WorkDoneProgressReporterImpl.Instances.get(e.token);(t instanceof WorkDoneProgressServerReporterImpl||t instanceof NullProgressServerReporter)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new NullProgressReporter:new WorkDoneProgressReporterImpl(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=i.generateUuid();return this.connection.sendRequest(r.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new WorkDoneProgressServerReporterImpl(this.connection,e)))}return Promise.resolve(new NullProgressServerReporter)}},function(e){e.type=new r.ProgressType}(o||(o={}));class ResultProgressReporterImpl{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(o.type,this._token,e)}}t.attachPartialResult=function attachPartialResult(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new ResultProgressReporterImpl(e,n)}},59817:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensFeature=void 0;const r=n(40273);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{on:e=>{const t=r.SemanticTokensRequest.type;this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=r.SemanticTokensDeltaRequest.type;this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=r.SemanticTokensRangeRequest.type;this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}};t.SemanticTokensBuilder=class SemanticTokensBuilder{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,t,n,r,i){let o=e,s=t;this._dataLen>0&&(o-=this._prevLine,0===o&&(s-=this._prevChar)),this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._data[this._dataLen++]=n,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){if(void 0!==this._prevData){const e=this._prevData.length,t=this._data.length;let n=0;for(;n<t&&n<e&&this._prevData[n]===this._data[n];)n++;if(n<t&&n<e){let r=0;for(;r<t&&r<e&&this._prevData[e-1-r]===this._data[t-1-r];)r++;const i=this._data.slice(n,t-r);return{resultId:this.id,edits:[{start:n,deleteCount:e-r-n,data:i}]}}return n<t?{resultId:this.id,edits:[{start:n,deleteCount:0,data:this._data.slice(n)}]}:n<e?{resultId:this.id,edits:[{start:n,deleteCount:e-n}]}:{resultId:this.id,edits:[]}}return this.build()}}},49891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=t.TextDocuments=void 0;const r=n(40273),i=n(40289),o=n(37560),s=n(42731),a=n(52507),c=n(28634),l=n(47985),u=n(59817),d=n(85421),f=n(50828),h=n(22776),p=n(8120);function null2Undefined(e){if(null!==e)return e}t.TextDocuments=class TextDocuments{constructor(e){this._documents=Object.create(null),this._configuration=e,this._onDidChangeContent=new r.Emitter,this._onDidOpen=new r.Emitter,this._onDidClose=new r.Emitter,this._onDidSave=new r.Emitter,this._onWillSave=new r.Emitter}get onDidChangeContent(){return this._onDidChangeContent.event}get onDidOpen(){return this._onDidOpen.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._documents[e]}all(){return Object.keys(this._documents).map((e=>this._documents[e]))}keys(){return Object.keys(this._documents)}listen(e){e.__textDocumentSync=r.TextDocumentSyncKind.Full,e.onDidOpenTextDocument((e=>{let t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._documents[t.uri]=n;let r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)})),e.onDidChangeTextDocument((e=>{let t=e.textDocument,n=e.contentChanges;if(0===n.length)return;let r=this._documents[t.uri];const{version:i}=t;if(null==i)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);r=this._configuration.update(r,n,i),this._documents[t.uri]=r,this._onDidChangeContent.fire(Object.freeze({document:r}))})),e.onDidCloseTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&(delete this._documents[e.textDocument.uri],this._onDidClose.fire(Object.freeze({document:t})))})),e.onWillSaveTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))})),e.onWillSaveTextDocumentWaitUntil(((e,t)=>{let n=this._documents[e.textDocument.uri];return n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]})),e.onDidSaveTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&this._onDidSave.fire(Object.freeze({document:t}))}))}};t.ErrorMessageTracker=class ErrorMessageTracker{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 RemoteConsoleImpl{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(r.MessageType.Error,e)}warn(e){this.send(r.MessageType.Warning,e)}info(e){this.send(r.MessageType.Info,e)}log(e){this.send(r.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(r.LogMessageNotification.type,{type:e,message:t})}}const m=d.ShowDocumentFeature(s.ProgressFeature(class _RemoteWindowImpl{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){let n={type:r.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(null2Undefined)}showWarningMessage(e,...t){let n={type:r.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(null2Undefined)}showInformationMessage(e,...t){let n={type:r.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(null2Undefined)}}));!function(e){e.create=function create(){return new BulkRegistrationImpl}}(t.BulkRegistration||(t.BulkRegistration={}));class BulkRegistrationImpl{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=i.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const r=o.generateUuid();this._registrations.push({id:r,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function create(){return new BulkUnregistrationImpl(void 0,[])}}(t.BulkUnregistration||(t.BulkUnregistration={}));class BulkUnregistrationImpl{constructor(e,t){this._connection=e,this._unregistrations=new Map,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(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(r.UnregistrationRequest.type,t).then(void 0,(e=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=i.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;let o={unregisterations:[n]};return this._connection.sendRequest(r.UnregistrationRequest.type,o).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class RemoteClientImpl{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 BulkRegistrationImpl?this.registerMany(e):e instanceof BulkUnregistrationImpl?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const s=i.string(t)?t:t.method,a=o.generateUuid();let c={registrations:[{id:a,method:s,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(r.RegistrationRequest.type,c).then((t=>(e.add({id:a,method:s}),e)),(e=>(this.connection.console.info(`Registering request handler for ${s} failed.`),Promise.reject(e))))}registerSingle2(e,t){const n=i.string(e)?e:e.method,s=o.generateUuid();let a={registrations:[{id:s,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(r.RegistrationRequest.type,a).then((e=>r.Disposable.create((()=>{this.unregisterSingle(s,n)}))),(e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e))))}unregisterSingle(e,t){let n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(r.UnregistrationRequest.type,n).then(void 0,(t=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(r.RegistrationRequest.type,t).then((()=>new BulkUnregistrationImpl(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const g=f.FileOperationsFeature(c.WorkspaceFoldersFeature(a.ConfigurationFeature(class _RemoteWorkspaceImpl{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){let t=function isApplyWorkspaceEditParams(e){return e&&!!e.edit}(e)?e:{edit:e};return this.connection.sendRequest(r.ApplyWorkspaceEditRequest.type,t)}})));class TracerImpl{constructor(){this._trace=r.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!==r.Trace.Off&&this.connection.sendNotification(r.LogTraceNotification.type,{message:e,verbose:this._trace===r.Trace.Verbose?t:void 0})}}class TelemetryImpl{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(r.TelemetryEventNotification.type,e)}}class _LanguagesImpl{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 s.attachWorkDone(this.connection,e)}attachPartialResultProgress(e,t){return s.attachPartialResult(this.connection,t)}}t._LanguagesImpl=_LanguagesImpl;const y=p.MonikerFeature(h.LinkedEditingRangeFeature(u.SemanticTokensFeature(l.CallHierarchyFeature(_LanguagesImpl))));function combineConsoleFeatures(e,t){return function(n){return t(e(n))}}function combineTelemetryFeatures(e,t){return function(n){return t(e(n))}}function combineTracerFeatures(e,t){return function(n){return t(e(n))}}function combineClientFeatures(e,t){return function(n){return t(e(n))}}function combineWindowFeatures(e,t){return function(n){return t(e(n))}}function combineWorkspaceFeatures(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=combineConsoleFeatures,t.combineTelemetryFeatures=combineTelemetryFeatures,t.combineTracerFeatures=combineTracerFeatures,t.combineClientFeatures=combineClientFeatures,t.combineWindowFeatures=combineWindowFeatures,t.combineWorkspaceFeatures=combineWorkspaceFeatures,t.combineLanguagesFeatures=function combineLanguagesFeatures(e,t){return function(n){return t(e(n))}},t.combineFeatures=function combineFeatures(e,t){function combine(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:combine(e.console,t.console,combineConsoleFeatures),tracer:combine(e.tracer,t.tracer,combineTracerFeatures),telemetry:combine(e.telemetry,t.telemetry,combineTelemetryFeatures),client:combine(e.client,t.client,combineClientFeatures),window:combine(e.window,t.window,combineWindowFeatures),workspace:combine(e.workspace,t.workspace,combineWorkspaceFeatures)}},t.createConnection=function createConnection(e,t,n){const o=n&&n.console?new(n.console(RemoteConsoleImpl)):new RemoteConsoleImpl,a=e(o);o.rawAttach(a);const c=n&&n.tracer?new(n.tracer(TracerImpl)):new TracerImpl,l=n&&n.telemetry?new(n.telemetry(TelemetryImpl)):new TelemetryImpl,u=n&&n.client?new(n.client(RemoteClientImpl)):new RemoteClientImpl,d=n&&n.window?new(n.window(m)):new m,f=n&&n.workspace?new(n.workspace(g)):new g,h=n&&n.languages?new(n.languages(y)):new y,p=[o,c,l,u,d,f,h];function asPromise(e){return e instanceof Promise?e:i.thenable(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}let v,b,w,S={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(i.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const n=i.string(e)?e:e.method;1===arguments.length?a.sendNotification(n):a.sendNotification(n,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>b=e,onInitialized:e=>a.onNotification(r.InitializedNotification.type,e),onShutdown:e=>v=e,onExit:e=>w=e,get console(){return o},get telemetry(){return l},get tracer(){return c},get client(){return u},get window(){return d},get workspace(){return f},get languages(){return h},onDidChangeConfiguration:e=>a.onNotification(r.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(r.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(r.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(r.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(r.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(r.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(r.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(r.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(r.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(r.HoverRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onCompletion:e=>a.onRequest(r.CompletionRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCompletionResolve:e=>a.onRequest(r.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(r.SignatureHelpRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onDeclaration:e=>a.onRequest(r.DeclarationRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDefinition:e=>a.onRequest(r.DefinitionRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onTypeDefinition:e=>a.onRequest(r.TypeDefinitionRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onImplementation:e=>a.onRequest(r.ImplementationRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onReferences:e=>a.onRequest(r.ReferencesRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentHighlight:e=>a.onRequest(r.DocumentHighlightRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentSymbol:e=>a.onRequest(r.DocumentSymbolRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onWorkspaceSymbol:e=>a.onRequest(r.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeAction:e=>a.onRequest(r.CodeActionRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeActionResolve:e=>a.onRequest(r.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>a.onRequest(r.CodeLensRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeLensResolve:e=>a.onRequest(r.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>a.onRequest(r.DocumentFormattingRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(r.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(r.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>a.onRequest(r.RenameRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),onPrepareRename:e=>a.onRequest(r.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>a.onRequest(r.DocumentLinkRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentLinkResolve:e=>a.onRequest(r.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>a.onRequest(r.DocumentColorRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onColorPresentation:e=>a.onRequest(r.ColorPresentationRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onFoldingRanges:e=>a.onRequest(r.FoldingRangeRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onSelectionRanges:e=>a.onRequest(r.SelectionRangeRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onExecuteCommand:e=>a.onRequest(r.ExecuteCommandRequest.type,((t,n)=>e(t,n,s.attachWorkDone(a,t),void 0))),dispose:()=>a.dispose()};for(let e of p)e.attach(S);return a.onRequest(r.InitializeRequest.type,(e=>{t.initialize(e),i.string(e.trace)&&(c.trace=r.Trace.fromString(e.trace));for(let t of p)t.initialize(e.capabilities);if(b){return asPromise(b(e,(new r.CancellationTokenSource).token,s.attachWorkDone(a,e),void 0)).then((e=>{if(e instanceof r.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=i.number(S.__textDocumentSync)?S.__textDocumentSync:r.TextDocumentSyncKind.None:i.number(n.textDocumentSync)||i.number(n.textDocumentSync.change)||(n.textDocumentSync.change=i.number(S.__textDocumentSync)?S.__textDocumentSync:r.TextDocumentSyncKind.None);for(let e of p)e.fillServerCapabilities(n);return t}))}{let e={capabilities:{textDocumentSync:r.TextDocumentSyncKind.None}};for(let t of p)t.fillServerCapabilities(e.capabilities);return e}})),a.onRequest(r.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,v?v((new r.CancellationTokenSource).token):void 0))),a.onNotification(r.ExitNotification.type,(()=>{try{w&&w()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(r.SetTraceNotification.type,(e=>{c.trace=r.Trace.fromString(e.value)})),S}},85421:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const r=n(40273);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(r.ShowDocumentRequest.type,e)}}},40289:(e,t)=>{function string(e){return"string"==typeof e||e instanceof String}function func(e){return"function"==typeof e}function array(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function boolean(e){return!0===e||!1===e},t.string=string,t.number=function number(e){return"number"==typeof e||e instanceof Number},t.error=function error(e){return e instanceof Error},t.func=func,t.array=array,t.stringArray=function stringArray(e){return array(e)&&e.every((e=>string(e)))},t.typedArray=function typedArray(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function thenable(e){return e&&func(e.then)}},37560:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class ValueUUID{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class V4UUID extends ValueUUID{constructor(){super([V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),"-",V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),"-","4",V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),"-",V4UUID._oneOf(V4UUID._timeHighBits),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),"-",V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex(),V4UUID._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return V4UUID._oneOf(V4UUID._chars)}}function v4(){return new V4UUID}V4UUID._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],V4UUID._timeHighBits=["8","9","a","b"],t.empty=new ValueUUID("00000000-0000-0000-0000-000000000000"),t.v4=v4;const n=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function isUUID(e){return n.test(e)}t.isUUID=isUUID,t.parse=function parse(e){if(!isUUID(e))throw new Error("invalid uuid");return new ValueUUID(e)},t.generateUuid=function generateUuid(){return v4().asHex()}},28634:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const r=n(40273);t.WorkspaceFoldersFeature=e=>class extends e{initialize(e){let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new r.Emitter,this.connection.onNotification(r.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}getWorkspaceFolders(){return this.connection.sendRequest(r.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._unregistration||(this._unregistration=this.connection.client.register(r.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},87613:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const r=n(57310),i=n(71017),o=n(57147),s=n(32081);function isWindows(){return"win32"===process.platform}function resolve(e,t,n,r){const a=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise(((c,l)=>{let u=process.env,d=Object.create(null);Object.keys(u).forEach((e=>d[e]=u[e])),t&&o.existsSync(t)&&(d.NODE_PATH?d.NODE_PATH=t+i.delimiter+d.NODE_PATH:d.NODE_PATH=t,r&&r(`NODE_PATH value is: ${d.NODE_PATH}`)),d.ELECTRON_RUN_AS_NODE="1";try{let t=s.fork("",[],{cwd:n,env:d,execArgv:["-e",a]});if(void 0===t.pid)return void l(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",(e=>{l(e)})),t.on("message",(n=>{"r"===n.c&&(t.send({c:"e"}),n.s?c(n.r):l(new Error(`Failed to resolve module: ${e}`)))}));let r={c:"rs",a:e};t.send(r)}catch(e){l(e)}}))}function resolveGlobalNodePath(e){let t="npm";const n=Object.create(null);Object.keys(process.env).forEach((e=>n[e]=process.env[e])),n.NO_UPDATE_NOTIFIER="true";const r={encoding:"utf8",env:n};isWindows()&&(t="npm.cmd",r.shell=!0);let handler=()=>{};try{process.on("SIGPIPE",handler);let n=s.spawnSync(t,["config","get","prefix"],r).stdout;if(!n)return void(e&&e("'npm config get prefix' didn't return a value."));let o=n.trim();return e&&e(`'npm config get prefix' value is: ${o}`),o.length>0?isWindows()?i.join(o,"node_modules"):i.join(o,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",handler)}}var a;t.uriToFilePath=function uriToFilePath(e){let t=r.parse(e);if("file:"!==t.protocol||!t.path)return;let n=t.path.split("/");for(var o=0,s=n.length;o<s;o++)n[o]=decodeURIComponent(n[o]);if("win32"===process.platform&&n.length>1){let e=n[0],t=n[1];0===e.length&&t.length>1&&":"===t[1]&&n.shift()}return i.normalize(n.join("/"))},t.resolve=resolve,t.resolveGlobalNodePath=resolveGlobalNodePath,t.resolveGlobalYarnPath=function resolveGlobalYarnPath(e){let t="yarn",n={encoding:"utf8"};isWindows()&&(t="yarn.cmd",n.shell=!0);let handler=()=>{};try{process.on("SIGPIPE",handler);let r=s.spawnSync(t,["global","dir","--json"],n),o=r.stdout;if(!o)return void(e&&(e("'yarn global dir' didn't return a value."),r.stderr&&e(r.stderr)));let a=o.trim().split(/\r?\n/);for(let e of a)try{let t=JSON.parse(e);if("log"===t.type)return i.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",handler)}},function(e){let t;function isCaseSensitive(){return void 0!==t||(t="win32"!==process.platform&&(!o.existsSync(__filename.toUpperCase())||!o.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=isCaseSensitive,e.isParent=function isParent(e,t){return isCaseSensitive()?0===i.normalize(t).indexOf(i.normalize(e)):0===i.normalize(t).toLowerCase().indexOf(i.normalize(e).toLowerCase())}}(a=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function resolveModulePath(e,t,n,r){return n?(i.isAbsolute(n)||(n=i.join(e,n)),resolve(t,n,n,r).then((e=>a.isParent(n,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`)))).then(void 0,(n=>resolve(t,resolveGlobalNodePath(r),e,r)))):resolve(t,resolveGlobalNodePath(r),e,r)}},35809:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const o=n(40289),s=n(49891),a=n(87613),c=n(96560);i(n(96560),t),i(n(76265),t),function(e){e.uriToFilePath=a.uriToFilePath,e.resolveGlobalNodePath=a.resolveGlobalNodePath,e.resolveGlobalYarnPath=a.resolveGlobalYarnPath,e.resolve=a.resolve,e.resolveModulePath=a.resolveModulePath}(t.Files||(t.Files={}));let l,u=!1;!function setupExitTimer(){const e="--clientProcessId";function runTimer(e){try{let t=parseInt(e);isNaN(t)||(l=setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(u?0:1)}}),3e3))}catch(e){}}for(let t=2;t<process.argv.length;t++){let n=process.argv[t];if(n===e&&t+1<process.argv.length)return void runTimer(process.argv[t+1]);{let t=n.split("=");t[0]===e&&runTimer(t[1])}}}();const d={initialize:e=>{const t=e.processId;o.number(t)&&void 0===l&&setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(u?0:1)}}),3e3)},get shutdownReceived(){return u},set shutdownReceived(e){u=e},exit:e=>{process.exit(e)}};t.createConnection=function createConnection(e,t,n,r){let i,a,l,f;return void 0!==e&&"features"===e.__brand&&(i=e,e=t,t=n,n=r),c.ConnectionStrategy.is(e)||c.ConnectionOptions.is(e)?f=e:(a=e,l=t,f=n),function _createConnection(e,t,n,r){if(!e&&!t&&process.argv.length>2){let n,r,o=process.argv.slice(2);for(let s=0;s<o.length;s++){let a=o[s];if("--node-ipc"===a){e=new c.IPCMessageReader(process),t=new c.IPCMessageWriter(process);break}if("--stdio"===a){e=process.stdin,t=process.stdout;break}if("--socket"===a){n=parseInt(o[s+1]);break}if("--pipe"===a){r=o[s+1];break}var i=a.split("=");if("--socket"===i[0]){n=parseInt(i[1]);break}if("--pipe"===i[0]){r=i[1];break}}if(n){let r=c.createServerSocketTransport(n);e=r[0],t=r[1]}else if(r){let n=c.createServerPipeTransport(r);e=n[0],t=n[1]}}var a="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+a);if(!t)throw new Error("Connection output stream is not set. "+a);if(o.func(e.read)&&o.func(e.on)){let t=e;t.on("end",(()=>{process.exit(u?0:1)})),t.on("close",(()=>{process.exit(u?0:1)}))}const connectionFactory=r=>c.createProtocolConnection(e,t,r,n);return s.createConnection(connectionFactory,d,r)}(a,l,f,i)}},68212:(e,t,n)=>{e.exports=n(35809)},50852:e=>{e.exports=require("async_hooks")},32081:e=>{e.exports=require("child_process")},6113:e=>{e.exports=require("crypto")},57147:e=>{e.exports=require("fs")},41808:e=>{e.exports=require("net")},22037:e=>{e.exports=require("os")},71017:e=>{e.exports=require("path")},57310:e=>{e.exports=require("url")},73837:e=>{e.exports=require("util")},14139:(e,t,n)=>{var r=n(10466),i=n(58844),o=n(76933),s=n(83179),a=n(94658);t.composeCollection=function composeCollection(e,t,n,c,l){let u;switch(n.type){case"block-map":u=o.resolveBlockMap(e,t,n,l);break;case"block-seq":u=s.resolveBlockSeq(e,t,n,l);break;case"flow-collection":u=a.resolveFlowCollection(e,t,n,l)}if(!c)return u;const d=t.directives.tagName(c.source,(e=>l(c,"TAG_RESOLVE_FAILED",e)));if(!d)return u;const f=u.constructor;if("!"===d||d===f.tagName)return u.tag=f.tagName,u;const h=r.isMap(u)?"map":"seq";let p=t.schema.tags.find((e=>e.collection===h&&e.tag===d));if(!p){const e=t.schema.knownTags[d];if(!e||e.collection!==h)return l(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),u.tag=d,u;t.schema.tags.push(Object.assign({},e,{default:!1})),p=e}const m=p.resolve(u,(e=>l(c,"TAG_RESOLVE_FAILED",e)),t.options),g=r.isNode(m)?m:new i.Scalar(m);return g.range=u.range,g.tag=d,(null==p?void 0:p.format)&&(g.format=p.format),g}},83138:(e,t,n)=>{var r=n(86068),i=n(90081),o=n(7655),s=n(5920);t.composeDoc=function composeDoc(e,t,{offset:n,start:a,value:c,end:l},u){const d=Object.assign({directives:t},e),f=new r.Document(void 0,d),h={atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},p=s.resolveProps(a,{indicator:"doc-start",next:null!=c?c:null==l?void 0:l[0],offset:n,onError:u,startOnNewline:!0});p.found&&(f.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||p.hasNewline||u(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=c?i.composeNode(h,c,p,u):i.composeEmptyNode(h,p.end,a,null,p,u);const m=f.contents.range[2],g=o.resolveEnd(l,m,!1,u);return g.comment&&(f.comment=g.comment),f.range=[n,m,g.offset],f}},90081:(e,t,n)=>{var r=n(12055),i=n(14139),o=n(76548),s=n(7655),a=n(7154);const c={composeNode,composeEmptyNode};function composeNode(e,t,n,a){const{spaceBefore:l,comment:u,anchor:d,tag:f}=n;let h,p=!0;switch(t.type){case"alias":h=function composeAlias({options:e},{offset:t,source:n,end:i},o){const a=new r.Alias(n.substring(1));""===a.source&&o(t,"BAD_ALIAS","Alias cannot be an empty string");a.source.endsWith(":")&&o(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,l=s.resolveEnd(i,c,e.strict,o);a.range=[t,c,l.offset],l.comment&&(a.comment=l.comment);return a}(e,t,a),(d||f)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":h=o.composeScalar(e,t,f,a),d&&(h.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":h=i.composeCollection(c,e,t,f,a),d&&(h.anchor=d.source.substring(1));break;default:a(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),h=composeEmptyNode(e,t.offset,void 0,null,n,a),p=!1}return d&&""===h.anchor&&a(d,"BAD_ALIAS","Anchor cannot be an empty string"),l&&(h.spaceBefore=!0),u&&("scalar"===t.type&&""===t.source?h.comment=u:h.commentBefore=u),e.options.keepSourceTokens&&p&&(h.srcToken=t),h}function composeEmptyNode(e,t,n,r,{spaceBefore:i,comment:s,anchor:c,tag:l},u){const d={type:"scalar",offset:a.emptyScalarPosition(t,n,r),indent:-1,source:""},f=o.composeScalar(e,d,l,u);return c&&(f.anchor=c.source.substring(1),""===f.anchor&&u(c,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),s&&(f.comment=s),f}t.composeEmptyNode=composeEmptyNode,t.composeNode=composeNode},76548:(e,t,n)=>{var r=n(10466),i=n(58844),o=n(51328),s=n(7876);t.composeScalar=function composeScalar(e,t,n,a){const{value:c,type:l,comment:u,range:d}="block-scalar"===t.type?o.resolveBlockScalar(t,e.options.strict,a):s.resolveFlowScalar(t,e.options.strict,a),f=n?e.directives.tagName(n.source,(e=>a(n,"TAG_RESOLVE_FAILED",e))):null,h=n&&f?function findScalarTagByName(e,t,n,i,o){var s;if("!"===n)return e[r.SCALAR];const a=[];for(const t of e.tags)if(!t.collection&&t.tag===n){if(!t.default||!t.test)return t;a.push(t)}for(const e of a)if(null===(s=e.test)||void 0===s?void 0:s.test(t))return e;const c=e.knownTags[n];if(c&&!c.collection)return e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c;return o(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[r.SCALAR]}(e.schema,c,f,n,a):"scalar"===t.type?function findScalarTagByTest({directives:e,schema:t},n,i,o){var s;const a=t.tags.find((e=>{var t;return e.default&&(null===(t=e.test)||void 0===t?void 0:t.test(n))}))||t[r.SCALAR];if(t.compat){const c=null!==(s=t.compat.find((e=>{var t;return e.default&&(null===(t=e.test)||void 0===t?void 0:t.test(n))})))&&void 0!==s?s:t[r.SCALAR];if(a.tag!==c.tag){o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(a.tag)} or ${e.tagString(c.tag)}`,!0)}}return a}(e,c,t,a):e.schema[r.SCALAR];let p;try{const o=h.resolve(c,(e=>a(null!=n?n:t,"TAG_RESOLVE_FAILED",e)),e.options);p=r.isScalar(o)?o:new i.Scalar(o)}catch(e){const r=e instanceof Error?e.message:String(e);a(null!=n?n:t,"TAG_RESOLVE_FAILED",r),p=new i.Scalar(c)}return p.range=d,p.source=c,l&&(p.type=l),f&&(p.tag=f),h.format&&(p.format=h.format),u&&(p.comment=u),p}},5281:(e,t,n)=>{var r=n(99226),i=n(86068),o=n(2394),s=n(10466),a=n(83138),c=n(7655);function getErrorPos(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function parsePrelude(e){var t;let n="",r=!1,i=!1;for(let o=0;o<e.length;++o){const s=e[o];switch(s[0]){case"#":n+=(""===n?"":i?"\n\n":"\n")+(s.substring(1)||" "),r=!0,i=!1;break;case"%":"#"!==(null===(t=e[o+1])||void 0===t?void 0:t[0])&&(o+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:n,afterEmptyLine:i}}t.Composer=class Composer{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{const i=getErrorPos(e);r?this.warnings.push(new o.YAMLWarning(i,t,n)):this.errors.push(new o.YAMLParseError(i,t,n))},this.directives=new r.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=parsePrelude(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(s.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];s.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,((t,n,r)=>{const i=getErrorPos(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,r)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=a.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new o.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new o.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=c.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new o.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({directives:this.directives},this.options),n=new i.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}},76933:(e,t,n)=>{var r=n(10394),i=n(56575),o=n(5920),s=n(93094),a=n(72566),c=n(96493);const l="All mapping items must start at the same column";t.resolveBlockMap=function resolveBlockMap({composeNode:e,composeEmptyNode:t},n,u,d){var f;const h=new i.YAMLMap(n.schema);n.atRoot&&(n.atRoot=!1);let p=u.offset;for(const i of u.items){const{start:m,key:g,sep:y,value:v}=i,b=o.resolveProps(m,{indicator:"explicit-key-ind",next:null!=g?g:null==y?void 0:y[0],offset:p,onError:d,startOnNewline:!0}),w=!b.found;if(w){if(g&&("block-seq"===g.type?d(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==u.indent&&d(p,"BAD_INDENT",l)),!b.anchor&&!b.tag&&!y){b.comment&&(h.comment?h.comment+="\n"+b.comment:h.comment=b.comment);continue}}else(null===(f=b.found)||void 0===f?void 0:f.indent)!==u.indent&&d(p,"BAD_INDENT",l);w&&s.containsNewline(g)&&d(g,"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line");const S=b.end,k=g?e(n,g,b,d):t(n,S,m,null,b,d);n.schema.compat&&a.flowIndentCheck(u.indent,g,d),c.mapIncludes(n,h.items,k)&&d(S,"DUPLICATE_KEY","Map keys must be unique");const T=o.resolveProps(null!=y?y:[],{indicator:"map-value-ind",next:v,offset:k.range[2],onError:d,startOnNewline:!g||"block-scalar"===g.type});if(p=T.end,T.found){w&&("block-map"!==(null==v?void 0:v.type)||T.hasNewline||d(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&b.start<T.found.offset-1024&&d(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const o=v?e(n,v,T,d):t(n,p,y,null,T,d);n.schema.compat&&a.flowIndentCheck(u.indent,v,d),p=o.range[2];const s=new r.Pair(k,o);n.options.keepSourceTokens&&(s.srcToken=i),h.items.push(s)}else{w&&d(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(k.comment?k.comment+="\n"+T.comment:k.comment=T.comment);const e=new r.Pair(k);n.options.keepSourceTokens&&(e.srcToken=i),h.items.push(e)}}return h.range=[u.offset,p,p],h}},51328:(e,t,n)=>{var r=n(58844);t.resolveBlockScalar=function resolveBlockScalar(e,t,n){const i=e.offset,o=function parseBlockScalarHeader({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=t[0],o=i[0];let s=0,a="",c=-1;for(let t=1;t<i.length;++t){const n=i[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!s&&r?s=r:-1===c&&(c=e+t)}else a=n}-1!==c&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,u="",d=i.length;for(let e=1;e<t.length;++e){const i=t[e];switch(i.type){case"space":l=!0;case"newline":d+=i.source.length;break;case"comment":if(n&&!l){r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}d+=i.source.length,u=i.source.substring(1);break;case"error":r(i,"UNEXPECTED_TOKEN",i.message),d+=i.source.length;break;default:{r(i,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${i.type}`);const e=i.source;e&&"string"==typeof e&&(d+=e.length)}}}return{mode:o,indent:s,chomp:a,comment:u,length:d}}(e,t,n);if(!o)return{value:"",type:null,comment:"",range:[i,i,i]};const s=">"===o.mode?r.Scalar.BLOCK_FOLDED:r.Scalar.BLOCK_LITERAL,a=e.source?function splitLines(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[(null==r?void 0:r[1])?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(e.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const t="+"===o.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let n=i+o.length;return e.source&&(n+=e.source.length),{value:t,type:s,comment:o.comment,range:[i,n,n]}}let l=e.indent+o.indent,u=e.offset+o.length,d=0;for(let e=0;e<c;++e){const[t,r]=a[e];if(""!==r&&"\r"!==r){if(t.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(u+t.length,"MISSING_CHAR",e)}0===o.indent&&(l=t.length),d=e;break}0===o.indent&&t.length>l&&(l=t.length),u+=t.length+r.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>l&&(c=e+1);let f="",h="",p=!1;for(let e=0;e<d;++e)f+=a[e][0].slice(l)+"\n";for(let e=d;e<c;++e){let[t,i]=a[e];u+=t.length+i.length+1;const c="\r"===i[i.length-1];if(c&&(i=i.slice(0,-1)),i&&t.length<l){const e=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;n(u-i.length-(c?2:1),"BAD_INDENT",e),t=""}s===r.Scalar.BLOCK_LITERAL?(f+=h+t.slice(l)+i,h="\n"):t.length>l||"\t"===i[0]?(" "===h?h="\n":p||"\n"!==h||(h="\n\n"),f+=h+t.slice(l)+i,h="\n",p=!0):""===i?"\n"===h?f+="\n":h="\n":(f+=h+i,h=" ",p=!1)}switch(o.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)f+="\n"+a[e][0].slice(l);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}const m=i+o.length+e.source.length;return{value:f,type:s,comment:o.comment,range:[i,m,m]}}},83179:(e,t,n)=>{var r=n(13798),i=n(5920),o=n(72566);t.resolveBlockSeq=function resolveBlockSeq({composeNode:e,composeEmptyNode:t},n,s,a){const c=new r.YAMLSeq(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset;for(const{start:r,value:u}of s.items){const d=i.resolveProps(r,{indicator:"seq-item-ind",next:u,offset:l,onError:a,startOnNewline:!0});if(l=d.end,!d.found){if(!(d.anchor||d.tag||u)){d.comment&&(c.comment=d.comment);continue}u&&"block-seq"===u.type?a(l,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const f=u?e(n,u,d,a):t(n,l,r,null,d,a);n.schema.compat&&o.flowIndentCheck(s.indent,u,a),l=f.range[2],c.items.push(f)}return c.range=[s.offset,l,l],c}},7655:(e,t)=>{t.resolveEnd=function resolveEnd(e,t,n,r){let i="";if(e){let o=!1,s="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";i?i+=s+t:i=t,s="";break}case"newline":i&&(s+=e),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}},94658:(e,t,n)=>{var r=n(10466),i=n(10394),o=n(56575),s=n(13798),a=n(7655),c=n(5920),l=n(93094),u=n(96493);const d="Block collections are not allowed within flow collections",isBlock=e=>e&&("block-map"===e.type||"block-seq"===e.type);t.resolveFlowCollection=function resolveFlowCollection({composeNode:e,composeEmptyNode:t},n,f,h){var p;const m="{"===f.start.source,g=m?"flow map":"flow sequence",y=m?new o.YAMLMap(n.schema):new s.YAMLSeq(n.schema);y.flow=!0;const v=n.atRoot;v&&(n.atRoot=!1);let b=f.offset+f.start.source.length;for(let s=0;s<f.items.length;++s){const a=f.items[s],{start:v,key:w,sep:S,value:k}=a,T=c.resolveProps(v,{flow:g,indicator:"explicit-key-ind",next:null!=w?w:null==S?void 0:S[0],offset:b,onError:h,startOnNewline:!1});if(!T.found){if(!(T.anchor||T.tag||S||k)){0===s&&T.comma?h(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${g}`):s<f.items.length-1&&h(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${g}`),T.comment&&(y.comment?y.comment+="\n"+T.comment:y.comment=T.comment),b=T.end;continue}!m&&n.options.strict&&l.containsNewline(w)&&h(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===s)T.comma&&h(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${g}`);else if(T.comma||h(T.start,"MISSING_CHAR",`Missing , between ${g} items`),T.comment){let e="";e:for(const t of v)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=y.items[y.items.length-1];r.isPair(t)&&(t=null!==(p=t.value)&&void 0!==p?p:t.key),t.comment?t.comment+="\n"+e:t.comment=e,T.comment=T.comment.substring(e.length+1)}}if(m||S||T.found){const r=T.end,s=w?e(n,w,T,h):t(n,r,v,null,T,h);isBlock(w)&&h(s.range,"BLOCK_IN_FLOW",d);const l=c.resolveProps(null!=S?S:[],{flow:g,indicator:"map-value-ind",next:k,offset:s.range[2],onError:h,startOnNewline:!1});if(l.found){if(!m&&!T.found&&n.options.strict){if(S)for(const e of S){if(e===l.found)break;if("newline"===e.type){h(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}T.start<l.found.offset-1024&&h(l.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else k&&("source"in k&&k.source&&":"===k.source[0]?h(k,"MISSING_CHAR",`Missing space after : in ${g}`):h(l.start,"MISSING_CHAR",`Missing , or : between ${g} items`));const f=k?e(n,k,l,h):l.found?t(n,l.end,S,null,l,h):null;f?isBlock(k)&&h(f.range,"BLOCK_IN_FLOW",d):l.comment&&(s.comment?s.comment+="\n"+l.comment:s.comment=l.comment);const p=new i.Pair(s,f);if(n.options.keepSourceTokens&&(p.srcToken=a),m){const e=y;u.mapIncludes(n,e.items,s)&&h(r,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(p)}else{const e=new o.YAMLMap(n.schema);e.flow=!0,e.items.push(p),y.items.push(e)}b=f?f.range[2]:l.end}else{const r=k?e(n,k,T,h):t(n,T.end,S,null,T,h);y.items.push(r),b=r.range[2],isBlock(k)&&h(r.range,"BLOCK_IN_FLOW",d)}}const w=m?"}":"]",[S,...k]=f.end;let T=b;if(S&&S.source===w)T=S.offset+S.source.length;else{const e=g[0].toUpperCase()+g.substring(1);h(b,v?"MISSING_CHAR":"BAD_INDENT",v?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),S&&1!==S.source.length&&k.unshift(S)}if(k.length>0){const e=a.resolveEnd(k,T,n.options.strict,h);e.comment&&(y.comment?y.comment+="\n"+e.comment:y.comment=e.comment),y.range=[f.offset,T,e.offset]}else y.range=[f.offset,T,T];return y}},7876:(e,t,n)=>{var r=n(58844),i=n(7655);function foldLines(e){var t;let n,r;try{n=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),r=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch(e){n=/(.*?)[ \t]*\r?\n/ys,r=/[ \t]*(.*?)[ \t]*\r?\n/ys}let i=n.exec(e);if(!i)return e;let o=i[1],s=" ",a=n.lastIndex;for(r.lastIndex=a;i=r.exec(e);)""===i[1]?"\n"===s?o+=s:s="\n":(o+=s+i[1],s=" "),a=r.lastIndex;const c=/[ \t]*(.*)/ys;return c.lastIndex=a,i=c.exec(e),o+s+(null!==(t=null==i?void 0:i[1])&&void 0!==t?t:"")}function foldNewline(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const o={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function parseCharCode(e,t,n,r){const i=e.substr(t,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const i=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}return String.fromCodePoint(o)}t.resolveFlowScalar=function resolveFlowScalar(e,t,n){const{offset:s,type:a,source:c,end:l}=e;let u,d;const _onError=(e,t,r)=>n(s+e,t,r);switch(a){case"scalar":u=r.Scalar.PLAIN,d=function plainValue(e,t){let n="";switch(e[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`);return foldLines(e)}(c,_onError);break;case"single-quoted-scalar":u=r.Scalar.QUOTE_SINGLE,d=function singleQuotedValue(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return foldLines(e.slice(1,-1)).replace(/''/g,"'")}(c,_onError);break;case"double-quoted-scalar":u=r.Scalar.QUOTE_DOUBLE,d=function doubleQuotedValue(e,t){let n="";for(let r=1;r<e.length-1;++r){const i=e[r];if("\r"!==i||"\n"!==e[r+1])if("\n"===i){const{fold:t,offset:i}=foldNewline(e,r);n+=t,r=i}else if("\\"===i){let i=e[++r];const s=o[i];if(s)n+=s;else if("\n"===i)for(i=e[r+1];" "===i||"\t"===i;)i=e[1+ ++r];else if("\r"===i&&"\n"===e[r+1])for(i=e[1+ ++r];" "===i||"\t"===i;)i=e[1+ ++r];else if("x"===i||"u"===i||"U"===i){const o={x:2,u:4,U:8}[i];n+=parseCharCode(e,r+1,o,t),r+=o}else{const i=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),n+=i}}else if(" "===i||"\t"===i){const t=r;let o=e[r+1];for(;" "===o||"\t"===o;)o=e[1+ ++r];"\n"===o||"\r"===o&&"\n"===e[r+2]||(n+=r>t?e.slice(t,r+1):i)}else n+=i}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(c,_onError);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[s,s+c.length,s+c.length]}}const f=s+c.length,h=i.resolveEnd(l,f,t,n);return{value:d,type:u,comment:h.comment,range:[s,f,h.offset]}}},5920:(e,t)=>{t.resolveProps=function resolveProps(e,{flow:t,indicator:n,next:r,offset:i,onError:o,startOnNewline:s}){let a=!1,c=s,l=s,u="",d="",f=!1,h=!1,p=null,m=null,g=null,y=null,v=null;for(const r of e)switch(h&&("space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),r.type){case"space":!t&&c&&"doc-start"!==n&&"\t"===r.source[0]&&o(r,"TAB_AS_INDENT","Tabs are not allowed as indentation"),l=!0;break;case"comment":{l||o(r,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=r.source.substring(1)||" ";u?u+=d+e:u=e,d="",c=!1;break}case"newline":c?u?u+=r.source:a=!0:d+=r.source,c=!0,f=!0,l=!0;break;case"anchor":p&&o(r,"MULTIPLE_ANCHORS","A node can have at most one anchor"),r.source.endsWith(":")&&o(r.offset+r.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=r,null===v&&(v=r.offset),c=!1,l=!1,h=!0;break;case"tag":m&&o(r,"MULTIPLE_TAGS","A node can have at most one tag"),m=r,null===v&&(v=r.offset),c=!1,l=!1,h=!0;break;case n:(p||m)&&o(r,"BAD_PROP_ORDER",`Anchors and tags must be after the ${r.source} indicator`),y&&o(r,"UNEXPECTED_TOKEN",`Unexpected ${r.source} in ${null!=t?t:"collection"}`),y=r,c=!1,l=!1;break;case"comma":if(t){g&&o(r,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),g=r,c=!1,l=!1;break}default:o(r,"UNEXPECTED_TOKEN",`Unexpected ${r.type} token`),c=!1,l=!1}const b=e[e.length-1],w=b?b.offset+b.source.length:i;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),{comma:g,found:y,spaceBefore:a,comment:u,hasNewline:f,anchor:p,tag:m,end:w,start:null!=v?v:w}}},93094:(e,t)=>{t.containsNewline=function containsNewline(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(containsNewline(t.key)||containsNewline(t.value))return!0}return!1;default:return!0}}},7154:(e,t)=>{t.emptyScalarPosition=function emptyScalarPosition(e,t,n){if(t){null===n&&(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===(null==n?void 0:n.type);)e+=n.source.length,n=t[++r];break}}return e}},72566:(e,t,n)=>{var r=n(93094);t.flowIndentCheck=function flowIndentCheck(e,t,n){if("flow-collection"===(null==t?void 0:t.type)){const i=t.end[0];if(i.indent===e&&("]"===i.source||"}"===i.source)&&r.containsNewline(t)){n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}}},96493:(e,t,n)=>{var r=n(10466);t.mapIncludes=function mapIncludes(e,t,n){const{uniqueKeys:i}=e.options;if(!1===i)return!1;const o="function"==typeof i?i:(t,n)=>t===n||r.isScalar(t)&&r.isScalar(n)&&t.value===n.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>o(e.key,n)))}},86068:(e,t,n)=>{var r=n(12055),i=n(43365),o=n(10466),s=n(10394),a=n(93257),c=n(23673),l=n(20611),u=n(89957),d=n(78475),f=n(33085),h=n(87581),p=n(99226);class Document{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,o.NODE_TYPE,{value:o.DOC});let r=null;"function"==typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:s}=i;(null==n?void 0:n.directives)?(this.directives=n.directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new p.Directives({version:s}),this.setSchema(s,n),this.contents=void 0===e?null:this.createNode(e,r,n)}clone(){const e=Object.create(Document.prototype,{[o.NODE_TYPE]:{value:o.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=o.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){assertCollection(this.contents)&&this.contents.add(e)}addIn(e,t){assertCollection(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=d.anchorNames(this);e.anchor=!t||n.has(t)?d.findNewAnchor(t||"a",n):t}return new r.Alias(e.anchor)}createNode(e,t,n){let r;if("function"==typeof t)e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){const keyToStr=e=>"number"==typeof e||e instanceof String||e instanceof Number,e=t.filter(keyToStr).map(String);e.length>0&&(t=t.concat(e)),r=t}else void 0===n&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:s,flow:a,keepUndefined:c,onTagObj:l,tag:u}=null!=n?n:{},{onAnchor:f,setAnchors:p,sourceObjects:m}=d.createNodeAnchors(this,s||"a"),g={aliasDuplicateObjects:null==i||i,keepUndefined:null!=c&&c,onAnchor:f,onTagObj:l,replacer:r,schema:this.schema,sourceObjects:m},y=h.createNode(e,u,g);return a&&o.isCollection(y)&&(y.flow=!0),p(),y}createPair(e,t,n={}){const r=this.createNode(e,null,n),i=this.createNode(t,null,n);return new s.Pair(r,i)}delete(e){return!!assertCollection(this.contents)&&this.contents.delete(e)}deleteIn(e){return i.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!assertCollection(this.contents)&&this.contents.deleteIn(e)}get(e,t){return o.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return i.isEmptyPath(e)?!t&&o.isScalar(this.contents)?this.contents.value:this.contents:o.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!o.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return i.isEmptyPath(e)?void 0!==this.contents:!!o.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=i.collectionFromPath(this.schema,[e],t):assertCollection(this.contents)&&this.contents.set(e,t)}setIn(e,t){i.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=i.collectionFromPath(this.schema,Array.from(e),t):assertCollection(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new p.Directives({version:"1.1"}),n={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new p.Directives({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!n)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new c.Schema(Object.assign(n,t))}}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100,stringify:l.stringify},c=a.toJS(this.contents,null!=t?t:"",s);if("function"==typeof i)for(const{count:e,res:t}of s.anchors.values())i(t,e);return"function"==typeof o?f.applyReviver(o,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return u.stringifyDocument(this,e)}}function assertCollection(e){if(o.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}t.Document=Document},78475:(e,t,n)=>{var r=n(10466),i=n(81381);function anchorNames(e){const t=new Set;return i.visit(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function findNewAnchor(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}t.anchorIsValid=function anchorIsValid(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},t.anchorNames=anchorNames,t.createNodeAnchors=function createNodeAnchors(e,t){const n=[],i=new Map;let o=null;return{onAnchor:r=>{n.push(r),o||(o=anchorNames(e));const i=findNewAnchor(t,o);return o.add(i),i},setAnchors:()=>{for(const e of n){const t=i.get(e);if("object"!=typeof t||!t.anchor||!r.isScalar(t.node)&&!r.isCollection(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:i}},t.findNewAnchor=findNewAnchor},33085:(e,t)=>{t.applyReviver=function applyReviver(e,t,n,r){if(r&&"object"==typeof r)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){const n=r[t],i=applyReviver(e,r,String(t),n);void 0===i?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(const t of Array.from(r.keys())){const n=r.get(t),i=applyReviver(e,r,t,n);void 0===i?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(const t of Array.from(r)){const n=applyReviver(e,r,t,t);void 0===n?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(const[t,n]of Object.entries(r)){const i=applyReviver(e,r,t,n);void 0===i?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}},87581:(e,t,n)=>{var r=n(12055),i=n(10466),o=n(58844);t.createNode=function createNode(e,t,n){var s,a;if(i.isDocument(e)&&(e=e.contents),i.isNode(e))return e;if(i.isPair(e)){const t=null===(a=(s=n.schema[i.MAP]).createNode)||void 0===a?void 0:a.call(s,n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"function"==typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:c,onAnchor:l,onTagObj:u,schema:d,sourceObjects:f}=n;let h;if(c&&e&&"object"==typeof e){if(h=f.get(e),h)return h.anchor||(h.anchor=l(e)),new r.Alias(h.anchor);h={anchor:null,node:null},f.set(e,h)}(null==t?void 0:t.startsWith("!!"))&&(t="tag:yaml.org,2002:"+t.slice(2));let p=function findTagObject(e,t,n){var r;if(t){const e=n.filter((e=>e.tag===t)),i=null!==(r=e.find((e=>!e.format)))&&void 0!==r?r:e[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find((t=>{var n;return(null===(n=t.identify)||void 0===n?void 0:n.call(t,e))&&!t.format}))}(e,t,d.tags);if(!p){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new o.Scalar(e);return h&&(h.node=t),t}p=e instanceof Map?d[i.MAP]:Symbol.iterator in Object(e)?d[i.SEQ]:d[i.MAP]}u&&(u(p),delete n.onTagObj);const m=(null==p?void 0:p.createNode)?p.createNode(n.schema,e,n):new o.Scalar(e);return t&&(m.tag=t),h&&(h.node=m),m}},99226:(e,t,n)=>{var r=n(10466),i=n(81381);const o={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class Directives{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Directives.defaultYaml,e),this.tags=Object.assign({},Directives.defaultTags,t)}clone(){const e=new Directives(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Directives.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Directives.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/);r||t(`The ${e} tag has no suffix`);const i=this.tags[n];return i?i+decodeURIComponent(r):"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+e.substring(n.length).replace(/[!,[\]{}]/g,(e=>o[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let o;if(e&&n.length>0&&r.isNode(e.contents)){const t={};i.visit(e.contents,((e,n)=>{r.isNode(n)&&n.tag&&(t[n.tag]=!0)})),o=Object.keys(t)}else o=[];for(const[r,i]of n)"!!"===r&&"tag:yaml.org,2002:"===i||e&&!o.some((e=>e.startsWith(i)))||t.push(`%TAG ${r} ${i}`);return t.join("\n")}}Directives.defaultYaml={explicit:!1,version:"1.2"},Directives.defaultTags={"!!":"tag:yaml.org,2002:"},t.Directives=Directives},2394:(e,t)=>{class YAMLError extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}t.YAMLError=YAMLError,t.YAMLParseError=class YAMLParseError extends YAMLError{constructor(e,t,n){super("YAMLParseError",e,t,n)}},t.YAMLWarning=class YAMLWarning extends YAMLError{constructor(e,t,n){super("YAMLWarning",e,t,n)}},t.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map((e=>t.linePos(e)));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let o=i-1,s=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){const e=Math.min(o-39,s.length-79);s=""+s.substring(e),o-=e-1}if(s.length>80&&(s=s.substring(0,79)+""),r>1&&/^ *$/.test(s.substring(0,o))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"\n"),s=n+s}if(/[^ ]/.test(s)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>i&&(e=Math.min(t.col-i,80-o));const a=" ".repeat(o)+"^".repeat(e);n.message+=`:\n\n${s}\n${a}\n`}}},93419:(e,t,n)=>{var r=n(5281),i=n(86068),o=n(23673),s=n(2394),a=n(12055),c=n(10466),l=n(10394),u=n(58844),d=n(56575),f=n(13798),h=n(75208),p=n(87135),m=n(94708),g=n(69369),y=n(68011),v=n(81381);t.Composer=r.Composer,t.Document=i.Document,t.Schema=o.Schema,t.YAMLError=s.YAMLError,t.YAMLParseError=s.YAMLParseError,t.YAMLWarning=s.YAMLWarning,t.Alias=a.Alias,t.isAlias=c.isAlias,t.isCollection=c.isCollection,t.isDocument=c.isDocument,t.isMap=c.isMap,t.isNode=c.isNode,t.isPair=c.isPair,t.isScalar=c.isScalar,t.isSeq=c.isSeq,t.Pair=l.Pair,t.Scalar=u.Scalar,t.YAMLMap=d.YAMLMap,t.YAMLSeq=f.YAMLSeq,t.CST=h,t.Lexer=p.Lexer,t.LineCounter=m.LineCounter,t.Parser=g.Parser,t.parse=y.parse,t.parseAllDocuments=y.parseAllDocuments,t.parseDocument=y.parseDocument,t.stringify=y.stringify,t.visit=v.visit,t.visitAsync=v.visitAsync},95441:(e,t)=>{t.debug=function debug(e,...t){"debug"===e&&console.log(...t)},t.warn=function warn(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}},12055:(e,t,n)=>{var r=n(78475),i=n(81381),o=n(10466);class Alias extends o.NodeBase{constructor(e){super(o.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return i.visit(e,{Node:(e,n)=>{if(n===this)return i.visit.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:i}=t,o=this.resolve(r);if(!o){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}const s=n.get(o);if(!s||void 0===s.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(i>=0&&(s.count+=1,0===s.aliasCount&&(s.aliasCount=getAliasCount(r,o,n)),s.count*s.aliasCount>i)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return s.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(r.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${i} `}return i}}function getAliasCount(e,t,n){if(o.isAlias(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(o.isCollection(t)){let r=0;for(const i of t.items){const t=getAliasCount(e,i,n);t>r&&(r=t)}return r}if(o.isPair(t)){const r=getAliasCount(e,t.key,n),i=getAliasCount(e,t.value,n);return Math.max(r,i)}return 1}t.Alias=Alias},43365:(e,t,n)=>{var r=n(87581),i=n(10466);function collectionFromPath(e,t,n){let i=n;for(let e=t.length-1;e>=0;--e){const n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){const e=[];e[n]=i,i=e}else i=new Map([[n,i]])}return r.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const isEmptyPath=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class Collection extends i.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>i.isNode(t)||i.isPair(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(isEmptyPath(e))this.add(t);else{const[n,...r]=e,o=this.get(n,!0);if(i.isCollection(o))o.addIn(r,t);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,collectionFromPath(this.schema,r,t))}}}deleteIn(e){const[t,...n]=e;if(0===n.length)return this.delete(t);const r=this.get(t,!0);if(i.isCollection(r))return r.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...r]=e,o=this.get(n,!0);return 0===r.length?!t&&i.isScalar(o)?o.value:o:i.isCollection(o)?o.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!i.isPair(t))return!1;const n=t.value;return null==n||e&&i.isScalar(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn(e){const[t,...n]=e;if(0===n.length)return this.has(t);const r=this.get(t,!0);return!!i.isCollection(r)&&r.hasIn(n)}setIn(e,t){const[n,...r]=e;if(0===r.length)this.set(n,t);else{const e=this.get(n,!0);if(i.isCollection(e))e.setIn(r,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,collectionFromPath(this.schema,r,t))}}}}Collection.maxFlowStringSingleLineLength=60,t.Collection=Collection,t.collectionFromPath=collectionFromPath,t.isEmptyPath=isEmptyPath},10466:(e,t)=>{const n=Symbol.for("yaml.alias"),r=Symbol.for("yaml.document"),i=Symbol.for("yaml.map"),o=Symbol.for("yaml.pair"),s=Symbol.for("yaml.scalar"),a=Symbol.for("yaml.seq"),c=Symbol.for("yaml.node.type"),isScalar=e=>!!e&&"object"==typeof e&&e[c]===s;function isCollection(e){if(e&&"object"==typeof e)switch(e[c]){case i:case a:return!0}return!1}t.ALIAS=n,t.DOC=r,t.MAP=i,t.NODE_TYPE=c,t.NodeBase=class NodeBase{constructor(e){Object.defineProperty(this,c,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}},t.PAIR=o,t.SCALAR=s,t.SEQ=a,t.hasAnchor=e=>(isScalar(e)||isCollection(e))&&!!e.anchor,t.isAlias=e=>!!e&&"object"==typeof e&&e[c]===n,t.isCollection=isCollection,t.isDocument=e=>!!e&&"object"==typeof e&&e[c]===r,t.isMap=e=>!!e&&"object"==typeof e&&e[c]===i,t.isNode=function isNode(e){if(e&&"object"==typeof e)switch(e[c]){case n:case i:case s:case a:return!0}return!1},t.isPair=e=>!!e&&"object"==typeof e&&e[c]===o,t.isScalar=isScalar,t.isSeq=e=>!!e&&"object"==typeof e&&e[c]===a},10394:(e,t,n)=>{var r=n(87581),i=n(38843),o=n(13567),s=n(10466);class Pair{constructor(e,t=null){Object.defineProperty(this,s.NODE_TYPE,{value:s.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return s.isNode(t)&&(t=t.clone(e)),s.isNode(n)&&(n=n.clone(e)),new Pair(t,n)}toJSON(e,t){const n=(null==t?void 0:t.mapAsMap)?new Map:{};return o.addPairToJSMap(t,n,this)}toString(e,t,n){return(null==e?void 0:e.doc)?i.stringifyPair(this,e,t,n):JSON.stringify(this)}}t.Pair=Pair,t.createPair=function createPair(e,t,n){const i=r.createNode(e,void 0,n),o=r.createNode(t,void 0,n);return new Pair(i,o)}},58844:(e,t,n)=>{var r=n(10466),i=n(93257);class Scalar extends r.NodeBase{constructor(e){super(r.SCALAR),this.value=e}toJSON(e,t){return(null==t?void 0:t.keep)?this.value:i.toJS(this.value,e,t)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED",Scalar.BLOCK_LITERAL="BLOCK_LITERAL",Scalar.PLAIN="PLAIN",Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE",Scalar.QUOTE_SINGLE="QUOTE_SINGLE",t.Scalar=Scalar,t.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e},56575:(e,t,n)=>{var r=n(40240),i=n(13567),o=n(43365),s=n(10466),a=n(10394),c=n(58844);function findPair(e,t){const n=s.isScalar(t)?t.value:t;for(const r of e)if(s.isPair(r)){if(r.key===t||r.key===n)return r;if(s.isScalar(r.key)&&r.key.value===n)return r}}class YAMLMap extends o.Collection{constructor(e){super(s.MAP,e),this.items=[]}static get tagName(){return"tag:yaml.org,2002:map"}add(e,t){var n;let r;r=s.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new a.Pair(e.key,e.value):new a.Pair(e,e.value);const i=findPair(this.items,r.key),o=null===(n=this.schema)||void 0===n?void 0:n.sortMapEntries;if(i){if(!t)throw new Error(`Key ${r.key} already set`);s.isScalar(i.value)&&c.isScalarValue(r.value)?i.value.value=r.value:i.value=r.value}else if(o){const e=this.items.findIndex((e=>o(r,e)<0));-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=findPair(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=findPair(this.items,e),r=null==n?void 0:n.value;return!t&&s.isScalar(r)?r.value:r}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new a.Pair(e,t),!0)}toJSON(e,t,n){const r=n?new n:(null==t?void 0:t.mapAsMap)?new Map:{};(null==t?void 0:t.onCreate)&&t.onCreate(r);for(const e of this.items)i.addPairToJSMap(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(const e of this.items)if(!s.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),r.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}t.YAMLMap=YAMLMap,t.findPair=findPair},13798:(e,t,n)=>{var r=n(40240),i=n(43365),o=n(10466),s=n(58844),a=n(93257);class YAMLSeq extends i.Collection{constructor(e){super(o.SEQ,e),this.items=[]}static get tagName(){return"tag:yaml.org,2002:seq"}add(e){this.items.push(e)}delete(e){const t=asItemIndex(e);if("number"!=typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=asItemIndex(e);if("number"!=typeof n)return;const r=this.items[n];return!t&&o.isScalar(r)?r.value:r}has(e){const t=asItemIndex(e);return"number"==typeof t&&t<this.items.length}set(e,t){const n=asItemIndex(e);if("number"!=typeof n)throw new Error(`Expected a valid index, not ${e}.`);const r=this.items[n];o.isScalar(r)&&s.isScalarValue(t)?r.value=t:this.items[n]=t}toJSON(e,t){const n=[];(null==t?void 0:t.onCreate)&&t.onCreate(n);let r=0;for(const e of this.items)n.push(a.toJS(e,String(r++),t));return n}toString(e,t,n){return e?r.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}}function asItemIndex(e){let t=o.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=YAMLSeq},13567:(e,t,n)=>{var r=n(95441),i=n(20611),o=n(10466),s=n(58844),a=n(93257);const isMergeKey=e=>"<<"===e||o.isScalar(e)&&"<<"===e.value&&(!e.type||e.type===s.Scalar.PLAIN);function mergeToJSMap(e,t,n){const r=e&&o.isAlias(n)?n.resolve(e.doc):n;if(!o.isMap(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,e,Map);for(const[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}t.addPairToJSMap=function addPairToJSMap(e,t,{key:n,value:s}){if((null==e?void 0:e.doc.schema.merge)&&isMergeKey(n))if(s=o.isAlias(s)?s.resolve(e.doc):s,o.isSeq(s))for(const n of s.items)mergeToJSMap(e,t,n);else if(Array.isArray(s))for(const n of s)mergeToJSMap(e,t,n);else mergeToJSMap(e,t,s);else{const c=a.toJS(n,"",e);if(t instanceof Map)t.set(c,a.toJS(s,c,e));else if(t instanceof Set)t.add(c);else{const l=function stringifyKey(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(o.isNode(e)&&n&&n.doc){const t=i.createStringifyContext(n.doc,{});t.anchors=new Set;for(const e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const o=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(o);e.length>40&&(e=e.substring(0,36)+'..."'),r.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return o}return JSON.stringify(t)}(n,c,e),u=a.toJS(s,l,e);l in t?Object.defineProperty(t,l,{value:u,writable:!0,enumerable:!0,configurable:!0}):t[l]=u}}return t}},93257:(e,t,n)=>{var r=n(10466);t.toJS=function toJS(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>toJS(e,String(t),n)));if(e&&"function"==typeof e.toJSON){if(!n||!r.hasAnchor(e))return e.toJSON(t,n);const i={aliasCount:0,count:1,res:void 0};n.anchors.set(e,i),n.onCreate=e=>{i.res=e,delete n.onCreate};const o=e.toJSON(t,n);return n.onCreate&&n.onCreate(o),o}return"bigint"!=typeof e||(null==n?void 0:n.keep)?e:Number(e)}},47084:(e,t,n)=>{var r=n(51328),i=n(7876),o=n(2394),s=n(98431);function addEndtoBlockProps(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function setFlowScalarValue(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let i=t.length;"block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length);for(const e of r)e.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}t.createScalarToken=function createScalarToken(e,t){var n;const{implicitKey:r=!1,indent:i,inFlow:o=!1,offset:a=-1,type:c="PLAIN"}=t,l=s.stringifyString({type:c,value:e},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),u=null!==(n=t.end)&&void 0!==n?n:[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(l[0]){case"|":case">":{const e=l.indexOf("\n"),t=l.substring(0,e),n=l.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return addEndtoBlockProps(r,u)||r.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:l,end:u};default:return{type:"scalar",offset:a,indent:i,source:l,end:u}}},t.resolveAsScalar=function resolveAsScalar(e,t=!0,n){if(e){const _onError=(e,t,r)=>{const i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!n)throw new o.YAMLParseError([i,i+1],t,r);n(i,t,r)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return i.resolveFlowScalar(e,t,_onError);case"block-scalar":return r.resolveBlockScalar(e,t,_onError)}}return null},t.setScalarValue=function setScalarValue(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:o=!1,type:a}=n,c="indent"in e?e.indent:null;if(r&&"number"==typeof c&&(c+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");a=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}const l=s.stringifyString({type:a,value:t},{implicitKey:i||null===c,indent:null!==c&&c>0?" ".repeat(c):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function setBlockScalarValue(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:n,source:r}];addEndtoBlockProps(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:o,source:i})}}(e,l);break;case'"':setFlowScalarValue(e,l,"double-quoted-scalar");break;case"'":setFlowScalarValue(e,l,"single-quoted-scalar");break;default:setFlowScalarValue(e,l,"scalar")}}},84453:(e,t)=>{function stringifyToken(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=stringifyToken(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=stringifyItem(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=stringifyItem(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=stringifyItem(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function stringifyItem({start:e,key:t,sep:n,value:r}){let i="";for(const t of e)i+=t.source;if(t&&(i+=stringifyToken(t)),n)for(const e of n)i+=e.source;return r&&(i+=stringifyToken(r)),i}t.stringify=e=>"type"in e?stringifyToken(e):stringifyItem(e)},28318:(e,t)=>{const n=Symbol("break visit"),r=Symbol("skip children"),i=Symbol("remove item");function visit(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),_visit(Object.freeze([]),e,t)}function _visit(e,t,r){let o=r(t,e);if("symbol"==typeof o)return o;for(const s of["key","value"]){const a=t[s];if(a&&"items"in a){for(let t=0;t<a.items.length;++t){const o=_visit(Object.freeze(e.concat([[s,t]])),a.items[t],r);if("number"==typeof o)t=o-1;else{if(o===n)return n;o===i&&(a.items.splice(t,1),t-=1)}}"function"==typeof o&&"key"===s&&(o=o(t,e))}}return"function"==typeof o?o(t,e):o}visit.BREAK=n,visit.SKIP=r,visit.REMOVE=i,visit.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=null==n?void 0:n[e];if(!t||!("items"in t))return;n=t.items[r]}return n},visit.parentCollection=(e,t)=>{const n=visit.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=null==n?void 0:n[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},t.visit=visit},75208:(e,t,n)=>{var r=n(47084),i=n(84453),o=n(28318);t.createScalarToken=r.createScalarToken,t.resolveAsScalar=r.resolveAsScalar,t.setScalarValue=r.setScalarValue,t.stringify=i.stringify,t.visit=o.visit,t.BOM="\ufeff",t.DOCUMENT="",t.FLOW_END="",t.SCALAR="",t.isCollection=e=>!!e&&"items"in e,t.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),t.prettyToken=function prettyToken(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},t.tokenType=function tokenType(e){switch(e){case"\ufeff":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}},87135:(e,t,n)=>{var r=n(75208);function isEmpty(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const i="0123456789ABCDEFabcdef".split(""),o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),s=",[]{}".split(""),a=" ,[]{}\n\r\t".split(""),isNotAnchorChar=e=>!e||a.includes(e);t.Lexer=class Lexer{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){var n;e&&(this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null),this.atEnd=!t;let r=null!==(n=this.next)&&void 0!==n?n:"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){const t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"===t||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&isEmpty(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===r.BOM&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length;const n=e.indexOf("#");if(-1!==n){const r=e[n-1];" "!==r&&"\t"!==r||(t=n-1)}for(;;){const n=e[t-1];if(" "!==n&&"\t"!==n)break;t-=1}const r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield r.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if("---"===e&&isEmpty(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if("..."===e&&isEmpty(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!isEmpty(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&isEmpty(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(isNotAnchorChar),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const i=this.getLine();if(null===i)return this.setNext("flow");if(-1!==n&&n<this.indentNext&&"#"!==i[0]||0===n&&(i.startsWith("---")||i.startsWith("..."))&&isEmpty(i[3])){if(!(n===this.indentNext-1&&1===this.flowLevel&&("]"===i[0]||"}"===i[0])))return this.flowLevel=0,yield r.FLOW_END,yield*this.parseLineStart()}let o=0;for(;","===i[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),i[o]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(isNotAnchorChar),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||isEmpty(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>isEmpty(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let r=this.pos;e=this.buffer[r];++r)switch(e){case" ":n+=1;break;case"\n":t=r,n=0;break;case"\r":{const e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext+=this.blockScalarIndent;do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep)for(;;){let e=t-1,r=this.buffer[e];"\r"===r&&(r=this.buffer[--e]);const i=e;for(;" "===r||"\t"===r;)r=this.buffer[--e];if(!("\n"===r&&e>=this.pos&&e+1+n>i))break;t=e}return yield r.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,n=this.pos-1,i=this.pos-1;for(;t=this.buffer[++i];)if(":"===t){const t=this.buffer[i+1];if(isEmpty(t)||e&&","===t)break;n=i}else if(isEmpty(t)){let r=this.buffer[i+1];if("\r"===t&&("\n"===r?(i+=1,t="\n",r=this.buffer[i+1]):n=i),"#"===r||e&&s.includes(r))break;if("\n"===t){const e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(e&&s.includes(t))break;n=i}return t||this.atEnd?(yield r.SCALAR,yield*this.pushToIndex(n+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(isNotAnchorChar))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(isEmpty(t)||e&&s.includes(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!isEmpty(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(o.includes(t))t=this.buffer[++e];else{if("%"!==t||!i.includes(this.buffer[e+1])||!i.includes(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}},94708:(e,t)=>{t.LineCounter=class LineCounter{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}}},69369:(e,t,n)=>{var r=n(75208),i=n(87135);function includesToken(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function includesNonEmpty(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return!0}return!1}function isFlowToken(e){switch(null==e?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function getPrevProps(e){var t;switch(e.type){case"document":return e.start;case"block-map":{const n=e.items[e.items.length-1];return null!==(t=n.sep)&&void 0!==t?t:n.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function getFirstKeyStartProps(e){var t;if(0===e.length)return[];let n=e.length;e:for(;--n>=0;)switch(e[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===(null===(t=e[++n])||void 0===t?void 0:t.type););return e.splice(n,e.length)}function fixFlowSeqItems(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||includesToken(t.start,"explicit-key-ind")||includesToken(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,isFlowToken(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}t.Parser=class Parser{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new i.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",r.prettyToken(e)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=r.tokenType(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=null!=e?e:this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&fixFlowSeqItems(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!includesToken(n.start,"explicit-key-ind"));n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&!includesNonEmpty(n.start)&&(0===t.indent||n.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(includesNonEmpty(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=getFirstKeyStartProps(getPrevProps(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var t;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const t="end"in n.value?n.value.end:void 0,r=Array.isArray(t)?t[t.length-1]:void 0;"comment"===(null==r?void 0:r.type)?null==t||t.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const r=e.items[e.items.length-2],i=null===(t=null==r?void 0:r.value)||void 0===t?void 0:t.end;if(Array.isArray(i))return Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),void e.items.pop()}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const t=!this.onKeyLine&&this.indent===e.indent&&(n.sep||includesNonEmpty(n.start));let r=[];if(t&&n.sep&&!n.value){const t=[];for(let r=0;r<n.sep.length;++r){const i=n.sep[r];switch(i.type){case"newline":t.push(r);break;case"space":break;case"comment":i.indent>e.indent&&(t.length=0);break;default:t.length=0}}t.length>=2&&(r=n.sep.splice(t[1]))}switch(this.type){case"anchor":case"tag":return void(t||n.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken));case"explicit-key-ind":return n.sep||includesToken(n.start,"explicit-key-ind")?t||n.value?(r.push(this.sourceToken),e.items.push({start:r})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]}):n.start.push(this.sourceToken),void(this.onKeyLine=!0);case"map-value-ind":if(includesToken(n.start,"explicit-key-ind"))if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(includesToken(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(isFlowToken(n.key)&&!includesToken(n.sep,"newline")){const e=getFirstKeyStartProps(n.start),t=n.key,r=n.sep;r.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:t,sep:r}]})}else r.length>0?n.sep=n.sep.concat(r,this.sourceToken):n.sep.push(this.sourceToken);else if(includesToken(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const e=getFirstKeyStartProps(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||t?e.items.push({start:r,key:null,sep:[this.sourceToken]}):includesToken(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);return void(t||n.value?(e.items.push({start:r,key:i,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(i):(Object.assign(n,{key:i,sep:[]}),this.onKeyLine=!0))}default:{const i=this.startBlockValue(e);if(i)return t&&"block-seq"!==i.type&&includesToken(n.start,"explicit-key-ind")&&e.items.push({start:r}),void this.stack.push(i)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var t;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const t="end"in n.value?n.value.end:void 0,r=Array.isArray(t)?t[t.length-1]:void 0;"comment"===(null==r?void 0:r.type)?null==t||t.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const r=e.items[e.items.length-2],i=null===(t=null==r?void 0:r.value)||void 0===t?void 0:t.end;if(Array.isArray(i))return Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),void e.items.pop()}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;return void n.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(n.value||includesToken(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=getFirstKeyStartProps(getPrevProps(t));fixFlowSeqItems(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=getFirstKeyStartProps(getPrevProps(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t}]}}case"map-value-ind":{this.onKeyLine=!0;const t=getFirstKeyStartProps(getPrevProps(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&(!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type)))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}},68011:(e,t,n)=>{var r=n(5281),i=n(86068),o=n(2394),s=n(95441),a=n(94708),c=n(69369);function parseOptions(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new a.LineCounter||null,prettyErrors:t}}function parseDocument(e,t={}){const{lineCounter:n,prettyErrors:i}=parseOptions(t),s=new c.Parser(null==n?void 0:n.addNewLine),a=new r.Composer(t);let l=null;for(const t of a.compose(s.parse(e),!0,e.length))if(l){if("silent"!==l.options.logLevel){l.errors.push(new o.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else l=t;return i&&n&&(l.errors.forEach(o.prettifyError(e,n)),l.warnings.forEach(o.prettifyError(e,n))),l}t.parse=function parse(e,t,n){let r;"function"==typeof t?r=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=parseDocument(e,n);if(!i)return null;if(i.warnings.forEach((e=>s.warn(i.options.logLevel,e))),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))},t.parseAllDocuments=function parseAllDocuments(e,t={}){const{lineCounter:n,prettyErrors:i}=parseOptions(t),s=new c.Parser(null==n?void 0:n.addNewLine),a=new r.Composer(t),l=Array.from(a.compose(s.parse(e)));if(i&&n)for(const t of l)t.errors.forEach(o.prettifyError(e,n)),t.warnings.forEach(o.prettifyError(e,n));return l.length>0?l:Object.assign([],{empty:!0},a.streamInfo())},t.parseDocument=parseDocument,t.stringify=function stringify(e,t,n){var r;let o=null;if("function"==typeof t||Array.isArray(t)?o=t:void 0===n&&t&&(n=t),"string"==typeof n&&(n=n.length),"number"==typeof n){const e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=null!==(r=null!=n?n:t)&&void 0!==r?r:{};if(!e)return}return new i.Document(e,o,n).toString(n)}},23673:(e,t,n)=>{var r=n(10466),i=n(92744),o=n(52360),s=n(73042),a=n(76524);const sortMapEntriesByKey=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Schema{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:c,schema:l,sortMapEntries:u,toStringDefaults:d}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null,this.merge=!!n,this.name="string"==typeof l&&l||"core",this.knownTags=c?a.coreKnownTags:{},this.tags=a.getTags(t,this.name),this.toStringOptions=null!=d?d:null,Object.defineProperty(this,r.MAP,{value:i.map}),Object.defineProperty(this,r.SCALAR,{value:s.string}),Object.defineProperty(this,r.SEQ,{value:o.seq}),this.sortMapEntries="function"==typeof u?u:!0===u?sortMapEntriesByKey:null}clone(){const e=Object.create(Schema.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}t.Schema=Schema},92744:(e,t,n)=>{var r=n(10466),i=n(10394),o=n(56575);const s={collection:"map",createNode:function createMap(e,t,n){const{keepUndefined:r,replacer:s}=n,a=new o.YAMLMap(e),add=(e,o)=>{if("function"==typeof s)o=s.call(t,e,o);else if(Array.isArray(s)&&!s.includes(e))return;(void 0!==o||r)&&a.items.push(i.createPair(e,o,n))};if(t instanceof Map)for(const[e,n]of t)add(e,n);else if(t&&"object"==typeof t)for(const e of Object.keys(t))add(e,t[e]);return"function"==typeof e.sortMapEntries&&a.items.sort(e.sortMapEntries),a},default:!0,nodeClass:o.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(r.isMap(e)||t("Expected a mapping for this tag"),e)};t.map=s},25397:(e,t,n)=>{var r=n(58844);const i={identify:e=>null==e,createNode:()=>new r.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new r.Scalar(null),stringify:({source:e},t)=>"string"==typeof e&&i.test.test(e)?e:t.options.nullStr};t.nullTag=i},52360:(e,t,n)=>{var r=n(87581),i=n(10466),o=n(13798);const s={collection:"seq",createNode:function createSeq(e,t,n){const{replacer:i}=n,s=new o.YAMLSeq(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if("function"==typeof i){const n=t instanceof Set?o:String(e++);o=i.call(t,n,o)}s.items.push(r.createNode(o,void 0,n))}}return s},default:!0,nodeClass:o.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(i.isSeq(e)||t("Expected a sequence for this tag"),e)};t.seq=s},73042:(e,t,n)=>{var r=n(98431);const i={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,i)=>(t=Object.assign({actualString:!0},t),r.stringifyString(e,t,n,i))};t.string=i},50976:(e,t,n)=>{var r=n(58844);const i={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new r.Scalar("t"===e[0]||"T"===e[0]),stringify({source:e,value:t},n){if(e&&i.test.test(e)){if(t===("t"===e[0]||"T"===e[0]))return e}return t?n.options.trueStr:n.options.falseStr}};t.boolTag=i},13398:(e,t,n)=>{var r=n(58844),i=n(15260);const o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new r.Scalar(parseFloat(e)),n=e.indexOf(".");return-1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:i.stringifyNumber};t.float=a,t.floatExp=s,t.floatNaN=o},64723:(e,t,n)=>{var r=n(15260);const intIdentify=e=>"bigint"==typeof e||Number.isInteger(e),intResolve=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function intStringify(e,t,n){const{value:i}=e;return intIdentify(i)&&i>=0?n+i.toString(t):r.stringifyNumber(e)}const i={identify:e=>intIdentify(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>intResolve(e,2,8,n),stringify:e=>intStringify(e,8,"0o")},o={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>intResolve(e,0,10,n),stringify:r.stringifyNumber},s={identify:e=>intIdentify(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>intResolve(e,2,16,n),stringify:e=>intStringify(e,16,"0x")};t.int=o,t.intHex=s,t.intOct=i},63305:(e,t,n)=>{var r=n(92744),i=n(25397),o=n(52360),s=n(73042),a=n(50976),c=n(13398),l=n(64723);const u=[r.map,o.seq,s.string,i.nullTag,a.boolTag,l.intOct,l.int,l.intHex,c.floatNaN,c.floatExp,c.float];t.schema=u},27854:(e,t,n)=>{var r=n(58844),i=n(92744),o=n(52360);function intIdentify(e){return"bigint"==typeof e||Number.isInteger(e)}const stringifyJSON=({value:e})=>JSON.stringify(e),s=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:stringifyJSON},{identify:e=>null==e,createNode:()=>new r.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:stringifyJSON},{identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>intIdentify(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:stringifyJSON}],a={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},c=[i.map,o.seq].concat(s,a);t.schema=c},76524:(e,t,n)=>{var r=n(92744),i=n(25397),o=n(52360),s=n(73042),a=n(50976),c=n(13398),l=n(64723),u=n(63305),d=n(27854),f=n(38798),h=n(71367),p=n(63879),m=n(10163),g=n(87559),y=n(67714);const v=new Map([["core",u.schema],["failsafe",[r.map,o.seq,s.string]],["json",d.schema],["yaml11",m.schema],["yaml-1.1",m.schema]]),b={binary:f.binary,bool:a.boolTag,float:c.float,floatExp:c.floatExp,floatNaN:c.floatNaN,floatTime:y.floatTime,int:l.int,intHex:l.intHex,intOct:l.intOct,intTime:y.intTime,map:r.map,null:i.nullTag,omap:h.omap,pairs:p.pairs,seq:o.seq,set:g.set,timestamp:y.timestamp},w={"tag:yaml.org,2002:binary":f.binary,"tag:yaml.org,2002:omap":h.omap,"tag:yaml.org,2002:pairs":p.pairs,"tag:yaml.org,2002:set":g.set,"tag:yaml.org,2002:timestamp":y.timestamp};t.coreKnownTags=w,t.getTags=function getTags(e,t){let n=v.get(t);if(!n){if(!Array.isArray(e)){const e=Array.from(v.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}n=[]}if(Array.isArray(e))for(const t of e)n=n.concat(t);else"function"==typeof e&&(n=e(n.slice()));return n.map((e=>{if("string"!=typeof e)return e;const t=b[e];if(t)return t;const n=Object.keys(b).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${n}`)}))}},38798:(e,t,n)=>{var r=n(58844),i=n(98431);const o={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},o,s,a){const c=n;let l;if("function"==typeof Buffer)l=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<c.length;++t)e+=String.fromCharCode(c[t]);l=btoa(e)}}if(t||(t=r.Scalar.BLOCK_LITERAL),t!==r.Scalar.QUOTE_DOUBLE){const e=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth),n=Math.ceil(l.length/e),i=new Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=l.substr(r,e);l=i.join(t===r.Scalar.BLOCK_LITERAL?"\n":" ")}return i.stringifyString({comment:e,type:t,value:l},o,s,a)}};t.binary=o},69466:(e,t,n)=>{var r=n(58844);function boolStringify({value:e,source:t},n){return t&&(e?i:o).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const i={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new r.Scalar(!0),stringify:boolStringify},o={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new r.Scalar(!1),stringify:boolStringify};t.falseTag=o,t.trueTag=i},13922:(e,t,n)=>{var r=n(58844),i=n(15260);const o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},s={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():i.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new r.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){const r=e.substring(n+1).replace(/_/g,"");"0"===r[r.length-1]&&(t.minFractionDigits=r.length)}return t},stringify:i.stringifyNumber};t.float=a,t.floatExp=s,t.floatNaN=o},5563:(e,t,n)=>{var r=n(15260);const intIdentify=e=>"bigint"==typeof e||Number.isInteger(e);function intResolve(e,t,n,{intAsBigInt:r}){const i=e[0];if("-"!==i&&"+"!==i||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===i?BigInt(-1)*t:t}const o=parseInt(e,n);return"-"===i?-1*o:o}function intStringify(e,t,n){const{value:i}=e;if(intIdentify(i)){const e=i.toString(t);return i<0?"-"+n+e.substr(1):n+e}return r.stringifyNumber(e)}const i={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>intResolve(e,2,2,n),stringify:e=>intStringify(e,2,"0b")},o={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>intResolve(e,1,8,n),stringify:e=>intStringify(e,8,"0")},s={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>intResolve(e,0,10,n),stringify:r.stringifyNumber},a={identify:intIdentify,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>intResolve(e,2,16,n),stringify:e=>intStringify(e,16,"0x")};t.int=s,t.intBin=i,t.intHex=a,t.intOct=o},71367:(e,t,n)=>{var r=n(13798),i=n(93257),o=n(10466),s=n(56575),a=n(63879);class YAMLOMap extends r.YAMLSeq{constructor(){super(),this.add=s.YAMLMap.prototype.add.bind(this),this.delete=s.YAMLMap.prototype.delete.bind(this),this.get=s.YAMLMap.prototype.get.bind(this),this.has=s.YAMLMap.prototype.has.bind(this),this.set=s.YAMLMap.prototype.set.bind(this),this.tag=YAMLOMap.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;(null==t?void 0:t.onCreate)&&t.onCreate(n);for(const e of this.items){let r,s;if(o.isPair(e)?(r=i.toJS(e.key,"",t),s=i.toJS(e.value,r,t)):r=i.toJS(e,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,s)}return n}}YAMLOMap.tag="tag:yaml.org,2002:omap";const c={collection:"seq",identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=a.resolvePairs(e,t),r=[];for(const{key:e}of n.items)o.isScalar(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new YAMLOMap,n)},createNode(e,t,n){const r=a.createPairs(e,t,n),i=new YAMLOMap;return i.items=r.items,i}};t.YAMLOMap=YAMLOMap,t.omap=c},63879:(e,t,n)=>{var r=n(10466),i=n(10394),o=n(58844),s=n(13798);function resolvePairs(e,t){var n;if(r.isSeq(e))for(let s=0;s<e.items.length;++s){let a=e.items[s];if(!r.isPair(a)){if(r.isMap(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const e=a.items[0]||new i.Pair(new o.Scalar(null));if(a.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${a.commentBefore}\n${e.key.commentBefore}`:a.commentBefore),a.comment){const t=null!==(n=e.value)&&void 0!==n?n:e.key;t.comment=t.comment?`${a.comment}\n${t.comment}`:a.comment}a=e}e.items[s]=r.isPair(a)?a:new i.Pair(a)}}else t("Expected a sequence for this tag");return e}function createPairs(e,t,n){const{replacer:r}=n,o=new s.YAMLSeq(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,c;if("function"==typeof r&&(e=r.call(t,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);s=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected { key: value } tuple: ${e}`);s=t[0],c=e[s]}else s=e;o.items.push(i.createPair(s,c,n))}return o}const a={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};t.createPairs=createPairs,t.pairs=a,t.resolvePairs=resolvePairs},10163:(e,t,n)=>{var r=n(92744),i=n(25397),o=n(52360),s=n(73042),a=n(38798),c=n(69466),l=n(13922),u=n(5563),d=n(71367),f=n(63879),h=n(87559),p=n(67714);const m=[r.map,o.seq,s.string,i.nullTag,c.trueTag,c.falseTag,u.intBin,u.intOct,u.int,u.intHex,l.floatNaN,l.floatExp,l.float,a.binary,d.omap,f.pairs,h.set,p.intTime,p.floatTime,p.timestamp];t.schema=m},87559:(e,t,n)=>{var r=n(10466),i=n(10394),o=n(56575);class YAMLSet extends o.YAMLMap{constructor(e){super(e),this.tag=YAMLSet.tag}add(e){let t;t=r.isPair(e)?e:"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new i.Pair(e.key,null):new i.Pair(e,null);o.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const n=o.findPair(this.items,e);return!t&&r.isPair(n)?r.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=o.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new i.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}}YAMLSet.tag="tag:yaml.org,2002:set";const s={collection:"map",identify:e=>e instanceof Set,nodeClass:YAMLSet,default:!1,tag:"tag:yaml.org,2002:set",resolve(e,t){if(r.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new YAMLSet,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e},createNode(e,t,n){const{replacer:r}=n,o=new YAMLSet(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof r&&(e=r.call(t,e,e)),o.items.push(i.createPair(e,null,n));return o}};t.YAMLSet=YAMLSet,t.set=s},67714:(e,t,n)=>{var r=n(15260);function parseSexagesimal(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,num=e=>t?BigInt(e):Number(e),i=r.replace(/_/g,"").split(":").reduce(((e,t)=>e*num(60)+num(t)),num(0));return"-"===n?num(-1)*i:i}function stringifySexagesimal(e){let{value:t}=e,num=e=>e;if("bigint"==typeof t)num=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return r.stringifyNumber(e);let n="";t<0&&(n="-",t*=num(-1));const i=num(60),o=[t%i];return t<60?o.unshift(0):(t=(t-o[0])/i,o.unshift(t%i),t>=60&&(t=(t-o[0])/i,o.unshift(t))),n+o.map((e=>e<10?"0"+String(e):String(e))).join(":").replace(/000000\d*$/,"")}const i={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>parseSexagesimal(e,n),stringify:stringifySexagesimal},o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>parseSexagesimal(e,!1),stringify:stringifySexagesimal},s={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(s.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,o,a,c]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,i,o||0,a||0,c||0,l);const d=t[8];if(d&&"Z"!==d){let e=parseSexagesimal(d,!1);Math.abs(e)<30&&(e*=60),u-=6e4*e}return new Date(u)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};t.floatTime=o,t.intTime=i,t.timestamp=s},94112:(e,t)=>{const n="block",r="quoted";function consumeMoreIndentedLines(e,t){let n=e[t+1];for(;" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t}t.FOLD_BLOCK=n,t.FOLD_FLOW="flow",t.FOLD_QUOTED=r,t.foldFlowLines=function foldFlowLines(e,t,i="flow",{indentAtStart:o,lineWidth:s=80,minContentWidth:a=20,onFold:c,onOverflow:l}={}){if(!s||s<0)return e;const u=Math.max(1+a,1+s-t.length);if(e.length<=u)return e;const d=[],f={};let h,p,m=s-t.length;"number"==typeof o&&(o>s-Math.max(2,a)?d.push(0):m=s-o);let g,y=!1,v=-1,b=-1,w=-1;for(i===n&&(v=consumeMoreIndentedLines(e,v),-1!==v&&(m=v+u));g=e[v+=1];){if(i===r&&"\\"===g){switch(b=v,e[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}w=v}if("\n"===g)i===n&&(v=consumeMoreIndentedLines(e,v)),m=v+u,h=void 0;else{if(" "===g&&p&&" "!==p&&"\n"!==p&&"\t"!==p){const t=e[v+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(h=v)}if(v>=m)if(h)d.push(h),m=h+u,h=void 0;else if(i===r){for(;" "===p||"\t"===p;)p=g,g=e[v+=1],y=!0;const t=v>w+1?v-2:b-1;if(f[t])return e;d.push(t),f[t]=!0,m=t+u,h=void 0}else y=!0}p=g}if(y&&l&&l(),0===d.length)return e;c&&c();let S=e.slice(0,d[0]);for(let n=0;n<d.length;++n){const o=d[n],s=d[n+1]||e.length;0===o?S=`\n${t}${e.slice(0,s)}`:(i===r&&f[o]&&(S+=`${e[o]}\\`),S+=`\n${t}${e.slice(o+1,s)}`)}return S}},20611:(e,t,n)=>{var r=n(78475),i=n(10466),o=n(28463),s=n(98431);t.createStringifyContext=function createStringifyContext(e,t){const n=Object.assign({blockQuote:!0,commentString:o.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,indent:"",indentStep:"number"==typeof n.indent?" ".repeat(n.indent):" ",inFlow:r,options:n}},t.stringify=function stringify(e,t,n,o){var a,c;if(i.isPair(e))return e.toString(t,n,o);if(i.isAlias(e)){if(t.doc.directives)return e.toString(t);if(null===(a=t.resolvedAliases)||void 0===a?void 0:a.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let l;const u=i.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>l=e});l||(l=function getTagObject(e,t){var n,r,o,s;if(t.tag){const r=e.filter((e=>e.tag===t.tag));if(r.length>0)return null!==(n=r.find((e=>e.format===t.format)))&&void 0!==n?n:r[0]}let a,c;if(i.isScalar(t)){c=t.value;const n=e.filter((e=>{var t;return null===(t=e.identify)||void 0===t?void 0:t.call(e,c)}));a=null!==(r=n.find((e=>e.format===t.format)))&&void 0!==r?r:n.find((e=>!e.format))}else c=t,a=e.find((e=>e.nodeClass&&c instanceof e.nodeClass));if(!a){const e=null!==(s=null===(o=null==c?void 0:c.constructor)||void 0===o?void 0:o.name)&&void 0!==s?s:typeof c;throw new Error(`Tag not resolved for ${e} value`)}return a}(t.doc.schema.tags,u));const d=function stringifyProps(e,t,{anchors:n,doc:o}){if(!o.directives)return"";const s=[],a=(i.isScalar(e)||i.isCollection(e))&&e.anchor;a&&r.anchorIsValid(a)&&(n.add(a),s.push(`&${a}`));const c=e.tag?e.tag:t.default?null:t.tag;return c&&s.push(o.directives.tagString(c)),s.join(" ")}(u,l,t);d.length>0&&(t.indentAtStart=(null!==(c=t.indentAtStart)&&void 0!==c?c:0)+d.length+1);const f="function"==typeof l.stringify?l.stringify(u,t,n,o):i.isScalar(u)?s.stringifyString(u,t,n,o):u.toString(t,n,o);return d?i.isScalar(u)||"{"===f[0]||"["===f[0]?`${d} ${f}`:`${d}\n${t.indent}${f}`:f}},40240:(e,t,n)=>{var r=n(43365),i=n(10466),o=n(20611),s=n(28463);function stringifyBlockCollection({comment:e,items:t},n,{blockItemPrefix:r,flowChars:a,itemIndent:c,onChompKeep:l,onComment:u}){const{indent:d,options:{commentString:f}}=n,h=Object.assign({},n,{indent:c,type:null});let p=!1;const m=[];for(let e=0;e<t.length;++e){const a=t[e];let l=null;if(i.isNode(a))!p&&a.spaceBefore&&m.push(""),addCommentBefore(n,m,a.commentBefore,p),a.comment&&(l=a.comment);else if(i.isPair(a)){const e=i.isNode(a.key)?a.key:null;e&&(!p&&e.spaceBefore&&m.push(""),addCommentBefore(n,m,e.commentBefore,p))}p=!1;let u=o.stringify(a,h,(()=>l=null),(()=>p=!0));l&&(u+=s.lineComment(u,c,f(l))),p&&l&&(p=!1),m.push(r+u)}let g;if(0===m.length)g=a.start+a.end;else{g=m[0];for(let e=1;e<m.length;++e){const t=m[e];g+=t?`\n${d}${t}`:"\n"}}return e?(g+="\n"+s.indentComment(f(e),d),u&&u()):p&&l&&l(),g}function stringifyFlowCollection({comment:e,items:t},n,{flowChars:a,itemIndent:c,onComment:l}){const{indent:u,indentStep:d,options:{commentString:f}}=n;c+=d;const h=Object.assign({},n,{indent:c,inFlow:!0,type:null});let p=!1,m=0;const g=[];for(let e=0;e<t.length;++e){const r=t[e];let a=null;if(i.isNode(r))r.spaceBefore&&g.push(""),addCommentBefore(n,g,r.commentBefore,!1),r.comment&&(a=r.comment);else if(i.isPair(r)){const e=i.isNode(r.key)?r.key:null;e&&(e.spaceBefore&&g.push(""),addCommentBefore(n,g,e.commentBefore,!1),e.comment&&(p=!0));const t=i.isNode(r.value)?r.value:null;t?(t.comment&&(a=t.comment),t.commentBefore&&(p=!0)):null==r.value&&e&&e.comment&&(a=e.comment)}a&&(p=!0);let l=o.stringify(r,h,(()=>a=null));e<t.length-1&&(l+=","),a&&(l+=s.lineComment(l,c,f(a))),!p&&(g.length>m||l.includes("\n"))&&(p=!0),g.push(l),m=g.length}let y;const{start:v,end:b}=a;if(0===g.length)y=v+b;else{if(!p){p=g.reduce(((e,t)=>e+t.length+2),2)>r.Collection.maxFlowStringSingleLineLength}if(p){y=v;for(const e of g)y+=e?`\n${d}${u}${e}`:"\n";y+=`\n${u}${b}`}else y=`${v} ${g.join(" ")} ${b}`}return e&&(y+=s.lineComment(y,f(e),u),l&&l()),y}function addCommentBefore({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const i=s.indentComment(t(r),e);n.push(i.trimStart())}}t.stringifyCollection=function stringifyCollection(e,t,n){var r;return((null!==(r=t.inFlow)&&void 0!==r?r:e.flow)?stringifyFlowCollection:stringifyBlockCollection)(e,t,n)}},28463:(e,t)=>{function indentComment(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}t.indentComment=indentComment,t.lineComment=(e,t,n)=>e.endsWith("\n")?indentComment(n,t):n.includes("\n")?"\n"+indentComment(n,t):(e.endsWith(" ")?"":" ")+n,t.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#")},89957:(e,t,n)=>{var r=n(10466),i=n(20611),o=n(28463);t.stringifyDocument=function stringifyDocument(e,t){var n;const s=[];let a=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(s.push(t),a=!0):e.directives.docStart&&(a=!0)}a&&s.push("---");const c=i.createStringifyContext(e,t),{commentString:l}=c.options;if(e.commentBefore){1!==s.length&&s.unshift("");const t=l(e.commentBefore);s.unshift(o.indentComment(t,""))}let u=!1,d=null;if(e.contents){if(r.isNode(e.contents)){if(e.contents.spaceBefore&&a&&s.push(""),e.contents.commentBefore){const t=l(e.contents.commentBefore);s.push(o.indentComment(t,""))}c.forceBlockIndent=!!e.comment,d=e.contents.comment}const t=d?void 0:()=>u=!0;let n=i.stringify(e.contents,c,(()=>d=null),t);d&&(n+=o.lineComment(n,"",l(d))),"|"!==n[0]&&">"!==n[0]||"---"!==s[s.length-1]?s.push(n):s[s.length-1]=`--- ${n}`}else s.push(i.stringify(e.contents,c));if(null===(n=e.directives)||void 0===n?void 0:n.docEnd)if(e.comment){const t=l(e.comment);t.includes("\n")?(s.push("..."),s.push(o.indentComment(t,""))):s.push(`... ${t}`)}else s.push("...");else{let t=e.comment;t&&u&&(t=t.replace(/^\n+/,"")),t&&(u&&!d||""===s[s.length-1]||s.push(""),s.push(o.indentComment(l(t),"")))}return s.join("\n")+"\n"}},15260:(e,t)=>{t.stringifyNumber=function stringifyNumber({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const i="number"==typeof r?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(o)){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o}},38843:(e,t,n)=>{var r=n(10466),i=n(58844),o=n(20611),s=n(28463);t.stringifyPair=function stringifyPair({key:e,value:t},n,a,c){const{allNullValues:l,doc:u,indent:d,indentStep:f,options:{commentString:h,indentSeq:p,simpleKeys:m}}=n;let g=r.isNode(e)&&e.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(r.isCollection(e)){throw new Error("With simple keys, collection cannot be used as a key value")}}let y=!m&&(!e||g&&null==t&&!n.inFlow||r.isCollection(e)||(r.isScalar(e)?e.type===i.Scalar.BLOCK_FOLDED||e.type===i.Scalar.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!y&&(m||!l),indent:d+f});let v=!1,b=!1,w=o.stringify(e,n,(()=>v=!0),(()=>b=!0));if(!y&&!n.inFlow&&w.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(n.inFlow){if(l||null==t)return v&&a&&a(),""===w?"?":y?`? ${w}`:w}else if(l&&!m||null==t&&y)return w=`? ${w}`,g&&!v?w+=s.lineComment(w,n.indent,h(g)):b&&c&&c(),w;v&&(g=null),y?(g&&(w+=s.lineComment(w,n.indent,h(g))),w=`? ${w}\n${d}:`):(w=`${w}:`,g&&(w+=s.lineComment(w,n.indent,h(g))));let S="",k=null;if(r.isNode(t)){if(t.spaceBefore&&(S="\n"),t.commentBefore){const e=h(t.commentBefore);S+=`\n${s.indentComment(e,n.indent)}`}k=t.comment}else t&&"object"==typeof t&&(t=u.createNode(t));n.implicitKey=!1,y||g||!r.isScalar(t)||(n.indentAtStart=w.length+1),b=!1,p||!(f.length>=2)||n.inFlow||y||!r.isSeq(t)||t.flow||t.tag||t.anchor||(n.indent=n.indent.substr(2));let T=!1;const R=o.stringify(t,n,(()=>T=!0),(()=>b=!0));let C=" ";if(S||g)C=""!==R||n.inFlow?`${S}\n${n.indent}`:"\n"===S?"\n\n":S;else if(!y&&r.isCollection(t)){("["===R[0]||"{"===R[0])&&!R.includes("\n")||(C=`\n${n.indent}`)}else""!==R&&"\n"!==R[0]||(C="");return w+=C+R,n.inFlow?T&&a&&a():k&&!T?w+=s.lineComment(w,n.indent,h(k)):b&&c&&c(),w}},98431:(e,t,n)=>{var r=n(58844),i=n(94112);const getFoldOptions=e=>({indentAtStart:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),containsDocumentMarker=e=>/^(%|---|\.\.\.)/m.test(e);function doubleQuotedString(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,o=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(containsDocumentMarker(e)?" ":"");let a="",c=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(a+=n.slice(c,e)+"\\ ",e+=1,c=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{a+=n.slice(c,e);const t=n.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=n.substr(e,6)}e+=5,c=e+1}break;case"n":if(r||'"'===n[e+2]||n.length<o)e+=1;else{for(a+=n.slice(c,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)a+="\n",e+=2;a+=s," "===n[e+2]&&(a+="\\"),e+=1,c=e+1}break;default:e+=1}return a=c?a+n.slice(c):n,r?a:i.foldFlowLines(a,s,i.FOLD_QUOTED,getFoldOptions(t))}function singleQuotedString(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return doubleQuotedString(e,t);const n=t.indent||(containsDocumentMarker(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:i.foldFlowLines(r,n,i.FOLD_FLOW,getFoldOptions(t))}function quotedString(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=doubleQuotedString;else{const t=e.includes('"'),i=e.includes("'");r=t&&!i?singleQuotedString:i&&!t?doubleQuotedString:n?singleQuotedString:doubleQuotedString}return r(e,t)}function blockString({comment:e,type:t,value:n},o,s,a){const{blockQuote:c,commentString:l,lineWidth:u}=o.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return quotedString(n,o);const d=o.indent||(o.forceBlockIndent||containsDocumentMarker(n)?" ":""),f="literal"===c||"folded"!==c&&t!==r.Scalar.BLOCK_FOLDED&&(t===r.Scalar.BLOCK_LITERAL||!function lineLengthOverLimit(e,t,n){if(!t||t<0)return!1;const r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}(n,u,d.length));if(!n)return f?"|\n":">\n";let h,p;for(p=n.length;p>0;--p){const e=n[p-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let m=n.substring(p);const g=m.indexOf("\n");-1===g?h="-":n===m||g!==m.length-1?(h="+",a&&a()):h="",m&&(n=n.slice(0,-m.length),"\n"===m[m.length-1]&&(m=m.slice(0,-1)),m=m.replace(/\n+(?!\n|$)/g,`$&${d}`));let y,v=!1,b=-1;for(y=0;y<n.length;++y){const e=n[y];if(" "===e)v=!0;else{if("\n"!==e)break;b=y}}let w=n.substring(0,b<y?b+1:y);w&&(n=n.substring(w.length),w=w.replace(/\n+/g,`$&${d}`));let S=(f?"|":">")+(v?d?"2":"1":"")+h;if(e&&(S+=" "+l(e.replace(/ ?[\r\n]+/g," ")),s&&s()),f)return`${S}\n${d}${w}${n=n.replace(/\n+/g,`$&${d}`)}${m}`;n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);return`${S}\n${d}${i.foldFlowLines(`${w}${n}${m}`,d,i.FOLD_BLOCK,getFoldOptions(o))}`}t.stringifyString=function stringifyString(e,t,n,o){const{implicitKey:s,inFlow:a}=t,c="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:l}=e;l!==r.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(l=r.Scalar.QUOTE_DOUBLE);const _stringify=e=>{switch(e){case r.Scalar.BLOCK_FOLDED:case r.Scalar.BLOCK_LITERAL:return s||a?quotedString(c.value,t):blockString(c,t,n,o);case r.Scalar.QUOTE_DOUBLE:return doubleQuotedString(c.value,t);case r.Scalar.QUOTE_SINGLE:return singleQuotedString(c.value,t);case r.Scalar.PLAIN:return function plainString(e,t,n,o){const{type:s,value:a}=e,{actualString:c,implicitKey:l,indent:u,inFlow:d}=t;if(l&&/[\n[\]{},]/.test(a)||d&&/[[\]{},]/.test(a))return quotedString(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return l||d||!a.includes("\n")?quotedString(a,t):blockString(e,t,n,o);if(!l&&!d&&s!==r.Scalar.PLAIN&&a.includes("\n"))return blockString(e,t,n,o);if(""===u&&containsDocumentMarker(a))return t.forceBlockIndent=!0,blockString(e,t,n,o);const f=a.replace(/\n+/g,`$&\n${u}`);if(c){const test=e=>{var t;return e.default&&"tag:yaml.org,2002:str"!==e.tag&&(null===(t=e.test)||void 0===t?void 0:t.test(f))},{compat:e,tags:n}=t.doc.schema;if(n.some(test)||(null==e?void 0:e.some(test)))return quotedString(a,t)}return l?f:i.foldFlowLines(f,u,i.FOLD_FLOW,getFoldOptions(t))}(c,t,n,o);default:return null}};let u=_stringify(l);if(null===u){const{defaultKeyType:e,defaultStringType:n}=t.options,r=s&&e||n;if(u=_stringify(r),null===u)throw new Error(`Unsupported default string type ${r}`)}return u}},81381:(e,t,n)=>{var r=n(10466);const i=Symbol("break visit"),o=Symbol("skip children"),s=Symbol("remove node");function visit(e,t){const n=initVisitor(t);if(r.isDocument(e)){visit_(null,e.contents,n,Object.freeze([e]))===s&&(e.contents=null)}else visit_(null,e,n,Object.freeze([]))}function visit_(e,t,n,o){const a=callVisitor(e,t,n,o);if(r.isNode(a)||r.isPair(a))return replaceNode(e,o,a),visit_(e,a,n,o);if("symbol"!=typeof a)if(r.isCollection(t)){o=Object.freeze(o.concat(t));for(let e=0;e<t.items.length;++e){const r=visit_(e,t.items[e],n,o);if("number"==typeof r)e=r-1;else{if(r===i)return i;r===s&&(t.items.splice(e,1),e-=1)}}}else if(r.isPair(t)){o=Object.freeze(o.concat(t));const e=visit_("key",t.key,n,o);if(e===i)return i;e===s&&(t.key=null);const r=visit_("value",t.value,n,o);if(r===i)return i;r===s&&(t.value=null)}return a}async function visitAsync(e,t){const n=initVisitor(t);if(r.isDocument(e)){await visitAsync_(null,e.contents,n,Object.freeze([e]))===s&&(e.contents=null)}else await visitAsync_(null,e,n,Object.freeze([]))}async function visitAsync_(e,t,n,o){const a=await callVisitor(e,t,n,o);if(r.isNode(a)||r.isPair(a))return replaceNode(e,o,a),visitAsync_(e,a,n,o);if("symbol"!=typeof a)if(r.isCollection(t)){o=Object.freeze(o.concat(t));for(let e=0;e<t.items.length;++e){const r=await visitAsync_(e,t.items[e],n,o);if("number"==typeof r)e=r-1;else{if(r===i)return i;r===s&&(t.items.splice(e,1),e-=1)}}}else if(r.isPair(t)){o=Object.freeze(o.concat(t));const e=await visitAsync_("key",t.key,n,o);if(e===i)return i;e===s&&(t.key=null);const r=await visitAsync_("value",t.value,n,o);if(r===i)return i;r===s&&(t.value=null)}return a}function initVisitor(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function callVisitor(e,t,n,i){var o,s,a,c,l;return"function"==typeof n?n(e,t,i):r.isMap(t)?null===(o=n.Map)||void 0===o?void 0:o.call(n,e,t,i):r.isSeq(t)?null===(s=n.Seq)||void 0===s?void 0:s.call(n,e,t,i):r.isPair(t)?null===(a=n.Pair)||void 0===a?void 0:a.call(n,e,t,i):r.isScalar(t)?null===(c=n.Scalar)||void 0===c?void 0:c.call(n,e,t,i):r.isAlias(t)?null===(l=n.Alias)||void 0===l?void 0:l.call(n,e,t,i):void 0}function replaceNode(e,t,n){const i=t[t.length-1];if(r.isCollection(i))i.items[e]=n;else if(r.isPair(i))"key"===e?i.key=n:i.value=n;else{if(!r.isDocument(i)){const e=r.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}i.contents=n}}visit.BREAK=i,visit.SKIP=o,visit.REMOVE=s,visitAsync.BREAK=i,visitAsync.SKIP=o,visitAsync.REMOVE=s,t.visit=visit,t.visitAsync=visitAsync}},t={};function __webpack_require__(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0});const t=__webpack_require__(35809),r=__webpack_require__(68212),i=__webpack_require__(72743),o=(0,r.createConnection)(t.ProposedFeatures.all);o.onInitialize((e=>{const t=new i.ComposeLanguageService(o,e);return o.onShutdown((()=>{t.dispose()})),{capabilities:t.capabilities,serverInfo:{name:"Docker Compose Language Server"}}})),o.listen()})(),module.exports=n})();