From 542f54962c5ee8464ec15f5c2ab7eee789732918 Mon Sep 17 00:00:00 2001 From: Umesh Timalsina Date: Thu, 17 Sep 2020 16:49:28 -0500 Subject: [PATCH 01/35] WIP #1908: Add working example with basic pyls --- bin/deepforge | 20 +++- config/config.extensions.js | 14 +++ environment.server.yml | 1 + language-servers.yml | 5 + package-lock.json | 52 ++++++++- package.json | 1 + .../TextEditor/DeepForgeLanguageClient.js | 102 ++++++++++++++++++ .../widgets/TextEditor/TextEditorWidget.js | 34 +++++- .../lib/monaco-languageclient.min.js | 9 ++ .../lib/monaco-languageclient.min.js.map | 1 + .../lib/reconnecting-websocket.min.js | 17 +++ .../lib/reconnecting-websocket.min.js.map | 1 + .../TextEditor/lib/vscode-ws-jsonrpc.min.js | 9 ++ .../lib/vscode-ws-jsonrpc.min.js.map | 1 + 14 files changed, 261 insertions(+), 6 deletions(-) create mode 100644 language-servers.yml create mode 100644 src/visualizers/widgets/TextEditor/DeepForgeLanguageClient.js create mode 100644 src/visualizers/widgets/TextEditor/lib/monaco-languageclient.min.js create mode 100644 src/visualizers/widgets/TextEditor/lib/monaco-languageclient.min.js.map create mode 100644 src/visualizers/widgets/TextEditor/lib/reconnecting-websocket.min.js create mode 100644 src/visualizers/widgets/TextEditor/lib/reconnecting-websocket.min.js.map create mode 100644 src/visualizers/widgets/TextEditor/lib/vscode-ws-jsonrpc.min.js create mode 100644 src/visualizers/widgets/TextEditor/lib/vscode-ws-jsonrpc.min.js.map diff --git a/bin/deepforge b/bin/deepforge index c21a0d8a1..264ab4137 100755 --- a/bin/deepforge +++ b/bin/deepforge @@ -236,12 +236,23 @@ var spawn = function (cmd, args, opts) { return deferred.promise; }; +function startLanguageServers(serversYML, port) { + const command = path.join(__dirname, '..', 'node_modules', 'jsonrpc-ws-proxy', 'dist', 'server.js') + const args = ['--port' , port, '--languageServers', serversYML]; + spawn( + command, + args, + true + ) +} + program.command('start') .description('start deepforge locally (default) or specific components') .option('-p, --port ', 'specify the port to use') .option('-s, --server', 'start the server') .option('-N, --no-conda', 'do not start deepforge server in a conda environment.') .option('-m, --mongo', 'start MongoDB') + .option('-l, --langServers', 'Start Language servers listed in language-servers.yml file for activating IntelliSense in code editors') .action(async args => { if(args.conda){ try { @@ -254,10 +265,11 @@ program.command('start') } } const serverCommand = getDeepForgeServerCommand(args.conda); - const startAll = !args.server && !args.mongo; + const startAll = !args.server && !args.mongo && !args.langServers; if (startAll) { args.server = true; args.mongo = true; + args.langServers = true; } if (args.port) { @@ -268,6 +280,11 @@ program.command('start') await checkMongo(args, true); } + if (args.langServers) { + const serversYML = path.join(__dirname, '..', 'language-servers.yml'); + startLanguageServers(serversYML, parseInt(process.env.PORT || gmeConfig.server.port) + 2); + } + if (args.server) { await checkMongo(args); const main = path.join(__dirname, '..', 'app.js'); @@ -275,6 +292,7 @@ program.command('start') shell: SHELL }); } + }); // update diff --git a/config/config.extensions.js b/config/config.extensions.js index df926579f..652af574b 100644 --- a/config/config.extensions.js +++ b/config/config.extensions.js @@ -1,6 +1,20 @@ +const yaml = require('js-yaml'); +const path = require('path'); +const fs = require('fs'); + +const SERVERS_YML = path.join(__dirname, '..', 'language-servers.yml'); + +function getAvailableLanguageServers () { + const parsed = yaml.safeLoad(fs.readFileSync(SERVERS_YML)); + return parsed.langservers ? Object.keys(parsed.langservers): []; +} module.exports = config => { config.extensions = {}; config.extensions.InteractiveComputeHost = process.env.DEEPFORGE_INTERACTIVE_COMPUTE_HOST; + config.extensions.languageServers = { + host: process.env.DEEPFORGE_LANGUAGE_SERVER_HOST, + servers: getAvailableLanguageServers() + }; return config; }; diff --git a/environment.server.yml b/environment.server.yml index 1f3e633ee..22034499c 100644 --- a/environment.server.yml +++ b/environment.server.yml @@ -1,3 +1,4 @@ name: deepforge dependencies: - python=3.7 + - python-language-server diff --git a/language-servers.yml b/language-servers.yml new file mode 100644 index 000000000..0c7dad473 --- /dev/null +++ b/language-servers.yml @@ -0,0 +1,5 @@ +langservers: + python: + - pyls + - --log-file + - pyls.log \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9686d60c5..61f4c7a17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1046,6 +1046,14 @@ } } }, + "@sourcegraph/vscode-ws-jsonrpc": { + "version": "0.0.3-fork", + "resolved": "https://registry.npmjs.org/@sourcegraph/vscode-ws-jsonrpc/-/vscode-ws-jsonrpc-0.0.3-fork.tgz", + "integrity": "sha512-EJLq/ni66glk3xYyOZtUIEbjTCw8kMI6RvO0YQtPd+4um2+aTSM1LfN4NrsiVrRkG7EG/U2OkFlKqT8mGo6w4Q==", + "requires": { + "vscode-jsonrpc": "^4.0.0" + } + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -2820,8 +2828,8 @@ "version": "github:deepforge-dev/user-management-page#4872b8fd124b31381ee74ce32dabcdf137490be5", "from": "github:deepforge-dev/user-management-page", "requires": { - "body-parser": "^1.18.3", - "ejs": "^2.4.2", + "body-parser": "^1.19.0", + "ejs": "^2.7.4", "express": "4.16.3" }, "dependencies": { @@ -2847,6 +2855,11 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, + "ejs": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", + "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" + }, "express": { "version": "4.16.3", "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", @@ -5175,6 +5188,32 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "jsonrpc-ws-proxy": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/jsonrpc-ws-proxy/-/jsonrpc-ws-proxy-0.0.5.tgz", + "integrity": "sha512-Gz3Njkc4LdJ+wEtrgG5acZWKTH78kYRHCYwN/QKzoJjdQw1jEepwkWTXLRa3JifcIpxh+WjA6OJw8A8RvejzXw==", + "requires": { + "@sourcegraph/vscode-ws-jsonrpc": "0.0.3-fork", + "js-yaml": "^3.12.0", + "minimist": "^1.2.0", + "ws": "^6.1.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, "jsonwebtoken": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.1.0.tgz", @@ -9863,6 +9902,11 @@ "vow": "^0.4.17" } }, + "vscode-jsonrpc": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.0.0.tgz", + "integrity": "sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==" + }, "webgme": { "version": "2.42.0", "resolved": "https://registry.npmjs.org/webgme/-/webgme-2.42.0.tgz", @@ -11889,7 +11933,7 @@ "dependencies": { "are-we-there-yet": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", + "resolved": "http://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", "integrity": "sha1-gORw6VoIR5T+GJkmLFZnxuiN4bM=", "requires": { "delegates": "^1.0.0", @@ -11974,7 +12018,7 @@ "dependencies": { "number-is-nan": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz", "integrity": "sha1-wCD1KcUoKt/dIz2R1LGBw9aG3Es=" } } diff --git a/package.json b/package.json index ebb4b25a7..ec4734f86 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "express": "^4.14.0", "graceful-fs": "^4.1.10", "js-yaml": "^3.13.1", + "jsonrpc-ws-proxy": "0.0.5", "lodash.difference": "^4.1.2", "lodash.merge": "^4.6.2", "lodash.template": "^4.4.0", diff --git a/src/visualizers/widgets/TextEditor/DeepForgeLanguageClient.js b/src/visualizers/widgets/TextEditor/DeepForgeLanguageClient.js new file mode 100644 index 000000000..265e7bb27 --- /dev/null +++ b/src/visualizers/widgets/TextEditor/DeepForgeLanguageClient.js @@ -0,0 +1,102 @@ +/* globals define */ + +define([ + './lib/vscode-ws-jsonrpc.min', + './lib/monaco-languageclient.min', + './lib/reconnecting-websocket.min', +], function ( + vscodeWSJSONRpc, + LangaugeClient, + RS +) { + const {ReconnectingWebSocket} = RS, + {listen} = vscodeWSJSONRpc; + const { + MonacoLanguageClient, + CloseAction, + ErrorAction, + Services, + MonacoCommands, + MonacoWorkspace, + ConsoleWindow, + MonacoLanguages, + MonacoToProtocolConverter, + ProtocolToMonacoConverter, + createConnection + } = LangaugeClient; + + class DeepForgeLanguageClient { + constructor(editor, serverURL, opts) { + const services = createServices(editor, opts); + Services.install(services); + this.serverURL = serverURL; + this.socket = createReconnectingWebSocket(this.serverURL, opts); + this._initializeClient(opts); + } + + _initializeClient(opts) { + listen({ + webSocket: this.socket, + onConnection: connection => { + const languageClient = createLanguageClient(connection, opts); + const disposable = languageClient.start(); + connection.onClose(() => disposable.dispose()); + } + }); + } + } + + const createLanguageClient = function (connection, opts) { + return new MonacoLanguageClient({ + name: opts.name || 'DeepForge Language Client', + clientOptions: { + documentSelector: [opts.language || 'python'], + errorHandler: { + error: () => ErrorAction.Continue, + closed: () => CloseAction.DoNotRestart + } + }, + connectionProvider: { + get(errorHandler, closeHandler, outputChannel) { + return Promise.resolve( + createConnection(connection, errorHandler, closeHandler) + ); + } + } + } + ); + }; + + const createReconnectingWebSocket = function (url, opts = {}) { + const socketOpts = { + maxReconnectionDelay: opts.socket.maxReconnectionDelay || 10000, + minReconnectionDelay: opts.socket.minReconnectionDelay || 1000, + reconnectionDelayGrowFactor: opts.socket.reconnectionDelayGrowFactor || 1.3, + connectionTimeout: 10000, + maxRetries: Infinity, + debug: opts.socket.debug || false + }; + + return new ReconnectingWebSocket( + url, + [], + socketOpts + ); + }; + + const createServices = function (editor, opts) { + const m2p = new MonacoToProtocolConverter(); + const p2m = new ProtocolToMonacoConverter(); + let services = { + commands: new MonacoCommands(editor), + languages: new MonacoLanguages(p2m, m2p), + workspace: new MonacoWorkspace(p2m, m2p, opts.rootUri) + }; + if (opts.debug) { + services.window = new ConsoleWindow(); + } + return services; + }; + + return DeepForgeLanguageClient; +}); \ No newline at end of file diff --git a/src/visualizers/widgets/TextEditor/TextEditorWidget.js b/src/visualizers/widgets/TextEditor/TextEditorWidget.js index 971236687..1453e6d14 100644 --- a/src/visualizers/widgets/TextEditor/TextEditorWidget.js +++ b/src/visualizers/widgets/TextEditor/TextEditorWidget.js @@ -6,6 +6,8 @@ define([ 'underscore', 'js/Utils/ComponentSettings', './MonacoThemesProvider', + 'deepforge/gmeConfig', + './DeepForgeLanguageClient', 'text!./MonacoLanguages.json', 'vs/editor/editor.main', 'jquery-contextMenu', @@ -14,7 +16,9 @@ define([ _, ComponentSettings, MonacoThemesProvider, - MonacoLanguages, + gmeConfig, + DeepforgeLanguageClient, + MonacoLanguages ) { 'use strict'; @@ -23,6 +27,18 @@ define([ MonacoLanguages = JSON.parse(MonacoLanguages); const AVAILABLE_KEYBINDINGS = ['default', 'vim']; + const LANGAUGE_SERVER_HOST = gmeConfig.extensions.languageServers.host || getDefaultServerURL(); + const AVAILABLE_LANGUAGE_SERVERS = gmeConfig.extensions.languageServers.servers; + + // ToDo: Move this to utils?? + function getDefaultServerURL() { + const isSecure = location.protocol.includes('s'); + const protocol = isSecure ? 'wss' : 'ws'; + const defaultHost = location.origin + .replace(location.protocol + '//', '') + .replace(/:[0-9]+$/, ''); + return `${protocol}://${defaultHost}:${gmeConfig.server.port + 2}`; + } const TextEditorWidget = function (logger, container, config={}) { this.logger = logger.fork('Widget'); @@ -68,9 +84,25 @@ define([ this.nodes = {}; this._initialize(); + + if (AVAILABLE_LANGUAGE_SERVERS.includes(this.language)) { + this._initializeLanguageClient(); + } this.logger.debug('ctor finished'); }; + TextEditorWidget.prototype._initializeLanguageClient = function () { + this.languageClient = new DeepforgeLanguageClient( + this.editor, + `${LANGAUGE_SERVER_HOST}/${this.language}`, + { + language: this.language, + rootUri: 'file:///tmp/py-models', + socket: {} + } + ); + }; + TextEditorWidget.prototype.getModel = function(monacoURI, value) { return monaco.editor.getModel(monacoURI) || monaco.editor.createModel( diff --git a/src/visualizers/widgets/TextEditor/lib/monaco-languageclient.min.js b/src/visualizers/widgets/TextEditor/lib/monaco-languageclient.min.js new file mode 100644 index 000000000..d163cb5b3 --- /dev/null +++ b/src/visualizers/widgets/TextEditor/lib/monaco-languageclient.min.js @@ -0,0 +1,9 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=48)}([function(e,t,n){"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const r=n(2);t.ErrorCodes=r.ErrorCodes,t.ResponseError=r.ResponseError,t.CancellationToken=r.CancellationToken,t.CancellationTokenSource=r.CancellationTokenSource,t.Disposable=r.Disposable,t.Event=r.Event,t.Emitter=r.Emitter,t.Trace=r.Trace,t.TraceFormat=r.TraceFormat,t.SetTraceNotification=r.SetTraceNotification,t.LogTraceNotification=r.LogTraceNotification,t.RequestType=r.RequestType,t.RequestType0=r.RequestType0,t.NotificationType=r.NotificationType,t.NotificationType0=r.NotificationType0,t.MessageReader=r.MessageReader,t.MessageWriter=r.MessageWriter,t.ConnectionStrategy=r.ConnectionStrategy,t.StreamMessageReader=r.StreamMessageReader,t.StreamMessageWriter=r.StreamMessageWriter,t.IPCMessageReader=r.IPCMessageReader,t.IPCMessageWriter=r.IPCMessageWriter,t.createClientPipeTransport=r.createClientPipeTransport,t.createServerPipeTransport=r.createServerPipeTransport,t.generateRandomPipeName=r.generateRandomPipeName,t.createClientSocketTransport=r.createClientSocketTransport,t.createServerSocketTransport=r.createServerSocketTransport,t.ProgressType=r.ProgressType,i(n(49)),i(n(50));const o=n(60),s=n(61);!function(e){let t,n,i,r,a,c;!function(e){e.method=o.CallHierarchyPrepareRequest.method,e.type=o.CallHierarchyPrepareRequest.type}(t=e.CallHierarchyPrepareRequest||(e.CallHierarchyPrepareRequest={})),function(e){e.method=o.CallHierarchyIncomingCallsRequest.method,e.type=o.CallHierarchyIncomingCallsRequest.type}(n=e.CallHierarchyIncomingCallsRequest||(e.CallHierarchyIncomingCallsRequest={})),function(e){e.method=o.CallHierarchyOutgoingCallsRequest.method,e.type=o.CallHierarchyOutgoingCallsRequest.type}(i=e.CallHierarchyOutgoingCallsRequest||(e.CallHierarchyOutgoingCallsRequest={})),e.SemanticTokenTypes=s.SemanticTokenTypes,e.SemanticTokenModifiers=s.SemanticTokenModifiers,e.SemanticTokens=s.SemanticTokens,function(e){e.method=s.SemanticTokensRequest.method,e.type=s.SemanticTokensRequest.type}(r=e.SemanticTokensRequest||(e.SemanticTokensRequest={})),function(e){e.method=s.SemanticTokensEditsRequest.method,e.type=s.SemanticTokensEditsRequest.type}(a=e.SemanticTokensEditsRequest||(e.SemanticTokensEditsRequest={})),function(e){e.method=s.SemanticTokensRangeRequest.method,e.type=s.SemanticTokensRangeRequest.type}(c=e.SemanticTokensRangeRequest||(e.SemanticTokensRangeRequest={}))}(t.Proposed||(t.Proposed={})),t.createProtocolConnection=function(e,t,n,i){return r.createMessageConnection(e,t,n,i)}},function(e,t,n){"use strict";const i=n(64),r=n(6);e.exports=i.createVSCodeApi(r.Services.get)},function(e,t,n){"use strict";(function(e){function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const r=n(4),o=n(14);t.RequestType=o.RequestType,t.RequestType0=o.RequestType0,t.RequestType1=o.RequestType1,t.RequestType2=o.RequestType2,t.RequestType3=o.RequestType3,t.RequestType4=o.RequestType4,t.RequestType5=o.RequestType5,t.RequestType6=o.RequestType6,t.RequestType7=o.RequestType7,t.RequestType8=o.RequestType8,t.RequestType9=o.RequestType9,t.ResponseError=o.ResponseError,t.ErrorCodes=o.ErrorCodes,t.NotificationType=o.NotificationType,t.NotificationType0=o.NotificationType0,t.NotificationType1=o.NotificationType1,t.NotificationType2=o.NotificationType2,t.NotificationType3=o.NotificationType3,t.NotificationType4=o.NotificationType4,t.NotificationType5=o.NotificationType5,t.NotificationType6=o.NotificationType6,t.NotificationType7=o.NotificationType7,t.NotificationType8=o.NotificationType8,t.NotificationType9=o.NotificationType9;const s=n(8);t.MessageReader=s.MessageReader,t.StreamMessageReader=s.StreamMessageReader,t.IPCMessageReader=s.IPCMessageReader,t.SocketMessageReader=s.SocketMessageReader;const a=n(9);t.MessageWriter=a.MessageWriter,t.StreamMessageWriter=a.StreamMessageWriter,t.IPCMessageWriter=a.IPCMessageWriter,t.SocketMessageWriter=a.SocketMessageWriter;const c=n(5);t.Disposable=c.Disposable,t.Event=c.Event,t.Emitter=c.Emitter;const u=n(22);t.CancellationTokenSource=u.CancellationTokenSource,t.CancellationToken=u.CancellationToken;const l=n(23);var d,g,m,h,p,f,v,y;i(n(24)),i(n(27)),function(e){e.type=new o.NotificationType("$/cancelRequest")}(d||(d={})),function(e){e.type=new o.NotificationType("$/progress")}(g||(g={}));t.ProgressType=class{constructor(){}},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"}(m=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!r.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(m=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(h=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTraceNotification")}(p=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTraceNotification")}(f=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));class C extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,C.prototype)}}function w(t,n,i,s){let a=0,w=0,D=0;let R,T,P=void 0,b=Object.create(null),_=void 0,S=Object.create(null),x=new Map,E=new l.LinkedMap,k=Object.create(null),I=Object.create(null),O=m.Off,M=h.Text,F=y.New,q=new c.Emitter,N=new c.Emitter,L=new c.Emitter,K=new c.Emitter,A=new c.Emitter;function H(e){return"req-"+e.toString()}function U(e,t){var n;o.isRequestMessage(t)?e.set(H(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++D).toString():"res-"+n.toString(),t):e.set("not-"+(++w).toString(),t)}function W(e){}function j(){return F===y.Listening}function z(){return F===y.Closed}function B(){return F===y.Disposed}function $(){F!==y.New&&F!==y.Listening||(F=y.Closed,N.fire(void 0))}function J(){R||0===E.size||(R=e(()=>{R=void 0,function(){if(0===E.size)return;let e=E.shift();try{o.isRequestMessage(e)?function(e){if(B())return;function t(t,i,r){let s={jsonrpc:"2.0",id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,V(s,i,r),n.write(s)}function i(t,i,r){let o={jsonrpc:"2.0",id:e.id,error:t.toJson()};V(o,i,r),n.write(o)}!function(e){if(O===m.Off||!T)return;if(M===h.Text){let t=void 0;O===m.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),T.log(`Received request '${e.method} - (${e.id})'.`,t)}else Q("receive-request",e)}(e);let s,a,c=b[e.method];c&&(s=c.type,a=c.handler);let l=Date.now();if(a||P){let c=new u.CancellationTokenSource,d=String(e.id);I[d]=c;try{let u;u=void 0===e.params||void 0!==s&&0===s.numberOfParams?a?a(c.token):P(e.method,c.token):r.array(e.params)&&(void 0===s||s.numberOfParams>1)?a?a(...e.params,c.token):P(e.method,...e.params,c.token):a?a(e.params,c.token):P(e.method,e.params,c.token);let g=u;u?g.then?g.then(n=>{delete I[d],t(n,e.method,l)},t=>{delete I[d],t instanceof o.ResponseError?i(t,e.method,l):t&&r.string(t.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}):(delete I[d],t(u,e.method,l)):(delete I[d],function(t,i,r){void 0===t&&(t=null);let o={jsonrpc:"2.0",id:e.id,result:t};V(o,i,r),n.write(o)}(u,e.method,l))}catch(n){delete I[d],n instanceof o.ResponseError?t(n,e.method,l):n&&r.string(n.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,l):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else i(new o.ResponseError(o.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,l)}(e):o.isNotificationMessage(e)?function(e){if(B())return;let t,n=void 0;if(e.method===d.type.method)t=e=>{let t=e.id,n=I[String(t)];n&&n.cancel()};else{let i=S[e.method];i&&(t=i.handler,n=i.type)}if(t||_)try{!function(e){if(O===m.Off||!T||e.method===f.type.method)return;if(M===h.Text){let t=void 0;O===m.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),T.log(`Received notification '${e.method}'.`,t)}else Q("receive-notification",e)}(e),void 0===e.params||void 0!==n&&0===n.numberOfParams?t?t():_(e.method):r.array(e.params)&&(void 0===n||n.numberOfParams>1)?t?t(...e.params):_(e.method,...e.params):t?t(e.params):_(e.method,e.params)}catch(t){t.message?i.error(`Notification handler '${e.method}' failed with message: ${t.message}`):i.error(`Notification handler '${e.method}' failed unexpectedly.`)}else L.fire(e)}(e):o.isResponseMessage(e)?function(e){if(B())return;if(null===e.id)e.error?i.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):i.error("Received response message without id. No further error information provided.");else{let t=String(e.id),n=k[t];if(function(e,t){if(O===m.Off||!T)return;if(M===h.Text){let n=void 0;if(O===m.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){let i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";T.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else T.log(`Received response ${e.id} without active response promise.`,n)}else Q("receive-response",e)}(e,n),n){delete k[t];try{if(e.error){let 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?i.error(`Response handler '${n.method}' failed with message: ${e.message}`):i.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void i.error("Received empty message.");i.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));let t=e;if(r.string(t.id)||r.number(t.id)){let e=String(t.id),n=k[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{J()}}()}))}t.onClose($),t.onError((function(e){q.fire([e,void 0,void 0])})),n.onClose($),n.onError((function(e){q.fire(e)}));let Y=e=>{try{if(o.isNotificationMessage(e)&&e.method===d.type.method){let t=H(e.params.id),i=E.get(t);if(o.isRequestMessage(i)){let r=s&&s.cancelUndispatched?s.cancelUndispatched(i,W):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return E.delete(t),r.id=i.id,V(r,e.method,Date.now()),void n.write(r)}}U(E,e)}finally{J()}};function V(e,t,n){if(O!==m.Off&&T)if(M===h.Text){let i=void 0;O===m.Verbose&&(e.error&&e.error.data?i=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?i=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),T.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else Q("send-response",e)}function Q(e,t){if(!T||O===m.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};T.log(n)}function G(){if(z())throw new C(v.Closed,"Connection is closed.");if(B())throw new C(v.Disposed,"Connection is disposed.")}function X(e){return void 0===e?null:e}function Z(e,t){let n,i=e.numberOfParams;switch(i){case 0:n=null;break;case 1:n=X(t[0]);break;default:n=[];for(let e=0;e{let i,o;if(G(),r.string(e))switch(i=e,t.length){case 0:o=null;break;case 1:o=t[0];break;default:o=t}else i=e.method,o=Z(e,t);let s={jsonrpc:"2.0",method:i,params:o};!function(e){if(O!==m.Off&&T)if(M===h.Text){let t=void 0;O===m.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),T.log(`Sending notification '${e.method}'.`,t)}else Q("send-notification",e)}(s),n.write(s)},onNotification:(e,t)=>{G(),r.func(e)?_=e:t&&(r.string(e)?S[e]={type:void 0,handler:t}:S[e.method]={type:e,handler:t})},onProgress:(e,t,n)=>{if(x.has(t))throw new Error(`Progress handler for token ${t} already registered`);return x.set(t,n),{dispose:()=>{x.delete(t)}}},sendProgress:(e,t,n)=>{ee.sendNotification(g.type,{token:t,value:n})},onUnhandledProgress:K.event,sendRequest:(e,...t)=>{let i,s;G(),function(){if(!j())throw new Error("Call listen() first.")}();let c=void 0;if(r.string(e))switch(i=e,t.length){case 0:s=null;break;case 1:u.CancellationToken.is(t[0])?(s=null,c=t[0]):s=X(t[0]);break;default:const e=t.length-1;u.CancellationToken.is(t[e])?(c=t[e],s=2===t.length?X(t[0]):t.slice(0,e).map(e=>X(e))):s=t.map(e=>X(e))}else{i=e.method,s=Z(e,t);let n=e.numberOfParams;c=u.CancellationToken.is(t[n])?t[n]:void 0}let l=a++,g=new Promise((e,t)=>{let r={jsonrpc:"2.0",id:l,method:i,params:s},a={method:i,timerStart:Date.now(),resolve:e,reject:t};!function(e){if(O!==m.Off&&T)if(M===h.Text){let t=void 0;O===m.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),T.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Q("send-request",e)}(r);try{n.write(r)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(k[String(l)]=a)});return c&&c.onCancellationRequested(()=>{ee.sendNotification(d.type,{id:l})}),g},onRequest:(e,t)=>{G(),r.func(e)?P=e:t&&(r.string(e)?b[e]={type:void 0,handler:t}:b[e.method]={type:e,handler:t})},trace:(e,t,n)=>{let i=!1,o=h.Text;void 0!==n&&(r.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||h.Text)),O=e,M=o,T=O===m.Off?void 0:t,!i||z()||B()||ee.sendNotification(p.type,{value:m.toString(e)})},onError:q.event,onClose:N.event,onUnhandledNotification:L.event,onDispose:A.event,dispose:()=>{if(B())return;F=y.Disposed,A.fire(void 0);let e=new Error("Connection got disposed.");Object.keys(k).forEach(t=>{k[t].reject(e)}),k=Object.create(null),I=Object.create(null),E=new l.LinkedMap,r.func(n.dispose)&&n.dispose(),r.func(t.dispose)&&t.dispose()},listen:()=>{G(),function(){if(j())throw new C(v.AlreadyListening,"Connection is already listening")}(),F=y.Listening,t.listen(Y)},inspect:()=>{console.log("inspect")}};return ee.onNotification(f.type,e=>{O!==m.Off&&T&&T.log(e.message,O===m.Verbose?e.verbose:void 0)}),ee.onNotification(g.type,e=>{const t=x.get(e.token);t?t(e.value):K.fire(e)}),ee}t.ConnectionError=C,function(e){e.is=function(e){let t=e;return t&&r.func(t.cancelUndispatched)}}(t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(y||(y={})),t.createMessageConnection=function(e,n,i,r){var o;return i||(i=t.NullLogger),w(void 0!==(o=e).listen&&void 0===o.read?e:new s.StreamMessageReader(e),function(e){return void 0!==e.write&&void 0===e.end}(n)?n:new a.StreamMessageWriter(n),i,r)}}).call(this,n(17).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2);class r extends i.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=r;class o extends i.RequestType{constructor(e){super(e)}}t.ProtocolRequestType=o;class s extends i.NotificationType{constructor(e){super(e)}}t.ProtocolNotificationType=s;class a extends i.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>i(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={})),function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{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){for(var n=!1,i=0,r=this._callbacks.length;i{let o;return this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),o={dispose:()=>{this._callbacks.remove(e,t),o.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(n)&&n.push(o),o}),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=r,r._noop=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(2);t.Disposable=r.Disposable,t.CancellationToken=r.CancellationToken,t.Event=r.Event,t.Emitter=r.Emitter,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(0)),function(e){const t=window,n=Symbol("Services");e.get=()=>{const e=t[n];if(!e)throw new Error("Language Client services has not been installed");return e},e.install=function(e){return t[n]&&console.error(new Error("Language Client services has been overridden")),t[n]=e,r.Disposable.create(()=>t[n]=void 0)}}(t.Services||(t.Services={})),t.isDocumentSelector=function(e){return!(!e||!Array.isArray(e))&&e.every(e=>"string"==typeof e||i.DocumentFilter.is(e))},function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information",e[e.Hint=3]="Hint"}(t.VsCodeDiagnosticSeverity||(t.VsCodeDiagnosticSeverity={})),function(e){e.is=function(e){return!!e&&"uri"in e&&"languageId"in e}}(t.DocumentIdentifier||(t.DocumentIdentifier={})),function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace",e[e.WorkspaceFolder=3]="WorkspaceFolder"}(t.ConfigurationTarget||(t.ConfigurationTarget={}))},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],l=!1,d=-1;function g(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&m())}function m(){if(!l){var e=a(g);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d1)for(var n=1;n=n.length)n.copy(this.buffer,this.index,0,n.length);else{var o=8192*(Math.ceil((this.index+n.length)/8192)+1);0===this.index?(this.buffer=e.allocUnsafe(o),n.copy(this.buffer,0,0,n.length)):this.buffer=e.concat([this.buffer.slice(0,this.index),n],o)}this.index+=n.length}tryReadHeaders(){let e=void 0,t=0;for(;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach(t=>{let n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");let i=t.substr(0,n),r=t.substr(n+1).trim();e[i]=r});let n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e}tryReadContent(e){if(this.index{this.onData(e)}),this.readable.on("error",e=>this.fireError(e)),this.readable.on("close",()=>this.fireClose())}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var n=JSON.parse(t);this.callback(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=u;t.IPCMessageReader=class extends c{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){this.process.on("message",e)}};t.SocketMessageReader=class extends u{constructor(e,t="utf-8"){super(e,t)}}}).call(this,n(13).Buffer)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const i=n(5),r=n(4);!function(e){e.is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class o{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.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: "+(r.string(e.message)?e.message:"unknown"))}}t.AbstractMessageWriter=o;t.StreamMessageWriter=class extends o{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",e=>this.fireError(e)),this.writable.on("close",()=>this.fireClose())}write(t){let n=JSON.stringify(t),i=["Content-Length: ",e.byteLength(n,this.encoding).toString(),"\r\n","\r\n"];try{this.writable.write(i.join(""),"ascii"),this.writable.write(n,this.encoding),this.errorCount=0}catch(e){this.errorCount++,this.fireError(e,t,this.errorCount)}}};t.IPCMessageWriter=class extends o{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}};t.SocketMessageWriter=class extends o{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",e=>this.fireError(e)),this.socket.on("close",()=>this.fireClose())}dispose(){super.dispose(),this.socket.destroy()}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(t){let n=JSON.stringify(t),i=["Content-Length: ",e.byteLength(n,this.encoding).toString(),"\r\n","\r\n"];try{this.sending=!0,this.socket.write(i.join(""),"ascii",e=>{e&&this.handleError(e,t);try{this.socket.write(n,this.encoding,e=>{this.sending=!1,e?this.handleError(e,t):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})}catch(e){this.handleError(e,t)}})}catch(e){this.handleError(e,t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}}).call(this,n(13).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(66),s=n(67),a=n(16),c=n(68),u=n(38),l=n(69);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(0));class d{error(e){console.error(e)}warn(e){console.warn(e)}info(e){console.info(e)}log(e){console.log(e)}}var g,m,h,p,f;!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(g=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(m=t.CloseAction||(t.CloseAction={}));class v{constructor(e){this.name=e,this.restarts=[]}error(e,t,n){return n&&n<=3?g.Continue:g.Shutdown}closed(){if(this.restarts.push(Date.now()),this.restarts.length<5)return m.Restart;return this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(i.window.showErrorMessage(`The ${this.name} server crashed 5 times in the last 3 minutes. The server will not be restarted.`),m.DoNotRestart):(this.restarts.shift(),m.Restart)}}!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(h=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(p=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(f||(f={}));const y=[r.SymbolKind.File,r.SymbolKind.Module,r.SymbolKind.Namespace,r.SymbolKind.Package,r.SymbolKind.Class,r.SymbolKind.Method,r.SymbolKind.Property,r.SymbolKind.Field,r.SymbolKind.Constructor,r.SymbolKind.Enum,r.SymbolKind.Interface,r.SymbolKind.Function,r.SymbolKind.Variable,r.SymbolKind.Constant,r.SymbolKind.String,r.SymbolKind.Number,r.SymbolKind.Boolean,r.SymbolKind.Array,r.SymbolKind.Object,r.SymbolKind.Key,r.SymbolKind.Null,r.SymbolKind.EnumMember,r.SymbolKind.Struct,r.SymbolKind.Event,r.SymbolKind.Operator,r.SymbolKind.TypeParameter],C=[r.CompletionItemKind.Text,r.CompletionItemKind.Method,r.CompletionItemKind.Function,r.CompletionItemKind.Constructor,r.CompletionItemKind.Field,r.CompletionItemKind.Variable,r.CompletionItemKind.Class,r.CompletionItemKind.Interface,r.CompletionItemKind.Module,r.CompletionItemKind.Property,r.CompletionItemKind.Unit,r.CompletionItemKind.Value,r.CompletionItemKind.Enum,r.CompletionItemKind.Keyword,r.CompletionItemKind.Snippet,r.CompletionItemKind.Color,r.CompletionItemKind.File,r.CompletionItemKind.Reference,r.CompletionItemKind.Folder,r.CompletionItemKind.EnumMember,r.CompletionItemKind.Constant,r.CompletionItemKind.Struct,r.CompletionItemKind.Event,r.CompletionItemKind.Operator,r.CompletionItemKind.TypeParameter];function w(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var D;!function(e){e.is=function(e){let t=e;return t&&a.func(t.register)&&a.func(t.unregister)&&a.func(t.dispose)&&void 0!==t.messages}}(D||(D={}));class R{constructor(e,t,n,i,r,o){this._client=e,this._event=t,this._type=n,this._middleware=i,this._createParams=r,this._selectorFilter=o,this._selectors=new Map}static textDocumentFilter(e,t){for(const n of e)if(i.languages.match(n,t))return!0;return!1}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))}callback(e){this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,e=>this._client.sendNotification(this._type,this._createParams(e))):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))}notificationSent(e){}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(i.languages.match(t,e))return{send:e=>{this.callback(e)}};throw new Error("No provider available for the given text document")}}class T extends R{constructor(e,t){super(e,i.workspace.onDidOpenTextDocument,r.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t),R.textDocumentFilter),this._syncedDocuments=t}get messages(){return r.DidOpenTextDocumentNotification.type}fillClientCapabilities(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{documentSelector:t}})}register(e,t){if(super.register(e,t),!t.registerOptions.documentSelector)return;let n=t.registerOptions.documentSelector;i.workspace.textDocuments.forEach(e=>{let t=e.uri.toString();if(!this._syncedDocuments.has(t)&&i.languages.match(n,e)){let n=this._client.clientOptions.middleware,i=e=>{this._client.sendNotification(this._type,this._createParams(e))};n.didOpen?n.didOpen(e,i):i(e),this._syncedDocuments.set(t,e)}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}}class P extends R{constructor(e,t){super(e,i.workspace.onDidCloseTextDocument,r.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t),R.textDocumentFilter),this._syncedDocuments=t}get messages(){return r.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{documentSelector:t}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.delete(e.uri.toString())}unregister(e){let t=this._selectors.get(e);super.unregister(e);let n=this._selectors.values();this._syncedDocuments.forEach(e=>{if(i.languages.match(t,e)&&!this._selectorFilter(n,e)){let t=this._client.clientOptions.middleware,n=e=>{this._client.sendNotification(this._type,this._createParams(e))};this._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,n):n(e)}})}}class b{constructor(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}get messages(){return r.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==r.TextDocumentSyncKind.None&&this.register(this.messages,{id:u.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))}callback(e){if(0!==e.contentChanges.length)for(const t of this._changeData.values())if(i.languages.match(t.documentSelector,e.document)){let n=this._client.clientOptions.middleware;if(t.syncKind===r.TextDocumentSyncKind.Incremental){let t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,()=>this._client.sendNotification(r.DidChangeTextDocumentNotification.type,t)):this._client.sendNotification(r.DidChangeTextDocumentNotification.type,t)}else if(t.syncKind===r.TextDocumentSyncKind.Full){let t=e=>{this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(r.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))})):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new c.Delayer(200)},this._changeDelayer.delayer.trigger(()=>{this._client.sendNotification(r.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))},-1))};n.didChange?n.didChange(e,t):t(e)}}}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}getProvider(e){for(const t of this._changeData.values())if(i.languages.match(t.documentSelector,e))return{send:e=>{this.callback(e)}};throw new Error("No provider available for the given text document")}}class _ extends R{constructor(e){super(e,i.workspace.onWillSaveTextDocument,r.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t),(e,t)=>R.textDocumentFilter(e,t.document))}get messages(){return r.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){w(w(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{documentSelector:t}})}}class S{constructor(e){this._client=e,this._selectors=new Map}get messages(){return r.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){w(w(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{documentSelector:t}})}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))}callback(e){if(R.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,n=e=>this._client.sendRequest(r.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then(e=>{let t=this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t});e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class x extends R{constructor(e){super(e,i.workspace.onDidSaveTextDocument,r.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText),R.textDocumentFilter)}get messages(){return r.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){w(w(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.save&&this.register(this.messages,{id:u.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!n.save.includeText})})}register(e,t){this._includeText=!!t.registerOptions.includeText,super.register(e,t)}}class E{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}get messages(){return r.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){w(w(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0}initialize(e,t){}register(e,t){if(!Array.isArray(t.registerOptions.watchers))return;let n=[];for(let e of t.registerOptions.watchers){if(!a.string(e.globPattern))continue;let t=!0,o=!0,s=!0;void 0!==e.kind&&null!==e.kind&&(t=0!=(e.kind&r.WatchKind.Create),o=0!=(e.kind&r.WatchKind.Change),s=0!=(e.kind&r.WatchKind.Delete));let c=i.workspace.createFileSystemWatcher(e.globPattern,!t,!o,!s);this.hookListeners(c,t,o,s),n.push(c)}this._watchers.set(t.id,n)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,i,o){t&&e.onDidCreate(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Created}),null,o),n&&e.onDidChange(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Changed}),null,o),i&&e.onDidDelete(e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Deleted}),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}}class k{constructor(e,t){this._client=e,this._message=t,this._registrations=new Map}get messages(){return this._message}register(e,t){if(e.method!==this.messages.method)throw new Error(`Register called on wrong feature. Requested ${e.method} but reached feature ${this.messages.method}`);if(!t.registerOptions.documentSelector)return;let n=this.registerLanguageProvider(t.registerOptions);this._registrations.set(t.id,{disposable:n[0],data:t,provider:n[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(r.TextDocumentRegistrationOptions.is(t)){const n=r.StaticRegistrationOptions.hasId(t)?t.id:u.generateUuid(),i=t.documentSelector||e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(a.boolean(t)&&!0===t||r.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let n=a.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[u.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return a.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(null!==n&&i.languages.match(n,e))return t.provider}throw new Error("The feature has no registration for the provided text document "+e.uri.toString())}}t.TextDocumentFeature=k;class I extends k{constructor(e){super(e,r.CompletionRequest.type)}fillClientCapabilities(e){let t=w(w(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[r.MarkupKind.Markdown,r.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[r.CompletionItemTag.Deprecated]}},t.completionItemKind={valueSet:C}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.triggerCharacters||[],n={provideCompletionItems:(e,t,n,i)=>{const o=this._client,s=this._client.clientOptions.middleware,a=(e,t,n,i)=>o.sendRequest(r.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),i).then(o.protocol2CodeConverter.asCompletionResult,e=>(o.logFailedRequest(r.CompletionRequest.type,e),Promise.resolve([])));return s.provideCompletionItem?s.provideCompletionItem(e,t,i,n,a):a(e,t,i,n)},resolveCompletionItem:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.clientOptions.middleware,o=(e,t)=>n.sendRequest(r.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,t=>(n.logFailedRequest(r.CompletionResolveRequest.type,t),Promise.resolve(e)));return i.resolveCompletionItem?i.resolveCompletionItem(e,t,o):o(e,t)}:void 0};return[i.languages.registerCompletionItemProvider(e.documentSelector,n,...t),n]}}class O extends k{constructor(e){super(e,r.HoverRequest.type)}fillClientCapabilities(e){const t=w(w(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[r.MarkupKind.Markdown,r.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideHover:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.HoverRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asHover,e=>(i.logFailedRequest(r.HoverRequest.type,e),Promise.resolve(null))),s=i.clientOptions.middleware;return s.provideHover?s.provideHover(e,t,n,o):o(e,t,n)}};return[i.languages.registerHoverProvider(e.documentSelector,t),t]}}class M extends k{constructor(e){super(e,r.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=w(w(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[r.MarkupKind.Markdown,r.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>o.sendRequest(r.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),i).then(o.protocol2CodeConverter.asSignatureHelp,e=>(o.logFailedRequest(r.SignatureHelpRequest.type,e),Promise.resolve(null))),a=o.clientOptions.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,i,n,s):s(e,t,i,n)}};let n;if(void 0===e.retriggerCharacters){const r=e.triggerCharacters||[];n=i.languages.registerSignatureHelpProvider(e.documentSelector,t,...r)}else{const r={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};n=i.languages.registerSignatureHelpProvider(e.documentSelector,t,r)}return[n,t]}}class F extends k{constructor(e){super(e,r.DefinitionRequest.type)}fillClientCapabilities(e){let t=w(w(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>(i.logFailedRequest(r.DefinitionRequest.type,e),Promise.resolve(null))),s=i.clientOptions.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,o):o(e,t,n)}};return[i.languages.registerDefinitionProvider(e.documentSelector,t),t]}}class q extends k{constructor(e){super(e,r.ReferencesRequest.type)}fillClientCapabilities(e){w(w(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideReferences:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>o.sendRequest(r.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),i).then(o.protocol2CodeConverter.asReferences,e=>(o.logFailedRequest(r.ReferencesRequest.type,e),Promise.resolve([]))),a=o.clientOptions.middleware;return a.provideReferences?a.provideReferences(e,t,n,i,s):s(e,t,n,i)}};return[i.languages.registerReferenceProvider(e.documentSelector,t),t]}}class N extends k{constructor(e){super(e,r.DocumentHighlightRequest.type)}fillClientCapabilities(e){w(w(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentHighlights:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DocumentHighlightRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDocumentHighlights,e=>(i.logFailedRequest(r.DocumentHighlightRequest.type,e),Promise.resolve([]))),s=i.clientOptions.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[i.languages.registerDocumentHighlightProvider(e.documentSelector,t),t]}}class L extends k{constructor(e){super(e,r.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=w(w(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:y},t.hierarchicalDocumentSymbolSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t).then(e=>{if(null!==e){if(0===e.length)return[];{let t=e[0];return r.DocumentSymbol.is(t)?n.protocol2CodeConverter.asDocumentSymbols(e):n.protocol2CodeConverter.asSymbolInformations(e)}}},e=>(n.logFailedRequest(r.DocumentSymbolRequest.type,e),Promise.resolve([]))),o=n.clientOptions.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,i):i(e,t)}};return[i.languages.registerDocumentSymbolProvider(e.documentSelector,t),t]}}class K extends class{constructor(e,t){this._client=e,this._message=t,this._registrations=new Map}get messages(){return this._message}register(e,t){if(e.method!==this.messages.method)throw new Error(`Register called on wron feature. Requested ${e.method} but reached feature ${this.messages.method}`);const n=this.registerLanguageProvider(t.registerOptions);this._registrations.set(t.id,{disposable:n[0],provider:n[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}{constructor(e){super(e,r.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=w(w(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:y}}initialize(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:u.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.WorkspaceSymbolRequest.type,{query:e},t).then(n.protocol2CodeConverter.asSymbolInformations,e=>(n.logFailedRequest(r.WorkspaceSymbolRequest.type,e),Promise.resolve([]))),o=n.clientOptions.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,i):i(e,t)}};return[i.languages.registerWorkspaceSymbolProvider(t),t]}}class A extends k{constructor(e){super(e,r.CodeActionRequest.type)}fillClientCapabilities(e){const t=w(w(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:[r.CodeActionKind.Empty,r.CodeActionKind.QuickFix,r.CodeActionKind.Refactor,r.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorRewrite,r.CodeActionKind.Source,r.CodeActionKind.SourceOrganizeImports]}}}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideCodeActions:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContext(n)};return o.sendRequest(r.CodeActionRequest.type,s,i).then(e=>{if(null===e)return;const t=[];for(let n of e)r.Command.is(n)?t.push(o.protocol2CodeConverter.asCommand(n)):t.push(o.protocol2CodeConverter.asCodeAction(n));return t},e=>(o.logFailedRequest(r.CodeActionRequest.type,e),Promise.resolve([])))},a=o.clientOptions.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,i,s):s(e,t,n,i)}};return[i.languages.registerCodeActionsProvider(e.documentSelector,t,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),t]}}class H extends k{constructor(e){super(e,r.CodeLensRequest.type)}fillClientCapabilities(e){w(w(e,"textDocument"),"codeLens").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideCodeLenses:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then(n.protocol2CodeConverter.asCodeLenses,e=>(n.logFailedRequest(r.CodeLensRequest.type,e),Promise.resolve([]))),o=n.clientOptions.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,i):i(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then(n.protocol2CodeConverter.asCodeLens,t=>(n.logFailedRequest(r.CodeLensResolveRequest.type,t),e)),o=n.clientOptions.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,i):i(e,t)}:void 0};return[i.languages.registerCodeLensProvider(e.documentSelector,t),t]}}class U extends k{constructor(e){super(e,r.DocumentFormattingRequest.type)}fillClientCapabilities(e){w(w(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentFormattingEdits:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),options:i.code2ProtocolConverter.asFormattingOptions(t)};return i.sendRequest(r.DocumentFormattingRequest.type,o,n).then(i.protocol2CodeConverter.asTextEdits,e=>(i.logFailedRequest(r.DocumentFormattingRequest.type,e),Promise.resolve([])))},s=i.clientOptions.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[i.languages.registerDocumentFormattingEditProvider(e.documentSelector,t),t]}}class W extends k{constructor(e){super(e,r.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){w(w(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentRangeFormattingEdits:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n)};return o.sendRequest(r.DocumentRangeFormattingRequest.type,s,i).then(o.protocol2CodeConverter.asTextEdits,e=>(o.logFailedRequest(r.DocumentRangeFormattingRequest.type,e),Promise.resolve([])))};let a=o.clientOptions.middleware;return a.provideDocumentRangeFormattingEdits?a.provideDocumentRangeFormattingEdits(e,t,n,i,s):s(e,t,n,i)}};return[i.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,t),t]}}class j extends k{constructor(e){super(e,r.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){w(w(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideOnTypeFormattingEdits:(e,t,n,i,o)=>{const s=this._client,a=(e,t,n,i,o)=>{let a={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(i)};return s.sendRequest(r.DocumentOnTypeFormattingRequest.type,a,o).then(s.protocol2CodeConverter.asTextEdits,e=>(s.logFailedRequest(r.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([])))},c=s.clientOptions.middleware;return c.provideOnTypeFormattingEdits?c.provideOnTypeFormattingEdits(e,t,n,i,o,a):a(e,t,n,i,o)}},n=e.moreTriggerCharacter||[];return[i.languages.registerOnTypeFormattingEditProvider(e.documentSelector,t,e.firstTriggerCharacter,...n),t]}}class z extends k{constructor(e){super(e,r.RenameRequest.type)}fillClientCapabilities(e){let t=w(w(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(a.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register(this.messages,{id:u.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t={provideRenameEdits:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(r.RenameRequest.type,s,i).then(o.protocol2CodeConverter.asWorkspaceEdit,e=>(o.logFailedRequest(r.RenameRequest.type,e),Promise.reject(new Error(e.message))))},a=o.clientOptions.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,i,s):s(e,t,n,i)},prepareRename:e.prepareProvider?(e,t,n)=>{const i=this._client,o=(e,t,n)=>{let o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),position:i.code2ProtocolConverter.asPosition(t)};return i.sendRequest(r.PrepareRenameRequest.type,o,n).then(e=>r.Range.is(e)?i.protocol2CodeConverter.asRange(e):e&&r.Range.is(e.range)?{range:i.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed.")),e=>(i.logFailedRequest(r.PrepareRenameRequest.type,e),Promise.reject(new Error(e.message))))},s=i.clientOptions.middleware;return s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[i.languages.registerRenameProvider(e.documentSelector,t),t]}}class B extends k{constructor(e){super(e,r.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=w(w(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register(this.messages,{id:u.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideDocumentLinks:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then(n.protocol2CodeConverter.asDocumentLinks,e=>(n.logFailedRequest(r.DocumentLinkRequest.type,e),Promise.resolve([]))),o=n.clientOptions.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,i):i(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let i=(e,t)=>n.sendRequest(r.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then(n.protocol2CodeConverter.asDocumentLink,t=>(n.logFailedRequest(r.DocumentLinkResolveRequest.type,t),Promise.resolve(e)));const o=n.clientOptions.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,i):i(e,t)}:void 0};return[i.languages.registerDocumentLinkProvider(e.documentSelector,t),t]}}class ${constructor(e){this._client=e,this._listeners=new Map}get messages(){return r.DidChangeConfigurationNotification.type}fillClientCapabilities(e){w(w(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:u.generateUuid(),registerOptions:{section:e}})}register(e,t){let n=i.workspace.onDidChangeConfiguration(e=>{this.onDidChangeConfiguration(t.registerOptions.section,e)});this._listeners.set(t.id,n),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let n;if(n=a.string(e)?[e]:e,void 0!==n&&void 0!==t){if(!n.some(e=>t.affectsConfiguration(e)))return}let i=e=>{void 0!==e?this._client.sendNotification(r.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}):this._client.sendNotification(r.DidChangeConfigurationNotification.type,{settings:null})},o=this.getMiddleware();o?o(n,i):i(n)}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e=0?i.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):i.workspace.getConfiguration(s,n),c){let n=e[o].split(".");t(r,n)[n[n.length-1]]=c}}return r}getMiddleware(){let e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0}}class J{constructor(e){this._client=e,this._commands=new Map}get messages(){return r.ExecuteCommandRequest.type}fillClientCapabilities(e){w(w(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register(this.messages,{id:u.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e,t){const n=this._client,o=n.clientOptions.middleware,s=(e,t)=>{let i={command:e,arguments:t};return n.sendRequest(r.ExecuteCommandRequest.type,i).then(void 0,e=>{n.logFailedRequest(r.ExecuteCommandRequest.type,e)})};if(t.registerOptions.commands){const e=[];for(const n of t.registerOptions.commands)e.push(i.commands.registerCommand(n,(...e)=>o.executeCommand?o.executeCommand(n,e,s):s(n,e)));this._commands.set(t.id,e)}}unregister(e){let t=this._commands.get(e);t&&t.forEach(e=>e.dispose())}dispose(){this._commands.forEach(e=>{e.forEach(e=>e.dispose())}),this._commands.clear()}}!function(e){e.is=function(e){return e&&r.MessageReader.is(e.reader)&&r.MessageWriter.is(e.writer)}}(t.MessageTransports||(t.MessageTransports={}));class Y{constructor(e,t){this._resolve=e,this._reject=t,this._used=!1}get isUsed(){return this._used}resolve(){this._used=!0,this._resolve()}reject(e){this._used=!0,this._reject(e)}}t.BaseLanguageClient=class{constructor(e,t,n){this._traceFormat=r.TraceFormat.Text,this._features=[],this._method2Message=new Map,this._dynamicFeatures=new Map,this._id=e,this._name=t,n=n||{},this._clientOptions={documentSelector:n.documentSelector||[],synchronize:n.synchronize||{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName||this._name,revealOutputChannelOn:n.revealOutputChannelOn||h.Error,stdioEncoding:n.stdioEncoding||"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler||new v(this._name),middleware:n.middleware||{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this.state=f.Initial,this._connectionPromise=void 0,this._resolvedConnection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._listeners=void 0,this._providers=void 0,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new c.Delayer(250),this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new Y(e,t)}),this._onStop=void 0,this._telemetryEmitter=new r.Emitter,this._stateChangeEmitter=new r.Emitter,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=o.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=s.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get state(){return this._state}set state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){return this.state===f.Running?p.Running:this.state===f.Starting?p.Starting:p.Stopped}get initializeResult(){return this._initializeResult}sendRequest(e,...t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{return this._resolvedConnection.sendRequest(e,...t)}catch(t){throw this.error(`Sending request ${a.string(e)?e:e.method} failed.`,t),t}}onRequest(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.onRequest(e,t)}catch(t){throw this.error(`Registering request handler ${a.string(e)?e:e.method} failed.`,t),t}}sendNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{this._resolvedConnection.sendNotification(e,t)}catch(t){throw this.error(`Sending notification ${a.string(e)?e:e.method} failed.`,t),t}}onNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.onNotification(e,t)}catch(t){throw this.error(`Registering notification handler ${a.string(e)?e:e.method} failed.`,t),t}}onProgress(e,t,n){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onProgress(e,t,n)}catch(e){throw this.error(`Registering progress handler for token ${t} failed.`,e),e}}sendProgress(e,t,n){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{this._resolvedConnection.sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=i.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(){return new v(this._name)}set trace(e){this._trace=e,this.onReady().then(()=>{this.resolveConnection().then(e=>{e.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})})},()=>{})}data2String(e){if(e instanceof r.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}info(e,t,n=!0){this.outputChannel.appendLine(`[Info - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=h.Info&&this.showNotificationMessage()}warn(e,t,n=!0){this.outputChannel.appendLine(`[Warn - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=h.Warn&&this.showNotificationMessage()}error(e,t,n=!0){this.outputChannel.appendLine(`[Error - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),n&&this._clientOptions.revealOutputChannelOn<=h.Error&&this.showNotificationMessage()}showNotificationMessage(){i.window.showInformationMessage("A request has failed. See the output for more information.","Go to output").then(()=>{this.outputChannel.show(!0)})}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(""+JSON.stringify(e))}needsStart(){return this.state===f.Initial||this.state===f.Stopping||this.state===f.Stopped}needsStop(){return this.state===f.Starting||this.state===f.Running}onReady(){return this._onReady}isConnectionActive(){return this.state===f.Running&&!!this._resolvedConnection}start(){return this._onReadyCallbacks.isUsed&&(this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new Y(e,t)})),this._listeners=[],this._providers=[],this._diagnostics||(this._diagnostics=this._clientOptions.diagnosticCollectionName?i.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):i.languages.createDiagnosticCollection()),this.state=f.Starting,this.resolveConnection().then(e=>(e.onLogMessage(e=>{switch(e.type){case r.MessageType.Error:this.error(e.message,void 0,!1);break;case r.MessageType.Warning:this.warn(e.message,void 0,!1);break;case r.MessageType.Info:this.info(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}}),e.onShowMessage(e=>{switch(e.type){case r.MessageType.Error:i.window.showErrorMessage(e.message);break;case r.MessageType.Warning:i.window.showWarningMessage(e.message);break;case r.MessageType.Info:i.window.showInformationMessage(e.message);break;default:i.window.showInformationMessage(e.message)}}),e.onRequest(r.ShowMessageRequest.type,e=>{let t;switch(e.type){case r.MessageType.Error:t=i.window.showErrorMessage;break;case r.MessageType.Warning:t=i.window.showWarningMessage;break;case r.MessageType.Info:t=i.window.showInformationMessage;break;default:t=i.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)}),e.onTelemetry(e=>{this._telemetryEmitter.fire(e)}),e.listen(),this.initialize(e))).then(void 0,e=>{this.state=f.StartFailed,this._onReadyCallbacks.reject(e),this.error("Starting client failed",e),i.window.showErrorMessage("Couldn't start client "+this._name)}),new i.Disposable(()=>{this.needsStop()&&this.stop()})}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}initialize(t){this.refreshTrace(t,!1);let n=this._clientOptions.initializationOptions,o=this._clientOptions.workspaceFolder?this._clientOptions.workspaceFolder.uri.fsPath:this._clientGetRootPath(),s={processId:e.pid,clientInfo:{name:"vscode",version:i.version},rootPath:o||null,rootUri:o?this._c2p.asUri(i.Uri.file(o)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(n)?n():n,trace:r.Trace.toString(this._trace),workspaceFolders:null};if(this.fillInitializeParams(s),this._clientOptions.progressOnInitialization){const e=u.generateUuid(),n=new l.ProgressPart(t,e);return s.workDoneToken=e,this.doInitialize(t,s).then(e=>(n.done(),e),e=>{throw n.cancel(),e})}return this.doInitialize(t,s)}doInitialize(e,t){return e.initialize(t).then(t=>{this._resolvedConnection=e,this._initializeResult=t,this.state=f.Running;let n=void 0;return a.number(t.capabilities.textDocumentSync)?n=t.capabilities.textDocumentSync===r.TextDocumentSyncKind.None?{openClose:!1,change:r.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:t.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==t.capabilities.textDocumentSync&&null!==t.capabilities.textDocumentSync&&(n=t.capabilities.textDocumentSync),this._capabilities=Object.assign({},t.capabilities,{resolvedTextDocumentSync:n}),e.onDiagnostics(e=>this.handleDiagnostics(e)),e.onRequest(r.RegistrationRequest.type,e=>this.handleRegistrationRequest(e)),e.onRequest("client/registerFeature",e=>this.handleRegistrationRequest(e)),e.onRequest(r.UnregistrationRequest.type,e=>this.handleUnregistrationRequest(e)),e.onRequest("client/unregisterFeature",e=>this.handleUnregistrationRequest(e)),e.onRequest(r.ApplyWorkspaceEditRequest.type,e=>this.handleApplyWorkspaceEdit(e)),e.sendNotification(r.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),t}).then(void 0,t=>{throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t)):t instanceof r.ResponseError&&t.data&&t.data.retry?i.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then(n=>{n&&"retry"===n.id?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t))}):(t&&t.message&&i.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop(),this._onReadyCallbacks.reject(t)),t})}_clientGetRootPath(){let e=i.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(){return this._initializeResult=void 0,this._connectionPromise?this.state===f.Stopping&&this._onStop?this._onStop:(this.state=f.Stopping,this.cleanUp(!1),this._onStop=this.resolveConnection().then(e=>e.shutdown().then(()=>{e.exit(),e.dispose(),this.state=f.Stopped,this.cleanUpChannel(),this._onStop=void 0,this._connectionPromise=void 0,this._resolvedConnection=void 0}))):(this.state=f.Stopped,Promise.resolve())}cleanUp(e=!0,t=!0){this._listeners&&(this._listeners.forEach(e=>e.dispose()),this._listeners=void 0),this._providers&&(this._providers.forEach(e=>e.dispose()),this._providers=void 0),this._syncedDocuments&&this._syncedDocuments.clear();for(let e of this._dynamicFeatures.values())e.dispose();e&&this.cleanUpChannel(),t&&this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0)}cleanUpChannel(){this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){var t,n;const i=this;function r(e){i._fileEvents.push(e),i._fileEventDelayer.trigger(()=>{i.onReady().then(()=>{i.resolveConnection().then(e=>{i.isConnectionActive()&&(i.forceDocumentSync(),e.didChangeWatchedFiles({changes:i._fileEvents})),i._fileEvents=[]})},e=>{i.error("Notify file events failed.",e)})})}const o=null===(t=this.clientOptions.middleware)||void 0===t?void 0:t.workspace;(null===(n=o)||void 0===n?void 0:n.didChangeWatchedFile)?o.didChangeWatchedFile(e,r):r(e)}forceDocumentSync(){this._dynamicFeatures.get(r.DidChangeTextDocumentNotification.type.method).forceDelivery()}handleDiagnostics(e){if(!this._diagnostics)return;let t=this._p2c.asUri(e.uri),n=this._p2c.asDiagnostics(e.diagnostics),i=this.clientOptions.middleware;i.handleDiagnostics?i.handleDiagnostics(t,n,(e,t)=>this.setDiagnostics(e,t)):this.setDiagnostics(t,n)}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}createConnection(){let e=(e,t,n)=>{this.handleConnectionError(e,t,n)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then(n=>function(e,t,n,i){let o=new d,s=r.createProtocolConnection(e,t,o);return s.onError(e=>{n(e[0],e[1],e[2])}),s.onClose(i),{listen:()=>s.listen(),sendRequest:(e,...t)=>s.sendRequest(a.string(e)?e:e.method,...t),onRequest:(e,t)=>s.onRequest(a.string(e)?e:e.method,t),sendNotification:(e,t)=>s.sendNotification(a.string(e)?e:e.method,t),onNotification:(e,t)=>s.onNotification(a.string(e)?e:e.method,t),onProgress:s.onProgress,sendProgress:s.sendProgress,trace:(e,t,n)=>{const i={sendNotification:!1,traceFormat:r.TraceFormat.Text};void 0===n?s.trace(e,t,i):(a.boolean(n),s.trace(e,t,n))},initialize:e=>s.sendRequest(r.InitializeRequest.type,e),shutdown:()=>s.sendRequest(r.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(r.ExitNotification.type),onLogMessage:e=>s.onNotification(r.LogMessageNotification.type,e),onShowMessage:e=>s.onNotification(r.ShowMessageNotification.type,e),onTelemetry:e=>s.onNotification(r.TelemetryEventNotification.type,e),didChangeConfiguration:e=>s.sendNotification(r.DidChangeConfigurationNotification.type,e),didChangeWatchedFiles:e=>s.sendNotification(r.DidChangeWatchedFilesNotification.type,e),didOpenTextDocument:e=>s.sendNotification(r.DidOpenTextDocumentNotification.type,e),didChangeTextDocument:e=>s.sendNotification(r.DidChangeTextDocumentNotification.type,e),didCloseTextDocument:e=>s.sendNotification(r.DidCloseTextDocumentNotification.type,e),didSaveTextDocument:e=>s.sendNotification(r.DidSaveTextDocumentNotification.type,e),onDiagnostics:e=>s.onNotification(r.PublishDiagnosticsNotification.type,e),dispose:()=>s.dispose()}}(n.reader,n.writer,e,t))}handleConnectionClosed(){if(this.state===f.Stopping||this.state===f.Stopped)return;try{this._resolvedConnection&&this._resolvedConnection.dispose()}catch(e){}let e=m.DoNotRestart;try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===m.DoNotRestart?(this.error("Connection to server got closed. Server will not be restarted."),this.state=f.Stopped,this.cleanUp(!1,!0)):e===m.Restart&&(this.info("Connection to server got closed. Server will restart."),this.cleanUp(!1,!1),this.state=f.Initial,this.start())}handleConnectionError(e,t,n){this._clientOptions.errorHandler.error(e,t,n)===g.Shutdown&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){i.workspace.onDidChangeConfiguration(()=>{this.refreshTrace(e,!0)})}refreshTrace(e,t=!1){let n=i.workspace.getConfiguration(this._id),o=r.Trace.Off,s=r.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=r.Trace.fromString(e):(o=r.Trace.fromString(n.get("trace.server.verbosity","off")),s=r.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat})}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=a.array(n)?n:[n],t&&this._dynamicFeatures.get(r.DidChangeWatchedFilesNotification.type.method).registerRaw(u.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),D.is(e)){let t=e.messages;if(Array.isArray(t))for(let n of t)this._method2Message.set(n.method,n),this._dynamicFeatures.set(n.method,e);else this._method2Message.set(t.method,t),this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}registerBuiltinFeatures(){this.registerFeature(new $(this)),this.registerFeature(new T(this,this._syncedDocuments)),this.registerFeature(new b(this)),this.registerFeature(new _(this)),this.registerFeature(new S(this)),this.registerFeature(new x(this)),this.registerFeature(new P(this,this._syncedDocuments)),this.registerFeature(new E(this,e=>this.notifyFileEvent(e))),this.registerFeature(new I(this)),this.registerFeature(new O(this)),this.registerFeature(new M(this)),this.registerFeature(new F(this)),this.registerFeature(new q(this)),this.registerFeature(new N(this)),this.registerFeature(new L(this)),this.registerFeature(new K(this)),this.registerFeature(new A(this)),this.registerFeature(new H(this)),this.registerFeature(new U(this)),this.registerFeature(new W(this)),this.registerFeature(new j(this)),this.registerFeature(new z(this)),this.registerFeature(new B(this)),this.registerFeature(new J(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};w(e,"workspace").applyEdit=!0;let t=w(w(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[r.ResourceOperationKind.Create,r.ResourceOperationKind.Rename,r.ResourceOperationKind.Delete],t.failureHandling=r.FailureHandlingKind.TextOnlyTransactional;let n=w(w(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[r.DiagnosticTag.Unnecessary,r.DiagnosticTag.Deprecated]};for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let e of this._features)e.initialize(this._capabilities,t)}handleRegistrationRequest(e){return new Promise((t,n)=>{for(let t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const i=t.registerOptions||{};i.documentSelector=i.documentSelector||this._clientOptions.documentSelector;const r={id:t.id,registerOptions:i};e.register(this._method2Message.get(t.method),r)}t()})}handleUnregistrationRequest(e){return new Promise((t,n)=>{for(let t of e.unregisterations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}t()})}handleApplyWorkspaceEdit(e){let t=e.edit,n=new Map;i.workspace.textDocuments.forEach(e=>n.set(e.uri.toString(),e));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(r.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){let t=n.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):a.asPromise(i.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then(e=>({applied:e})))}logFailedRequest(e,t){t instanceof r.ResponseError&&(t.code===r.ErrorCodes.RequestCancelled||t.code===r.ErrorCodes.ContentModified)||this.error(`Request ${e.method} failed.`,t)}}}).call(this,n(7))},function(e,t,n){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var i=n(19),r=n(20),o=n(21);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(i)return H(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return x(this,t,n);case"base64":return b(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function f(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function v(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){var o,s=1,a=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var l=-1;for(o=n;oa&&(n=a-c),o=n;o>=0;o--){for(var d=!0,g=0;gr&&(i=r):i=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s>8,r=n%256,o.push(r),o.push(i);return o}(t,e.length-n),e,n,i)}function b(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r239?4:u>223?3:u>191?2:1;if(r+d<=n)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=e[r+1]))&&(c=(31&u)<<6|63&o)>127&&(l=c);break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l),r+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,i,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(i,r),l=e.slice(t,n),d=0;dr)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return C(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return D(this,e,t,n);case"latin1":case"binary":return R(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;ri)&&(n=i);for(var r="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,i,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function M(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r>>8*(i?r:1-r)}function F(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r>>8*(i?r:3-r)&255}function q(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,i,o){return o||q(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function L(e,t,n,i,o){return o||q(e,0,n,8),r.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t0&&(r*=256);)i+=this[e+--t]*r;return i},c.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var i=this[e],r=1,o=0;++o=(r*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+r]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--r)e[r+t]=this[r+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,i){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(10))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(4);var r;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.ContentModified=-32801,e.MessageWriteError=1,e.MessageReadError=2}(r=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:r.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e,t){this._method=e,this._numberOfParams=t}get method(){return this._method}get numberOfParams(){return this._numberOfParams}}t.AbstractMessageType=s;t.RequestType0=class extends s{constructor(e){super(e,0)}};t.RequestType=class extends s{constructor(e){super(e,1)}};t.RequestType1=class extends s{constructor(e){super(e,1)}};t.RequestType2=class extends s{constructor(e){super(e,2)}};t.RequestType3=class extends s{constructor(e){super(e,3)}};t.RequestType4=class extends s{constructor(e){super(e,4)}};t.RequestType5=class extends s{constructor(e){super(e,5)}};t.RequestType6=class extends s{constructor(e){super(e,6)}};t.RequestType7=class extends s{constructor(e){super(e,7)}};t.RequestType8=class extends s{constructor(e){super(e,8)}};t.RequestType9=class extends s{constructor(e){super(e,9)}};t.NotificationType=class extends s{constructor(e){super(e,1),this._=void 0}};t.NotificationType0=class extends s{constructor(e){super(e,0)}};t.NotificationType1=class extends s{constructor(e){super(e,1)}};t.NotificationType2=class extends s{constructor(e){super(e,2)}};t.NotificationType3=class extends s{constructor(e){super(e,3)}};t.NotificationType4=class extends s{constructor(e){super(e,4)}};t.NotificationType5=class extends s{constructor(e){super(e,5)}};t.NotificationType6=class extends s{constructor(e){super(e,6)}};t.NotificationType7=class extends s{constructor(e){super(e,7)}};t.NotificationType8=class extends s{constructor(e){super(e,8)}};t.NotificationType9=class extends s{constructor(e){super(e,9)}},t.isRequestMessage=function(e){let t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},t.isNotificationMessage=function(e){let t=e;return t&&i.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){let t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(6);t.Disposable=i.Disposable;t.DisposableCollection=class{constructor(){this.disposables=[]}dispose(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()}push(e){const t=this.disposables;return t.push(e),{dispose(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}}}},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(e){return Array.isArray(e)}function s(e){return e&&r(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=o,t.stringArray=function(e){return o(e)&&e.every(e=>i(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=s,t.asPromise=function(e){return e instanceof Promise?e:s(e)?new Promise((t,n)=>{e.then(e=>t(e),e=>n(e))}):Promise.resolve(e)}},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(18),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(10))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,s,a,c=1,u={},l=!1,d=e.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(e);g=g&&g.setTimeout?g:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(h,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&h(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),i=function(t){e.postMessage(s+t,"*")}),g.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?s-4:s;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],s=0,a=n-r;sa?a:s+16383));1===r?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")};for(var i=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var r,o,s=[],a=t;a>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,c=(1<>1,l=-7,d=n?r-1:0,g=n?-1:1,m=e[t+d];for(d+=g,o=m&(1<<-l)-1,m>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=g,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=i;l>0;s=256*s+e[t+d],d+=g,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,i),o-=u}return(m?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,n,i,r,o){var s,a,c,u=8*o-r-1,l=(1<>1,g=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,m=i?0:o-1,h=i?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?g/c:g*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+m]=255&a,m+=h,a/=256,r-=8);for(s=s<0;e[n+m]=255&s,m+=h,s/=256,u-=8);e[n+m-h]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(5),r=n(4);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),e.is=function(t){let n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o=t.CancellationToken||(t.CancellationToken={}));const s=Object.freeze((function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));class a{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?s:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new a),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof a&&this._token.dispose():this._token=o.None}}},function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(i=t.Touch||(t.Touch={}));t.LinkedMap=class{constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}has(e){return this._map.has(e)}get(e){const t=this._map.get(e);if(t)return t.value}set(e,t,n=i.None){let r=this._map.get(e);if(r)r.value=t,n!==i.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case i.None:this.addItemLast(r);break;case i.First:this.addItemFirst(r);break;case i.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}}delete(e){const t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)}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){let n=this._head;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next}forEachReverse(e,t){let n=this._tail;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous}values(){let e=[],t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){let e=[],t=this._head;for(;t;)e.push(t.key),t=t.next;return e}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}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}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)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}}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===i.First||t===i.Last)if(t===i.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}else if(t===i.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}}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const i=n(25),r=n(26),o=n(11),s=n(11),a=n(8),c=n(9);t.generateRandomPipeName=function(){const t=o.randomBytes(21).toString("hex");return"win32"===e.platform?`\\\\.\\pipe\\vscode-jsonrpc-${t}-sock`:i.join(r.tmpdir(),`vscode-${t}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let n,i=new Promise((e,t)=>{n=e});return new Promise((r,o)=>{let u=s.createServer(e=>{u.close(),n([new a.SocketMessageReader(e,t),new c.SocketMessageWriter(e,t)])});u.on("error",o),u.listen(e,()=>{u.removeListener("error",o),r({onConnected:()=>i})})})},t.createServerPipeTransport=function(e,t="utf-8"){const n=s.createConnection(e);return[new a.SocketMessageReader(n,t),new c.SocketMessageWriter(n,t)]}}).call(this,n(7))},function(e,t,n){(function(e){function n(e,t){for(var n=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var n=[],i=0;i=-1&&!r;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,r="/"===s.charAt(0))}return(r?"/":"")+(t=n(i(t.split("/"),(function(e){return!!e})),!r).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===r(e,-1);return(e=n(i(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function i(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var r=i(e.split("/")),o=i(n.split("/")),s=Math.min(r.length,o.length),a=s,c=0;c=1;--o)if(47===(t=e.charCodeAt(o))){if(!r){i=o;break}}else r=!1;return-1===i?n?"/":".":n&&1===i?"/":e.slice(0,i)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,i=-1,r=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!r){n=t+1;break}}else-1===i&&(r=!1,i=t+1);return-1===i?"":e.slice(n,i)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,i=-1,r=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===i&&(r=!1,i=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!r){n=s+1;break}}return-1===t||-1===i||0===o||1===o&&t===i-1&&t===n+1?"":e.slice(t,i)};var r="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(7))},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(11),r=n(8),o=n(9);t.createClientSocketTransport=function(e,t="utf-8"){let n,s=new Promise((e,t)=>{n=e});return new Promise((a,c)=>{let u=i.createServer(e=>{u.close(),n([new r.SocketMessageReader(e,t),new o.SocketMessageWriter(e,t)])});u.on("error",c),u.listen(e,"127.0.0.1",()=>{u.removeListener("error",c),a({onConnected:()=>s})})})},t.createServerSocketTransport=function(e,t="utf-8"){const n=i.createConnection(e,"127.0.0.1");return[new r.SocketMessageReader(n,t),new o.SocketMessageWriter(n,t)]}},function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>i(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},,,,,,function(e,t,n){"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(15)),i(n(6)),i(n(62)),i(n(63)),i(n(39)),i(n(40)),i(n(41)),i(n(42)),i(n(79)),i(n(43))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1);class r extends i.CompletionItem{constructor(e){super(e)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1);class r extends i.CodeLens{constructor(e){super(e)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1);class r extends i.DocumentLink{constructor(e,t){super(e,t)}}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends i{constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}}function o(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new i("00000000-0000-0000-0000-000000000000"),t.v4=o;const s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function a(e){return s.test(e)}t.isUUID=a,t.parse=function(e){if(!a(e))throw new Error("invalid uuid");return new i(e)},t.generateUuid=function(){return o().asHex()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MonacoCommands=class{constructor(e){this.editor=e}registerCommand(e,t,n){return this.editor._commandService.addCommand({id:e,handler:(e,...n)=>t(...n)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(6);t.ConsoleWindow=class{constructor(){this.channels=new Map}showMessage(e,t,...n){return e===i.MessageType.Error&&console.error(t),e===i.MessageType.Warning&&console.warn(t),e===i.MessageType.Info&&console.info(t),e===i.MessageType.Log&&console.log(t),Promise.resolve(void 0)}createOutputChannel(e){const t=this.channels.get(e);if(t)return t;const n={append(t){console.log(e+": "+t)},appendLine(t){console.log(e+": "+t)},show(){},dispose(){}};return this.channels.set(e,n),n}}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const r=n(77),o=n(6),s=n(78),a=n(15);var c;function u(e,t){return r(e,{extended:!0,globstar:!0}).test(t)}!function(e){e.fromDocument=function(e){return{uri:monaco.Uri.parse(e.uri),languageId:e.languageId}},e.fromModel=function(e){return{uri:e.uri,languageId:e.getModeId()}}}(c=t.MonacoModelIdentifier||(t.MonacoModelIdentifier={})),t.testGlob=u;t.MonacoLanguages=class{constructor(e,t){this.p2m=e,this.m2p=t}match(e,t){return this.matchModel(e,c.fromDocument(t))}createDiagnosticCollection(e){return new s.MonacoDiagnosticCollection(e||"default",this.p2m)}registerCompletionItemProvider(e,t,...n){const i=this.createCompletionProvider(e,t,...n),r=new a.DisposableCollection;for(const t of this.matchLanguage(e))r.push(monaco.languages.registerCompletionItemProvider(t,i));return r}createCompletionProvider(e,t,...n){return{triggerCharacters:n,provideCompletionItems:(n,r,o,s)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=n.getWordUntilPosition(r),a=new monaco.Range(r.lineNumber,i.startColumn,r.lineNumber,i.endColumn),u=this.m2p.asCompletionParams(n,r,o),l=yield t.provideCompletionItems(u,s);return l&&this.p2m.asCompletionResult(l,a)})),resolveCompletionItem:t.resolveCompletionItem?(e,n,r,o)=>i(this,void 0,void 0,(function*(){const e=this.m2p.asCompletionItem(r),n=yield t.resolveCompletionItem(e,o);if(n){const e=this.p2m.asCompletionItem(n,r.range);Object.assign(r,e)}return r})):void 0}}registerHoverProvider(e,t){const n=this.createHoverProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerHoverProvider(t,n));return i}createHoverProvider(e,t){return{provideHover:(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentPositionParams(n,r),s=yield t.provideHover(i,o);return s&&this.p2m.asHover(s)}))}}registerSignatureHelpProvider(e,t,...n){const i=this.createSignatureHelpProvider(e,t,...n),r=new a.DisposableCollection;for(const t of this.matchLanguage(e))r.push(monaco.languages.registerSignatureHelpProvider(t,i));return r}createSignatureHelpProvider(e,t,...n){return{signatureHelpTriggerCharacters:[...t.triggerCharacters||n||[]],signatureHelpRetriggerCharacters:t.retriggerCharacters,provideSignatureHelp:(n,r,o,s)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentPositionParams(n,r),a=yield t.provideSignatureHelp(i,o,this.m2p.asSignatureHelpContext(s));return a&&this.p2m.asSignatureHelpResult(a)}))}}registerDefinitionProvider(e,t){const n=this.createDefinitionProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerDefinitionProvider(t,n));return i}createDefinitionProvider(e,t){return{provideDefinition:(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentPositionParams(n,r),s=yield t.provideDefinition(i,o);return s&&this.p2m.asDefinitionResult(s)}))}}registerReferenceProvider(e,t){const n=this.createReferenceProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerReferenceProvider(t,n));return i}createReferenceProvider(e,t){return{provideReferences:(n,r,o,s)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asReferenceParams(n,r,o),a=yield t.provideReferences(i,s);return a&&this.p2m.asReferences(a)}))}}registerDocumentHighlightProvider(e,t){const n=this.createDocumentHighlightProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerDocumentHighlightProvider(t,n));return i}createDocumentHighlightProvider(e,t){return{provideDocumentHighlights:(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentPositionParams(n,r),s=yield t.provideDocumentHighlights(i,o);return s&&this.p2m.asDocumentHighlights(s)}))}}registerDocumentSymbolProvider(e,t){const n=this.createDocumentSymbolProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerDocumentSymbolProvider(t,n));return i}createDocumentSymbolProvider(e,t){return{provideDocumentSymbols:(n,r)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asDocumentSymbolParams(n),o=yield t.provideDocumentSymbols(i,r);return o&&this.p2m.asDocumentSymbols(o)}))}}registerCodeActionsProvider(e,t){const n=this.createCodeActionProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerCodeActionProvider(t,n));return i}createCodeActionProvider(e,t){return{provideCodeActions:(n,r,o,s)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asCodeActionParams(n,r,o),a=yield t.provideCodeActions(i,s);return a&&this.p2m.asCodeActionList(a)||void 0}))}}registerCodeLensProvider(e,t){const n=this.createCodeLensProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerCodeLensProvider(t,n));return i}createCodeLensProvider(e,t){return{provideCodeLenses:(n,r)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asCodeLensParams(n),o=yield t.provideCodeLenses(i,r);return o&&this.p2m.asCodeLensList(o)})),resolveCodeLens:t.resolveCodeLens?(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return r;const i=this.m2p.asCodeLens(r),s=yield t.resolveCodeLens(i,o);if(s){const e=this.p2m.asCodeLens(s);Object.assign(r,e)}return r})):(e,t)=>t}}registerDocumentFormattingEditProvider(e,t){const n=this.createDocumentFormattingEditProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerDocumentFormattingEditProvider(t,n));return i}createDocumentFormattingEditProvider(e,t){return{provideDocumentFormattingEdits:(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asDocumentFormattingParams(n,r),s=yield t.provideDocumentFormattingEdits(i,o);return s&&this.p2m.asTextEdits(s)}))}}registerDocumentRangeFormattingEditProvider(e,t){const n=this.createDocumentRangeFormattingEditProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerDocumentRangeFormattingEditProvider(t,n));return i}createDocumentRangeFormattingEditProvider(e,t){return{provideDocumentRangeFormattingEdits:(n,r,o,s)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asDocumentRangeFormattingParams(n,r,o),a=yield t.provideDocumentRangeFormattingEdits(i,s);return a&&this.p2m.asTextEdits(a)}))}}registerOnTypeFormattingEditProvider(e,t,n,...i){const r=this.createOnTypeFormattingEditProvider(e,t,n,...i),o=new a.DisposableCollection;for(const t of this.matchLanguage(e))o.push(monaco.languages.registerOnTypeFormattingEditProvider(t,r));return o}createOnTypeFormattingEditProvider(e,t,n,...r){return{autoFormatTriggerCharacters:[n].concat(r),provideOnTypeFormattingEdits:(n,r,o,s,a)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asDocumentOnTypeFormattingParams(n,r,o,s),u=yield t.provideOnTypeFormattingEdits(i,a);return u&&this.p2m.asTextEdits(u)}))}}registerRenameProvider(e,t){const n=this.createRenameProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerRenameProvider(t,n));return i}createRenameProvider(e,t){return{provideRenameEdits:(n,r,o,s)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asRenameParams(n,r,o),a=yield t.provideRenameEdits(i,s);return a&&this.p2m.asWorkspaceEdit(a)}))}}registerDocumentLinkProvider(e,t){const n=this.createDocumentLinkProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerLinkProvider(t,n));return i}createDocumentLinkProvider(e,t){return{provideLinks:(n,r)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asDocumentLinkParams(n),o=yield t.provideDocumentLinks(i,r);return o&&this.p2m.asDocumentLinks(o)})),resolveLink:(e,n)=>i(this,void 0,void 0,(function*(){if(t.resolveDocumentLink&&(null===e.url||void 0===e.url)){const i=this.m2p.asDocumentLink(e),r=yield t.resolveDocumentLink(i,n);if(r){const t=this.p2m.asDocumentLink(r);Object.assign(e,t)}}return e}))}}registerImplementationProvider(e,t){const n=this.createImplementationProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerImplementationProvider(t,n));return i}createImplementationProvider(e,t){return{provideImplementation:(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentPositionParams(n,r),s=yield t.provideImplementation(i,o);return s&&this.p2m.asDefinitionResult(s)}))}}registerTypeDefinitionProvider(e,t){const n=this.createTypeDefinitionProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerTypeDefinitionProvider(t,n));return i}createTypeDefinitionProvider(e,t){return{provideTypeDefinition:(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentPositionParams(n,r),s=yield t.provideTypeDefinition(i,o);return s&&this.p2m.asDefinitionResult(s)}))}}registerColorProvider(e,t){const n=this.createDocumentColorProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerColorProvider(t,n));return i}createDocumentColorProvider(e,t){return{provideDocumentColors:(n,r)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentIdentifier(n),o=yield t.provideDocumentColors({textDocument:i},r);return o&&this.p2m.asColorInformations(o)})),provideColorPresentations:(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentIdentifier(n),s=this.m2p.asRange(r.range),a=yield t.provideColorPresentations({textDocument:i,color:r.color,range:s},o);return a&&this.p2m.asColorPresentations(a)}))}}registerFoldingRangeProvider(e,t){const n=this.createFoldingRangeProvider(e,t),i=new a.DisposableCollection;for(const t of this.matchLanguage(e))i.push(monaco.languages.registerFoldingRangeProvider(t,n));return i}createFoldingRangeProvider(e,t){return{provideFoldingRanges:(n,r,o)=>i(this,void 0,void 0,(function*(){if(!this.matchModel(e,c.fromModel(n)))return;const i=this.m2p.asTextDocumentIdentifier(n),r=yield t.provideFoldingRanges({textDocument:i},o);return r&&this.p2m.asFoldingRanges(r)}))}}matchModel(e,t){return Array.isArray(e)?e.some(e=>this.matchModel(e,t)):o.DocumentFilter.is(e)?(!e.language||e.language===t.languageId)&&((!e.scheme||e.scheme===t.uri.scheme)&&!(e.pattern&&!u(e.pattern,t.uri.path))):e===t.languageId}matchLanguage(e){const t=new Set;if(Array.isArray(e))for(const n of e)t.add(this.matchLanguageByFilter(n));else t.add(this.matchLanguageByFilter(e));return t}matchLanguageByFilter(e){return o.DocumentFilter.is(e)?e.language?e.language:"*":e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(6);t.MonacoWorkspace=class{constructor(e,t,n=null){this.p2m=e,this.m2p=t,this._rootUri=n,this.documents=new Map,this.onDidOpenTextDocumentEmitter=new i.Emitter,this.onDidCloseTextDocumentEmitter=new i.Emitter,this.onDidChangeTextDocumentEmitter=new i.Emitter;for(const e of monaco.editor.getModels())this.addModel(e);monaco.editor.onDidCreateModel(e=>this.addModel(e)),monaco.editor.onWillDisposeModel(e=>this.removeModel(e))}get rootUri(){return this._rootUri}removeModel(e){const t=e.uri.toString(),n=this.documents.get(t);n&&(this.documents.delete(t),this.onDidCloseTextDocumentEmitter.fire(n))}addModel(e){const t=e.uri.toString(),n=this.setModel(t,e);this.onDidOpenTextDocumentEmitter.fire(n),e.onDidChangeContent(n=>this.onDidChangeContent(t,e,n))}onDidChangeContent(e,t,n){const i=this.setModel(e,t),r=[];for(const e of n.changes){const t=this.m2p.asRange(e.range),n=e.rangeLength,i=e.text;r.push({range:t,rangeLength:n,text:i})}this.onDidChangeTextDocumentEmitter.fire({textDocument:i,contentChanges:r})}setModel(e,t){const n=i.TextDocument.create(e,t.getModeId(),t.getVersionId(),t.getValue());return this.documents.set(e,n),n}get textDocuments(){return Array.from(this.documents.values())}get onDidOpenTextDocument(){return this.onDidOpenTextDocumentEmitter.event}get onDidCloseTextDocument(){return this.onDidCloseTextDocumentEmitter.event}get onDidChangeTextDocument(){return this.onDidChangeTextDocumentEmitter.event}applyEdit(e){const t=this.p2m.asWorkspaceEdit(e),n=t.edits?t.edits.reduce((e,t)=>{const n=t;return e[n.resource.toString()]=monaco.editor.getModel(n.resource),e},{}):{};if(!Object.keys(n).map(e=>n[e]).every(e=>!!e))return Promise.resolve(!1);const i=t.edits?t.edits.reduce((e,t)=>{const n=t,i=n.resource.toString();i in e||(e[i]=[]);const r=n.edits.map(e=>({range:monaco.Range.lift(e.range),text:e.text}));return e[i].push(...r),e},{}):{};return Object.keys(i).forEach(e=>{n[e].pushEditOperations([],i[e].map(e=>({identifier:{major:1,minor:0},range:e.range,text:e.text,forceMoveMarkers:!0})),()=>[])}),Promise.resolve(!0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(28),o=n(6);var s,a,c;!function(e){e.is=function(e){return!!e&&"data"in e}}(s=t.ProtocolDocumentLink||(t.ProtocolDocumentLink={})),function(e){e.is=function(e){return!!e&&"data"in e}}(a=t.ProtocolCodeLens||(t.ProtocolCodeLens={})),function(e){e.is=function(e){return!!e&&"data"in e}}(c=t.ProtocolCompletionItem||(t.ProtocolCompletionItem={}));t.MonacoToProtocolConverter=class{asPosition(e,t){return{line:null==e?void 0:e-1,character:null==t?void 0:t-1}}asRange(e){if(void 0!==e){if(null===e)return null;if(void 0!==e.insert)return this.asRange(e.insert);return{start:this.asPosition(e.startLineNumber,e.startColumn),end:this.asPosition(e.endLineNumber,e.endColumn)}}}asTextDocumentIdentifier(e){return{uri:e.uri.toString()}}asTextDocumentPositionParams(e,t){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column)}}asCompletionParams(e,t,n){return Object.assign(this.asTextDocumentPositionParams(e,t),{context:this.asCompletionContext(n)})}asCompletionContext(e){return{triggerKind:this.asCompletionTriggerKind(e.triggerKind),triggerCharacter:e.triggerCharacter}}asSignatureHelpContext(e){return{triggerKind:this.asSignatureHelpTriggerKind(e.triggerKind),triggerCharacter:e.triggerCharacter,isRetrigger:e.isRetrigger,activeSignatureHelp:this.asSignatureHelp(e.activeSignatureHelp)}}asSignatureHelp(e){if(void 0!==e)return{signatures:e.signatures.map(e=>this.asSignatureInformation(e)),activeParameter:e.activeParameter,activeSignature:e.activeSignature}}asSignatureInformation(e){return{documentation:this.asMarkupContent(e.documentation),label:e.label,parameters:e.parameters.map(e=>this.asParameterInformation(e))}}asParameterInformation(e){return{documentation:this.asMarkupContent(e.documentation),label:e.label}}asMarkupContent(e){if(void 0!==e)return"string"==typeof e?e:{kind:o.MarkupKind.Markdown,value:e.value}}asSignatureHelpTriggerKind(e){switch(e){case monaco.languages.SignatureHelpTriggerKind.ContentChange:return o.SignatureHelpTriggerKind.ContentChange;case monaco.languages.SignatureHelpTriggerKind.TriggerCharacter:return o.SignatureHelpTriggerKind.TriggerCharacter;default:return o.SignatureHelpTriggerKind.Invoke}}asCompletionTriggerKind(e){switch(e){case monaco.languages.CompletionTriggerKind.TriggerCharacter:return o.CompletionTriggerKind.TriggerCharacter;case monaco.languages.CompletionTriggerKind.TriggerForIncompleteCompletions:return o.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return o.CompletionTriggerKind.Invoked}}asCompletionItem(e){const t={label:e.label},n=c.is(e)?e:void 0;return e.detail&&(t.detail=e.detail),e.documentation&&(n&&n.documentationFormat?t.documentation=this.asDocumentation(n.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),this.fillPrimaryInsertText(t,e),r.number(e.kind)&&(t.kind=this.asCompletionItemKind(e.kind,n&&n.originalItemKind)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),e.command&&(t.command=this.asCommand(e.command)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=this.asCommand(e.command)),n&&(void 0!==n.data&&(t.data=n.data),!0!==n.deprecated&&!1!==n.deprecated||(t.deprecated=n.deprecated)),t}asCompletionItemKind(e,t){if(void 0!==t)return t;switch(e){case monaco.languages.CompletionItemKind.Method:return o.CompletionItemKind.Method;case monaco.languages.CompletionItemKind.Function:return o.CompletionItemKind.Function;case monaco.languages.CompletionItemKind.Constructor:return o.CompletionItemKind.Constructor;case monaco.languages.CompletionItemKind.Field:return o.CompletionItemKind.Field;case monaco.languages.CompletionItemKind.Variable:return o.CompletionItemKind.Variable;case monaco.languages.CompletionItemKind.Class:return o.CompletionItemKind.Class;case monaco.languages.CompletionItemKind.Struct:return o.CompletionItemKind.Struct;case monaco.languages.CompletionItemKind.Interface:return o.CompletionItemKind.Interface;case monaco.languages.CompletionItemKind.Module:return o.CompletionItemKind.Module;case monaco.languages.CompletionItemKind.Property:return o.CompletionItemKind.Property;case monaco.languages.CompletionItemKind.Event:return o.CompletionItemKind.Event;case monaco.languages.CompletionItemKind.Operator:return o.CompletionItemKind.Operator;case monaco.languages.CompletionItemKind.Unit:return o.CompletionItemKind.Unit;case monaco.languages.CompletionItemKind.Value:return o.CompletionItemKind.Value;case monaco.languages.CompletionItemKind.Constant:return o.CompletionItemKind.Constant;case monaco.languages.CompletionItemKind.Enum:return o.CompletionItemKind.Enum;case monaco.languages.CompletionItemKind.EnumMember:return o.CompletionItemKind.EnumMember;case monaco.languages.CompletionItemKind.Keyword:return o.CompletionItemKind.Keyword;case monaco.languages.CompletionItemKind.Text:return o.CompletionItemKind.Text;case monaco.languages.CompletionItemKind.Color:return o.CompletionItemKind.Color;case monaco.languages.CompletionItemKind.File:return o.CompletionItemKind.File;case monaco.languages.CompletionItemKind.Reference:return o.CompletionItemKind.Reference;case monaco.languages.CompletionItemKind.Customcolor:return o.CompletionItemKind.Color;case monaco.languages.CompletionItemKind.Folder:return o.CompletionItemKind.Folder;case monaco.languages.CompletionItemKind.TypeParameter:return o.CompletionItemKind.TypeParameter;case monaco.languages.CompletionItemKind.Snippet:return o.CompletionItemKind.Snippet;default:return e+1}}asDocumentation(e,t){switch(e){case o.MarkupKind.PlainText:return{kind:e,value:t};case o.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}fillPrimaryInsertText(e,t){let n,i,r=o.InsertTextFormat.PlainText;void 0!==t.insertTextRules&&0==(t.insertTextRules&monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet)&&(r=o.InsertTextFormat.Snippet,n=t.insertText),e.insertTextFormat=r,n=t.insertText,t.range&&(i=this.asRange(t.range)),e.insertTextFormat=r,t.fromEdit&&n&&i?e.textEdit={newText:n,range:i}:e.insertText=n}asTextEdit(e){return{range:this.asRange(e.range),newText:e.text||""}}asTextEdits(e){if(e)return e.map(e=>this.asTextEdit(e))}asReferenceParams(e,t,n){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),context:{includeDeclaration:n.includeDeclaration}}}asDocumentSymbolParams(e){return{textDocument:this.asTextDocumentIdentifier(e)}}asCodeLensParams(e){return{textDocument:this.asTextDocumentIdentifier(e)}}asDiagnosticSeverity(e){switch(e){case monaco.MarkerSeverity.Error:return o.DiagnosticSeverity.Error;case monaco.MarkerSeverity.Warning:return o.DiagnosticSeverity.Warning;case monaco.MarkerSeverity.Info:return o.DiagnosticSeverity.Information;case monaco.MarkerSeverity.Hint:return o.DiagnosticSeverity.Hint}}asDiagnostic(e){const t=this.asRange(new monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)),n=this.asDiagnosticSeverity(e.severity);return o.Diagnostic.create(t,e.message,n,e.code,e.source)}asDiagnostics(e){return null==e?e:e.map(e=>this.asDiagnostic(e))}asCodeActionContext(e){if(null==e)return e;const t=this.asDiagnostics(e.markers);return o.CodeActionContext.create(t,r.string(e.only)?[e.only]:void 0)}asCodeActionParams(e,t,n){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),context:this.asCodeActionContext(n)}}asCommand(e){if(e){let t=e.arguments||[];return o.Command.create(e.title,e.id,...t)}}asCodeLens(e){let t=o.CodeLens.create(this.asRange(e.range));return e.command&&(t.command=this.asCommand(e.command)),a.is(e)&&e.data&&(t.data=e.data),t}asFormattingOptions(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}asDocumentFormattingParams(e,t){return{textDocument:this.asTextDocumentIdentifier(e),options:this.asFormattingOptions(t)}}asDocumentRangeFormattingParams(e,t,n){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),options:this.asFormattingOptions(n)}}asDocumentOnTypeFormattingParams(e,t,n,i){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),ch:n,options:this.asFormattingOptions(i)}}asRenameParams(e,t,n){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),newName:n}}asDocumentLinkParams(e){return{textDocument:this.asTextDocumentIdentifier(e)}}asDocumentLink(e){let t=o.DocumentLink.create(this.asRange(e.range));return e.url&&(t.target="string"==typeof e.url?e.url:e.url.toString()),s.is(e)&&e.data&&(t.data=e.data),t}};t.ProtocolToMonacoConverter=class{asResourceEdits(e,t,n){return{resource:e,edits:this.asTextEdits(t),modelVersionId:n}}asWorkspaceEdit(e){if(!e)return;const t=[];if(e.documentChanges)e.documentChanges.forEach(e=>{if(i.CreateFile.is(e))t.push({newUri:monaco.Uri.parse(e.uri),options:e.options});else if(i.RenameFile.is(e))t.push({oldUri:monaco.Uri.parse(e.oldUri),newUri:monaco.Uri.parse(e.newUri),options:e.options});else if(i.DeleteFile.is(e))t.push({oldUri:monaco.Uri.parse(e.uri),options:e.options});else if(i.TextDocumentEdit.is(e)){const n=monaco.Uri.parse(e.textDocument.uri),i="number"==typeof e.textDocument.version?e.textDocument.version:void 0;t.push(this.asResourceEdits(n,e.edits,i))}else console.error("Unknown workspace edit change received:\n"+JSON.stringify(e,void 0,4))});else if(e.changes)for(const n of Object.keys(e.changes)){const i=monaco.Uri.parse(n);t.push(this.asResourceEdits(i,e.changes[n]))}return{edits:t}}asTextEdit(e){if(!e)return;return{range:this.asRange(e.range),text:e.newText}}asTextEdits(e){if(e)return e.map(e=>this.asTextEdit(e))}asCodeLens(e){if(!e)return;let t={range:this.asRange(e.range)};return e.command&&(t.command=this.asCommand(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}asCodeLensList(e){if(e)return{lenses:e.map(e=>this.asCodeLens(e)),dispose:()=>{}}}asCodeActionList(e){return{actions:e.map(e=>this.asCodeAction(e)),dispose:()=>{}}}asCodeAction(e){return o.CodeAction.is(e)?{title:e.title,command:this.asCommand(e.command),edit:this.asWorkspaceEdit(e.edit),diagnostics:this.asDiagnostics(e.diagnostics),kind:e.kind}:{command:{id:e.command,title:e.title,arguments:e.arguments},title:e.title}}asCommand(e){if(e)return{id:e.command,title:e.title,arguments:e.arguments}}asDocumentSymbol(e){const t=e.children&&e.children.map(e=>this.asDocumentSymbol(e));return{name:e.name,detail:e.detail||"",kind:this.asSymbolKind(e.kind),tags:[],range:this.asRange(e.range),selectionRange:this.asRange(e.selectionRange),children:t}}asDocumentSymbols(e){return o.DocumentSymbol.is(e[0])?e.map(e=>this.asDocumentSymbol(e)):this.asSymbolInformations(e)}asSymbolInformations(e,t){if(e)return e.map(e=>this.asSymbolInformation(e,t))}asSymbolInformation(e,t){const n=this.asLocation(t?Object.assign(Object.assign({},e.location),{uri:t.toString()}):e.location);return{name:e.name,detail:"",containerName:e.containerName,kind:this.asSymbolKind(e.kind),tags:[],range:n.range,selectionRange:n.range}}asSymbolKind(e){return e<=o.SymbolKind.TypeParameter?e-1:monaco.languages.SymbolKind.Property}asDocumentHighlights(e){if(e)return e.map(e=>this.asDocumentHighlight(e))}asDocumentHighlight(e){return{range:this.asRange(e.range),kind:r.number(e.kind)?this.asDocumentHighlightKind(e.kind):void 0}}asDocumentHighlightKind(e){switch(e){case o.DocumentHighlightKind.Text:return monaco.languages.DocumentHighlightKind.Text;case o.DocumentHighlightKind.Read:return monaco.languages.DocumentHighlightKind.Read;case o.DocumentHighlightKind.Write:return monaco.languages.DocumentHighlightKind.Write}return monaco.languages.DocumentHighlightKind.Text}asReferences(e){if(e)return e.map(e=>this.asLocation(e))}asDefinitionResult(e){if(e){if(r.array(e)){if(0==e.length)return;if(o.LocationLink.is(e[0])){return e.map(e=>this.asLocationLink(e))}return e.map(e=>this.asLocation(e))}return this.asLocation(e)}}asLocation(e){if(!e)return;return{uri:monaco.Uri.parse(e.uri),range:this.asRange(e.range)}}asLocationLink(e){if(!e)return;let t={uri:monaco.Uri.parse(e.targetUri),range:this.asRange(e.targetSelectionRange),originSelectionRange:this.asRange(e.originSelectionRange),targetSelectionRange:this.asRange(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}asSignatureHelpResult(e){if(!e)return;let t={};return r.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,r.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures?t.signatures=this.asSignatureInformations(e.signatures):t.signatures=[],{value:t,dispose:()=>{}}}asSignatureInformations(e){return e.map(e=>this.asSignatureInformation(e))}asSignatureInformation(e){let t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),e.parameters?t.parameters=this.asParameterInformations(e.parameters):t.parameters=[],t}asParameterInformations(e){return e.map(e=>this.asParameterInformation(e))}asParameterInformation(e){let t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),t}asHover(e){if(e)return{contents:this.asHoverContent(e.contents),range:this.asRange(e.range)}}asHoverContent(e){return Array.isArray(e)?e.map(e=>this.asMarkdownString(e)):[this.asMarkdownString(e)]}asDocumentation(e){return r.string(e)?e:e.kind===o.MarkupKind.PlainText?e.value:this.asMarkdownString(e)}asMarkdownString(e){if(o.MarkupContent.is(e))return{value:e.value};if(r.string(e))return{value:e};const{language:t,value:n}=e;return{value:"```"+t+"\n"+n+"\n```"}}asSeverity(e){return 1===e?monaco.MarkerSeverity.Error:2===e?monaco.MarkerSeverity.Warning:3===e?monaco.MarkerSeverity.Info:monaco.MarkerSeverity.Hint}asDiagnostics(e){if(e)return e.map(e=>this.asDiagnostic(e))}asDiagnostic(e){return{code:"number"==typeof e.code?e.code.toString():e.code,severity:this.asSeverity(e.severity),message:e.message,source:e.source,startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,relatedInformation:this.asRelatedInformations(e.relatedInformation)}}asRelatedInformations(e){if(e)return e.map(e=>this.asRelatedInformation(e))}asRelatedInformation(e){return{resource:monaco.Uri.parse(e.location.uri),startLineNumber:e.location.range.start.line+1,startColumn:e.location.range.start.character+1,endLineNumber:e.location.range.end.line+1,endColumn:e.location.range.end.character+1,message:e.message}}asCompletionResult(e,t){if(!e)return{incomplete:!1,suggestions:[]};if(Array.isArray(e)){return{incomplete:!1,suggestions:e.map(e=>this.asCompletionItem(e,t))}}return{incomplete:e.isIncomplete,suggestions:e.items.map(e=>this.asCompletionItem(e,t))}}asCompletionItem(e,t){const n={label:e.label};e.detail&&(n.detail=e.detail),e.documentation&&(n.documentation=this.asDocumentation(e.documentation),n.documentationFormat=r.string(e.documentation)?void 0:e.documentation.kind),e.filterText&&(n.filterText=e.filterText);const i=this.asCompletionInsertText(e,t);if(n.insertText=i.insertText,n.range=i.range,n.fromEdit=i.fromEdit,i.isSnippet&&(n.insertTextRules=monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet),r.number(e.kind)){let[t,i]=this.asCompletionItemKind(e.kind);n.kind=t,i&&(n.originalItemKind=i)}return e.sortText&&(n.sortText=e.sortText),e.additionalTextEdits&&(n.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),r.stringArray(e.commitCharacters)&&(n.commitCharacters=e.commitCharacters.slice()),e.command&&(n.command=this.asCommand(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(n.deprecated=e.deprecated),!0!==e.preselect&&!1!==e.preselect||(n.preselect=e.preselect),void 0!==e.data&&(n.data=e.data),!0!==e.deprecated&&!1!==e.deprecated||(n.deprecated=e.deprecated),n}asCompletionItemKind(e){if(o.CompletionItemKind.Text<=e&&e<=o.CompletionItemKind.TypeParameter)switch(e){case o.CompletionItemKind.Text:return[monaco.languages.CompletionItemKind.Text,void 0];case o.CompletionItemKind.Method:return[monaco.languages.CompletionItemKind.Method,void 0];case o.CompletionItemKind.Function:return[monaco.languages.CompletionItemKind.Function,void 0];case o.CompletionItemKind.Constructor:return[monaco.languages.CompletionItemKind.Constructor,void 0];case o.CompletionItemKind.Field:return[monaco.languages.CompletionItemKind.Field,void 0];case o.CompletionItemKind.Variable:return[monaco.languages.CompletionItemKind.Variable,void 0];case o.CompletionItemKind.Class:return[monaco.languages.CompletionItemKind.Class,void 0];case o.CompletionItemKind.Interface:return[monaco.languages.CompletionItemKind.Interface,void 0];case o.CompletionItemKind.Module:return[monaco.languages.CompletionItemKind.Module,void 0];case o.CompletionItemKind.Property:return[monaco.languages.CompletionItemKind.Property,void 0];case o.CompletionItemKind.Unit:return[monaco.languages.CompletionItemKind.Unit,void 0];case o.CompletionItemKind.Value:return[monaco.languages.CompletionItemKind.Value,void 0];case o.CompletionItemKind.Enum:return[monaco.languages.CompletionItemKind.Enum,void 0];case o.CompletionItemKind.Keyword:return[monaco.languages.CompletionItemKind.Keyword,void 0];case o.CompletionItemKind.Snippet:return[monaco.languages.CompletionItemKind.Snippet,void 0];case o.CompletionItemKind.Color:return[monaco.languages.CompletionItemKind.Color,void 0];case o.CompletionItemKind.File:return[monaco.languages.CompletionItemKind.File,void 0];case o.CompletionItemKind.Reference:return[monaco.languages.CompletionItemKind.Reference,void 0];case o.CompletionItemKind.Folder:return[monaco.languages.CompletionItemKind.Folder,void 0];case o.CompletionItemKind.EnumMember:return[monaco.languages.CompletionItemKind.EnumMember,void 0];case o.CompletionItemKind.Constant:return[monaco.languages.CompletionItemKind.Constant,void 0];case o.CompletionItemKind.Struct:return[monaco.languages.CompletionItemKind.Struct,void 0];case o.CompletionItemKind.Event:return[monaco.languages.CompletionItemKind.Event,void 0];case o.CompletionItemKind.Operator:return[monaco.languages.CompletionItemKind.Operator,void 0];case o.CompletionItemKind.TypeParameter:return[monaco.languages.CompletionItemKind.TypeParameter,void 0];default:return[e-1,void 0]}return[o.CompletionItemKind.Text,e]}asCompletionInsertText(e,t){const n=e.insertTextFormat===o.InsertTextFormat.Snippet;if(e.textEdit){const t=this.asRange(e.textEdit.range);return{isSnippet:n,insertText:e.textEdit.newText,range:t,fromEdit:!0}}return e.insertText?{isSnippet:n,insertText:e.insertText,fromEdit:!1,range:t}:{insertText:e.label,range:t,fromEdit:!1,isSnippet:!1}}asDocumentLinks(e){return{links:e.map(e=>this.asDocumentLink(e))}}asDocumentLink(e){return{range:this.asRange(e.range),url:e.target,data:e.data}}asRange(e){if(void 0===e)return;if(null===e)return null;const t=this.asPosition(e.start),n=this.asPosition(e.end);if(t instanceof monaco.Position&&n instanceof monaco.Position)return new monaco.Range(t.lineNumber,t.column,n.lineNumber,n.column);return{startLineNumber:t&&void 0!==t.lineNumber?t.lineNumber:void 0,startColumn:t&&void 0!==t.column?t.column:void 0,endLineNumber:n&&void 0!==n.lineNumber?n.lineNumber:void 0,endColumn:n&&void 0!==n.column?n.column:void 0}}asPosition(e){if(void 0===e)return;if(null===e)return null;const{line:t,character:n}=e,i=void 0===t?void 0:t+1,r=void 0===n?void 0:n+1;return void 0!==i&&void 0!==r?new monaco.Position(i,r):{lineNumber:i,column:r}}asColorInformations(e){return e.map(e=>this.asColorInformation(e))}asColorInformation(e){return{range:this.asRange(e.range),color:e.color}}asColorPresentations(e){return e.map(e=>this.asColorPresentation(e))}asColorPresentation(e){return{label:e.label,textEdit:this.asTextEdit(e.textEdit),additionalTextEdits:this.asTextEdits(e.additionalTextEdits)}}asFoldingRanges(e){return e?e.map(e=>this.asFoldingRange(e)):e}asFoldingRange(e){return{start:e.startLine+1,end:e.endLine+1,kind:this.asFoldingRangeKind(e.kind)}}asFoldingRangeKind(e){if(e)switch(e){case o.FoldingRangeKind.Comment:return monaco.languages.FoldingRangeKind.Comment;case o.FoldingRangeKind.Imports:return monaco.languages.FoldingRangeKind.Imports;case o.FoldingRangeKind.Region:return monaco.languages.FoldingRangeKind.Region}}}},,,,,function(e,t,n){"use strict";n.r(t);var i=n(34);for(var r in i)"default"!==r&&function(e){n.d(t,e,(function(){return i[e]}))}(r)},function(e,t,n){"use strict";var i,r,o,s,a,c,u,l,d,g,m,h,p,f,v,y,C,w,D,R;n.r(t),n.d(t,"Position",(function(){return i})),n.d(t,"Range",(function(){return r})),n.d(t,"Location",(function(){return o})),n.d(t,"LocationLink",(function(){return s})),n.d(t,"Color",(function(){return a})),n.d(t,"ColorInformation",(function(){return c})),n.d(t,"ColorPresentation",(function(){return u})),n.d(t,"FoldingRangeKind",(function(){return l})),n.d(t,"FoldingRange",(function(){return d})),n.d(t,"DiagnosticRelatedInformation",(function(){return g})),n.d(t,"DiagnosticSeverity",(function(){return m})),n.d(t,"DiagnosticTag",(function(){return h})),n.d(t,"Diagnostic",(function(){return p})),n.d(t,"Command",(function(){return f})),n.d(t,"TextEdit",(function(){return v})),n.d(t,"TextDocumentEdit",(function(){return y})),n.d(t,"CreateFile",(function(){return C})),n.d(t,"RenameFile",(function(){return w})),n.d(t,"DeleteFile",(function(){return D})),n.d(t,"WorkspaceEdit",(function(){return R})),n.d(t,"WorkspaceChange",(function(){return G})),n.d(t,"TextDocumentIdentifier",(function(){return T})),n.d(t,"VersionedTextDocumentIdentifier",(function(){return P})),n.d(t,"TextDocumentItem",(function(){return b})),n.d(t,"MarkupKind",(function(){return _})),n.d(t,"MarkupContent",(function(){return S})),n.d(t,"CompletionItemKind",(function(){return x})),n.d(t,"InsertTextFormat",(function(){return E})),n.d(t,"CompletionItemTag",(function(){return k})),n.d(t,"CompletionItem",(function(){return I})),n.d(t,"CompletionList",(function(){return O})),n.d(t,"MarkedString",(function(){return M})),n.d(t,"Hover",(function(){return F})),n.d(t,"ParameterInformation",(function(){return q})),n.d(t,"SignatureInformation",(function(){return N})),n.d(t,"DocumentHighlightKind",(function(){return L})),n.d(t,"DocumentHighlight",(function(){return K})),n.d(t,"SymbolKind",(function(){return A})),n.d(t,"SymbolTag",(function(){return H})),n.d(t,"SymbolInformation",(function(){return U})),n.d(t,"DocumentSymbol",(function(){return W})),n.d(t,"CodeActionKind",(function(){return j})),n.d(t,"CodeActionContext",(function(){return z})),n.d(t,"CodeAction",(function(){return B})),n.d(t,"CodeLens",(function(){return $})),n.d(t,"FormattingOptions",(function(){return J})),n.d(t,"DocumentLink",(function(){return Y})),n.d(t,"SelectionRange",(function(){return V})),n.d(t,"EOL",(function(){return Z})),n.d(t,"TextDocument",(function(){return X})),function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return ee.objectLiteral(t)&&ee.number(t.line)&&ee.number(t.character)}}(i||(i={})),function(e){e.create=function(e,t,n,r){if(ee.number(e)&&ee.number(t)&&ee.number(n)&&ee.number(r))return{start:i.create(e,t),end:i.create(n,r)};if(i.is(e)&&i.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return ee.objectLiteral(t)&&i.is(t.start)&&i.is(t.end)}}(r||(r={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return ee.defined(t)&&r.is(t.range)&&(ee.string(t.uri)||ee.undefined(t.uri))}}(o||(o={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){var t=e;return ee.defined(t)&&r.is(t.targetRange)&&ee.string(t.targetUri)&&(r.is(t.targetSelectionRange)||ee.undefined(t.targetSelectionRange))&&(r.is(t.originSelectionRange)||ee.undefined(t.originSelectionRange))}}(s||(s={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){var t=e;return ee.number(t.red)&&ee.number(t.green)&&ee.number(t.blue)&&ee.number(t.alpha)}}(a||(a={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return r.is(t.range)&&a.is(t.color)}}(c||(c={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return ee.string(t.label)&&(ee.undefined(t.textEdit)||v.is(t))&&(ee.undefined(t.additionalTextEdits)||ee.typedArray(t.additionalTextEdits,v.is))}}(u||(u={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(l||(l={})),function(e){e.create=function(e,t,n,i,r){var o={startLine:e,endLine:t};return ee.defined(n)&&(o.startCharacter=n),ee.defined(i)&&(o.endCharacter=i),ee.defined(r)&&(o.kind=r),o},e.is=function(e){var t=e;return ee.number(t.startLine)&&ee.number(t.startLine)&&(ee.undefined(t.startCharacter)||ee.number(t.startCharacter))&&(ee.undefined(t.endCharacter)||ee.number(t.endCharacter))&&(ee.undefined(t.kind)||ee.string(t.kind))}}(d||(d={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return ee.defined(t)&&o.is(t.location)&&ee.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(m||(m={})),function(e){e.Unnecessary=1,e.Deprecated=2}(h||(h={})),function(e){e.create=function(e,t,n,i,r,o){var s={range:e,message:t};return ee.defined(n)&&(s.severity=n),ee.defined(i)&&(s.code=i),ee.defined(r)&&(s.source=r),ee.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t=e;return ee.defined(t)&&r.is(t.range)&&ee.string(t.message)&&(ee.number(t.severity)||ee.undefined(t.severity))&&(ee.number(t.code)||ee.string(t.code)||ee.undefined(t.code))&&(ee.string(t.source)||ee.undefined(t.source))&&(ee.undefined(t.relatedInformation)||ee.typedArray(t.relatedInformation,g.is))}}(p||(p={})),function(e){e.create=function(e,t){for(var n=[],i=2;i0&&(r.arguments=n),r},e.is=function(e){var t=e;return ee.defined(t)&&ee.string(t.title)&&ee.string(t.command)}}(f||(f={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return ee.objectLiteral(t)&&ee.string(t.newText)&&r.is(t.range)}}(v||(v={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return ee.defined(t)&&P.is(t.textDocument)&&Array.isArray(t.edits)}}(y||(y={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&ee.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ee.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ee.boolean(t.options.ignoreIfExists)))}}(C||(C={})),function(e){e.create=function(e,t,n){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&ee.string(t.oldUri)&&ee.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ee.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ee.boolean(t.options.ignoreIfExists)))}}(w||(w={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&ee.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ee.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ee.boolean(t.options.ignoreIfNotExists)))}}(D||(D={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return ee.string(e.kind)?C.is(e)||w.is(e)||D.is(e):y.is(e)})))}}(R||(R={}));var T,P,b,_,S,x,E,k,I,O,M,F,q,N,L,K,A,H,U,W,j,z,B,$,J,Y,V,Q=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(v.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(v.replace(e,t))},e.prototype.delete=function(e){this.edits.push(v.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),G=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(y.is(e)){var n=new Q(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var i=new Q(e.changes[n]);t._textEditChanges[n]=i})))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(P.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(i=this._textEditChanges[t.uri])){var n={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(n),i=new Q(r),this._textEditChanges[t.uri]=i}return i}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var i;if(!(i=this._textEditChanges[e])){var r=[];this._workspaceEdit.changes[e]=r,i=new Q(r),this._textEditChanges[e]=i}return i},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(C.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(w.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(D.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return ee.defined(t)&&ee.string(t.uri)}}(T||(T={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ee.defined(t)&&ee.string(t.uri)&&(null===t.version||ee.number(t.version))}}(P||(P={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){var t=e;return ee.defined(t)&&ee.string(t.uri)&&ee.string(t.languageId)&&ee.number(t.version)&&ee.string(t.text)}}(b||(b={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(_||(_={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(_||(_={})),function(e){e.is=function(e){var t=e;return ee.objectLiteral(e)&&_.is(t.kind)&&ee.string(t.value)}}(S||(S={})),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}(x||(x={})),function(e){e.PlainText=1,e.Snippet=2}(E||(E={})),function(e){e.Deprecated=1}(k||(k={})),function(e){e.create=function(e){return{label:e}}}(I||(I={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(O||(O={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return ee.string(t)||ee.objectLiteral(t)&&ee.string(t.language)&&ee.string(t.value)}}(M||(M={})),function(e){e.is=function(e){var t=e;return!!t&&ee.objectLiteral(t)&&(S.is(t.contents)||M.is(t.contents)||ee.typedArray(t.contents,M.is))&&(void 0===e.range||r.is(e.range))}}(F||(F={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(q||(q={})),function(e){e.create=function(e,t){for(var n=[],i=2;i=0;o--){var s=i[o],a=e.offsetAt(s.range.start),c=e.offsetAt(s.range.end);if(!(c<=r))throw new Error("Overlapping edit");n=n.substring(0,a)+s.newText+n.substring(c,n.length),r=a}return n}}(X||(X={}));var ee,te=function(){function e(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.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},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,i=0;i0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.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 i.create(0,e);for(;ne?r=o:n=o+1}var s=n-1;return i.create(s,e-t[s])},e.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],i=e.line+10}}(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||f.is(t.documentSelector))}}(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(void 0===t.workDoneProgress||i.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&i.boolean(t.workDoneProgress)}}(t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})),function(e){e.type=new o.ProtocolRequestType("initialize")}(t.InitializeRequest||(t.InitializeRequest={})),function(e){e.unknownProtocolVersion=1}(t.InitializeError||(t.InitializeError={})),function(e){e.type=new o.ProtocolNotificationType("initialized")}(t.InitializedNotification||(t.InitializedNotification={})),function(e){e.type=new o.ProtocolRequestType0("shutdown")}(t.ShutdownRequest||(t.ShutdownRequest={})),function(e){e.type=new o.ProtocolNotificationType0("exit")}(t.ExitNotification||(t.ExitNotification={})),function(e){e.type=new o.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 o.ProtocolNotificationType("window/showMessage")}(t.ShowMessageNotification||(t.ShowMessageNotification={})),function(e){e.type=new o.ProtocolRequestType("window/showMessageRequest")}(t.ShowMessageRequest||(t.ShowMessageRequest={})),function(e){e.type=new o.ProtocolNotificationType("window/logMessage")}(t.LogMessageNotification||(t.LogMessageNotification={})),function(e){e.type=new o.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 o.ProtocolNotificationType(e.method)}(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})),function(e){e.method="textDocument/didChange",e.type=new o.ProtocolNotificationType(e.method)}(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})),function(e){e.method="textDocument/didClose",e.type=new o.ProtocolNotificationType(e.method)}(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})),function(e){e.method="textDocument/didSave",e.type=new o.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 o.ProtocolNotificationType(e.method)}(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})),function(e){e.method="textDocument/willSaveWaitUntil",e.type=new o.ProtocolRequestType(e.method)}(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})),function(e){e.type=new o.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 o.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 o.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.CompletionRequest||(t.CompletionRequest={})),function(e){e.method="completionItem/resolve",e.type=new o.ProtocolRequestType(e.method)}(t.CompletionResolveRequest||(t.CompletionResolveRequest={})),function(e){e.method="textDocument/hover",e.type=new o.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 o.ProtocolRequestType(e.method)}(t.SignatureHelpRequest||(t.SignatureHelpRequest={})),function(e){e.method="textDocument/definition",e.type=new o.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.DefinitionRequest||(t.DefinitionRequest={})),function(e){e.method="textDocument/references",e.type=new o.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.ReferencesRequest||(t.ReferencesRequest={})),function(e){e.method="textDocument/documentHighlight",e.type=new o.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})),function(e){e.method="textDocument/documentSymbol",e.type=new o.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})),function(e){e.method="textDocument/codeAction",e.type=new o.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.CodeActionRequest||(t.CodeActionRequest={})),function(e){e.method="workspace/symbol",e.type=new o.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})),function(e){e.type=new o.ProtocolRequestType("textDocument/codeLens"),e.resultType=new r.ProgressType}(t.CodeLensRequest||(t.CodeLensRequest={})),function(e){e.type=new o.ProtocolRequestType("codeLens/resolve")}(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})),function(e){e.method="textDocument/documentLink",e.type=new o.ProtocolRequestType(e.method),e.resultType=new r.ProgressType}(t.DocumentLinkRequest||(t.DocumentLinkRequest={})),function(e){e.type=new o.ProtocolRequestType("documentLink/resolve")}(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})),function(e){e.method="textDocument/formatting",e.type=new o.ProtocolRequestType(e.method)}(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})),function(e){e.method="textDocument/rangeFormatting",e.type=new o.ProtocolRequestType(e.method)}(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})),function(e){e.method="textDocument/onTypeFormatting",e.type=new o.ProtocolRequestType(e.method)}(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})),function(e){e.method="textDocument/rename",e.type=new o.ProtocolRequestType(e.method)}(t.RenameRequest||(t.RenameRequest={})),function(e){e.method="textDocument/prepareRename",e.type=new o.ProtocolRequestType(e.method)}(t.PrepareRenameRequest||(t.PrepareRenameRequest={})),function(e){e.type=new o.ProtocolRequestType("workspace/executeCommand")}(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})),function(e){e.type=new o.ProtocolRequestType("workspace/applyEdit")}(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),r=n(3);!function(e){e.method="textDocument/implementation",e.type=new r.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.ImplementationRequest||(t.ImplementationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),r=n(3);!function(e){e.method="textDocument/typeDefinition",e.type=new r.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(3);!function(e){e.type=new i.ProtocolRequestType0("workspace/workspaceFolders")}(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})),function(e){e.type=new i.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")}(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(3);!function(e){e.type=new i.ProtocolRequestType("workspace/configuration")}(t.ConfigurationRequest||(t.ConfigurationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),r=n(3);!function(e){e.method="textDocument/documentColor",e.type=new r.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.DocumentColorRequest||(t.DocumentColorRequest={})),function(e){e.type=new r.ProtocolRequestType("textDocument/colorPresentation")}(t.ColorPresentationRequest||(t.ColorPresentationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),r=n(3);!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),e.resultType=new i.ProgressType}(t.FoldingRangeRequest||(t.FoldingRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),r=n(3);!function(e){e.method="textDocument/declaration",e.type=new r.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.DeclarationRequest||(t.DeclarationRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),r=n(3);!function(e){e.method="textDocument/selectionRange",e.type=new r.ProtocolRequestType(e.method),e.resultType=new i.ProgressType}(t.SelectionRangeRequest||(t.SelectionRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),r=n(3);!function(e){e.type=new i.ProgressType}(t.WorkDoneProgress||(t.WorkDoneProgress={})),function(e){e.type=new r.ProtocolRequestType("window/workDoneProgress/create")}(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})),function(e){e.type=new r.ProtocolNotificationType("window/workDoneProgress/cancel")}(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(3);!function(e){e.method="textDocument/prepareCallHierarchy",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})),function(e){e.method="callHierarchy/incomingCalls",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})),function(e){e.method="callHierarchy/outgoingCalls",e.type=new i.ProtocolRequestType(e.method)}(t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(3);!function(e){e.comment="comment",e.keyword="keyword",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.namespace="namespace",e.type="type",e.struct="struct",e.class="class",e.interface="interface",e.enum="enum",e.typeParameter="typeParameter",e.function="function",e.member="member",e.property="property",e.macro="macro",e.variable="variable",e.parameter="parameter",e.label="label"}(t.SemanticTokenTypes||(t.SemanticTokenTypes={})),function(e){e.documentation="documentation",e.declaration="declaration",e.definition="definition",e.reference="reference",e.static="static",e.abstract="abstract",e.deprecated="deprecated",e.async="async",e.volatile="volatile",e.readonly="readonly"}(t.SemanticTokenModifiers||(t.SemanticTokenModifiers={})),function(e){e.is=function(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.method="textDocument/semanticTokens",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensRequest||(t.SemanticTokensRequest={})),function(e){e.method="textDocument/semanticTokens/edits",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensEditsRequest||(t.SemanticTokensEditsRequest={})),function(e){e.method="textDocument/semanticTokens/range",e.type=new i.ProtocolRequestType(e.method)}(t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(0),r=n(28);t.createConnection=function(e,t,n){return e.onError(e=>{t(e[0],e[1],e[2])}),e.onClose(n),{listen:()=>e.listen(),sendRequest:(t,...n)=>e.sendRequest(r.string(t)?t:t.method,...n),onRequest:(t,n)=>e.onRequest(r.string(t)?t:t.method,n),sendNotification:(t,n)=>e.sendNotification(r.string(t)?t:t.method,n),onNotification:(t,n)=>e.onNotification(r.string(t)?t:t.method,n),trace:(t,n,i=!1)=>e.trace(t,n,i),initialize:t=>e.sendRequest(i.InitializeRequest.type,t),shutdown:()=>e.sendRequest(i.ShutdownRequest.type,void 0),exit:()=>e.sendNotification(i.ExitNotification.type),onLogMessage:t=>e.onNotification(i.LogMessageNotification.type,t),onShowMessage:t=>e.onNotification(i.ShowMessageNotification.type,t),onTelemetry:t=>e.onNotification(i.TelemetryEventNotification.type,t),didChangeConfiguration:t=>e.sendNotification(i.DidChangeConfigurationNotification.type,t),didChangeWatchedFiles:t=>e.sendNotification(i.DidChangeWatchedFilesNotification.type,t),didOpenTextDocument:t=>e.sendNotification(i.DidOpenTextDocumentNotification.type,t),didChangeTextDocument:t=>e.sendNotification(i.DidChangeTextDocumentNotification.type,t),didCloseTextDocument:t=>e.sendNotification(i.DidCloseTextDocumentNotification.type,t),didSaveTextDocument:t=>e.sendNotification(i.DidSaveTextDocumentNotification.type,t),onDiagnostics:t=>e.onNotification(i.PublishDiagnosticsNotification.type,t),dispose:()=>e.dispose()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(12),r=n(70),o=n(71),s=n(72),a=n(73),c=n(74),u=n(75),l=n(76);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(12));class d extends i.BaseLanguageClient{constructor({id:e,name:t,clientOptions:n,connectionProvider:i}){super(e||t.toLowerCase(),t,n),this.connectionProvider=i,this.createConnection=this.doCreateConnection.bind(this);this._p2c=new Proxy(this._p2c,{get:(e,t)=>"asUri"===t?e[t]:d.bypassConversion}),this._c2p=new Proxy(this._c2p,{get:(e,t)=>"asUri"===t?e[t]:"asCompletionParams"===t?(t,n,i)=>({textDocument:e.asTextDocumentIdentifier(t),position:n,context:i}):"asWillSaveTextDocumentParams"===t?t=>({textDocument:e.asTextDocumentIdentifier(t.document),reason:t.reason}):t.endsWith("Params")?e[t]:d.bypassConversion})}doCreateConnection(){const e=this.handleConnectionError.bind(this),t=this.handleConnectionClosed.bind(this);return this.connectionProvider.get(e,t,this.outputChannel)}createMessageTransports(e){throw new Error("Unsupported")}registerBuiltinFeatures(){super.registerBuiltinFeatures(),this.registerFeature(new o.ConfigurationFeature(this)),this.registerFeature(new r.TypeDefinitionFeature(this)),this.registerFeature(new s.ImplementationFeature(this)),this.registerFeature(new a.ColorProviderFeature(this)),this.registerFeature(new c.WorkspaceFoldersFeature(this));const e=new u.FoldingRangeFeature(this);e.asFoldingRanges=d.bypassConversion,this.registerFeature(e),this.registerFeature(new l.DeclarationFeature(this));const t=this._features;for(const e of t)e instanceof a.ColorProviderFeature&&(e.asColor=d.bypassConversion,e.asColorInformations=d.bypassConversion,e.asColorPresentations=d.bypassConversion)}}t.MonacoLanguageClient=d,d.bypassConversion=e=>e||void 0},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),o=n(65),s=n(15),a=n(6),c=n(6);t.createVSCodeApi=function(e){const t=()=>{throw new Error("unsupported")},n=o.URI;class u{constructor(e){this.value=e,this.contains=t,this.intersects=t}append(e){return new u(this.value?this.value+u.sep+e:e)}}u.sep=".",u.Empty=new u(""),u.QuickFix=new u("quickfix"),u.Refactor=new u("refactor"),u.RefactorExtract=u.Refactor.append("extract"),u.RefactorInline=u.Refactor.append("inline"),u.RefactorRewrite=u.Refactor.append("rewrite"),u.Source=new u("source"),u.SourceOrganizeImports=u.Source.append("organizeImports"),u.SourceFixAll=u.Source.append("fixAll");const l={fs:new class{stat(e){throw new Error("Method not implemented.")}readDirectory(e){return Promise.resolve([])}createDirectory(e){return Promise.resolve()}readFile(e){return Promise.resolve(new Uint8Array(0))}writeFile(e,t){return Promise.resolve()}delete(e,t){return Promise.resolve()}rename(e,t,n){return Promise.resolve()}copy(e,t,n){return Promise.resolve()}},workspaceFile:void 0,createFileSystemWatcher(t,n,i,r){const o=e();if("string"!=typeof t)throw new Error("unsupported");if(o.workspace.createFileSystemWatcher){const e=o.workspace.createFileSystemWatcher(t,n,i,r);return Object.assign(e,{ignoreCreateEvents:!!n,ignoreChangeEvents:!!i,ignoreDeleteEvents:!!r})}return{ignoreCreateEvents:!!n,ignoreChangeEvents:!!i,ignoreDeleteEvents:!!r,onDidCreate:a.Event.None,onDidChange:a.Event.None,onDidDelete:a.Event.None,dispose:()=>{}}},applyEdit:t=>i(this,void 0,void 0,(function*(){const n=e();if(a.WorkspaceEdit.is(t))return n.workspace.applyEdit(t);throw new Error("unsupported")})),getConfiguration(n,i){const{workspace:r}=e(),o=r.configurations?r.configurations.getConfiguration(n,i?i.toString():void 0):void 0,s={get:(e,t)=>o?o.get(e,t):t,has:e=>!!o&&o.has(e),inspect:t,update:t};return Object.assign(s,{toJSON:()=>o?o.toJSON():void 0})},get onDidChangeConfiguration(){const t=e();return t.workspace.configurations?t.workspace.configurations.onDidChangeConfiguration:a.Event.None},get workspaceFolders(){const t=e();if("workspaceFolders"in t.workspace)return t.workspace.workspaceFolders;const i=t.workspace.rootUri;if(!i)return;const r=n.parse(i);return[{uri:r,index:0,name:r.toString()}]},get onDidChangeWorkspaceFolders(){return e().workspace.onDidChangeWorkspaceFolders||a.Event.None},get textDocuments(){return e().workspace.textDocuments},get onDidOpenTextDocument(){return e().workspace.onDidOpenTextDocument},get onDidCloseTextDocument(){return e().workspace.onDidCloseTextDocument},get onDidChangeTextDocument(){const t=e();return(e,n,i)=>t.workspace.onDidChangeTextDocument(({textDocument:t,contentChanges:i})=>{e.bind(n)({document:t,contentChanges:i})},void 0,i)},get onWillSaveTextDocument(){const t=e().workspace.onWillSaveTextDocument;return t?(e,n,i)=>t(({textDocument:t,reason:i,waitUntil:r})=>{e.bind(n)({document:t,reason:i,waitUntil:e=>{r&&r(e)}})},void 0,i):a.Event.None},get onDidSaveTextDocument(){return e().workspace.onDidSaveTextDocument||a.Event.None},get onWillCreateFiles(){return a.Event.None},get onDidCreateFiles(){return a.Event.None},get onWillDeleteFiles(){return a.Event.None},get onDidDeleteFiles(){return a.Event.None},get onWillRenameFiles(){return a.Event.None},get onDidRenameFiles(){return a.Event.None},getWorkspaceFolder:t,asRelativePath:t,updateWorkspaceFolders:t,findFiles:t,saveAll:t,openTextDocument:t,registerTextDocumentContentProvider:t,registerTaskProvider:t,registerFileSystemProvider:t,rootPath:void 0,name:void 0};class d{constructor(t){this.name=t||"default",this.services=e(),this.collection=this.services.languages.createDiagnosticCollection?this.services.languages.createDiagnosticCollection(t):void 0}entries(){}set(e,t){e instanceof o.URI!==void 0?this.collection&&(t?this.collection.set(e.toString(),t.map(e=>({range:e.range,code:e.code,source:e.source,message:e.message,tags:e.tags,relatedInformation:void 0,severity:e.severity}))):this.collection.set(e.toString(),[])):e.forEach(e=>{this.set(e[0],e[1])})}dispose(){this.collection&&this.collection.dispose()}delete(e){}clear(){}forEach(e,t){}get(e){}has(e){return!1}}const g={match(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));if(!a.DocumentIdentifier.is(n))throw new Error("unexpected document: "+JSON.stringify(n));return e().languages.match(t,n)?1:0},registerCallHierarchyProvider:(e,t)=>({dispose(){}}),createDiagnosticCollection:e=>new d(e),registerCompletionItemProvider(t,n,...i){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:r}=e();if(!r.registerCompletionItemProvider)return s.Disposable.create(()=>{});const o=n.resolveCompletionItem;return r.registerCompletionItemProvider(t,{provideCompletionItems:({textDocument:e,position:t,context:i},r)=>n.provideCompletionItems(e,t,r,i||{triggerKind:a.CompletionTriggerKind.Invoked}),resolveCompletionItem:o?(e,t)=>o(e,t):void 0},...i)},registerCodeActionsProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerCodeActionsProvider?i.registerCodeActionsProvider(t,{provideCodeActions:({textDocument:e,range:t,context:i},r)=>n.provideCodeActions(e,t,i,r)}):s.Disposable.create(()=>{})},registerCodeLensProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();if(!i.registerCodeLensProvider)return s.Disposable.create(()=>{});const r=n.resolveCodeLens;return i.registerCodeLensProvider(t,{provideCodeLenses:({textDocument:e},t)=>n.provideCodeLenses(e,t),resolveCodeLens:r?(e,t)=>r(e,t):void 0})},registerDefinitionProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerDefinitionProvider?i.registerDefinitionProvider(t,{provideDefinition:({textDocument:e,position:t},i)=>n.provideDefinition(e,t,i)}):s.Disposable.create(()=>{})},registerImplementationProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerImplementationProvider?i.registerImplementationProvider(t,{provideImplementation:({textDocument:e,position:t},i)=>n.provideImplementation(e,t,i)}):s.Disposable.create(()=>{})},registerTypeDefinitionProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerTypeDefinitionProvider?i.registerTypeDefinitionProvider(t,{provideTypeDefinition:({textDocument:e,position:t},i)=>n.provideTypeDefinition(e,t,i)}):s.Disposable.create(()=>{})},registerDeclarationProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerDeclarationProvider?i.registerDeclarationProvider(t,{provideDeclaration:({textDocument:e,position:t},i)=>n.provideDeclaration(e,t,i)}):s.Disposable.create(()=>{})},registerHoverProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerHoverProvider?i.registerHoverProvider(t,{provideHover:({textDocument:e,position:t},i)=>n.provideHover(e,t,i)}):s.Disposable.create(()=>{})},registerDocumentHighlightProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerDocumentHighlightProvider?i.registerDocumentHighlightProvider(t,{provideDocumentHighlights:({textDocument:e,position:t},i)=>n.provideDocumentHighlights(e,t,i)}):s.Disposable.create(()=>{})},registerDocumentSymbolProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerDocumentSymbolProvider?i.registerDocumentSymbolProvider(t,{provideDocumentSymbols:({textDocument:e},t)=>n.provideDocumentSymbols(e,t)}):s.Disposable.create(()=>{})},registerWorkspaceSymbolProvider(t){const{languages:n}=e();return n.registerWorkspaceSymbolProvider?n.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:({query:e},n)=>t.provideWorkspaceSymbols(e,n)}):s.Disposable.create(()=>{})},registerReferenceProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerReferenceProvider?i.registerReferenceProvider(t,{provideReferences:({textDocument:e,position:t,context:i},r)=>n.provideReferences(e,t,i,r)}):s.Disposable.create(()=>{})},registerRenameProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerRenameProvider?i.registerRenameProvider(t,{provideRenameEdits:({textDocument:e,position:t,newName:i},r)=>n.provideRenameEdits(e,t,i,r)}):s.Disposable.create(()=>{})},registerDocumentFormattingEditProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerDocumentFormattingEditProvider?i.registerDocumentFormattingEditProvider(t,{provideDocumentFormattingEdits:({textDocument:e,options:t},i)=>n.provideDocumentFormattingEdits(e,t,i)}):s.Disposable.create(()=>{})},registerDocumentRangeFormattingEditProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerDocumentRangeFormattingEditProvider?i.registerDocumentRangeFormattingEditProvider(t,{provideDocumentRangeFormattingEdits:({textDocument:e,range:t,options:i},r)=>n.provideDocumentRangeFormattingEdits(e,t,i,r)}):s.Disposable.create(()=>{})},registerOnTypeFormattingEditProvider(t,n,i,...r){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();return o.registerOnTypeFormattingEditProvider?o.registerOnTypeFormattingEditProvider(t,{provideOnTypeFormattingEdits:({textDocument:e,position:t,ch:i,options:r},o)=>n.provideOnTypeFormattingEdits(e,t,i,r,o)},i,...r):s.Disposable.create(()=>{})},registerSignatureHelpProvider(t,n,i,...r){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:o}=e();if(!o.registerSignatureHelpProvider)return s.Disposable.create(()=>{});let c,u;return"string"==typeof i?c=[i,...r]:i&&(c=i.triggerCharacters,u=i.retriggerCharacters),o.registerSignatureHelpProvider(t,{triggerCharacters:c,retriggerCharacters:u,provideSignatureHelp:({textDocument:e,position:t},i,r)=>n.provideSignatureHelp(e,t,i,r)})},registerDocumentLinkProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();if(!i.registerDocumentLinkProvider)return s.Disposable.create(()=>{});const r=n.resolveDocumentLink;return i.registerDocumentLinkProvider(t,{provideDocumentLinks:({textDocument:e},t)=>n.provideDocumentLinks(e,t),resolveDocumentLink:r?(e,t)=>r(e,t):void 0})},registerColorProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerColorProvider?i.registerColorProvider(t,{provideDocumentColors:({textDocument:e},t)=>n.provideDocumentColors(e,t),provideColorPresentations:({textDocument:e,color:t,range:i},r)=>n.provideColorPresentations(t,{document:e,range:i},r)}):s.Disposable.create(()=>{})},registerFoldingRangeProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerFoldingRangeProvider?i.registerFoldingRangeProvider(t,{provideFoldingRanges:({textDocument:e},t)=>n.provideFoldingRanges(e,{},t)}):s.Disposable.create(()=>{})},registerSelectionRangeProvider(t,n){if(!a.isDocumentSelector(t))throw new Error("unexpected selector: "+JSON.stringify(t));const{languages:i}=e();return i.registerSelectionRangeProvider?i.registerSelectionRangeProvider(t,{provideSelectionRanges:({textDocument:e,positions:t},i)=>n.provideSelectionRanges(e,t,i)}):s.Disposable.create(()=>{})},getLanguages:t,setTextDocumentLanguage:t,getDiagnostics:t,setLanguageConfiguration:t,onDidChangeDiagnostics:t};function m(t,n,...i){if("string"!=typeof n)throw new Error("unexpected message: "+JSON.stringify(n));const r=n;if(void 0!==i&&!Array.isArray(i))throw new Error("unexpected actions: "+JSON.stringify(i));const o=i||[],{window:s}=e();return s?s.showMessage(t,r,...o):Promise.resolve(void 0)}const h={showInformationMessage:m.bind(void 0,a.MessageType.Info),showWarningMessage:m.bind(void 0,a.MessageType.Warning),showErrorMessage:m.bind(void 0,a.MessageType.Error),createOutputChannel(n){const{window:i}=e(),r=i?i.createOutputChannel:void 0,o=r?r.bind(i)(n):void 0;return{name:n,append:o?o.append.bind(o):()=>{},appendLine:o?o.appendLine.bind(o):()=>{},clear:t,show:e=>{if(void 0!==e&&"boolean"!=typeof e)throw new Error("unexpected preserveFocus argument: "+JSON.stringify(e,void 0,4));return o?o.show(e):()=>{}},hide:t,dispose:o?o.dispose.bind(o):()=>{}}},withProgress:(t,n)=>{const{window:i}=e();return i&&i.withProgress?i.withProgress(t,n):n({report:()=>{}},(new r.CancellationTokenSource).token)},showTextDocument:t,createTextEditorDecorationType:t,showQuickPick:t,showWorkspaceFolderPick:t,showOpenDialog:t,showSaveDialog:t,showInputBox:t,createWebviewPanel:t,setStatusBarMessage:t,withScmProgress:t,createStatusBarItem:t,createTerminal:t,registerTreeDataProvider:t,createTreeView:t,registerWebviewPanelSerializer:t,get activeTextEditor(){return t()},get visibleTextEditors(){return t()},onDidChangeActiveTextEditor:t,onDidChangeVisibleTextEditors:t,onDidChangeTextEditorSelection:t,onDidChangeTextEditorVisibleRanges:t,onDidChangeTextEditorOptions:t,onDidChangeTextEditorViewColumn:t,get terminals(){return t()},get activeTerminal(){return t()},onDidChangeActiveTerminal:t,onDidOpenTerminal:t,onDidCloseTerminal:t,get state(){return t()},onDidChangeWindowState:t,createQuickPick:t,createInputBox:t,registerUriHandler:t};return{workspace:l,languages:g,window:h,commands:{registerCommand(t,n,i){const{commands:r}=e();return r?r.registerCommand(t,n,i):s.Disposable.create(()=>{})},registerTextEditorCommand:t,executeCommand:t,getCommands:t},Uri:n,CompletionItem:class{constructor(e,t){this.label=e,this.kind=t}},CodeLens:class{constructor(e,t){this.range=e,this.command=t}get isResolved(){return!!this.command}},DocumentLink:class{constructor(e,t){this.range=e,this.target=t}},CodeActionKind:u,Disposable:class{constructor(e){this.callOnDispose=e}dispose(){this.callOnDispose()}},SignatureHelpTriggerKind:a.SignatureHelpTriggerKind,DiagnosticSeverity:c.DiagnosticSeverity}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"URI",(function(){return m})),n.d(t,"uriToFsPath",(function(){return C}));var i,r,o,s=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});if("object"==typeof e)o="win32"===e.platform;else if("object"==typeof navigator){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var c=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//;var d="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,m=function(){function e(e,t,n,i,r,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||"",this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||""),this.query=i||"",this.fragment=r||"",function(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,r=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===n?n=this.authority:null===n&&(n=""),void 0===i?i=this.path:null===i&&(i=""),void 0===r?r=this.query:null===r&&(r=""),void 0===o?o=this.fragment:null===o&&(o=""),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&o===this.fragment?this:new p(t,n,i,r,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=g.exec(e);return n?new p(n[2]||"",R(n[4]||""),R(n[5]||""),R(n[7]||""),R(n[9]||""),t):new p("","","","","")},e.file=function(e){var t="";if(o&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){var n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new p("file",t,e,"","")},e.from=function(e){return new p(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),w(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new p(t);return n._formatted=t.external,n._fsPath=t._sep===h?t.fsPath:null,n}return t},e}(),h=o?1:void 0,p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(m),f=((r={})[58]="%3A",r[47]="%2F",r[63]="%3F",r[35]="%23",r[91]="%5B",r[93]="%5D",r[64]="%40",r[33]="%21",r[36]="%24",r[38]="%26",r[39]="%27",r[40]="%28",r[41]="%29",r[42]="%2A",r[43]="%2B",r[44]="%2C",r[59]="%3B",r[61]="%3D",r[32]="%20",r);function v(e,t){for(var n=void 0,i=-1,r=0;r=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));var s=f[o];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=s):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function y(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,o&&(n=n.replace(/\//g,"\\")),n}function w(e,t){var n=t?y:v,i="",r=e.scheme,o=e.authority,s=e.path,a=e.query,c=e.fragment;if(r&&(i+=r,i+=":"),(o||"file"===r)&&(i+=d,i+=d),o){var u=o.indexOf("@");if(-1!==u){var l=o.substr(0,u);o=o.substr(u+1),-1===(u=l.indexOf(":"))?i+=n(l,!1):(i+=n(l.substr(0,u),!1),i+=":",i+=n(l.substr(u+1),!1)),i+="@"}-1===(u=(o=o.toLowerCase()).indexOf(":"))?i+=n(o,!1):(i+=n(o.substr(0,u),!1),i+=o.substr(u))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(g=s.charCodeAt(1))>=65&&g<=90&&(s="/"+String.fromCharCode(g+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var g;(g=s.charCodeAt(0))>=65&&g<=90&&(s=String.fromCharCode(g+32)+":"+s.substr(2))}i+=n(s,!0)}return a&&(i+="?",i+=n(a,!1)),c&&(i+="#",i+=t?c:v(c,!1)),i}var D=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function R(e){return e.match(D)?e.replace(D,(function(e){return function e(t){try{return decodeURIComponent(t)}catch(n){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}}(e)})):e}}.call(this,n(7))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(16),s=n(35),a=n(36),c=n(37);t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function u(e){return{uri:t(e.uri)}}function l(e){return{uri:t(e.uri),version:e.version}}function d(e){switch(e){case i.TextDocumentSaveReason.Manual:return r.TextDocumentSaveReason.Manual;case i.TextDocumentSaveReason.AfterDelay:return r.TextDocumentSaveReason.AfterDelay;case i.TextDocumentSaveReason.FocusOut:return r.TextDocumentSaveReason.FocusOut}return r.TextDocumentSaveReason.Manual}function g(e){switch(e){case i.CompletionTriggerKind.TriggerCharacter:return r.CompletionTriggerKind.TriggerCharacter;case i.CompletionTriggerKind.TriggerForIncompleteCompletions:return r.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return r.CompletionTriggerKind.Invoked}}function m(e){switch(e){case i.SignatureHelpTriggerKind.Invoke:return r.SignatureHelpTriggerKind.Invoked;case i.SignatureHelpTriggerKind.TriggerCharacter:return r.SignatureHelpTriggerKind.TriggerCharacter;case i.SignatureHelpTriggerKind.ContentChange:return r.SignatureHelpTriggerKind.ContentChange}}function h(e){return{label:e.label}}function p(e){return{label:e.label,parameters:(t=e.parameters,t.map(h))};var t}function f(e){return{line:e.line,character:e.character}}function v(e){return null==e?e:{line:e.line,character:e.character}}function y(e){if(null==e)return e;if(function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}(e))throw new Error("Receving unknown insert replace range.");return{start:v(e.start),end:v(e.end)}}function C(e){return null==e?e:r.Location.create(n(e.uri),y(e.range))}function w(e){switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}}function D(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function R(e){return{message:e.message,location:C(e.location)}}function T(e){let t=r.Diagnostic.create(y(e.range),e.message);return o.number(e.severity)&&(t.severity=w(e.severity)),(o.number(e.code)||o.string(e.code))&&(t.code=e.code),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=D(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(R)),e.source&&(t.source=e.source),t}function P(e){return null==e?e:e.map(T)}function b(e){switch(e){case i.CompletionItemTag.Deprecated:return r.CompletionItemTag.Deprecated}}function _(e){return{range:y(e.range),newText:e.newText}}function S(e){return e}function x(e){let t=r.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:u,asVersionedTextDocumentIdentifier:l,asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){if(function(e){let t=e;return!!t.uri&&!!t.version}(e)){return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]}}if(function(e){let t=e;return!!t.document&&!!t.contentChanges}(e)){let n=e.document;return{textDocument:{uri:t(n.uri),version:n.version},contentChanges:e.contentChanges.map(e=>{let t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}})}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:u(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:l(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:u(e.document),reason:d(e.reason)}},asTextDocumentPositionParams:function(e,t){return{textDocument:u(e),position:f(t)}},asCompletionParams:function(e,t,n){return{textDocument:u(e),position:f(t),context:{triggerKind:g(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:u(e),position:f(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:m(n.triggerKind),activeSignatureHelp:(i=n.activeSignatureHelp,void 0===i?i:{signatures:(r=i.signatures,r.map(p)),activeSignature:i.activeSignature,activeParameter:i.activeParameter})}};var i,r},asWorkerPosition:f,asRange:y,asPosition:v,asPositions:function(e){let t=[];for(let n of e)t.push(v(n));return t},asLocation:C,asDiagnosticSeverity:w,asDiagnosticTag:D,asDiagnostic:T,asDiagnostics:P,asCompletionItem:function(e){let t={label:e.label},n=e instanceof s.default?e:void 0;var a,c;e.detail&&(t.detail=e.detail),e.documentation&&(n&&"$string"!==n.documentationFormat?t.documentation=function(e,t){switch(e){case"$string":return t;case r.MarkupKind.PlainText:return{kind:e,value:t};case r.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}(n.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),function(e,t){let n=r.InsertTextFormat.PlainText,o=void 0,s=void 0;t.textEdit?(o=t.textEdit.newText,s=y(t.textEdit.range)):t.insertText instanceof i.SnippetString?(n=r.InsertTextFormat.Snippet,o=t.insertText.value):o=t.insertText;t.range&&(s=y(t.range));e.insertTextFormat=n,t.fromEdit&&void 0!==o&&void 0!==s?e.textEdit={newText:o,range:s}:e.insertText=o}(t,e),o.number(e.kind)&&(t.kind=(a=e.kind,void 0!==(c=n&&n.originalItemKind)?c:a+1)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=function(e){if(null==e)return e;return e.map(_)}(e.additionalTextEdits)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=x(e.command)),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect);const u=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=b(n);void 0!==e&&t.push(e)}return t}(e.tags);if(n&&(void 0!==n.data&&(t.data=n.data),!0===n.deprecated||!1===n.deprecated)){if(!0===n.deprecated&&void 0!==u&&u.length>0){const e=u.indexOf(i.CompletionItemTag.Deprecated);-1!==e&&u.splice(e,1)}t.deprecated=n.deprecated}return void 0!==u&&u.length>0&&(t.tags=u),t},asTextEdit:_,asSymbolKind:function(e){return e<=i.SymbolKind.TypeParameter?e+1:r.SymbolKind.Property},asSymbolTag:S,asSymbolTags:function(e){return e.map(S)},asReferenceParams:function(e,t,n){return{textDocument:u(e),position:f(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeActionContext:function(e){if(null==e)return e;let t;return e.only&&o.string(e.only.value)&&(t=[e.only.value]),r.CodeActionContext.create(P(e.diagnostics),t)},asCommand:x,asCodeLens:function(e){let t=r.CodeLens.create(y(e.range));return e.command&&(t.command=x(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},asDocumentSymbolParams:function(e){return{textDocument:u(e)}},asCodeLensParams:function(e){return{textDocument:u(e)}},asDocumentLink:function(e){let t=r.DocumentLink.create(y(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let i=e instanceof c.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:u(e)}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(16),s=n(35),a=n(36),c=n(37);var u;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(u||(u={})),t.createConverter=function(e){const t=e||(e=>i.Uri.parse(e));function n(e){return t(e)}function l(e){return e.map(d)}function d(e){let t=new i.Diagnostic(p(e.range),e.message,f(e.severity));return(o.number(e.code)||o.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(g)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=m(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function g(e){return new i.DiagnosticRelatedInformation(_(e.location),e.message)}function m(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function h(e){if(e)return new i.Position(e.line,e.character)}function p(e){if(e)return new i.Range(h(e.start),h(e.end))}function f(e){if(null==e)return i.DiagnosticSeverity.Error;switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}return i.DiagnosticSeverity.Error}function v(e){if(o.string(e))return e;switch(e.kind){case r.MarkupKind.Markdown:return new i.MarkdownString(e.value);case r.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function y(e){switch(e){case r.CompletionItemTag.Deprecated:return i.CompletionItemTag.Deprecated}}function C(e){let t=function(e){if(null==e)return[];const t=[];for(let n of e){const e=y(n);void 0!==e&&t.push(e)}return t}(e.tags),n=new s.default(e.label);e.detail&&(n.detail=e.detail),e.documentation&&(n.documentation=v(e.documentation),n.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(n.filterText=e.filterText);let a=function(e){return e.textEdit?e.insertTextFormat===r.InsertTextFormat.Snippet?{text:new i.SnippetString(e.textEdit.newText),range:p(e.textEdit.range),fromEdit:!0}:{text:e.textEdit.newText,range:p(e.textEdit.range),fromEdit:!0}:e.insertText?e.insertTextFormat===r.InsertTextFormat.Snippet?{text:new i.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(a&&(n.insertText=a.text,n.range=a.range,n.fromEdit=a.fromEdit),o.number(e.kind)){let[t,o]=(c=e.kind,r.CompletionItemKind.Text<=c&&c<=r.CompletionItemKind.TypeParameter?[c-1,void 0]:[i.CompletionItemKind.Text,c]);n.kind=t,o&&(n.originalItemKind=o)}var c;return e.sortText&&(n.sortText=e.sortText),e.additionalTextEdits&&(n.additionalTextEdits=D(e.additionalTextEdits)),o.stringArray(e.commitCharacters)&&(n.commitCharacters=e.commitCharacters.slice()),e.command&&(n.command=q(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(n.deprecated=e.deprecated,!0===e.deprecated&&t.push(i.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(n.preselect=e.preselect),void 0!==e.data&&(n.data=e.data),t.length>0&&(n.tags=t),n}function w(e){if(e)return new i.TextEdit(p(e.range),e.newText)}function D(e){if(e)return e.map(w)}function R(e){return e.map(T)}function T(e){let t=new i.SignatureInformation(e.label);return e.documentation&&(t.documentation=v(e.documentation)),e.parameters&&(t.parameters=P(e.parameters)),t}function P(e){return e.map(b)}function b(e){let t=new i.ParameterInformation(e.label);return e.documentation&&(t.documentation=v(e.documentation)),t}function _(e){if(e)return new i.Location(t(e.uri),p(e.range))}function S(e){if(!e)return;let n={targetUri:t(e.targetUri),targetRange:p(e.targetSelectionRange),originSelectionRange:p(e.originSelectionRange),targetSelectionRange:p(e.targetSelectionRange)};if(!n.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return n}function x(e){if(e){if(o.array(e)){if(0===e.length)return[];if(r.LocationLink.is(e[0])){return e.map(e=>S(e))}return e.map(e=>_(e))}return r.LocationLink.is(e)?[S(e)]:_(e)}}function E(e){let t=new i.DocumentHighlight(p(e.range));return o.number(e.kind)&&(t.kind=k(e.kind)),t}function k(e){switch(e){case r.DocumentHighlightKind.Text:return i.DocumentHighlightKind.Text;case r.DocumentHighlightKind.Read:return i.DocumentHighlightKind.Read;case r.DocumentHighlightKind.Write:return i.DocumentHighlightKind.Write}return i.DocumentHighlightKind.Text}function I(e){return e<=r.SymbolKind.TypeParameter?e-1:i.SymbolKind.Property}function O(e){return e}function M(e,n){let r=new i.SymbolInformation(e.name,I(e.kind),p(e.location.range),e.location.uri?t(e.location.uri):n);return e.containerName&&(r.containerName=e.containerName),r}function F(e){let t=new i.DocumentSymbol(e.name,e.detail||"",I(e.kind),p(e.range),p(e.selectionRange));if(void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(F(t));t.children=n}return t}function q(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const N=new Map;function L(e){if(null==e)return;let t=N.get(e);if(t)return t;let n=e.split(".");t=i.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}function K(e){if(!e)return;let t=new a.default(p(e.range));return e.command&&(t.command=q(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}function A(e){if(!e)return;let n=new i.WorkspaceEdit;return e.documentChanges?e.documentChanges.forEach(e=>{r.CreateFile.is(e)?n.createFile(t(e.uri),e.options):r.RenameFile.is(e)?n.renameFile(t(e.oldUri),t(e.newUri),e.options):r.DeleteFile.is(e)?n.deleteFile(t(e.uri),e.options):r.TextDocumentEdit.is(e)?n.set(t(e.textDocument.uri),D(e.edits)):console.error("Unknown workspace edit change received:\n"+JSON.stringify(e,void 0,4))}):e.changes&&Object.keys(e.changes).forEach(i=>{n.set(t(i),D(e.changes[i]))}),n}function H(e){let t=p(e.range),i=e.target?n(e.target):void 0,r=new c.default(t,i);return void 0!==e.tooltip&&(r.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(r.data=e.data),r}function U(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}function W(e){return new i.ColorInformation(p(e.range),U(e.color))}function j(e){let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=D(e.additionalTextEdits),e.textEdit&&(t.textEdit=w(e.textEdit)),t}function z(e){if(e)switch(e){case r.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case r.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case r.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}function B(e){return new i.FoldingRange(e.startLine,e.endLine,z(e.kind))}function $(e){return new i.SelectionRange(p(e.range),e.parent?$(e.parent):void 0)}return N.set(r.CodeActionKind.Empty,i.CodeActionKind.Empty),N.set(r.CodeActionKind.QuickFix,i.CodeActionKind.QuickFix),N.set(r.CodeActionKind.Refactor,i.CodeActionKind.Refactor),N.set(r.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorExtract),N.set(r.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorInline),N.set(r.CodeActionKind.RefactorRewrite,i.CodeActionKind.RefactorRewrite),N.set(r.CodeActionKind.Source,i.CodeActionKind.Source),N.set(r.CodeActionKind.SourceOrganizeImports,i.CodeActionKind.SourceOrganizeImports),{asUri:n,asDiagnostics:l,asDiagnostic:d,asRange:p,asRanges:function(e){return e.map(e=>p(e))},asPosition:h,asDiagnosticSeverity:f,asDiagnosticTag:m,asHover:function(e){if(e)return new i.Hover(function(e){if(o.string(e))return new i.MarkdownString(e);if(u.is(e)){return(new i.MarkdownString).appendCodeblock(e.value,e.language)}if(Array.isArray(e)){let t=[];for(let n of e){let e=new i.MarkdownString;u.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}{let t;switch(e.kind){case r.MarkupKind.Markdown:return new i.MarkdownString(e.value);case r.MarkupKind.PlainText:return t=new i.MarkdownString,t.appendText(e.value),t;default:return t=new i.MarkdownString,t.appendText("Unsupported Markup content received. Kind is: "+e.kind),t}}}(e.contents),p(e.range))},asCompletionResult:function(e){if(!e)return;if(Array.isArray(e)){return e.map(C)}let t=e;return new i.CompletionList(t.items.map(C),t.isIncomplete)},asCompletionItem:C,asTextEdit:w,asTextEdits:D,asSignatureHelp:function(e){if(!e)return;let t=new i.SignatureHelp;return o.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,o.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=R(e.signatures)),t},asSignatureInformations:R,asSignatureInformation:T,asParameterInformations:P,asParameterInformation:b,asDeclarationResult:function(e){if(e)return x(e)},asDefinitionResult:function(e){if(e)return x(e)},asLocation:_,asReferences:function(e){if(e)return e.map(e=>_(e))},asDocumentHighlights:function(e){if(e)return e.map(E)},asDocumentHighlight:E,asDocumentHighlightKind:k,asSymbolKind:I,asSymbolTag:O,asSymbolTags:function(e){if(null!=e)return e.map(O)},asSymbolInformations:function(e,t){if(e)return e.map(e=>M(e,t))},asSymbolInformation:M,asDocumentSymbols:function(e){if(null!=e)return e.map(F)},asDocumentSymbol:F,asCommand:q,asCommands:function(e){if(e)return e.map(q)},asCodeAction:function(e){if(null==e)return;let t=new i.CodeAction(e.title);return void 0!==e.kind&&(t.kind=L(e.kind)),e.diagnostics&&(t.diagnostics=l(e.diagnostics)),e.edit&&(t.edit=A(e.edit)),e.command&&(t.command=q(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),t},asCodeActionKind:L,asCodeActionKinds:function(e){if(null!=e)return e.map(e=>L(e))},asCodeLens:K,asCodeLenses:function(e){if(e)return e.map(e=>K(e))},asWorkspaceEdit:A,asDocumentLink:H,asDocumentLinks:function(e){if(e)return e.map(H)},asFoldingRangeKind:z,asFoldingRange:B,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(B)},asColor:U,asColorInformation:W,asColorInformations:function(e){if(Array.isArray(e))return e.map(W)},asColorPresentation:j,asColorPresentations:function(e){if(Array.isArray(e))return e.map(j)},asSelectionRange:$,asSelectionRanges:function(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)t.push($(n));return t}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(e=>{this.onSuccess=e}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e})),(t>=0||void 0===this.timeout)&&(this.timeout=setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(16);t.ProgressPart=class{constructor(e,t){this._client=e,this._token=t,this._reported=0,this._disposable=this._client.onProgress(r.WorkDoneProgress.type,this._token,e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done()}})}begin(e){let t=e.cancellable?i.ProgressLocation.Notification:i.ProgressLocation.Window;i.window.withProgress({location:t,cancellable:e.cancellable,title:e.title},async(t,n)=>(this._progress=t,this._infinite=void 0===e.percentage,this._cancellationToken=n,this._cancellationToken.onCancellationRequested(()=>{this._client.sendNotification(r.WorkDoneProgressCancelNotification.type,{token:this._token})}),this.report(e),new Promise((e,t)=>{this._resolve=e,this._reject=t})))}report(e){if(this._infinite&&o.string(e.message))this._progress.report({message:e.message});else if(o.number(e.percentage)){let t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._progress.report({message:e.message,increment:n}),this._reported+=n}}cancel(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this._disposable&&(this._disposable.dispose(),this._disposable=void 0),this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(12);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.TypeDefinitionRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=s(s(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.typeDefinitionProvider);n&&i&&this.register(this.messages,{id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideTypeDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.TypeDefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>(i.logFailedRequest(r.TypeDefinitionRequest.type,e),Promise.resolve(null))),s=i.clientOptions.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,o):o(e,t,n)}};return[i.languages.registerTypeDefinitionProvider(e.documentSelector,t),t]}}t.TypeDefinitionFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0);t.ConfigurationFeature=class{constructor(e){this._client=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(r.ConfigurationRequest.type,(t,n)=>{let i=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},r=e.clientOptions.middleware.workspace;return r&&r.configuration?r.configuration(t,n,i):i(t)})}getConfiguration(e,t){let n=null;if(t){let r=t.lastIndexOf(".");if(-1===r)n=i.workspace.getConfiguration(void 0,e).get(t);else{let o=i.workspace.getConfiguration(t.substr(0,r),e);o&&(n=o.get(t.substr(r+1)))}}else{let t=i.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=t.get(e))}return n||null}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(12);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.ImplementationRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.implementationProvider);n&&i&&this.register(this.messages,{id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideImplementation:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.ImplementationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDefinitionResult,e=>(i.logFailedRequest(r.ImplementationRequest.type,e),Promise.resolve(null))),s=i.clientOptions.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,o):o(e,t,n)}};return[i.languages.registerImplementationProvider(e.documentSelector,t),t]}}t.ImplementationFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(12);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.DocumentColorRequest.type)}fillClientCapabilities(e){s(s(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.colorProvider);n&&i&&this.register(this.messages,{id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideColorPresentations:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={color:e,textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:i.code2ProtocolConverter.asRange(t.range)};return i.sendRequest(r.ColorPresentationRequest.type,o,n).then(this.asColorPresentations.bind(this),e=>(i.logFailedRequest(r.ColorPresentationRequest.type,e),Promise.resolve(null)))},s=i.clientOptions.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,o):o(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,i=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(r.DocumentColorRequest.type,i,t).then(this.asColorInformations.bind(this),e=>(n.logFailedRequest(r.ColorPresentationRequest.type,e),Promise.resolve(null)))},o=n.clientOptions.middleware;return o.provideDocumentColors?o.provideDocumentColors(e,t,i):i(e,t)}};return[i.languages.registerColorProvider(e.documentSelector,t),t]}asColor(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}asColorInformations(e){return Array.isArray(e)?e.map(e=>new i.ColorInformation(this._client.protocol2CodeConverter.asRange(e.range),this.asColor(e.color))):[]}asColorPresentations(e){return Array.isArray(e)?e.map(e=>{let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=this._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),t.textEdit=this._client.protocol2CodeConverter.asTextEdit(e.textEdit),t}):[]}}t.ColorProviderFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(38),r=n(1),o=n(0);function s(e,t){if(void 0!==e)return e[t]}function a(e,t){return e.filter(e=>t.indexOf(e)<0)}t.arrayDiff=a;t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}get messages(){return o.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=r.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map(e=>this.asProtocol(e))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,e=>{let n=()=>{let e=r.workspace.workspaceFolders;return void 0===e?null:e.map(e=>this.asProtocol(e))},i=t.clientOptions.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()});let n,a=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");"string"==typeof a?n=a:!0===a&&(n=i.generateUuid()),n&&this.register(this.messages,{id:n,registerOptions:void 0})}sendInitialEvent(e){if(this._initialFolders&&e){const t=a(this._initialFolders,e),n=a(e,this._initialFolders);(n.length>0||t.length>0)&&this.doSendEvent(n,t)}else this._initialFolders?this.doSendEvent([],this._initialFolders):e&&this.doSendEvent(e,[])}doSendEvent(e,t){let n={event:{added:e.map(e=>this.asProtocol(e)),removed:t.map(e=>this.asProtocol(e))}};this._client.sendNotification(o.DidChangeWorkspaceFoldersNotification.type,n)}register(e,t){let n=t.id,i=this._client,o=r.workspace.onDidChangeWorkspaceFolders(e=>{let t=e=>{this.doSendEvent(e.added,e.removed)},n=i.clientOptions.middleware.workspace;n&&n.didChangeWorkspaceFolders?n.didChangeWorkspaceFolders(e,t):t(e)});this._listeners.set(n,o),this.sendInitialEvent(r.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(12);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=s(s(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.foldingRangeProvider);n&&i&&this.register(this.messages,{id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideFoldingRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(r.FoldingRangeRequest.type,o,n).then(this.asFoldingRanges.bind(this),e=>(i.logFailedRequest(r.FoldingRangeRequest.type,e),Promise.resolve(null)))},s=i.clientOptions.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,o):o(e,0,n)}};return[i.languages.registerFoldingRangeProvider(e.documentSelector,t),t]}asFoldingRangeKind(e){if(e)switch(e){case r.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case r.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case r.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}asFoldingRanges(e){return Array.isArray(e)?e.map(e=>new i.FoldingRange(e.startLine,e.endLine,this.asFoldingRangeKind(e.kind))):[]}}t.FoldingRangeFeature=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1),r=n(0),o=n(12);function s(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class a extends o.TextDocumentFeature{constructor(e){super(e,r.DeclarationRequest.type)}fillClientCapabilities(e){const t=s(s(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.declarationProvider);n&&i&&this.register(this.messages,{id:n,registerOptions:i})}registerLanguageProvider(e){const t={provideDeclaration:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DeclarationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then(i.protocol2CodeConverter.asDeclarationResult,e=>(i.logFailedRequest(r.DeclarationRequest.type,e),Promise.resolve(null))),s=i.clientOptions.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,o):o(e,t,n)}};return[i.languages.registerDeclarationProvider(e.documentSelector,t),t]}}t.DeclarationFeature=a},function(e,t){e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var n,i=String(e),r="",o=!!t&&!!t.extended,s=!!t&&!!t.globstar,a=!1,c=t&&"string"==typeof t.flags?t.flags:"",u=0,l=i.length;u1&&("/"===d||void 0===d)&&("/"===m||void 0===m)?(r+="(?:[^/]*(?:/|$))*",u++):r+="[^/]*";else r+=".*";break;default:r+=n}return c&&~c.indexOf("g")||(r="^"+r+"$"),new RegExp(r,c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(15);t.MonacoDiagnosticCollection=class{constructor(e,t){this.name=e,this.p2m=t,this.diagnostics=new Map,this.toDispose=new i.DisposableCollection}dispose(){this.toDispose.dispose()}get(e){const t=this.diagnostics.get(e);return t?t.diagnostics:[]}set(e,t){const n=this.diagnostics.get(e);if(n)n.diagnostics=t;else{const n=new r(e,t,this.name,this.p2m);this.diagnostics.set(e,n),this.toDispose.push(i.Disposable.create(()=>{this.diagnostics.delete(e),n.dispose()}))}}};class r{constructor(e,t,n,i){this.owner=n,this.p2m=i,this._markers=[],this._diagnostics=[],this.uri=monaco.Uri.parse(e),this.diagnostics=t,monaco.editor.onDidCreateModel(e=>this.doUpdateModelMarkers(e))}set diagnostics(e){this._diagnostics=e,this._markers=this.p2m.asDiagnostics(e),this.updateModelMarkers()}get diagnostics(){return this._diagnostics}get markers(){return this._markers}dispose(){this._markers=[],this.updateModelMarkers()}updateModelMarkers(){const e=monaco.editor.getModel(this.uri);this.doUpdateModelMarkers(e||void 0)}doUpdateModelMarkers(e){e&&this.uri.toString()===e.uri.toString()&&monaco.editor.setModelMarkers(e,this.owner,this._markers)}}t.MonacoModelDiagnostics=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(43),r=n(39),o=n(41),s=n(42),a=n(40),c=n(6);!function(e){function t(e,t={}){const n=new i.MonacoToProtocolConverter,c=new i.ProtocolToMonacoConverter;return{commands:new r.MonacoCommands(e),languages:new o.MonacoLanguages(c,n),workspace:new s.MonacoWorkspace(c,n,t.rootUri),window:new a.ConsoleWindow}}e.create=t,e.install=function(e,n={}){const i=t(e,n);return c.Services.install(i),i},e.get=function(){return c.Services.get()}}(t.MonacoServices||(t.MonacoServices={}))}])})); +//# sourceMappingURL=monaco-languageclient.min.js.map \ No newline at end of file diff --git a/src/visualizers/widgets/TextEditor/lib/monaco-languageclient.min.js.map b/src/visualizers/widgets/TextEditor/lib/monaco-languageclient.min.js.map new file mode 100644 index 000000000..3f35b85d7 --- /dev/null +++ b/src/visualizers/widgets/TextEditor/lib/monaco-languageclient.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./node_modules/vscode-languageserver-protocol/lib/main.js","webpack:///./node_modules/monaco-languageclient/lib/vscode-compatibility.js","webpack:///./node_modules/vscode-jsonrpc/lib/main.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/messages.js","webpack:///./node_modules/vscode-jsonrpc/lib/is.js","webpack:///./node_modules/vscode-jsonrpc/lib/events.js","webpack:///./node_modules/monaco-languageclient/lib/services.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/vscode-jsonrpc/lib/messageReader.js","webpack:///./node_modules/vscode-jsonrpc/lib/messageWriter.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/vscode-languageclient/lib/client.js","webpack:///./node_modules/buffer/index.js","webpack:///./node_modules/vscode-jsonrpc/lib/messages.js","webpack:///./node_modules/monaco-languageclient/lib/disposable.js","webpack:///./node_modules/vscode-languageclient/lib/utils/is.js","webpack:///./node_modules/timers-browserify/main.js","webpack:///./node_modules/setimmediate/setImmediate.js","webpack:///./node_modules/base64-js/index.js","webpack:///./node_modules/ieee754/index.js","webpack:///./node_modules/isarray/index.js","webpack:///./node_modules/vscode-jsonrpc/lib/cancellation.js","webpack:///./node_modules/vscode-jsonrpc/lib/linkedMap.js","webpack:///./node_modules/vscode-jsonrpc/lib/pipeSupport.js","webpack:///./node_modules/path-browserify/index.js","webpack:///./node_modules/os-browserify/browser.js","webpack:///./node_modules/vscode-jsonrpc/lib/socketSupport.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/utils/is.js","webpack:///./node_modules/monaco-languageclient/lib/index.js","webpack:///./node_modules/vscode-languageclient/lib/protocolCompletionItem.js","webpack:///./node_modules/vscode-languageclient/lib/protocolCodeLens.js","webpack:///./node_modules/vscode-languageclient/lib/protocolDocumentLink.js","webpack:///./node_modules/vscode-languageclient/lib/utils/uuid.js","webpack:///./node_modules/monaco-languageclient/lib/monaco-commands.js","webpack:///./node_modules/monaco-languageclient/lib/console-window.js","webpack:///./node_modules/monaco-languageclient/lib/monaco-languages.js","webpack:///./node_modules/monaco-languageclient/lib/monaco-workspace.js","webpack:///./node_modules/monaco-languageclient/lib/monaco-converter.js","webpack:///./src/visualizers/widgets/MonacoEditor/monaco-languageclientbrowser/src/monaco-languageclient.js","webpack:///./node_modules/vscode-languageserver-types/lib/esm/main.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.implementation.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.typeDefinition.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.workspaceFolders.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.configuration.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.colorProvider.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.foldingRange.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.declaration.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.selectionRange.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.progress.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.callHierarchy.proposed.js","webpack:///./node_modules/vscode-languageserver-protocol/lib/protocol.sematicTokens.proposed.js","webpack:///./node_modules/monaco-languageclient/lib/connection.js","webpack:///./node_modules/monaco-languageclient/lib/monaco-language-client.js","webpack:///./node_modules/monaco-languageclient/lib/vscode-api.js","webpack:///./node_modules/vscode-uri/lib/esm/index.js","webpack:///./node_modules/vscode-languageclient/lib/codeConverter.js","webpack:///./node_modules/vscode-languageclient/lib/protocolConverter.js","webpack:///./node_modules/vscode-languageclient/lib/utils/async.js","webpack:///./node_modules/vscode-languageclient/lib/progressPart.js","webpack:///./node_modules/vscode-languageclient/lib/typeDefinition.js","webpack:///./node_modules/vscode-languageclient/lib/configuration.js","webpack:///./node_modules/vscode-languageclient/lib/implementation.js","webpack:///./node_modules/vscode-languageclient/lib/colorProvider.js","webpack:///./node_modules/vscode-languageclient/lib/workspaceFolders.js","webpack:///./node_modules/vscode-languageclient/lib/foldingRange.js","webpack:///./node_modules/vscode-languageclient/lib/declaration.js","webpack:///./node_modules/glob-to-regexp/index.js","webpack:///./node_modules/monaco-languageclient/lib/monaco-diagnostic-collection.js","webpack:///./node_modules/monaco-languageclient/lib/monaco-services.js"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__export","vscode_jsonrpc_1","ErrorCodes","ResponseError","CancellationToken","CancellationTokenSource","Disposable","Event","Emitter","Trace","TraceFormat","SetTraceNotification","LogTraceNotification","RequestType","RequestType0","NotificationType","NotificationType0","MessageReader","MessageWriter","ConnectionStrategy","StreamMessageReader","StreamMessageWriter","IPCMessageReader","IPCMessageWriter","createClientPipeTransport","createServerPipeTransport","generateRandomPipeName","createClientSocketTransport","createServerSocketTransport","ProgressType","callHierarchy","st","Proposed","CallHierarchyPrepareRequest","CallHierarchyIncomingCallsRequest","CallHierarchyOutgoingCallsRequest","SemanticTokensRequest","SemanticTokensEditsRequest","SemanticTokensRangeRequest","method","type","SemanticTokenTypes","SemanticTokenModifiers","SemanticTokens","createProtocolConnection","reader","writer","logger","strategy","createMessageConnection","vscode_api_1","services_1","createVSCodeApi","Services","Is","messages_1","RequestType1","RequestType2","RequestType3","RequestType4","RequestType5","RequestType6","RequestType7","RequestType8","RequestType9","NotificationType1","NotificationType2","NotificationType3","NotificationType4","NotificationType5","NotificationType6","NotificationType7","NotificationType8","NotificationType9","messageReader_1","SocketMessageReader","messageWriter_1","SocketMessageWriter","events_1","cancellation_1","linkedMap_1","CancelNotification","ProgressNotification","ConnectionErrors","ConnectionState","NullLogger","freeze","error","warn","info","log","fromString","string","Off","toLowerCase","Messages","Verbose","toString","JSON","Text","ConnectionError","Error","code","message","super","this","setPrototypeOf","_createMessageConnection","messageReader","messageWriter","sequenceNumber","notificationSquenceNumber","unknownResponseSquenceNumber","timer","tracer","starRequestHandler","undefined","requestHandlers","starNotificationHandler","notificationHandlers","progressHandlers","Map","messageQueue","LinkedMap","responsePromises","requestTokens","trace","traceFormat","state","New","errorEmitter","closeEmitter","unhandledNotificationEmitter","unhandledProgressEmitter","disposeEmitter","createRequestQueueKey","id","addMessageToQueue","queue","isRequestMessage","set","isResponseMessage","cancelUndispatched","_message","isListening","Listening","isClosed","Closed","isDisposed","Disposed","closeHandler","fire","triggerMessageQueue","size","setImmediate","shift","requestMessage","reply","resultOrError","startTime","jsonrpc","toJson","result","traceSendingResponse","write","replyError","data","params","stringify","logLSPMessage","traceReceivedRequest","requestHandler","element","handler","Date","now","cancellationSource","tokenKey","String","handlerResult","numberOfParams","token","array","promise","then","InternalError","replySuccess","MethodNotFound","handleRequest","isNotificationMessage","notificationHandler","source","cancel","traceReceivedNotification","handleNotification","responseMessage","responsePromise","timerStart","traceReceivedResponse","reject","resolve","handleResponse","number","responseHandler","handleInvalidMessage","processMessageQueue","onClose","onError","callback","toCancel","response","delete","lspMessage","isLSPMessage","timestamp","throwIfClosedOrDisposed","undefinedToNull","param","computeMessageParams","length","push","connection","sendNotification","messageParams","notificationMessage","traceSendingNotification","onNotification","func","onProgress","_type","has","dispose","sendProgress","onUnhandledProgress","event","sendRequest","throwIfNotListening","is","last","slice","map","Promise","traceSendingRequest","e","MessageWriteError","onCancellationRequested","onRequest","_value","_tracer","sendNotificationOrTraceOptions","_sendNotification","_traceFormat","boolean","onUnhandledNotification","onDispose","keys","forEach","listen","AlreadyListening","throwIfListening","inspect","console","verbose","candidate","input","output","read","end","isMessageWriter","ProtocolRequestType0","ProtocolRequestType","ProtocolNotificationType","ProtocolNotificationType0","Array","isArray","Number","stringArray","every","elem","_disposable","None","CallbackList","context","bucket","_callbacks","_contexts","remove","foundCallbackWithDifferentContext","len","splice","args","ret","callbacks","contexts","apply","_options","_event","listener","thisArgs","disposables","onFirstListenerAdd","isEmpty","add","_noop","onLastListenerRemove","invoke","vscode_languageserver_protocol_1","global","symbol","services","install","isDocumentSelector","selector","DocumentFilter","SignatureHelpTriggerKind","VsCodeDiagnosticSeverity","DocumentIdentifier","arg","ConfigurationTarget","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","draining","queueIndex","cleanUpNextTick","concat","drainQueue","timeout","run","marker","runClearTimeout","Item","noop","nextTick","arguments","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","CR","Buffer","from","LF","MessageBuffer","encoding","index","buffer","allocUnsafe","chunk","toAppend","str","bufferLen","byteLength","copy","newSize","Math","ceil","current","split","header","indexOf","substr","trim","nextStart","onPartialMessage","AbstractMessageReader","partialMessageEmitter","asError","readable","_partialMessageTimeout","nextMessageLength","messageToken","partialMessageTimer","onData","fireError","fireClose","append","headers","tryReadHeaders","contentLength","parseInt","isNaN","msg","tryReadContent","setPartialMessageTimer","clearPartialMessageTimer","json","parse","firePartialMessage","waitingTime","eventEmitter","socket","AbstractMessageWriter","count","writable","errorCount","join","sending","doWriteMessage","send","destroy","handleError","g","Function","vscode_1","c2p","p2c","async_1","UUID","progressPart_1","ConsoleLogger","ErrorAction","CloseAction","RevealOutputChannelOn","State","ClientState","DefaultErrorHandler","restarts","_error","Continue","Shutdown","Restart","showErrorMessage","DoNotRestart","SupportedSymbolKinds","SymbolKind","File","Module","Namespace","Package","Class","Method","Property","Field","Constructor","Enum","Interface","Variable","Constant","Boolean","Key","Null","EnumMember","Struct","Operator","TypeParameter","SupportedCompletionItemKinds","CompletionItemKind","Unit","Value","Keyword","Snippet","Color","Reference","Folder","ensure","target","DynamicFeature","register","unregister","messages","DocumentNotifiactions","_client","_middleware","_createParams","_selectorFilter","_selectors","selectors","textDocument","languages","match","registerOptions","documentSelector","_listener","values","notificationSent","_data","clear","document","DidOpenTextDocumentFeature","client","_syncedDocuments","workspace","onDidOpenTextDocument","DidOpenTextDocumentNotification","clientOptions","middleware","didOpen","code2ProtocolConverter","asOpenTextDocumentParams","textDocumentFilter","capabilities","dynamicRegistration","textDocumentSyncOptions","resolvedTextDocumentSync","openClose","generateUuid","textDocuments","uri","DidCloseTextDocumentFeature","onDidCloseTextDocument","DidCloseTextDocumentNotification","didClose","asCloseTextDocumentParams","DidChangeTextDocumentFeature","_changeData","_forcingDelivery","DidChangeTextDocumentNotification","change","TextDocumentSyncKind","assign","syncKind","onDidChangeTextDocument","contentChanges","changeData","Incremental","asChangeTextDocumentParams","didChange","Full","_changeDelayer","forceDelivery","delayer","trigger","Delayer","WillSaveFeature","onWillSaveTextDocument","WillSaveTextDocumentNotification","willSave","willSaveEvent","asWillSaveTextDocumentParams","WillSaveWaitUntilFeature","WillSaveTextDocumentWaitUntilRequest","willSaveWaitUntil","edits","vEdits","protocol2CodeConverter","asTextEdits","waitUntil","DidSaveTextDocumentFeature","onDidSaveTextDocument","DidSaveTextDocumentNotification","didSave","asSaveTextDocumentParams","_includeText","save","includeText","FileSystemWatcherFeature","_notifyFileEvent","_watchers","DidChangeWatchedFilesNotification","_capabilities","_documentSelector","_method","watchers","disposeables","watcher","globPattern","watchCreate","watchChange","watchDelete","kind","WatchKind","Create","Change","Delete","fileSystemWatcher","createFileSystemWatcher","hookListeners","fileSystemWatchers","onDidCreate","resource","asUri","FileChangeType","Created","onDidChange","Changed","onDidDelete","Deleted","disposable","TextDocumentFeature","_registrations","registration","registerLanguageProvider","provider","capability","TextDocumentRegistrationOptions","StaticRegistrationOptions","hasId","WorkDoneProgressOptions","options","CompletionItemFeature","CompletionRequest","capabilites","completion","contextSupport","completionItem","snippetSupport","commitCharactersSupport","documentationFormat","MarkupKind","Markdown","PlainText","deprecatedSupport","preselectSupport","tagSupport","valueSet","CompletionItemTag","Deprecated","completionItemKind","getRegistrationOptions","completionProvider","triggerCharacters","provideCompletionItems","position","asCompletionParams","asCompletionResult","logFailedRequest","provideCompletionItem","resolveCompletionItem","resolveProvider","item","CompletionResolveRequest","asCompletionItem","registerCompletionItemProvider","HoverFeature","HoverRequest","hoverCapability","contentFormat","hoverProvider","provideHover","asTextDocumentPositionParams","asHover","registerHoverProvider","SignatureHelpFeature","SignatureHelpRequest","config","signatureInformation","parameterInformation","labelOffsetSupport","signatureHelpProvider","provideSignatureHelp","providerSignatureHelp","asSignatureHelpParams","asSignatureHelp","retriggerCharacters","registerSignatureHelpProvider","metaData","DefinitionFeature","DefinitionRequest","definitionSupport","linkSupport","definitionProvider","provideDefinition","asDefinitionResult","registerDefinitionProvider","ReferencesFeature","ReferencesRequest","referencesProvider","provideReferences","_providerReferences","asReferenceParams","asReferences","registerReferenceProvider","DocumentHighlightFeature","DocumentHighlightRequest","documentHighlightProvider","provideDocumentHighlights","_provideDocumentHighlights","asDocumentHighlights","registerDocumentHighlightProvider","DocumentSymbolFeature","DocumentSymbolRequest","symbolCapabilities","symbolKind","hierarchicalDocumentSymbolSupport","documentSymbolProvider","provideDocumentSymbols","_provideDocumentSymbols","asDocumentSymbolParams","DocumentSymbol","asDocumentSymbols","asSymbolInformations","registerDocumentSymbolProvider","WorkspaceSymbolFeature","WorkspaceSymbolRequest","workspaceSymbolProvider","workDoneProgress","provideWorkspaceSymbols","query","registerWorkspaceSymbolProvider","CodeActionFeature","CodeActionRequest","cap","isPreferredSupport","codeActionLiteralSupport","codeActionKind","CodeActionKind","Empty","QuickFix","Refactor","RefactorExtract","RefactorInline","RefactorRewrite","Source","SourceOrganizeImports","codeActionProvider","provideCodeActions","range","_provideCodeActions","asTextDocumentIdentifier","asRange","asCodeActionContext","Command","asCommand","asCodeAction","registerCodeActionsProvider","codeActionKinds","providedCodeActionKinds","asCodeActionKinds","CodeLensFeature","CodeLensRequest","codeLensProvider","provideCodeLenses","asCodeLensParams","asCodeLenses","resolveCodeLens","codeLens","CodeLensResolveRequest","asCodeLens","registerCodeLensProvider","DocumentFormattingFeature","DocumentFormattingRequest","documentFormattingProvider","provideDocumentFormattingEdits","asFormattingOptions","registerDocumentFormattingEditProvider","DocumentRangeFormattingFeature","DocumentRangeFormattingRequest","documentRangeFormattingProvider","provideDocumentRangeFormattingEdits","registerDocumentRangeFormattingEditProvider","DocumentOnTypeFormattingFeature","DocumentOnTypeFormattingRequest","documentOnTypeFormattingProvider","provideOnTypeFormattingEdits","ch","asPosition","moreTriggerCharacter","registerOnTypeFormattingEditProvider","firstTriggerCharacter","RenameFeature","RenameRequest","rename","prepareSupport","renameProvider","prepareProvider","provideRenameEdits","newName","asWorkspaceEdit","prepareRename","PrepareRenameRequest","Range","placeholder","registerRenameProvider","DocumentLinkFeature","DocumentLinkRequest","documentLinkCapabilities","tooltipSupport","documentLinkProvider","provideDocumentLinks","asDocumentLinkParams","asDocumentLinks","resolveDocumentLink","link","DocumentLinkResolveRequest","asDocumentLink","registerDocumentLinkProvider","ConfigurationFeature","_listeners","DidChangeConfigurationNotification","section","synchronize","configurationSection","onDidChangeConfiguration","sections","some","affectsConfiguration","didChangeConfiguration","settings","extractSettingsInformation","getMiddleware","ensurePath","path","obj","workspaceFolder","getConfiguration","ExecuteCommandFeature","_commands","ExecuteCommandRequest","executeCommandProvider","executeCommand","command","commands","registerCommand","MessageTransports","OnReady","_resolve","_reject","_used","BaseLanguageClient","_features","_method2Message","_dynamicFeatures","_id","_name","_clientOptions","diagnosticCollectionName","outputChannelName","revealOutputChannelOn","stdioEncoding","initializationOptions","initializationFailedHandler","progressOnInitialization","errorHandler","uriConverters","Initial","_connectionPromise","_resolvedConnection","_initializeResult","outputChannel","_outputChannel","_disposeOutputChannel","_traceOutputChannel","traceOutputChannel","_providers","_diagnostics","_fileEvents","_fileEventDelayer","_onReady","_onReadyCallbacks","_onStop","_telemetryEmitter","_stateChangeEmitter","messageOrDataObject","logTrace","logObjectTrace","_c2p","createConverter","code2Protocol","_p2c","protocol2Code","registerBuiltinFeatures","_state","oldState","getPublicState","newState","Running","Starting","Stopped","isConnectionActive","forceDocumentSync","createOutputChannel","_trace","onReady","resolveConnection","responseError","stack","showNotification","appendLine","toLocaleTimeString","data2String","Info","showNotificationMessage","Warn","showInformationMessage","show","Stopping","isUsed","createDiagnosticCollection","onLogMessage","MessageType","Warning","onShowMessage","showWarningMessage","ShowMessageRequest","messageFunc","actions","onTelemetry","initialize","StartFailed","needsStop","stop","createConnection","refreshTrace","initOption","rootPath","fsPath","_clientGetRootPath","initParams","processId","pid","clientInfo","rootUri","Uri","file","computeClientCapabilities","workspaceFolders","fillInitializeParams","part","ProgressPart","workDoneToken","doInitialize","done","textDocumentSync","onDiagnostics","handleDiagnostics","RegistrationRequest","handleRegistrationRequest","UnregistrationRequest","handleUnregistrationRequest","ApplyWorkspaceEditRequest","handleApplyWorkspaceEdit","InitializedNotification","hookFileEvents","hookConfigurationChanged","initializeFeatures","retry","folders","folder","scheme","cleanUp","shutdown","exit","cleanUpChannel","channel","diagnostics","_a","_b","didChangeWatchedFile","didChangeWatchedFiles","changes","workSpaceMiddleware","asDiagnostics","setDiagnostics","handleConnectionError","handleConnectionClosed","createMessageTransports","transports","defaultTraceOptions","InitializeRequest","ShutdownRequest","ExitNotification","LogMessageNotification","ShowMessageNotification","TelemetryEventNotification","didOpenTextDocument","didChangeTextDocument","didCloseTextDocument","didSaveTextDocument","PublishDiagnosticsNotification","action","closed","start","traceConfig","_connection","fileEvents","registerRaw","features","feature","registerFeature","request","notifyFileEvent","applyEdit","workspaceEdit","documentChanges","resourceOperations","ResourceOperationKind","Rename","failureHandling","FailureHandlingKind","TextOnlyTransactional","relatedInformation","versionSupport","DiagnosticTag","Unnecessary","fillClientCapabilities","registrations","unregistration","unregisterations","edit","openTextDocuments","versionMismatch","TextDocumentEdit","applied","asPromise","RequestCancelled","ContentModified","base64","ieee754","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","Uint8Array","__proto__","encodingOrOffset","TypeError","ArrayBuffer","byteOffset","fromArrayLike","fromArrayBuffer","isEncoding","actual","isBuffer","checked","val","fromObject","assertSize","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","b","bidirectionalIndexOf","arrayIndexOf","lastIndexOf","arr","indexSize","arrLength","valLength","buf","readUInt16BE","foundIndex","found","j","hexWrite","offset","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","byteArray","charCodeAt","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","fromByteArray","min","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","fromCharCode","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","subarray","typedArraySupport","poolSize","_augment","species","configurable","fill","allocUnsafeSlow","_isBuffer","compare","x","y","list","pos","swap16","swap32","swap64","equals","max","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","out","toHex","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","replace","stringtrim","base64clean","src","dst","ParseError","InvalidRequest","InvalidParams","serverErrorStart","serverErrorEnd","ServerNotInitialized","UnknownErrorCode","MessageReadError","AbstractMessageType","_numberOfParams","_","DisposableCollection","pop","thenable","typedArray","check","resolved","self","Timeout","clearFn","_clearFn","scope","setInterval","clearInterval","close","unref","ref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","clearImmediate","registerImmediate","html","messagePrefix","onGlobalMessage","nextHandle","tasksByHandle","currentlyRunningATask","doc","attachTo","getPrototypeOf","handle","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","onmessage","canUsePostMessage","MessageChannel","port1","port2","createElement","documentElement","script","onreadystatechange","removeChild","appendChild","random","addEventListener","attachEvent","task","b64","lens","getLens","validLen","placeHoldersLen","tmp","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","parts","len2","encodeChunk","lookup","num","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","rt","abs","LN2","isCancellationRequested","Cancelled","shortcutEvent","MutableToken","_isCancelled","_emitter","_token","Touch","First","Last","_map","_head","_tail","_size","touch","next","previous","addItemLast","addItemFirst","removeItem","callbackfn","thisArg","path_1","os_1","crypto_1","net_1","randomSuffix","randomBytes","platform","tmpdir","pipeName","connectResolve","connected","server","createServer","onConnected","normalizeArray","allowAboveRoot","up","unshift","filter","xs","f","resolvedPath","resolvedAbsolute","charAt","normalize","isAbsolute","trailingSlash","paths","relative","to","fromParts","toParts","samePartsLength","outputParts","sep","delimiter","dirname","hasRoot","matchedSlash","basename","extname","startDot","startPart","preDotState","endianness","hostname","location","loadavg","uptime","freemem","MAX_VALUE","totalmem","cpus","release","navigator","appVersion","networkInterfaces","getNetworkInterfaces","arch","tmpDir","EOL","homedir","port","objectLiteral","ProtocolCompletionItem","CompletionItem","label","default","ProtocolCodeLens","CodeLens","ProtocolDocumentLink","DocumentLink","ValueUUID","other","asHex","V4UUID","_randomHex","_oneOf","_timeHighBits","_chars","v4","empty","_UUIDPattern","isUUID","test","MonacoCommands","editor","_commandService","addCommand","_accessor","ConsoleWindow","channels","Log","existing","line","__awaiter","_arguments","P","generator","fulfilled","step","rejected","globToRegExp","monaco_diagnostic_collection_1","disposable_1","MonacoModelIdentifier","testGlob","pattern","extended","globstar","fromDocument","monaco","languageId","fromModel","model","getModeId","MonacoLanguages","p2m","m2p","matchModel","MonacoDiagnosticCollection","createCompletionProvider","providers","language","matchLanguage","wordUntil","getWordUntilPosition","defaultRange","lineNumber","startColumn","endColumn","protocolItem","resolvedItem","resolvedCompletionItem","createHoverProvider","hover","createSignatureHelpProvider","signatureHelpTriggerCharacters","signatureHelpRetriggerCharacters","signatureHelp","asSignatureHelpContext","asSignatureHelpResult","createDefinitionProvider","referenceProvider","createReferenceProvider","createDocumentHighlightProvider","createDocumentSymbolProvider","createCodeActionProvider","registerCodeActionProvider","asCodeActionParams","asCodeActionList","createCodeLensProvider","asCodeLensList","protocolCodeLens","resolvedCodeLens","documentFormattingEditProvider","createDocumentFormattingEditProvider","asDocumentFormattingParams","documentRangeFormattingEditProvider","createDocumentRangeFormattingEditProvider","asDocumentRangeFormattingParams","onTypeFormattingEditProvider","createOnTypeFormattingEditProvider","autoFormatTriggerCharacters","asDocumentOnTypeFormattingParams","createRenameProvider","asRenameParams","linkProvider","createDocumentLinkProvider","registerLinkProvider","provideLinks","resolveLink","url","documentLink","resolvedLink","implementationProvider","createImplementationProvider","registerImplementationProvider","provideImplementation","typeDefinitionProvider","createTypeDefinitionProvider","registerTypeDefinitionProvider","provideTypeDefinition","documentColorProvider","createDocumentColorProvider","registerColorProvider","provideDocumentColors","asColorInformations","provideColorPresentations","color","asColorPresentations","foldingRangeProvider","createFoldingRangeProvider","registerFoldingRangeProvider","provideFoldingRanges","asFoldingRanges","Set","matchLanguageByFilter","MonacoWorkspace","_rootUri","documents","onDidOpenTextDocumentEmitter","onDidCloseTextDocumentEmitter","onDidChangeTextDocumentEmitter","getModels","addModel","onDidCreateModel","onWillDisposeModel","removeModel","setModel","onDidChangeContent","rangeLength","text","TextDocument","getVersionId","getValue","models","reduce","acc","currentEdit","textEdit","getModel","editsByResource","operations","lift","pushEditOperations","resourceEdit","identifier","major","minor","forceMoveMarkers","ls","MonacoToProtocolConverter","column","character","insert","startLineNumber","endLineNumber","asCompletionContext","triggerKind","asCompletionTriggerKind","triggerCharacter","asSignatureHelpTriggerKind","isRetrigger","activeSignatureHelp","signatures","signatureInfo","asSignatureInformation","activeParameter","activeSignature","documentation","asMarkupContent","parameters","paramInfo","asParameterInformation","markupContent","ContentChange","TriggerCharacter","Invoke","CompletionTriggerKind","TriggerForIncompleteCompletions","Invoked","detail","asDocumentation","filterText","fillPrimaryInsertText","asCompletionItemKind","originalItemKind","sortText","additionalTextEdits","commitCharacters","deprecated","original","Customcolor","format","InsertTextFormat","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","insertText","insertTextFormat","fromEdit","newText","items","asTextEdit","includeDeclaration","MarkerSeverity","DiagnosticSeverity","Information","Hint","severity","asDiagnosticSeverity","Diagnostic","markers","asDiagnostic","CodeActionContext","only","tabSize","insertSpaces","ProtocolToMonacoConverter","modelVersionId","CreateFile","newUri","RenameFile","oldUri","DeleteFile","asResourceEdits","lenses","CodeAction","children","asDocumentSymbol","asSymbolKind","tags","selectionRange","information","asSymbolInformation","asLocation","containerName","asDocumentHighlight","asDocumentHighlightKind","DocumentHighlightKind","Read","Write","LocationLink","asLocationLink","targetUri","targetSelectionRange","originSelectionRange","asSignatureInformations","asParameterInformations","contents","asHoverContent","content","asMarkdownString","MarkupContent","diagnostic","asSeverity","asRelatedInformations","asRelatedInformation","incomplete","suggestions","isIncomplete","asCompletionInsertText","isSnippet","itemKind","preselect","documentLinks","links","Position","asColorInformation","asColorPresentation","asFoldingRange","startLine","endLine","asFoldingRangeKind","FoldingRangeKind","Comment","Imports","Region","Location","ColorInformation","ColorPresentation","FoldingRange","DiagnosticRelatedInformation","TextEdit","WorkspaceEdit","one","two","three","four","defined","targetRange","red","green","blue","alpha","startCharacter","endCharacter","_i","del","VersionedTextDocumentIdentifier","overwrite","ignoreIfExists","recursive","ignoreIfNotExists","TextDocumentIdentifier","TextDocumentItem","CompletionList","MarkedString","Hover","ParameterInformation","SignatureInformation","DocumentHighlight","SymbolTag","SymbolInformation","FormattingOptions","SelectionRange","TextEditChangeImpl","all","WorkspaceChange","_this","_textEditChanges","_workspaceEdit","textEditChange","getTextEditChange","textDocumentEdit","createFile","checkDocumentChanges","renameFile","deleteFile","fromPlainText","plainText","SourceFixAll","commandOrEdit","isPreferred","parent","FullTextDocument","lineCount","getText","positionAt","offsetAt","applyEdits","sortedEdits","mergeSort","left","right","leftIdx","rightIdx","diff","lastModifiedOffset","startOffset","endOffset","substring","_uri","_languageId","_version","_content","_lineOffsets","update","getLineOffsets","lineOffsets","isLineStart","low","high","mid","lineOffset","nextLineOffset","protocol_implementation_1","ImplementationRequest","protocol_typeDefinition_1","TypeDefinitionRequest","protocol_workspaceFolders_1","WorkspaceFoldersRequest","DidChangeWorkspaceFoldersNotification","protocol_configuration_1","ConfigurationRequest","protocol_colorProvider_1","DocumentColorRequest","ColorPresentationRequest","protocol_foldingRange_1","FoldingRangeRequest","protocol_declaration_1","DeclarationRequest","protocol_selectionRange_1","SelectionRangeRequest","protocol_progress_1","DocumentSelector","WorkDoneProgress","WorkDoneProgressCreateRequest","WorkDoneProgressCancelNotification","Abort","Transactional","Undo","hasWorkDoneProgress","InitializeError","unknownProtocolVersion","TextDocumentSaveReason","Manual","AfterDelay","FocusOut","resultType","resultId","main_1","client_1","typeDefinition_1","configuration_1","implementation_1","colorProvider_1","workspaceFolders_1","foldingRange_1","declaration_1","MonacoLanguageClient","connectionProvider","doCreateConnection","Proxy","prop","bypassConversion","reason","endsWith","TypeDefinitionFeature","ImplementationFeature","ColorProviderFeature","WorkspaceFoldersFeature","foldingRangeFeature","FoldingRangeFeature","DeclarationFeature","vscode","vscode_uri_1","ServicesModule","servicesProvider","unsupported","URI","contains","intersects","fs","workspaceFile","ignoreCreateEvents","ignoreChangeEvents","ignoreDeleteEvents","configuration","configurations","defaultValue","onDidChangeWorkspaceFolders","getWorkspaceFolder","asRelativePath","updateWorkspaceFolders","findFiles","saveAll","openTextDocument","registerTextDocumentContentProvider","registerTaskProvider","registerFileSystemProvider","ApiDiagnosticCollection","collection","arg0","arg1","diag","registerCallHierarchyProvider","registerDeclarationProvider","provideDeclaration","firstItem","registerSelectionRangeProvider","provideSelectionRanges","positions","getLanguages","setTextDocumentLanguage","getDiagnostics","setLanguageConfiguration","onDidChangeDiagnostics","showMessage","hide","withProgress","report","showTextDocument","createTextEditorDecorationType","showQuickPick","showWorkspaceFolderPick","showOpenDialog","showSaveDialog","showInputBox","createWebviewPanel","setStatusBarMessage","withScmProgress","createStatusBarItem","createTerminal","registerTreeDataProvider","createTreeView","registerWebviewPanelSerializer","onDidChangeActiveTextEditor","onDidChangeVisibleTextEditors","onDidChangeTextEditorSelection","onDidChangeTextEditorVisibleRanges","onDidChangeTextEditorOptions","onDidChangeTextEditorViewColumn","onDidChangeActiveTerminal","onDidOpenTerminal","onDidCloseTerminal","onDidChangeWindowState","createQuickPick","createInputBox","registerUriHandler","registerTextEditorCommand","getCommands","callOnDispose","extendStatics","isWindows","__extends","__","constructor","userAgent","_schemePattern","_singleSlashStart","_doubleSlashStart","_slash","_regexp","schemeOrData","authority","fragment","_strict","_schemeFix","_referenceResolution","_validateUri","isUri","thing","with","uriToFsPath","_URI","exec","percentDecode","idx","components","skipEncoding","_asFormatted","revive","_formatted","external","_fsPath","_sep","_pathSepMarker","_super","$mid","encodeTable","encodeURIComponentFast","uriComponent","allowSlash","nativeEncodePos","encodeURIComponent","escaped","encodeURIComponentMinimal","keepDriveLetterCasing","encoder","userinfo","_rEncodedAsHex","decodeURIComponentGraceful","decodeURIComponent","proto","protocolCompletionItem_1","protocolCodeLens_1","protocolDocumentLink_1","uriConverter","_uriConverter","asVersionedTextDocumentIdentifier","asTextDocumentSaveReason","asWorkerPosition","inserting","replacing","isInsertReplace","asDiagnosticTag","tag","converted","asDiagnosticTags","asCompletionItemTag","asSymbolTag","isTextDocument","isTextDocumentChangeEvent","includeContent","asPositions","SnippetString","asCompletionItemTags","asSymbolTags","tooltip","CodeBlock","asDiagnosticRelatedInformation","MarkdownString","asLocationResult","child","kindMapping","asCodeActionKind","asColor","ci","cp","presentation","asSelectionRange","asRanges","appendCodeblock","appendMarkdown","appendText","SignatureHelp","asDeclarationResult","asCommands","foldingRanges","colorInformation","colorPresentations","asSelectionRanges","selectionRanges","defaultDelay","completionPromise","onSuccess","delay","cancelTimeout","_reported","begin","cancellable","ProgressLocation","Notification","Window","async","progress","cancellationToken","_progress","_infinite","percentage","_cancellationToken","delta","increment","typeDefinitionSupport","getRegistration","scopeUri","implementationSupport","colorProvider","requestParams","access","arrayDiff","initializeWithFolders","asProtocol","currentWorkspaceFolders","_initialFolders","removed","added","doSendEvent","addedFolders","removedFolders","didChangeWorkspaceFolders","sendInitialEvent","rangeLimit","lineFoldingOnly","declarationSupport","declarationProvider","glob","opts","reStr","inGroup","flags","prevChar","starCount","nextChar","RegExp","toDispose","modelDiagnostics","MonacoModelDiagnostics","owner","_markers","doUpdateModelMarkers","updateModelMarkers","setModelMarkers","monaco_converter_1","monaco_commands_1","monaco_languages_1","monaco_workspace_1","console_window_1","MonacoServices"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ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EAAS,aAAc,CAAE0B,OAAO,IAKtD,MAAMwhE,EAAqB,EAAQ,IAC7BC,EAAoB,EAAQ,IAC5BC,EAAqB,EAAQ,IAC7BC,EAAqB,EAAQ,IAC7BC,EAAmB,EAAQ,IAC3B19D,EAAa,EAAQ,IAE3B,SAAW29D,GACP,SAASxhE,EAAOg4C,EAAQjxB,EAAU,IAC9B,MAAMizB,EAAM,IAAImnB,EAAmBjgB,0BAC7BnH,EAAM,IAAIonB,EAAmB9b,0BACnC,MAAO,CACHjxB,SAAU,IAAIgtC,EAAkBrpB,eAAeC,GAC/Cz4B,UAAW,IAAI8hD,EAAmBvnB,gBAAgBC,EAAKC,GACvD55B,UAAW,IAAIkhD,EAAmBtiB,gBAAgBjF,EAAKC,EAAKjzB,EAAQyT,SACpEj8B,OAAQ,IAAIgjE,EAAiBnpB,eAGrCopB,EAAexhE,OAASA,EAMxBwhE,EAAextD,QALf,SAAiBgkC,EAAQjxB,EAAU,IAC/B,MAAMhT,EAAW/T,EAAOg4C,EAAQjxB,GAEhC,OADAljB,EAAWE,SAASiQ,QAAQD,GACrBA,GAMXytD,EAAejiE,IAHf,WACI,OAAOsE,EAAWE,SAASxE,OAnBnC,CAsBoBtB,EAAQujE,iBAAmBvjE,EAAQujE,eAAiB","file":"monaco-languageclient.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst vscode_jsonrpc_1 = require(\"vscode-jsonrpc\");\r\nexports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;\r\nexports.ResponseError = vscode_jsonrpc_1.ResponseError;\r\nexports.CancellationToken = vscode_jsonrpc_1.CancellationToken;\r\nexports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;\r\nexports.Disposable = vscode_jsonrpc_1.Disposable;\r\nexports.Event = vscode_jsonrpc_1.Event;\r\nexports.Emitter = vscode_jsonrpc_1.Emitter;\r\nexports.Trace = vscode_jsonrpc_1.Trace;\r\nexports.TraceFormat = vscode_jsonrpc_1.TraceFormat;\r\nexports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;\r\nexports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;\r\nexports.RequestType = vscode_jsonrpc_1.RequestType;\r\nexports.RequestType0 = vscode_jsonrpc_1.RequestType0;\r\nexports.NotificationType = vscode_jsonrpc_1.NotificationType;\r\nexports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;\r\nexports.MessageReader = vscode_jsonrpc_1.MessageReader;\r\nexports.MessageWriter = vscode_jsonrpc_1.MessageWriter;\r\nexports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;\r\nexports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;\r\nexports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;\r\nexports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;\r\nexports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;\r\nexports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;\r\nexports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;\r\nexports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;\r\nexports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;\r\nexports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;\r\nexports.ProgressType = vscode_jsonrpc_1.ProgressType;\r\n__export(require(\"vscode-languageserver-types\"));\r\n__export(require(\"./protocol\"));\r\nconst callHierarchy = require(\"./protocol.callHierarchy.proposed\");\r\nconst st = require(\"./protocol.sematicTokens.proposed\");\r\nvar Proposed;\r\n(function (Proposed) {\r\n let CallHierarchyPrepareRequest;\r\n (function (CallHierarchyPrepareRequest) {\r\n CallHierarchyPrepareRequest.method = callHierarchy.CallHierarchyPrepareRequest.method;\r\n CallHierarchyPrepareRequest.type = callHierarchy.CallHierarchyPrepareRequest.type;\r\n })(CallHierarchyPrepareRequest = Proposed.CallHierarchyPrepareRequest || (Proposed.CallHierarchyPrepareRequest = {}));\r\n let CallHierarchyIncomingCallsRequest;\r\n (function (CallHierarchyIncomingCallsRequest) {\r\n CallHierarchyIncomingCallsRequest.method = callHierarchy.CallHierarchyIncomingCallsRequest.method;\r\n CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest.type;\r\n })(CallHierarchyIncomingCallsRequest = Proposed.CallHierarchyIncomingCallsRequest || (Proposed.CallHierarchyIncomingCallsRequest = {}));\r\n let CallHierarchyOutgoingCallsRequest;\r\n (function (CallHierarchyOutgoingCallsRequest) {\r\n CallHierarchyOutgoingCallsRequest.method = callHierarchy.CallHierarchyOutgoingCallsRequest.method;\r\n CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest.type;\r\n })(CallHierarchyOutgoingCallsRequest = Proposed.CallHierarchyOutgoingCallsRequest || (Proposed.CallHierarchyOutgoingCallsRequest = {}));\r\n Proposed.SemanticTokenTypes = st.SemanticTokenTypes;\r\n Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;\r\n Proposed.SemanticTokens = st.SemanticTokens;\r\n let SemanticTokensRequest;\r\n (function (SemanticTokensRequest) {\r\n SemanticTokensRequest.method = st.SemanticTokensRequest.method;\r\n SemanticTokensRequest.type = st.SemanticTokensRequest.type;\r\n })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));\r\n let SemanticTokensEditsRequest;\r\n (function (SemanticTokensEditsRequest) {\r\n SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;\r\n SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;\r\n })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));\r\n let SemanticTokensRangeRequest;\r\n (function (SemanticTokensRangeRequest) {\r\n SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;\r\n SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;\r\n })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));\r\n})(Proposed = exports.Proposed || (exports.Proposed = {}));\r\nfunction createProtocolConnection(reader, writer, logger, strategy) {\r\n return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);\r\n}\r\nexports.createProtocolConnection = createProtocolConnection;\r\n","\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nconst vscode_api_1 = require(\"./vscode-api\");\nconst services_1 = require(\"./services\");\nmodule.exports = vscode_api_1.createVSCodeApi(services_1.Services.get);\n//# sourceMappingURL=vscode-compatibility.js.map","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n/// \r\n'use strict';\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst Is = require(\"./is\");\r\nconst messages_1 = require(\"./messages\");\r\nexports.RequestType = messages_1.RequestType;\r\nexports.RequestType0 = messages_1.RequestType0;\r\nexports.RequestType1 = messages_1.RequestType1;\r\nexports.RequestType2 = messages_1.RequestType2;\r\nexports.RequestType3 = messages_1.RequestType3;\r\nexports.RequestType4 = messages_1.RequestType4;\r\nexports.RequestType5 = messages_1.RequestType5;\r\nexports.RequestType6 = messages_1.RequestType6;\r\nexports.RequestType7 = messages_1.RequestType7;\r\nexports.RequestType8 = messages_1.RequestType8;\r\nexports.RequestType9 = messages_1.RequestType9;\r\nexports.ResponseError = messages_1.ResponseError;\r\nexports.ErrorCodes = messages_1.ErrorCodes;\r\nexports.NotificationType = messages_1.NotificationType;\r\nexports.NotificationType0 = messages_1.NotificationType0;\r\nexports.NotificationType1 = messages_1.NotificationType1;\r\nexports.NotificationType2 = messages_1.NotificationType2;\r\nexports.NotificationType3 = messages_1.NotificationType3;\r\nexports.NotificationType4 = messages_1.NotificationType4;\r\nexports.NotificationType5 = messages_1.NotificationType5;\r\nexports.NotificationType6 = messages_1.NotificationType6;\r\nexports.NotificationType7 = messages_1.NotificationType7;\r\nexports.NotificationType8 = messages_1.NotificationType8;\r\nexports.NotificationType9 = messages_1.NotificationType9;\r\nconst messageReader_1 = require(\"./messageReader\");\r\nexports.MessageReader = messageReader_1.MessageReader;\r\nexports.StreamMessageReader = messageReader_1.StreamMessageReader;\r\nexports.IPCMessageReader = messageReader_1.IPCMessageReader;\r\nexports.SocketMessageReader = messageReader_1.SocketMessageReader;\r\nconst messageWriter_1 = require(\"./messageWriter\");\r\nexports.MessageWriter = messageWriter_1.MessageWriter;\r\nexports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;\r\nexports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;\r\nexports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;\r\nconst events_1 = require(\"./events\");\r\nexports.Disposable = events_1.Disposable;\r\nexports.Event = events_1.Event;\r\nexports.Emitter = events_1.Emitter;\r\nconst cancellation_1 = require(\"./cancellation\");\r\nexports.CancellationTokenSource = cancellation_1.CancellationTokenSource;\r\nexports.CancellationToken = cancellation_1.CancellationToken;\r\nconst linkedMap_1 = require(\"./linkedMap\");\r\n__export(require(\"./pipeSupport\"));\r\n__export(require(\"./socketSupport\"));\r\nvar CancelNotification;\r\n(function (CancelNotification) {\r\n CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');\r\n})(CancelNotification || (CancelNotification = {}));\r\nvar ProgressNotification;\r\n(function (ProgressNotification) {\r\n ProgressNotification.type = new messages_1.NotificationType('$/progress');\r\n})(ProgressNotification || (ProgressNotification = {}));\r\nclass ProgressType {\r\n constructor() {\r\n }\r\n}\r\nexports.ProgressType = ProgressType;\r\nexports.NullLogger = Object.freeze({\r\n error: () => { },\r\n warn: () => { },\r\n info: () => { },\r\n log: () => { }\r\n});\r\nvar Trace;\r\n(function (Trace) {\r\n Trace[Trace[\"Off\"] = 0] = \"Off\";\r\n Trace[Trace[\"Messages\"] = 1] = \"Messages\";\r\n Trace[Trace[\"Verbose\"] = 2] = \"Verbose\";\r\n})(Trace = exports.Trace || (exports.Trace = {}));\r\n(function (Trace) {\r\n function fromString(value) {\r\n if (!Is.string(value)) {\r\n return Trace.Off;\r\n }\r\n value = value.toLowerCase();\r\n switch (value) {\r\n case 'off':\r\n return Trace.Off;\r\n case 'messages':\r\n return Trace.Messages;\r\n case 'verbose':\r\n return Trace.Verbose;\r\n default:\r\n return Trace.Off;\r\n }\r\n }\r\n Trace.fromString = fromString;\r\n function toString(value) {\r\n switch (value) {\r\n case Trace.Off:\r\n return 'off';\r\n case Trace.Messages:\r\n return 'messages';\r\n case Trace.Verbose:\r\n return 'verbose';\r\n default:\r\n return 'off';\r\n }\r\n }\r\n Trace.toString = toString;\r\n})(Trace = exports.Trace || (exports.Trace = {}));\r\nvar TraceFormat;\r\n(function (TraceFormat) {\r\n TraceFormat[\"Text\"] = \"text\";\r\n TraceFormat[\"JSON\"] = \"json\";\r\n})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));\r\n(function (TraceFormat) {\r\n function fromString(value) {\r\n value = value.toLowerCase();\r\n if (value === 'json') {\r\n return TraceFormat.JSON;\r\n }\r\n else {\r\n return TraceFormat.Text;\r\n }\r\n }\r\n TraceFormat.fromString = fromString;\r\n})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));\r\nvar SetTraceNotification;\r\n(function (SetTraceNotification) {\r\n SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');\r\n})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));\r\nvar LogTraceNotification;\r\n(function (LogTraceNotification) {\r\n LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');\r\n})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));\r\nvar ConnectionErrors;\r\n(function (ConnectionErrors) {\r\n /**\r\n * The connection is closed.\r\n */\r\n ConnectionErrors[ConnectionErrors[\"Closed\"] = 1] = \"Closed\";\r\n /**\r\n * The connection got disposed.\r\n */\r\n ConnectionErrors[ConnectionErrors[\"Disposed\"] = 2] = \"Disposed\";\r\n /**\r\n * The connection is already in listening mode.\r\n */\r\n ConnectionErrors[ConnectionErrors[\"AlreadyListening\"] = 3] = \"AlreadyListening\";\r\n})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));\r\nclass ConnectionError extends Error {\r\n constructor(code, message) {\r\n super(message);\r\n this.code = code;\r\n Object.setPrototypeOf(this, ConnectionError.prototype);\r\n }\r\n}\r\nexports.ConnectionError = ConnectionError;\r\nvar ConnectionStrategy;\r\n(function (ConnectionStrategy) {\r\n function is(value) {\r\n let candidate = value;\r\n return candidate && Is.func(candidate.cancelUndispatched);\r\n }\r\n ConnectionStrategy.is = is;\r\n})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));\r\nvar ConnectionState;\r\n(function (ConnectionState) {\r\n ConnectionState[ConnectionState[\"New\"] = 1] = \"New\";\r\n ConnectionState[ConnectionState[\"Listening\"] = 2] = \"Listening\";\r\n ConnectionState[ConnectionState[\"Closed\"] = 3] = \"Closed\";\r\n ConnectionState[ConnectionState[\"Disposed\"] = 4] = \"Disposed\";\r\n})(ConnectionState || (ConnectionState = {}));\r\nfunction _createMessageConnection(messageReader, messageWriter, logger, strategy) {\r\n let sequenceNumber = 0;\r\n let notificationSquenceNumber = 0;\r\n let unknownResponseSquenceNumber = 0;\r\n const version = '2.0';\r\n let starRequestHandler = undefined;\r\n let requestHandlers = Object.create(null);\r\n let starNotificationHandler = undefined;\r\n let notificationHandlers = Object.create(null);\r\n let progressHandlers = new Map();\r\n let timer;\r\n let messageQueue = new linkedMap_1.LinkedMap();\r\n let responsePromises = Object.create(null);\r\n let requestTokens = Object.create(null);\r\n let trace = Trace.Off;\r\n let traceFormat = TraceFormat.Text;\r\n let tracer;\r\n let state = ConnectionState.New;\r\n let errorEmitter = new events_1.Emitter();\r\n let closeEmitter = new events_1.Emitter();\r\n let unhandledNotificationEmitter = new events_1.Emitter();\r\n let unhandledProgressEmitter = new events_1.Emitter();\r\n let disposeEmitter = new events_1.Emitter();\r\n function createRequestQueueKey(id) {\r\n return 'req-' + id.toString();\r\n }\r\n function createResponseQueueKey(id) {\r\n if (id === null) {\r\n return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();\r\n }\r\n else {\r\n return 'res-' + id.toString();\r\n }\r\n }\r\n function createNotificationQueueKey() {\r\n return 'not-' + (++notificationSquenceNumber).toString();\r\n }\r\n function addMessageToQueue(queue, message) {\r\n if (messages_1.isRequestMessage(message)) {\r\n queue.set(createRequestQueueKey(message.id), message);\r\n }\r\n else if (messages_1.isResponseMessage(message)) {\r\n queue.set(createResponseQueueKey(message.id), message);\r\n }\r\n else {\r\n queue.set(createNotificationQueueKey(), message);\r\n }\r\n }\r\n function cancelUndispatched(_message) {\r\n return undefined;\r\n }\r\n function isListening() {\r\n return state === ConnectionState.Listening;\r\n }\r\n function isClosed() {\r\n return state === ConnectionState.Closed;\r\n }\r\n function isDisposed() {\r\n return state === ConnectionState.Disposed;\r\n }\r\n function closeHandler() {\r\n if (state === ConnectionState.New || state === ConnectionState.Listening) {\r\n state = ConnectionState.Closed;\r\n closeEmitter.fire(undefined);\r\n }\r\n // If the connection is disposed don't sent close events.\r\n }\r\n function readErrorHandler(error) {\r\n errorEmitter.fire([error, undefined, undefined]);\r\n }\r\n function writeErrorHandler(data) {\r\n errorEmitter.fire(data);\r\n }\r\n messageReader.onClose(closeHandler);\r\n messageReader.onError(readErrorHandler);\r\n messageWriter.onClose(closeHandler);\r\n messageWriter.onError(writeErrorHandler);\r\n function triggerMessageQueue() {\r\n if (timer || messageQueue.size === 0) {\r\n return;\r\n }\r\n timer = setImmediate(() => {\r\n timer = undefined;\r\n processMessageQueue();\r\n });\r\n }\r\n function processMessageQueue() {\r\n if (messageQueue.size === 0) {\r\n return;\r\n }\r\n let message = messageQueue.shift();\r\n try {\r\n if (messages_1.isRequestMessage(message)) {\r\n handleRequest(message);\r\n }\r\n else if (messages_1.isNotificationMessage(message)) {\r\n handleNotification(message);\r\n }\r\n else if (messages_1.isResponseMessage(message)) {\r\n handleResponse(message);\r\n }\r\n else {\r\n handleInvalidMessage(message);\r\n }\r\n }\r\n finally {\r\n triggerMessageQueue();\r\n }\r\n }\r\n let callback = (message) => {\r\n try {\r\n // We have received a cancellation message. Check if the message is still in the queue\r\n // and cancel it if allowed to do so.\r\n if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {\r\n let key = createRequestQueueKey(message.params.id);\r\n let toCancel = messageQueue.get(key);\r\n if (messages_1.isRequestMessage(toCancel)) {\r\n let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);\r\n if (response && (response.error !== void 0 || response.result !== void 0)) {\r\n messageQueue.delete(key);\r\n response.id = toCancel.id;\r\n traceSendingResponse(response, message.method, Date.now());\r\n messageWriter.write(response);\r\n return;\r\n }\r\n }\r\n }\r\n addMessageToQueue(messageQueue, message);\r\n }\r\n finally {\r\n triggerMessageQueue();\r\n }\r\n };\r\n function handleRequest(requestMessage) {\r\n if (isDisposed()) {\r\n // we return here silently since we fired an event when the\r\n // connection got disposed.\r\n return;\r\n }\r\n function reply(resultOrError, method, startTime) {\r\n let message = {\r\n jsonrpc: version,\r\n id: requestMessage.id\r\n };\r\n if (resultOrError instanceof messages_1.ResponseError) {\r\n message.error = resultOrError.toJson();\r\n }\r\n else {\r\n message.result = resultOrError === void 0 ? null : resultOrError;\r\n }\r\n traceSendingResponse(message, method, startTime);\r\n messageWriter.write(message);\r\n }\r\n function replyError(error, method, startTime) {\r\n let message = {\r\n jsonrpc: version,\r\n id: requestMessage.id,\r\n error: error.toJson()\r\n };\r\n traceSendingResponse(message, method, startTime);\r\n messageWriter.write(message);\r\n }\r\n function replySuccess(result, method, startTime) {\r\n // The JSON RPC defines that a response must either have a result or an error\r\n // So we can't treat undefined as a valid response result.\r\n if (result === void 0) {\r\n result = null;\r\n }\r\n let message = {\r\n jsonrpc: version,\r\n id: requestMessage.id,\r\n result: result\r\n };\r\n traceSendingResponse(message, method, startTime);\r\n messageWriter.write(message);\r\n }\r\n traceReceivedRequest(requestMessage);\r\n let element = requestHandlers[requestMessage.method];\r\n let type;\r\n let requestHandler;\r\n if (element) {\r\n type = element.type;\r\n requestHandler = element.handler;\r\n }\r\n let startTime = Date.now();\r\n if (requestHandler || starRequestHandler) {\r\n let cancellationSource = new cancellation_1.CancellationTokenSource();\r\n let tokenKey = String(requestMessage.id);\r\n requestTokens[tokenKey] = cancellationSource;\r\n try {\r\n let handlerResult;\r\n if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {\r\n handlerResult = requestHandler\r\n ? requestHandler(cancellationSource.token)\r\n : starRequestHandler(requestMessage.method, cancellationSource.token);\r\n }\r\n else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {\r\n handlerResult = requestHandler\r\n ? requestHandler(...requestMessage.params, cancellationSource.token)\r\n : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);\r\n }\r\n else {\r\n handlerResult = requestHandler\r\n ? requestHandler(requestMessage.params, cancellationSource.token)\r\n : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);\r\n }\r\n let promise = handlerResult;\r\n if (!handlerResult) {\r\n delete requestTokens[tokenKey];\r\n replySuccess(handlerResult, requestMessage.method, startTime);\r\n }\r\n else if (promise.then) {\r\n promise.then((resultOrError) => {\r\n delete requestTokens[tokenKey];\r\n reply(resultOrError, requestMessage.method, startTime);\r\n }, error => {\r\n delete requestTokens[tokenKey];\r\n if (error instanceof messages_1.ResponseError) {\r\n replyError(error, requestMessage.method, startTime);\r\n }\r\n else if (error && Is.string(error.message)) {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\r\n }\r\n else {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\r\n }\r\n });\r\n }\r\n else {\r\n delete requestTokens[tokenKey];\r\n reply(handlerResult, requestMessage.method, startTime);\r\n }\r\n }\r\n catch (error) {\r\n delete requestTokens[tokenKey];\r\n if (error instanceof messages_1.ResponseError) {\r\n reply(error, requestMessage.method, startTime);\r\n }\r\n else if (error && Is.string(error.message)) {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\r\n }\r\n else {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\r\n }\r\n }\r\n }\r\n else {\r\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);\r\n }\r\n }\r\n function handleResponse(responseMessage) {\r\n if (isDisposed()) {\r\n // See handle request.\r\n return;\r\n }\r\n if (responseMessage.id === null) {\r\n if (responseMessage.error) {\r\n logger.error(`Received response message without id: Error is: \\n${JSON.stringify(responseMessage.error, undefined, 4)}`);\r\n }\r\n else {\r\n logger.error(`Received response message without id. No further error information provided.`);\r\n }\r\n }\r\n else {\r\n let key = String(responseMessage.id);\r\n let responsePromise = responsePromises[key];\r\n traceReceivedResponse(responseMessage, responsePromise);\r\n if (responsePromise) {\r\n delete responsePromises[key];\r\n try {\r\n if (responseMessage.error) {\r\n let error = responseMessage.error;\r\n responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\r\n }\r\n else if (responseMessage.result !== void 0) {\r\n responsePromise.resolve(responseMessage.result);\r\n }\r\n else {\r\n throw new Error('Should never happen.');\r\n }\r\n }\r\n catch (error) {\r\n if (error.message) {\r\n logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);\r\n }\r\n else {\r\n logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n function handleNotification(message) {\r\n if (isDisposed()) {\r\n // See handle request.\r\n return;\r\n }\r\n let type = undefined;\r\n let notificationHandler;\r\n if (message.method === CancelNotification.type.method) {\r\n notificationHandler = (params) => {\r\n let id = params.id;\r\n let source = requestTokens[String(id)];\r\n if (source) {\r\n source.cancel();\r\n }\r\n };\r\n }\r\n else {\r\n let element = notificationHandlers[message.method];\r\n if (element) {\r\n notificationHandler = element.handler;\r\n type = element.type;\r\n }\r\n }\r\n if (notificationHandler || starNotificationHandler) {\r\n try {\r\n traceReceivedNotification(message);\r\n if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {\r\n notificationHandler ? notificationHandler() : starNotificationHandler(message.method);\r\n }\r\n else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {\r\n notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);\r\n }\r\n else {\r\n notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);\r\n }\r\n }\r\n catch (error) {\r\n if (error.message) {\r\n logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);\r\n }\r\n else {\r\n logger.error(`Notification handler '${message.method}' failed unexpectedly.`);\r\n }\r\n }\r\n }\r\n else {\r\n unhandledNotificationEmitter.fire(message);\r\n }\r\n }\r\n function handleInvalidMessage(message) {\r\n if (!message) {\r\n logger.error('Received empty message.');\r\n return;\r\n }\r\n logger.error(`Received message which is neither a response nor a notification message:\\n${JSON.stringify(message, null, 4)}`);\r\n // Test whether we find an id to reject the promise\r\n let responseMessage = message;\r\n if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {\r\n let key = String(responseMessage.id);\r\n let responseHandler = responsePromises[key];\r\n if (responseHandler) {\r\n responseHandler.reject(new Error('The received response has neither a result nor an error property.'));\r\n }\r\n }\r\n }\r\n function traceSendingRequest(message) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n if (traceFormat === TraceFormat.Text) {\r\n let data = undefined;\r\n if (trace === Trace.Verbose && message.params) {\r\n data = `Params: ${JSON.stringify(message.params, null, 4)}\\n\\n`;\r\n }\r\n tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);\r\n }\r\n else {\r\n logLSPMessage('send-request', message);\r\n }\r\n }\r\n function traceSendingNotification(message) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n if (traceFormat === TraceFormat.Text) {\r\n let data = undefined;\r\n if (trace === Trace.Verbose) {\r\n if (message.params) {\r\n data = `Params: ${JSON.stringify(message.params, null, 4)}\\n\\n`;\r\n }\r\n else {\r\n data = 'No parameters provided.\\n\\n';\r\n }\r\n }\r\n tracer.log(`Sending notification '${message.method}'.`, data);\r\n }\r\n else {\r\n logLSPMessage('send-notification', message);\r\n }\r\n }\r\n function traceSendingResponse(message, method, startTime) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n if (traceFormat === TraceFormat.Text) {\r\n let data = undefined;\r\n if (trace === Trace.Verbose) {\r\n if (message.error && message.error.data) {\r\n data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\\n\\n`;\r\n }\r\n else {\r\n if (message.result) {\r\n data = `Result: ${JSON.stringify(message.result, null, 4)}\\n\\n`;\r\n }\r\n else if (message.error === void 0) {\r\n data = 'No result returned.\\n\\n';\r\n }\r\n }\r\n }\r\n tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);\r\n }\r\n else {\r\n logLSPMessage('send-response', message);\r\n }\r\n }\r\n function traceReceivedRequest(message) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n if (traceFormat === TraceFormat.Text) {\r\n let data = undefined;\r\n if (trace === Trace.Verbose && message.params) {\r\n data = `Params: ${JSON.stringify(message.params, null, 4)}\\n\\n`;\r\n }\r\n tracer.log(`Received request '${message.method} - (${message.id})'.`, data);\r\n }\r\n else {\r\n logLSPMessage('receive-request', message);\r\n }\r\n }\r\n function traceReceivedNotification(message) {\r\n if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {\r\n return;\r\n }\r\n if (traceFormat === TraceFormat.Text) {\r\n let data = undefined;\r\n if (trace === Trace.Verbose) {\r\n if (message.params) {\r\n data = `Params: ${JSON.stringify(message.params, null, 4)}\\n\\n`;\r\n }\r\n else {\r\n data = 'No parameters provided.\\n\\n';\r\n }\r\n }\r\n tracer.log(`Received notification '${message.method}'.`, data);\r\n }\r\n else {\r\n logLSPMessage('receive-notification', message);\r\n }\r\n }\r\n function traceReceivedResponse(message, responsePromise) {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n if (traceFormat === TraceFormat.Text) {\r\n let data = undefined;\r\n if (trace === Trace.Verbose) {\r\n if (message.error && message.error.data) {\r\n data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\\n\\n`;\r\n }\r\n else {\r\n if (message.result) {\r\n data = `Result: ${JSON.stringify(message.result, null, 4)}\\n\\n`;\r\n }\r\n else if (message.error === void 0) {\r\n data = 'No result returned.\\n\\n';\r\n }\r\n }\r\n }\r\n if (responsePromise) {\r\n let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';\r\n tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);\r\n }\r\n else {\r\n tracer.log(`Received response ${message.id} without active response promise.`, data);\r\n }\r\n }\r\n else {\r\n logLSPMessage('receive-response', message);\r\n }\r\n }\r\n function logLSPMessage(type, message) {\r\n if (!tracer || trace === Trace.Off) {\r\n return;\r\n }\r\n const lspMessage = {\r\n isLSPMessage: true,\r\n type,\r\n message,\r\n timestamp: Date.now()\r\n };\r\n tracer.log(lspMessage);\r\n }\r\n function throwIfClosedOrDisposed() {\r\n if (isClosed()) {\r\n throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');\r\n }\r\n if (isDisposed()) {\r\n throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');\r\n }\r\n }\r\n function throwIfListening() {\r\n if (isListening()) {\r\n throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');\r\n }\r\n }\r\n function throwIfNotListening() {\r\n if (!isListening()) {\r\n throw new Error('Call listen() first.');\r\n }\r\n }\r\n function undefinedToNull(param) {\r\n if (param === void 0) {\r\n return null;\r\n }\r\n else {\r\n return param;\r\n }\r\n }\r\n function computeMessageParams(type, params) {\r\n let result;\r\n let numberOfParams = type.numberOfParams;\r\n switch (numberOfParams) {\r\n case 0:\r\n result = null;\r\n break;\r\n case 1:\r\n result = undefinedToNull(params[0]);\r\n break;\r\n default:\r\n result = [];\r\n for (let i = 0; i < params.length && i < numberOfParams; i++) {\r\n result.push(undefinedToNull(params[i]));\r\n }\r\n if (params.length < numberOfParams) {\r\n for (let i = params.length; i < numberOfParams; i++) {\r\n result.push(null);\r\n }\r\n }\r\n break;\r\n }\r\n return result;\r\n }\r\n let connection = {\r\n sendNotification: (type, ...params) => {\r\n throwIfClosedOrDisposed();\r\n let method;\r\n let messageParams;\r\n if (Is.string(type)) {\r\n method = type;\r\n switch (params.length) {\r\n case 0:\r\n messageParams = null;\r\n break;\r\n case 1:\r\n messageParams = params[0];\r\n break;\r\n default:\r\n messageParams = params;\r\n break;\r\n }\r\n }\r\n else {\r\n method = type.method;\r\n messageParams = computeMessageParams(type, params);\r\n }\r\n let notificationMessage = {\r\n jsonrpc: version,\r\n method: method,\r\n params: messageParams\r\n };\r\n traceSendingNotification(notificationMessage);\r\n messageWriter.write(notificationMessage);\r\n },\r\n onNotification: (type, handler) => {\r\n throwIfClosedOrDisposed();\r\n if (Is.func(type)) {\r\n starNotificationHandler = type;\r\n }\r\n else if (handler) {\r\n if (Is.string(type)) {\r\n notificationHandlers[type] = { type: undefined, handler };\r\n }\r\n else {\r\n notificationHandlers[type.method] = { type, handler };\r\n }\r\n }\r\n },\r\n onProgress: (_type, token, handler) => {\r\n if (progressHandlers.has(token)) {\r\n throw new Error(`Progress handler for token ${token} already registered`);\r\n }\r\n progressHandlers.set(token, handler);\r\n return {\r\n dispose: () => {\r\n progressHandlers.delete(token);\r\n }\r\n };\r\n },\r\n sendProgress: (_type, token, value) => {\r\n connection.sendNotification(ProgressNotification.type, { token, value });\r\n },\r\n onUnhandledProgress: unhandledProgressEmitter.event,\r\n sendRequest: (type, ...params) => {\r\n throwIfClosedOrDisposed();\r\n throwIfNotListening();\r\n let method;\r\n let messageParams;\r\n let token = undefined;\r\n if (Is.string(type)) {\r\n method = type;\r\n switch (params.length) {\r\n case 0:\r\n messageParams = null;\r\n break;\r\n case 1:\r\n // The cancellation token is optional so it can also be undefined.\r\n if (cancellation_1.CancellationToken.is(params[0])) {\r\n messageParams = null;\r\n token = params[0];\r\n }\r\n else {\r\n messageParams = undefinedToNull(params[0]);\r\n }\r\n break;\r\n default:\r\n const last = params.length - 1;\r\n if (cancellation_1.CancellationToken.is(params[last])) {\r\n token = params[last];\r\n if (params.length === 2) {\r\n messageParams = undefinedToNull(params[0]);\r\n }\r\n else {\r\n messageParams = params.slice(0, last).map(value => undefinedToNull(value));\r\n }\r\n }\r\n else {\r\n messageParams = params.map(value => undefinedToNull(value));\r\n }\r\n break;\r\n }\r\n }\r\n else {\r\n method = type.method;\r\n messageParams = computeMessageParams(type, params);\r\n let numberOfParams = type.numberOfParams;\r\n token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;\r\n }\r\n let id = sequenceNumber++;\r\n let result = new Promise((resolve, reject) => {\r\n let requestMessage = {\r\n jsonrpc: version,\r\n id: id,\r\n method: method,\r\n params: messageParams\r\n };\r\n let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };\r\n traceSendingRequest(requestMessage);\r\n try {\r\n messageWriter.write(requestMessage);\r\n }\r\n catch (e) {\r\n // Writing the message failed. So we need to reject the promise.\r\n responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));\r\n responsePromise = null;\r\n }\r\n if (responsePromise) {\r\n responsePromises[String(id)] = responsePromise;\r\n }\r\n });\r\n if (token) {\r\n token.onCancellationRequested(() => {\r\n connection.sendNotification(CancelNotification.type, { id });\r\n });\r\n }\r\n return result;\r\n },\r\n onRequest: (type, handler) => {\r\n throwIfClosedOrDisposed();\r\n if (Is.func(type)) {\r\n starRequestHandler = type;\r\n }\r\n else if (handler) {\r\n if (Is.string(type)) {\r\n requestHandlers[type] = { type: undefined, handler };\r\n }\r\n else {\r\n requestHandlers[type.method] = { type, handler };\r\n }\r\n }\r\n },\r\n trace: (_value, _tracer, sendNotificationOrTraceOptions) => {\r\n let _sendNotification = false;\r\n let _traceFormat = TraceFormat.Text;\r\n if (sendNotificationOrTraceOptions !== void 0) {\r\n if (Is.boolean(sendNotificationOrTraceOptions)) {\r\n _sendNotification = sendNotificationOrTraceOptions;\r\n }\r\n else {\r\n _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;\r\n _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;\r\n }\r\n }\r\n trace = _value;\r\n traceFormat = _traceFormat;\r\n if (trace === Trace.Off) {\r\n tracer = undefined;\r\n }\r\n else {\r\n tracer = _tracer;\r\n }\r\n if (_sendNotification && !isClosed() && !isDisposed()) {\r\n connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });\r\n }\r\n },\r\n onError: errorEmitter.event,\r\n onClose: closeEmitter.event,\r\n onUnhandledNotification: unhandledNotificationEmitter.event,\r\n onDispose: disposeEmitter.event,\r\n dispose: () => {\r\n if (isDisposed()) {\r\n return;\r\n }\r\n state = ConnectionState.Disposed;\r\n disposeEmitter.fire(undefined);\r\n let error = new Error('Connection got disposed.');\r\n Object.keys(responsePromises).forEach((key) => {\r\n responsePromises[key].reject(error);\r\n });\r\n responsePromises = Object.create(null);\r\n requestTokens = Object.create(null);\r\n messageQueue = new linkedMap_1.LinkedMap();\r\n // Test for backwards compatibility\r\n if (Is.func(messageWriter.dispose)) {\r\n messageWriter.dispose();\r\n }\r\n if (Is.func(messageReader.dispose)) {\r\n messageReader.dispose();\r\n }\r\n },\r\n listen: () => {\r\n throwIfClosedOrDisposed();\r\n throwIfListening();\r\n state = ConnectionState.Listening;\r\n messageReader.listen(callback);\r\n },\r\n inspect: () => {\r\n // eslint-disable-next-line no-console\r\n console.log('inspect');\r\n }\r\n };\r\n connection.onNotification(LogTraceNotification.type, (params) => {\r\n if (trace === Trace.Off || !tracer) {\r\n return;\r\n }\r\n tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);\r\n });\r\n connection.onNotification(ProgressNotification.type, (params) => {\r\n const handler = progressHandlers.get(params.token);\r\n if (handler) {\r\n handler(params.value);\r\n }\r\n else {\r\n unhandledProgressEmitter.fire(params);\r\n }\r\n });\r\n return connection;\r\n}\r\nfunction isMessageReader(value) {\r\n return value.listen !== void 0 && value.read === void 0;\r\n}\r\nfunction isMessageWriter(value) {\r\n return value.write !== void 0 && value.end === void 0;\r\n}\r\nfunction createMessageConnection(input, output, logger, strategy) {\r\n if (!logger) {\r\n logger = exports.NullLogger;\r\n }\r\n let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);\r\n let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);\r\n return _createMessageConnection(reader, writer, logger, strategy);\r\n}\r\nexports.createMessageConnection = createMessageConnection;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst vscode_jsonrpc_1 = require(\"vscode-jsonrpc\");\r\nclass ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {\r\n constructor(method) {\r\n super(method);\r\n }\r\n}\r\nexports.ProtocolRequestType0 = ProtocolRequestType0;\r\nclass ProtocolRequestType extends vscode_jsonrpc_1.RequestType {\r\n constructor(method) {\r\n super(method);\r\n }\r\n}\r\nexports.ProtocolRequestType = ProtocolRequestType;\r\nclass ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {\r\n constructor(method) {\r\n super(method);\r\n }\r\n}\r\nexports.ProtocolNotificationType = ProtocolNotificationType;\r\nclass ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {\r\n constructor(method) {\r\n super(method);\r\n }\r\n}\r\nexports.ProtocolNotificationType0 = ProtocolNotificationType0;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nfunction boolean(value) {\r\n return value === true || value === false;\r\n}\r\nexports.boolean = boolean;\r\nfunction string(value) {\r\n return typeof value === 'string' || value instanceof String;\r\n}\r\nexports.string = string;\r\nfunction number(value) {\r\n return typeof value === 'number' || value instanceof Number;\r\n}\r\nexports.number = number;\r\nfunction error(value) {\r\n return value instanceof Error;\r\n}\r\nexports.error = error;\r\nfunction func(value) {\r\n return typeof value === 'function';\r\n}\r\nexports.func = func;\r\nfunction array(value) {\r\n return Array.isArray(value);\r\n}\r\nexports.array = array;\r\nfunction stringArray(value) {\r\n return array(value) && value.every(elem => string(elem));\r\n}\r\nexports.stringArray = stringArray;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Disposable;\r\n(function (Disposable) {\r\n function create(func) {\r\n return {\r\n dispose: func\r\n };\r\n }\r\n Disposable.create = create;\r\n})(Disposable = exports.Disposable || (exports.Disposable = {}));\r\nvar Event;\r\n(function (Event) {\r\n const _disposable = { dispose() { } };\r\n Event.None = function () { return _disposable; };\r\n})(Event = exports.Event || (exports.Event = {}));\r\nclass CallbackList {\r\n add(callback, context = null, bucket) {\r\n if (!this._callbacks) {\r\n this._callbacks = [];\r\n this._contexts = [];\r\n }\r\n this._callbacks.push(callback);\r\n this._contexts.push(context);\r\n if (Array.isArray(bucket)) {\r\n bucket.push({ dispose: () => this.remove(callback, context) });\r\n }\r\n }\r\n remove(callback, context = null) {\r\n if (!this._callbacks) {\r\n return;\r\n }\r\n var foundCallbackWithDifferentContext = false;\r\n for (var i = 0, len = this._callbacks.length; i < len; i++) {\r\n if (this._callbacks[i] === callback) {\r\n if (this._contexts[i] === context) {\r\n // callback & context match => remove it\r\n this._callbacks.splice(i, 1);\r\n this._contexts.splice(i, 1);\r\n return;\r\n }\r\n else {\r\n foundCallbackWithDifferentContext = true;\r\n }\r\n }\r\n }\r\n if (foundCallbackWithDifferentContext) {\r\n throw new Error('When adding a listener with a context, you should remove it with the same context');\r\n }\r\n }\r\n invoke(...args) {\r\n if (!this._callbacks) {\r\n return [];\r\n }\r\n var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; i++) {\r\n try {\r\n ret.push(callbacks[i].apply(contexts[i], args));\r\n }\r\n catch (e) {\r\n // eslint-disable-next-line no-console\r\n console.error(e);\r\n }\r\n }\r\n return ret;\r\n }\r\n isEmpty() {\r\n return !this._callbacks || this._callbacks.length === 0;\r\n }\r\n dispose() {\r\n this._callbacks = undefined;\r\n this._contexts = undefined;\r\n }\r\n}\r\nclass Emitter {\r\n constructor(_options) {\r\n this._options = _options;\r\n }\r\n /**\r\n * For the public to allow to subscribe\r\n * to events from this Emitter\r\n */\r\n get event() {\r\n if (!this._event) {\r\n this._event = (listener, thisArgs, disposables) => {\r\n if (!this._callbacks) {\r\n this._callbacks = new CallbackList();\r\n }\r\n if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {\r\n this._options.onFirstListenerAdd(this);\r\n }\r\n this._callbacks.add(listener, thisArgs);\r\n let result;\r\n result = {\r\n dispose: () => {\r\n this._callbacks.remove(listener, thisArgs);\r\n result.dispose = Emitter._noop;\r\n if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {\r\n this._options.onLastListenerRemove(this);\r\n }\r\n }\r\n };\r\n if (Array.isArray(disposables)) {\r\n disposables.push(result);\r\n }\r\n return result;\r\n };\r\n }\r\n return this._event;\r\n }\r\n /**\r\n * To be kept private to fire an event to\r\n * subscribers\r\n */\r\n fire(event) {\r\n if (this._callbacks) {\r\n this._callbacks.invoke.call(this._callbacks, event);\r\n }\r\n }\r\n dispose() {\r\n if (this._callbacks) {\r\n this._callbacks.dispose();\r\n this._callbacks = undefined;\r\n }\r\n }\r\n}\r\nexports.Emitter = Emitter;\r\nEmitter._noop = function () { };\r\n","/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst vscode_jsonrpc_1 = require(\"vscode-jsonrpc\");\nexports.Disposable = vscode_jsonrpc_1.Disposable;\nexports.CancellationToken = vscode_jsonrpc_1.CancellationToken;\nexports.Event = vscode_jsonrpc_1.Event;\nexports.Emitter = vscode_jsonrpc_1.Emitter;\n__export(require(\"vscode-languageserver-protocol/lib/main\"));\nvar Services;\n(function (Services) {\n const global = window;\n const symbol = Symbol('Services');\n Services.get = () => {\n const services = global[symbol];\n if (!services) {\n throw new Error('Language Client services has not been installed');\n }\n return services;\n };\n function install(services) {\n if (global[symbol]) {\n console.error(new Error('Language Client services has been overridden'));\n }\n global[symbol] = services;\n return vscode_jsonrpc_1.Disposable.create(() => global[symbol] = undefined);\n }\n Services.install = install;\n})(Services = exports.Services || (exports.Services = {}));\nfunction isDocumentSelector(selector) {\n if (!selector || !Array.isArray(selector)) {\n return false;\n }\n return selector.every(value => typeof value === 'string' || vscode_languageserver_protocol_1.DocumentFilter.is(value));\n}\nexports.isDocumentSelector = isDocumentSelector;\nvar SignatureHelpTriggerKind;\n(function (SignatureHelpTriggerKind) {\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"Invoke\"] = 1] = \"Invoke\";\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"TriggerCharacter\"] = 2] = \"TriggerCharacter\";\n SignatureHelpTriggerKind[SignatureHelpTriggerKind[\"ContentChange\"] = 3] = \"ContentChange\";\n})(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));\n// runtime support\nvar VsCodeDiagnosticSeverity;\n(function (VsCodeDiagnosticSeverity) {\n VsCodeDiagnosticSeverity[VsCodeDiagnosticSeverity[\"Error\"] = 0] = \"Error\";\n VsCodeDiagnosticSeverity[VsCodeDiagnosticSeverity[\"Warning\"] = 1] = \"Warning\";\n VsCodeDiagnosticSeverity[VsCodeDiagnosticSeverity[\"Information\"] = 2] = \"Information\";\n VsCodeDiagnosticSeverity[VsCodeDiagnosticSeverity[\"Hint\"] = 3] = \"Hint\";\n})(VsCodeDiagnosticSeverity = exports.VsCodeDiagnosticSeverity || (exports.VsCodeDiagnosticSeverity = {}));\nvar DocumentIdentifier;\n(function (DocumentIdentifier) {\n function is(arg) {\n return !!arg && ('uri' in arg) && ('languageId' in arg);\n }\n DocumentIdentifier.is = is;\n})(DocumentIdentifier = exports.DocumentIdentifier || (exports.DocumentIdentifier = {}));\nvar ConfigurationTarget;\n(function (ConfigurationTarget) {\n ConfigurationTarget[ConfigurationTarget[\"Global\"] = 1] = \"Global\";\n ConfigurationTarget[ConfigurationTarget[\"Workspace\"] = 2] = \"Workspace\";\n ConfigurationTarget[ConfigurationTarget[\"WorkspaceFolder\"] = 3] = \"WorkspaceFolder\";\n})(ConfigurationTarget = exports.ConfigurationTarget || (exports.ConfigurationTarget = {}));\n//# sourceMappingURL=services.js.map","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst events_1 = require(\"./events\");\r\nconst Is = require(\"./is\");\r\nlet DefaultSize = 8192;\r\nlet CR = Buffer.from('\\r', 'ascii')[0];\r\nlet LF = Buffer.from('\\n', 'ascii')[0];\r\nlet CRLF = '\\r\\n';\r\nclass MessageBuffer {\r\n constructor(encoding = 'utf8') {\r\n this.encoding = encoding;\r\n this.index = 0;\r\n this.buffer = Buffer.allocUnsafe(DefaultSize);\r\n }\r\n append(chunk) {\r\n var toAppend = chunk;\r\n if (typeof (chunk) === 'string') {\r\n var str = chunk;\r\n var bufferLen = Buffer.byteLength(str, this.encoding);\r\n toAppend = Buffer.allocUnsafe(bufferLen);\r\n toAppend.write(str, 0, bufferLen, this.encoding);\r\n }\r\n if (this.buffer.length - this.index >= toAppend.length) {\r\n toAppend.copy(this.buffer, this.index, 0, toAppend.length);\r\n }\r\n else {\r\n var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;\r\n if (this.index === 0) {\r\n this.buffer = Buffer.allocUnsafe(newSize);\r\n toAppend.copy(this.buffer, 0, 0, toAppend.length);\r\n }\r\n else {\r\n this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);\r\n }\r\n }\r\n this.index += toAppend.length;\r\n }\r\n tryReadHeaders() {\r\n let result = undefined;\r\n let current = 0;\r\n while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {\r\n current++;\r\n }\r\n // No header / body separator found (e.g CRLFCRLF)\r\n if (current + 3 >= this.index) {\r\n return result;\r\n }\r\n result = Object.create(null);\r\n let headers = this.buffer.toString('ascii', 0, current).split(CRLF);\r\n headers.forEach((header) => {\r\n let index = header.indexOf(':');\r\n if (index === -1) {\r\n throw new Error('Message header must separate key and value using :');\r\n }\r\n let key = header.substr(0, index);\r\n let value = header.substr(index + 1).trim();\r\n result[key] = value;\r\n });\r\n let nextStart = current + 4;\r\n this.buffer = this.buffer.slice(nextStart);\r\n this.index = this.index - nextStart;\r\n return result;\r\n }\r\n tryReadContent(length) {\r\n if (this.index < length) {\r\n return null;\r\n }\r\n let result = this.buffer.toString(this.encoding, 0, length);\r\n let nextStart = length;\r\n this.buffer.copy(this.buffer, 0, nextStart);\r\n this.index = this.index - nextStart;\r\n return result;\r\n }\r\n get numberOfBytes() {\r\n return this.index;\r\n }\r\n}\r\nvar MessageReader;\r\n(function (MessageReader) {\r\n function is(value) {\r\n let candidate = value;\r\n return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&\r\n Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);\r\n }\r\n MessageReader.is = is;\r\n})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));\r\nclass AbstractMessageReader {\r\n constructor() {\r\n this.errorEmitter = new events_1.Emitter();\r\n this.closeEmitter = new events_1.Emitter();\r\n this.partialMessageEmitter = new events_1.Emitter();\r\n }\r\n dispose() {\r\n this.errorEmitter.dispose();\r\n this.closeEmitter.dispose();\r\n }\r\n get onError() {\r\n return this.errorEmitter.event;\r\n }\r\n fireError(error) {\r\n this.errorEmitter.fire(this.asError(error));\r\n }\r\n get onClose() {\r\n return this.closeEmitter.event;\r\n }\r\n fireClose() {\r\n this.closeEmitter.fire(undefined);\r\n }\r\n get onPartialMessage() {\r\n return this.partialMessageEmitter.event;\r\n }\r\n firePartialMessage(info) {\r\n this.partialMessageEmitter.fire(info);\r\n }\r\n asError(error) {\r\n if (error instanceof Error) {\r\n return error;\r\n }\r\n else {\r\n return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\r\n }\r\n }\r\n}\r\nexports.AbstractMessageReader = AbstractMessageReader;\r\nclass StreamMessageReader extends AbstractMessageReader {\r\n constructor(readable, encoding = 'utf8') {\r\n super();\r\n this.readable = readable;\r\n this.buffer = new MessageBuffer(encoding);\r\n this._partialMessageTimeout = 10000;\r\n }\r\n set partialMessageTimeout(timeout) {\r\n this._partialMessageTimeout = timeout;\r\n }\r\n get partialMessageTimeout() {\r\n return this._partialMessageTimeout;\r\n }\r\n listen(callback) {\r\n this.nextMessageLength = -1;\r\n this.messageToken = 0;\r\n this.partialMessageTimer = undefined;\r\n this.callback = callback;\r\n this.readable.on('data', (data) => {\r\n this.onData(data);\r\n });\r\n this.readable.on('error', (error) => this.fireError(error));\r\n this.readable.on('close', () => this.fireClose());\r\n }\r\n onData(data) {\r\n this.buffer.append(data);\r\n while (true) {\r\n if (this.nextMessageLength === -1) {\r\n let headers = this.buffer.tryReadHeaders();\r\n if (!headers) {\r\n return;\r\n }\r\n let contentLength = headers['Content-Length'];\r\n if (!contentLength) {\r\n throw new Error('Header must provide a Content-Length property.');\r\n }\r\n let length = parseInt(contentLength);\r\n if (isNaN(length)) {\r\n throw new Error('Content-Length value must be a number.');\r\n }\r\n this.nextMessageLength = length;\r\n // Take the encoding form the header. For compatibility\r\n // treat both utf-8 and utf8 as node utf8\r\n }\r\n var msg = this.buffer.tryReadContent(this.nextMessageLength);\r\n if (msg === null) {\r\n /** We haven't received the full message yet. */\r\n this.setPartialMessageTimer();\r\n return;\r\n }\r\n this.clearPartialMessageTimer();\r\n this.nextMessageLength = -1;\r\n this.messageToken++;\r\n var json = JSON.parse(msg);\r\n this.callback(json);\r\n }\r\n }\r\n clearPartialMessageTimer() {\r\n if (this.partialMessageTimer) {\r\n clearTimeout(this.partialMessageTimer);\r\n this.partialMessageTimer = undefined;\r\n }\r\n }\r\n setPartialMessageTimer() {\r\n this.clearPartialMessageTimer();\r\n if (this._partialMessageTimeout <= 0) {\r\n return;\r\n }\r\n this.partialMessageTimer = setTimeout((token, timeout) => {\r\n this.partialMessageTimer = undefined;\r\n if (token === this.messageToken) {\r\n this.firePartialMessage({ messageToken: token, waitingTime: timeout });\r\n this.setPartialMessageTimer();\r\n }\r\n }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);\r\n }\r\n}\r\nexports.StreamMessageReader = StreamMessageReader;\r\nclass IPCMessageReader extends AbstractMessageReader {\r\n constructor(process) {\r\n super();\r\n this.process = process;\r\n let eventEmitter = this.process;\r\n eventEmitter.on('error', (error) => this.fireError(error));\r\n eventEmitter.on('close', () => this.fireClose());\r\n }\r\n listen(callback) {\r\n this.process.on('message', callback);\r\n }\r\n}\r\nexports.IPCMessageReader = IPCMessageReader;\r\nclass SocketMessageReader extends StreamMessageReader {\r\n constructor(socket, encoding = 'utf-8') {\r\n super(socket, encoding);\r\n }\r\n}\r\nexports.SocketMessageReader = SocketMessageReader;\r\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst events_1 = require(\"./events\");\r\nconst Is = require(\"./is\");\r\nlet ContentLength = 'Content-Length: ';\r\nlet CRLF = '\\r\\n';\r\nvar MessageWriter;\r\n(function (MessageWriter) {\r\n function is(value) {\r\n let candidate = value;\r\n return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&\r\n Is.func(candidate.onError) && Is.func(candidate.write);\r\n }\r\n MessageWriter.is = is;\r\n})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));\r\nclass AbstractMessageWriter {\r\n constructor() {\r\n this.errorEmitter = new events_1.Emitter();\r\n this.closeEmitter = new events_1.Emitter();\r\n }\r\n dispose() {\r\n this.errorEmitter.dispose();\r\n this.closeEmitter.dispose();\r\n }\r\n get onError() {\r\n return this.errorEmitter.event;\r\n }\r\n fireError(error, message, count) {\r\n this.errorEmitter.fire([this.asError(error), message, count]);\r\n }\r\n get onClose() {\r\n return this.closeEmitter.event;\r\n }\r\n fireClose() {\r\n this.closeEmitter.fire(undefined);\r\n }\r\n asError(error) {\r\n if (error instanceof Error) {\r\n return error;\r\n }\r\n else {\r\n return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\r\n }\r\n }\r\n}\r\nexports.AbstractMessageWriter = AbstractMessageWriter;\r\nclass StreamMessageWriter extends AbstractMessageWriter {\r\n constructor(writable, encoding = 'utf8') {\r\n super();\r\n this.writable = writable;\r\n this.encoding = encoding;\r\n this.errorCount = 0;\r\n this.writable.on('error', (error) => this.fireError(error));\r\n this.writable.on('close', () => this.fireClose());\r\n }\r\n write(msg) {\r\n let json = JSON.stringify(msg);\r\n let contentLength = Buffer.byteLength(json, this.encoding);\r\n let headers = [\r\n ContentLength, contentLength.toString(), CRLF,\r\n CRLF\r\n ];\r\n try {\r\n // Header must be written in ASCII encoding\r\n this.writable.write(headers.join(''), 'ascii');\r\n // Now write the content. This can be written in any encoding\r\n this.writable.write(json, this.encoding);\r\n this.errorCount = 0;\r\n }\r\n catch (error) {\r\n this.errorCount++;\r\n this.fireError(error, msg, this.errorCount);\r\n }\r\n }\r\n}\r\nexports.StreamMessageWriter = StreamMessageWriter;\r\nclass IPCMessageWriter extends AbstractMessageWriter {\r\n constructor(process) {\r\n super();\r\n this.process = process;\r\n this.errorCount = 0;\r\n this.queue = [];\r\n this.sending = false;\r\n let eventEmitter = this.process;\r\n eventEmitter.on('error', (error) => this.fireError(error));\r\n eventEmitter.on('close', () => this.fireClose);\r\n }\r\n write(msg) {\r\n if (!this.sending && this.queue.length === 0) {\r\n // See https://github.com/nodejs/node/issues/7657\r\n this.doWriteMessage(msg);\r\n }\r\n else {\r\n this.queue.push(msg);\r\n }\r\n }\r\n doWriteMessage(msg) {\r\n try {\r\n if (this.process.send) {\r\n this.sending = true;\r\n this.process.send(msg, undefined, undefined, (error) => {\r\n this.sending = false;\r\n if (error) {\r\n this.errorCount++;\r\n this.fireError(error, msg, this.errorCount);\r\n }\r\n else {\r\n this.errorCount = 0;\r\n }\r\n if (this.queue.length > 0) {\r\n this.doWriteMessage(this.queue.shift());\r\n }\r\n });\r\n }\r\n }\r\n catch (error) {\r\n this.errorCount++;\r\n this.fireError(error, msg, this.errorCount);\r\n }\r\n }\r\n}\r\nexports.IPCMessageWriter = IPCMessageWriter;\r\nclass SocketMessageWriter extends AbstractMessageWriter {\r\n constructor(socket, encoding = 'utf8') {\r\n super();\r\n this.socket = socket;\r\n this.queue = [];\r\n this.sending = false;\r\n this.encoding = encoding;\r\n this.errorCount = 0;\r\n this.socket.on('error', (error) => this.fireError(error));\r\n this.socket.on('close', () => this.fireClose());\r\n }\r\n dispose() {\r\n super.dispose();\r\n this.socket.destroy();\r\n }\r\n write(msg) {\r\n if (!this.sending && this.queue.length === 0) {\r\n // See https://github.com/nodejs/node/issues/7657\r\n this.doWriteMessage(msg);\r\n }\r\n else {\r\n this.queue.push(msg);\r\n }\r\n }\r\n doWriteMessage(msg) {\r\n let json = JSON.stringify(msg);\r\n let contentLength = Buffer.byteLength(json, this.encoding);\r\n let headers = [\r\n ContentLength, contentLength.toString(), CRLF,\r\n CRLF\r\n ];\r\n try {\r\n // Header must be written in ASCII encoding\r\n this.sending = true;\r\n this.socket.write(headers.join(''), 'ascii', (error) => {\r\n if (error) {\r\n this.handleError(error, msg);\r\n }\r\n try {\r\n // Now write the content. This can be written in any encoding\r\n this.socket.write(json, this.encoding, (error) => {\r\n this.sending = false;\r\n if (error) {\r\n this.handleError(error, msg);\r\n }\r\n else {\r\n this.errorCount = 0;\r\n }\r\n if (this.queue.length > 0) {\r\n this.doWriteMessage(this.queue.shift());\r\n }\r\n });\r\n }\r\n catch (error) {\r\n this.handleError(error, msg);\r\n }\r\n });\r\n }\r\n catch (error) {\r\n this.handleError(error, msg);\r\n }\r\n }\r\n handleError(error, msg) {\r\n this.errorCount++;\r\n this.fireError(error, msg, this.errorCount);\r\n }\r\n}\r\nexports.SocketMessageWriter = SocketMessageWriter;\r\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst vscode_1 = require(\"vscode\");\r\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\r\nconst c2p = require(\"./codeConverter\");\r\nconst p2c = require(\"./protocolConverter\");\r\nconst Is = require(\"./utils/is\");\r\nconst async_1 = require(\"./utils/async\");\r\nconst UUID = require(\"./utils/uuid\");\r\nconst progressPart_1 = require(\"./progressPart\");\r\n__export(require(\"vscode-languageserver-protocol\"));\r\nclass ConsoleLogger {\r\n error(message) {\r\n console.error(message);\r\n }\r\n warn(message) {\r\n console.warn(message);\r\n }\r\n info(message) {\r\n console.info(message);\r\n }\r\n log(message) {\r\n console.log(message);\r\n }\r\n}\r\nfunction createConnection(input, output, errorHandler, closeHandler) {\r\n let logger = new ConsoleLogger();\r\n let connection = vscode_languageserver_protocol_1.createProtocolConnection(input, output, logger);\r\n connection.onError((data) => { errorHandler(data[0], data[1], data[2]); });\r\n connection.onClose(closeHandler);\r\n let result = {\r\n listen: () => connection.listen(),\r\n sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),\r\n onRequest: (type, handler) => connection.onRequest(Is.string(type) ? type : type.method, handler),\r\n sendNotification: (type, params) => connection.sendNotification(Is.string(type) ? type : type.method, params),\r\n onNotification: (type, handler) => connection.onNotification(Is.string(type) ? type : type.method, handler),\r\n onProgress: connection.onProgress,\r\n sendProgress: connection.sendProgress,\r\n trace: (value, tracer, sendNotificationOrTraceOptions) => {\r\n const defaultTraceOptions = {\r\n sendNotification: false,\r\n traceFormat: vscode_languageserver_protocol_1.TraceFormat.Text\r\n };\r\n if (sendNotificationOrTraceOptions === void 0) {\r\n connection.trace(value, tracer, defaultTraceOptions);\r\n }\r\n else if (Is.boolean(sendNotificationOrTraceOptions)) {\r\n connection.trace(value, tracer, sendNotificationOrTraceOptions);\r\n }\r\n else {\r\n connection.trace(value, tracer, sendNotificationOrTraceOptions);\r\n }\r\n },\r\n initialize: (params) => connection.sendRequest(vscode_languageserver_protocol_1.InitializeRequest.type, params),\r\n shutdown: () => connection.sendRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, undefined),\r\n exit: () => connection.sendNotification(vscode_languageserver_protocol_1.ExitNotification.type),\r\n onLogMessage: (handler) => connection.onNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, handler),\r\n onShowMessage: (handler) => connection.onNotification(vscode_languageserver_protocol_1.ShowMessageNotification.type, handler),\r\n onTelemetry: (handler) => connection.onNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, handler),\r\n didChangeConfiguration: (params) => connection.sendNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, params),\r\n didChangeWatchedFiles: (params) => connection.sendNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, params),\r\n didOpenTextDocument: (params) => connection.sendNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, params),\r\n didChangeTextDocument: (params) => connection.sendNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params),\r\n didCloseTextDocument: (params) => connection.sendNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, params),\r\n didSaveTextDocument: (params) => connection.sendNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, params),\r\n onDiagnostics: (handler) => connection.onNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, handler),\r\n dispose: () => connection.dispose()\r\n };\r\n return result;\r\n}\r\n/**\r\n * An action to be performed when the connection is producing errors.\r\n */\r\nvar ErrorAction;\r\n(function (ErrorAction) {\r\n /**\r\n * Continue running the server.\r\n */\r\n ErrorAction[ErrorAction[\"Continue\"] = 1] = \"Continue\";\r\n /**\r\n * Shutdown the server.\r\n */\r\n ErrorAction[ErrorAction[\"Shutdown\"] = 2] = \"Shutdown\";\r\n})(ErrorAction = exports.ErrorAction || (exports.ErrorAction = {}));\r\n/**\r\n * An action to be performed when the connection to a server got closed.\r\n */\r\nvar CloseAction;\r\n(function (CloseAction) {\r\n /**\r\n * Don't restart the server. The connection stays closed.\r\n */\r\n CloseAction[CloseAction[\"DoNotRestart\"] = 1] = \"DoNotRestart\";\r\n /**\r\n * Restart the server.\r\n */\r\n CloseAction[CloseAction[\"Restart\"] = 2] = \"Restart\";\r\n})(CloseAction = exports.CloseAction || (exports.CloseAction = {}));\r\nclass DefaultErrorHandler {\r\n constructor(name) {\r\n this.name = name;\r\n this.restarts = [];\r\n }\r\n error(_error, _message, count) {\r\n if (count && count <= 3) {\r\n return ErrorAction.Continue;\r\n }\r\n return ErrorAction.Shutdown;\r\n }\r\n closed() {\r\n this.restarts.push(Date.now());\r\n if (this.restarts.length < 5) {\r\n return CloseAction.Restart;\r\n }\r\n else {\r\n let diff = this.restarts[this.restarts.length - 1] - this.restarts[0];\r\n if (diff <= 3 * 60 * 1000) {\r\n vscode_1.window.showErrorMessage(`The ${this.name} server crashed 5 times in the last 3 minutes. The server will not be restarted.`);\r\n return CloseAction.DoNotRestart;\r\n }\r\n else {\r\n this.restarts.shift();\r\n return CloseAction.Restart;\r\n }\r\n }\r\n }\r\n}\r\nvar RevealOutputChannelOn;\r\n(function (RevealOutputChannelOn) {\r\n RevealOutputChannelOn[RevealOutputChannelOn[\"Info\"] = 1] = \"Info\";\r\n RevealOutputChannelOn[RevealOutputChannelOn[\"Warn\"] = 2] = \"Warn\";\r\n RevealOutputChannelOn[RevealOutputChannelOn[\"Error\"] = 3] = \"Error\";\r\n RevealOutputChannelOn[RevealOutputChannelOn[\"Never\"] = 4] = \"Never\";\r\n})(RevealOutputChannelOn = exports.RevealOutputChannelOn || (exports.RevealOutputChannelOn = {}));\r\nvar State;\r\n(function (State) {\r\n State[State[\"Stopped\"] = 1] = \"Stopped\";\r\n State[State[\"Starting\"] = 3] = \"Starting\";\r\n State[State[\"Running\"] = 2] = \"Running\";\r\n})(State = exports.State || (exports.State = {}));\r\nvar ClientState;\r\n(function (ClientState) {\r\n ClientState[ClientState[\"Initial\"] = 0] = \"Initial\";\r\n ClientState[ClientState[\"Starting\"] = 1] = \"Starting\";\r\n ClientState[ClientState[\"StartFailed\"] = 2] = \"StartFailed\";\r\n ClientState[ClientState[\"Running\"] = 3] = \"Running\";\r\n ClientState[ClientState[\"Stopping\"] = 4] = \"Stopping\";\r\n ClientState[ClientState[\"Stopped\"] = 5] = \"Stopped\";\r\n})(ClientState || (ClientState = {}));\r\nconst SupportedSymbolKinds = [\r\n vscode_languageserver_protocol_1.SymbolKind.File,\r\n vscode_languageserver_protocol_1.SymbolKind.Module,\r\n vscode_languageserver_protocol_1.SymbolKind.Namespace,\r\n vscode_languageserver_protocol_1.SymbolKind.Package,\r\n vscode_languageserver_protocol_1.SymbolKind.Class,\r\n vscode_languageserver_protocol_1.SymbolKind.Method,\r\n vscode_languageserver_protocol_1.SymbolKind.Property,\r\n vscode_languageserver_protocol_1.SymbolKind.Field,\r\n vscode_languageserver_protocol_1.SymbolKind.Constructor,\r\n vscode_languageserver_protocol_1.SymbolKind.Enum,\r\n vscode_languageserver_protocol_1.SymbolKind.Interface,\r\n vscode_languageserver_protocol_1.SymbolKind.Function,\r\n vscode_languageserver_protocol_1.SymbolKind.Variable,\r\n vscode_languageserver_protocol_1.SymbolKind.Constant,\r\n vscode_languageserver_protocol_1.SymbolKind.String,\r\n vscode_languageserver_protocol_1.SymbolKind.Number,\r\n vscode_languageserver_protocol_1.SymbolKind.Boolean,\r\n vscode_languageserver_protocol_1.SymbolKind.Array,\r\n vscode_languageserver_protocol_1.SymbolKind.Object,\r\n vscode_languageserver_protocol_1.SymbolKind.Key,\r\n vscode_languageserver_protocol_1.SymbolKind.Null,\r\n vscode_languageserver_protocol_1.SymbolKind.EnumMember,\r\n vscode_languageserver_protocol_1.SymbolKind.Struct,\r\n vscode_languageserver_protocol_1.SymbolKind.Event,\r\n vscode_languageserver_protocol_1.SymbolKind.Operator,\r\n vscode_languageserver_protocol_1.SymbolKind.TypeParameter\r\n];\r\nconst SupportedCompletionItemKinds = [\r\n vscode_languageserver_protocol_1.CompletionItemKind.Text,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Method,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Function,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Constructor,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Field,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Variable,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Class,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Interface,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Module,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Property,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Unit,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Value,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Enum,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Keyword,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Snippet,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Color,\r\n vscode_languageserver_protocol_1.CompletionItemKind.File,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Reference,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Folder,\r\n vscode_languageserver_protocol_1.CompletionItemKind.EnumMember,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Constant,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Struct,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Event,\r\n vscode_languageserver_protocol_1.CompletionItemKind.Operator,\r\n vscode_languageserver_protocol_1.CompletionItemKind.TypeParameter\r\n];\r\nfunction ensure(target, key) {\r\n if (target[key] === void 0) {\r\n target[key] = {};\r\n }\r\n return target[key];\r\n}\r\nvar DynamicFeature;\r\n(function (DynamicFeature) {\r\n function is(value) {\r\n let candidate = value;\r\n return candidate && Is.func(candidate.register) && Is.func(candidate.unregister) && Is.func(candidate.dispose) && candidate.messages !== void 0;\r\n }\r\n DynamicFeature.is = is;\r\n})(DynamicFeature || (DynamicFeature = {}));\r\nclass DocumentNotifiactions {\r\n constructor(_client, _event, _type, _middleware, _createParams, _selectorFilter) {\r\n this._client = _client;\r\n this._event = _event;\r\n this._type = _type;\r\n this._middleware = _middleware;\r\n this._createParams = _createParams;\r\n this._selectorFilter = _selectorFilter;\r\n this._selectors = new Map();\r\n }\r\n static textDocumentFilter(selectors, textDocument) {\r\n for (const selector of selectors) {\r\n if (vscode_1.languages.match(selector, textDocument)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n register(_message, data) {\r\n if (!data.registerOptions.documentSelector) {\r\n return;\r\n }\r\n if (!this._listener) {\r\n this._listener = this._event(this.callback, this);\r\n }\r\n this._selectors.set(data.id, data.registerOptions.documentSelector);\r\n }\r\n callback(data) {\r\n if (!this._selectorFilter || this._selectorFilter(this._selectors.values(), data)) {\r\n if (this._middleware) {\r\n this._middleware(data, (data) => this._client.sendNotification(this._type, this._createParams(data)));\r\n }\r\n else {\r\n this._client.sendNotification(this._type, this._createParams(data));\r\n }\r\n this.notificationSent(data);\r\n }\r\n }\r\n notificationSent(_data) {\r\n }\r\n unregister(id) {\r\n this._selectors.delete(id);\r\n if (this._selectors.size === 0 && this._listener) {\r\n this._listener.dispose();\r\n this._listener = undefined;\r\n }\r\n }\r\n dispose() {\r\n this._selectors.clear();\r\n if (this._listener) {\r\n this._listener.dispose();\r\n this._listener = undefined;\r\n }\r\n }\r\n getProvider(document) {\r\n for (const selector of this._selectors.values()) {\r\n if (vscode_1.languages.match(selector, document)) {\r\n return {\r\n send: (data) => {\r\n this.callback(data);\r\n }\r\n };\r\n }\r\n }\r\n throw new Error(`No provider available for the given text document`);\r\n }\r\n}\r\nclass DidOpenTextDocumentFeature extends DocumentNotifiactions {\r\n constructor(client, _syncedDocuments) {\r\n super(client, vscode_1.workspace.onDidOpenTextDocument, vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, client.clientOptions.middleware.didOpen, (textDocument) => client.code2ProtocolConverter.asOpenTextDocumentParams(textDocument), DocumentNotifiactions.textDocumentFilter);\r\n this._syncedDocuments = _syncedDocuments;\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n ensure(ensure(capabilities, 'textDocument'), 'synchronization').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n let textDocumentSyncOptions = capabilities.resolvedTextDocumentSync;\r\n if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.openClose) {\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: { documentSelector: documentSelector } });\r\n }\r\n }\r\n register(message, data) {\r\n super.register(message, data);\r\n if (!data.registerOptions.documentSelector) {\r\n return;\r\n }\r\n let documentSelector = data.registerOptions.documentSelector;\r\n vscode_1.workspace.textDocuments.forEach((textDocument) => {\r\n let uri = textDocument.uri.toString();\r\n if (this._syncedDocuments.has(uri)) {\r\n return;\r\n }\r\n if (vscode_1.languages.match(documentSelector, textDocument)) {\r\n let middleware = this._client.clientOptions.middleware;\r\n let didOpen = (textDocument) => {\r\n this._client.sendNotification(this._type, this._createParams(textDocument));\r\n };\r\n if (middleware.didOpen) {\r\n middleware.didOpen(textDocument, didOpen);\r\n }\r\n else {\r\n didOpen(textDocument);\r\n }\r\n this._syncedDocuments.set(uri, textDocument);\r\n }\r\n });\r\n }\r\n notificationSent(textDocument) {\r\n super.notificationSent(textDocument);\r\n this._syncedDocuments.set(textDocument.uri.toString(), textDocument);\r\n }\r\n}\r\nclass DidCloseTextDocumentFeature extends DocumentNotifiactions {\r\n constructor(client, _syncedDocuments) {\r\n super(client, vscode_1.workspace.onDidCloseTextDocument, vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, client.clientOptions.middleware.didClose, (textDocument) => client.code2ProtocolConverter.asCloseTextDocumentParams(textDocument), DocumentNotifiactions.textDocumentFilter);\r\n this._syncedDocuments = _syncedDocuments;\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n ensure(ensure(capabilities, 'textDocument'), 'synchronization').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n let textDocumentSyncOptions = capabilities.resolvedTextDocumentSync;\r\n if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.openClose) {\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: { documentSelector: documentSelector } });\r\n }\r\n }\r\n notificationSent(textDocument) {\r\n super.notificationSent(textDocument);\r\n this._syncedDocuments.delete(textDocument.uri.toString());\r\n }\r\n unregister(id) {\r\n let selector = this._selectors.get(id);\r\n // The super call removed the selector from the map\r\n // of selectors.\r\n super.unregister(id);\r\n let selectors = this._selectors.values();\r\n this._syncedDocuments.forEach((textDocument) => {\r\n if (vscode_1.languages.match(selector, textDocument) && !this._selectorFilter(selectors, textDocument)) {\r\n let middleware = this._client.clientOptions.middleware;\r\n let didClose = (textDocument) => {\r\n this._client.sendNotification(this._type, this._createParams(textDocument));\r\n };\r\n this._syncedDocuments.delete(textDocument.uri.toString());\r\n if (middleware.didClose) {\r\n middleware.didClose(textDocument, didClose);\r\n }\r\n else {\r\n didClose(textDocument);\r\n }\r\n }\r\n });\r\n }\r\n}\r\nclass DidChangeTextDocumentFeature {\r\n constructor(_client) {\r\n this._client = _client;\r\n this._changeData = new Map();\r\n this._forcingDelivery = false;\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n ensure(ensure(capabilities, 'textDocument'), 'synchronization').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n let textDocumentSyncOptions = capabilities.resolvedTextDocumentSync;\r\n if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.change !== void 0 && textDocumentSyncOptions.change !== vscode_languageserver_protocol_1.TextDocumentSyncKind.None) {\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: Object.assign({}, { documentSelector: documentSelector }, { syncKind: textDocumentSyncOptions.change })\r\n });\r\n }\r\n }\r\n register(_message, data) {\r\n if (!data.registerOptions.documentSelector) {\r\n return;\r\n }\r\n if (!this._listener) {\r\n this._listener = vscode_1.workspace.onDidChangeTextDocument(this.callback, this);\r\n }\r\n this._changeData.set(data.id, {\r\n documentSelector: data.registerOptions.documentSelector,\r\n syncKind: data.registerOptions.syncKind\r\n });\r\n }\r\n callback(event) {\r\n // Text document changes are send for dirty changes as well. We don't\r\n // have dirty / undirty events in the LSP so we ignore content changes\r\n // with length zero.\r\n if (event.contentChanges.length === 0) {\r\n return;\r\n }\r\n for (const changeData of this._changeData.values()) {\r\n if (vscode_1.languages.match(changeData.documentSelector, event.document)) {\r\n let middleware = this._client.clientOptions.middleware;\r\n if (changeData.syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental) {\r\n let params = this._client.code2ProtocolConverter.asChangeTextDocumentParams(event);\r\n if (middleware.didChange) {\r\n middleware.didChange(event, () => this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params));\r\n }\r\n else {\r\n this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, params);\r\n }\r\n }\r\n else if (changeData.syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Full) {\r\n let didChange = (event) => {\r\n if (this._changeDelayer) {\r\n if (this._changeDelayer.uri !== event.document.uri.toString()) {\r\n // Use this force delivery to track boolean state. Otherwise we might call two times.\r\n this.forceDelivery();\r\n this._changeDelayer.uri = event.document.uri.toString();\r\n }\r\n this._changeDelayer.delayer.trigger(() => {\r\n this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, this._client.code2ProtocolConverter.asChangeTextDocumentParams(event.document));\r\n });\r\n }\r\n else {\r\n this._changeDelayer = {\r\n uri: event.document.uri.toString(),\r\n delayer: new async_1.Delayer(200)\r\n };\r\n this._changeDelayer.delayer.trigger(() => {\r\n this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, this._client.code2ProtocolConverter.asChangeTextDocumentParams(event.document));\r\n }, -1);\r\n }\r\n };\r\n if (middleware.didChange) {\r\n middleware.didChange(event, didChange);\r\n }\r\n else {\r\n didChange(event);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unregister(id) {\r\n this._changeData.delete(id);\r\n if (this._changeData.size === 0 && this._listener) {\r\n this._listener.dispose();\r\n this._listener = undefined;\r\n }\r\n }\r\n dispose() {\r\n this._changeDelayer = undefined;\r\n this._forcingDelivery = false;\r\n this._changeData.clear();\r\n if (this._listener) {\r\n this._listener.dispose();\r\n this._listener = undefined;\r\n }\r\n }\r\n forceDelivery() {\r\n if (this._forcingDelivery || !this._changeDelayer) {\r\n return;\r\n }\r\n try {\r\n this._forcingDelivery = true;\r\n this._changeDelayer.delayer.forceDelivery();\r\n }\r\n finally {\r\n this._forcingDelivery = false;\r\n }\r\n }\r\n getProvider(document) {\r\n for (const changeData of this._changeData.values()) {\r\n if (vscode_1.languages.match(changeData.documentSelector, document)) {\r\n return {\r\n send: (event) => {\r\n this.callback(event);\r\n }\r\n };\r\n }\r\n }\r\n throw new Error(`No provider available for the given text document`);\r\n }\r\n}\r\nclass WillSaveFeature extends DocumentNotifiactions {\r\n constructor(client) {\r\n super(client, vscode_1.workspace.onWillSaveTextDocument, vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, client.clientOptions.middleware.willSave, (willSaveEvent) => client.code2ProtocolConverter.asWillSaveTextDocumentParams(willSaveEvent), (selectors, willSaveEvent) => DocumentNotifiactions.textDocumentFilter(selectors, willSaveEvent.document));\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n let value = ensure(ensure(capabilities, 'textDocument'), 'synchronization');\r\n value.willSave = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n let textDocumentSyncOptions = capabilities.resolvedTextDocumentSync;\r\n if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.willSave) {\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: { documentSelector: documentSelector }\r\n });\r\n }\r\n }\r\n}\r\nclass WillSaveWaitUntilFeature {\r\n constructor(_client) {\r\n this._client = _client;\r\n this._selectors = new Map();\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n let value = ensure(ensure(capabilities, 'textDocument'), 'synchronization');\r\n value.willSaveWaitUntil = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n let textDocumentSyncOptions = capabilities.resolvedTextDocumentSync;\r\n if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.willSaveWaitUntil) {\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: { documentSelector: documentSelector }\r\n });\r\n }\r\n }\r\n register(_message, data) {\r\n if (!data.registerOptions.documentSelector) {\r\n return;\r\n }\r\n if (!this._listener) {\r\n this._listener = vscode_1.workspace.onWillSaveTextDocument(this.callback, this);\r\n }\r\n this._selectors.set(data.id, data.registerOptions.documentSelector);\r\n }\r\n callback(event) {\r\n if (DocumentNotifiactions.textDocumentFilter(this._selectors.values(), event.document)) {\r\n let middleware = this._client.clientOptions.middleware;\r\n let willSaveWaitUntil = (event) => {\r\n return this._client.sendRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(event)).then((edits) => {\r\n let vEdits = this._client.protocol2CodeConverter.asTextEdits(edits);\r\n return vEdits === void 0 ? [] : vEdits;\r\n });\r\n };\r\n event.waitUntil(middleware.willSaveWaitUntil\r\n ? middleware.willSaveWaitUntil(event, willSaveWaitUntil)\r\n : willSaveWaitUntil(event));\r\n }\r\n }\r\n unregister(id) {\r\n this._selectors.delete(id);\r\n if (this._selectors.size === 0 && this._listener) {\r\n this._listener.dispose();\r\n this._listener = undefined;\r\n }\r\n }\r\n dispose() {\r\n this._selectors.clear();\r\n if (this._listener) {\r\n this._listener.dispose();\r\n this._listener = undefined;\r\n }\r\n }\r\n}\r\nclass DidSaveTextDocumentFeature extends DocumentNotifiactions {\r\n constructor(client) {\r\n super(client, vscode_1.workspace.onDidSaveTextDocument, vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, client.clientOptions.middleware.didSave, (textDocument) => client.code2ProtocolConverter.asSaveTextDocumentParams(textDocument, this._includeText), DocumentNotifiactions.textDocumentFilter);\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n ensure(ensure(capabilities, 'textDocument'), 'synchronization').didSave = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n let textDocumentSyncOptions = capabilities.resolvedTextDocumentSync;\r\n if (documentSelector && textDocumentSyncOptions && textDocumentSyncOptions.save) {\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: Object.assign({}, { documentSelector: documentSelector }, { includeText: !!textDocumentSyncOptions.save.includeText })\r\n });\r\n }\r\n }\r\n register(method, data) {\r\n this._includeText = !!data.registerOptions.includeText;\r\n super.register(method, data);\r\n }\r\n}\r\nclass FileSystemWatcherFeature {\r\n constructor(_client, _notifyFileEvent) {\r\n this._client = _client;\r\n this._notifyFileEvent = _notifyFileEvent;\r\n this._watchers = new Map();\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n ensure(ensure(capabilities, 'workspace'), 'didChangeWatchedFiles').dynamicRegistration = true;\r\n }\r\n initialize(_capabilities, _documentSelector) {\r\n }\r\n register(_method, data) {\r\n if (!Array.isArray(data.registerOptions.watchers)) {\r\n return;\r\n }\r\n let disposeables = [];\r\n for (let watcher of data.registerOptions.watchers) {\r\n if (!Is.string(watcher.globPattern)) {\r\n continue;\r\n }\r\n let watchCreate = true, watchChange = true, watchDelete = true;\r\n if (watcher.kind !== void 0 && watcher.kind !== null) {\r\n watchCreate = (watcher.kind & vscode_languageserver_protocol_1.WatchKind.Create) !== 0;\r\n watchChange = (watcher.kind & vscode_languageserver_protocol_1.WatchKind.Change) !== 0;\r\n watchDelete = (watcher.kind & vscode_languageserver_protocol_1.WatchKind.Delete) !== 0;\r\n }\r\n let fileSystemWatcher = vscode_1.workspace.createFileSystemWatcher(watcher.globPattern, !watchCreate, !watchChange, !watchDelete);\r\n this.hookListeners(fileSystemWatcher, watchCreate, watchChange, watchDelete);\r\n disposeables.push(fileSystemWatcher);\r\n }\r\n this._watchers.set(data.id, disposeables);\r\n }\r\n registerRaw(id, fileSystemWatchers) {\r\n let disposeables = [];\r\n for (let fileSystemWatcher of fileSystemWatchers) {\r\n this.hookListeners(fileSystemWatcher, true, true, true, disposeables);\r\n }\r\n this._watchers.set(id, disposeables);\r\n }\r\n hookListeners(fileSystemWatcher, watchCreate, watchChange, watchDelete, listeners) {\r\n if (watchCreate) {\r\n fileSystemWatcher.onDidCreate((resource) => this._notifyFileEvent({\r\n uri: this._client.code2ProtocolConverter.asUri(resource),\r\n type: vscode_languageserver_protocol_1.FileChangeType.Created\r\n }), null, listeners);\r\n }\r\n if (watchChange) {\r\n fileSystemWatcher.onDidChange((resource) => this._notifyFileEvent({\r\n uri: this._client.code2ProtocolConverter.asUri(resource),\r\n type: vscode_languageserver_protocol_1.FileChangeType.Changed\r\n }), null, listeners);\r\n }\r\n if (watchDelete) {\r\n fileSystemWatcher.onDidDelete((resource) => this._notifyFileEvent({\r\n uri: this._client.code2ProtocolConverter.asUri(resource),\r\n type: vscode_languageserver_protocol_1.FileChangeType.Deleted\r\n }), null, listeners);\r\n }\r\n }\r\n unregister(id) {\r\n let disposeables = this._watchers.get(id);\r\n if (disposeables) {\r\n for (let disposable of disposeables) {\r\n disposable.dispose();\r\n }\r\n }\r\n }\r\n dispose() {\r\n this._watchers.forEach((disposeables) => {\r\n for (let disposable of disposeables) {\r\n disposable.dispose();\r\n }\r\n });\r\n this._watchers.clear();\r\n }\r\n}\r\nclass TextDocumentFeature {\r\n constructor(_client, _message) {\r\n this._client = _client;\r\n this._message = _message;\r\n this._registrations = new Map();\r\n }\r\n get messages() {\r\n return this._message;\r\n }\r\n register(message, data) {\r\n if (message.method !== this.messages.method) {\r\n throw new Error(`Register called on wrong feature. Requested ${message.method} but reached feature ${this.messages.method}`);\r\n }\r\n if (!data.registerOptions.documentSelector) {\r\n return;\r\n }\r\n let registration = this.registerLanguageProvider(data.registerOptions);\r\n this._registrations.set(data.id, { disposable: registration[0], data, provider: registration[1] });\r\n }\r\n unregister(id) {\r\n let registration = this._registrations.get(id);\r\n if (registration !== undefined) {\r\n registration.disposable.dispose();\r\n }\r\n }\r\n dispose() {\r\n this._registrations.forEach((value) => {\r\n value.disposable.dispose();\r\n });\r\n this._registrations.clear();\r\n }\r\n getRegistration(documentSelector, capability) {\r\n if (!capability) {\r\n return [undefined, undefined];\r\n }\r\n else if (vscode_languageserver_protocol_1.TextDocumentRegistrationOptions.is(capability)) {\r\n const id = vscode_languageserver_protocol_1.StaticRegistrationOptions.hasId(capability) ? capability.id : UUID.generateUuid();\r\n const selector = capability.documentSelector || documentSelector;\r\n if (selector) {\r\n return [id, Object.assign({}, capability, { documentSelector: selector })];\r\n }\r\n }\r\n else if (Is.boolean(capability) && capability === true || vscode_languageserver_protocol_1.WorkDoneProgressOptions.is(capability)) {\r\n if (!documentSelector) {\r\n return [undefined, undefined];\r\n }\r\n let options = (Is.boolean(capability) && capability === true ? { documentSelector } : Object.assign({}, capability, { documentSelector }));\r\n return [UUID.generateUuid(), options];\r\n }\r\n return [undefined, undefined];\r\n }\r\n getRegistrationOptions(documentSelector, capability) {\r\n if (!documentSelector || !capability) {\r\n return undefined;\r\n }\r\n return (Is.boolean(capability) && capability === true ? { documentSelector } : Object.assign({}, capability, { documentSelector }));\r\n }\r\n getProvider(textDocument) {\r\n for (const registration of this._registrations.values()) {\r\n let selector = registration.data.registerOptions.documentSelector;\r\n if (selector !== null && vscode_1.languages.match(selector, textDocument)) {\r\n return registration.provider;\r\n }\r\n }\r\n throw new Error(`The feature has no registration for the provided text document ${textDocument.uri.toString()}`);\r\n }\r\n}\r\nexports.TextDocumentFeature = TextDocumentFeature;\r\nclass WorkspaceFeature {\r\n constructor(_client, _message) {\r\n this._client = _client;\r\n this._message = _message;\r\n this._registrations = new Map();\r\n }\r\n get messages() {\r\n return this._message;\r\n }\r\n register(message, data) {\r\n if (message.method !== this.messages.method) {\r\n throw new Error(`Register called on wron feature. Requested ${message.method} but reached feature ${this.messages.method}`);\r\n }\r\n const registration = this.registerLanguageProvider(data.registerOptions);\r\n this._registrations.set(data.id, { disposable: registration[0], provider: registration[1] });\r\n }\r\n unregister(id) {\r\n let registration = this._registrations.get(id);\r\n if (registration !== undefined) {\r\n registration.disposable.dispose();\r\n }\r\n }\r\n dispose() {\r\n this._registrations.forEach((registration) => {\r\n registration.disposable.dispose();\r\n });\r\n this._registrations.clear();\r\n }\r\n getProviders() {\r\n const result = [];\r\n for (const registration of this._registrations.values()) {\r\n result.push(registration.provider);\r\n }\r\n return result;\r\n }\r\n}\r\nclass CompletionItemFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.CompletionRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n let completion = ensure(ensure(capabilites, 'textDocument'), 'completion');\r\n completion.dynamicRegistration = true;\r\n completion.contextSupport = true;\r\n completion.completionItem = {\r\n snippetSupport: true,\r\n commitCharactersSupport: true,\r\n documentationFormat: [vscode_languageserver_protocol_1.MarkupKind.Markdown, vscode_languageserver_protocol_1.MarkupKind.PlainText],\r\n deprecatedSupport: true,\r\n preselectSupport: true,\r\n tagSupport: { valueSet: [vscode_languageserver_protocol_1.CompletionItemTag.Deprecated] }\r\n };\r\n completion.completionItemKind = { valueSet: SupportedCompletionItemKinds };\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.completionProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: options\r\n });\r\n }\r\n registerLanguageProvider(options) {\r\n const triggerCharacters = options.triggerCharacters || [];\r\n const provider = {\r\n provideCompletionItems: (document, position, token, context) => {\r\n const client = this._client;\r\n const middleware = this._client.clientOptions.middleware;\r\n const provideCompletionItems = (document, position, context, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.CompletionRequest.type, client.code2ProtocolConverter.asCompletionParams(document, position, context), token).then(client.protocol2CodeConverter.asCompletionResult, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.CompletionRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n return middleware.provideCompletionItem\r\n ? middleware.provideCompletionItem(document, position, context, token, provideCompletionItems)\r\n : provideCompletionItems(document, position, context, token);\r\n },\r\n resolveCompletionItem: options.resolveProvider\r\n ? (item, token) => {\r\n const client = this._client;\r\n const middleware = this._client.clientOptions.middleware;\r\n const resolveCompletionItem = (item, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, client.code2ProtocolConverter.asCompletionItem(item), token).then(client.protocol2CodeConverter.asCompletionItem, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, error);\r\n return Promise.resolve(item);\r\n });\r\n };\r\n return middleware.resolveCompletionItem\r\n ? middleware.resolveCompletionItem(item, token, resolveCompletionItem)\r\n : resolveCompletionItem(item, token);\r\n }\r\n : undefined\r\n };\r\n return [vscode_1.languages.registerCompletionItemProvider(options.documentSelector, provider, ...triggerCharacters), provider];\r\n }\r\n}\r\nclass HoverFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.HoverRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n const hoverCapability = (ensure(ensure(capabilites, 'textDocument'), 'hover'));\r\n hoverCapability.dynamicRegistration = true;\r\n hoverCapability.contentFormat = [vscode_languageserver_protocol_1.MarkupKind.Markdown, vscode_languageserver_protocol_1.MarkupKind.PlainText];\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.hoverProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: options\r\n });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideHover: (document, position, token) => {\r\n const client = this._client;\r\n const provideHover = (document, position, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.HoverRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then(client.protocol2CodeConverter.asHover, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.HoverRequest.type, error);\r\n return Promise.resolve(null);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideHover\r\n ? middleware.provideHover(document, position, token, provideHover)\r\n : provideHover(document, position, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerHoverProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass SignatureHelpFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.SignatureHelpRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n let config = ensure(ensure(capabilites, 'textDocument'), 'signatureHelp');\r\n config.dynamicRegistration = true;\r\n config.signatureInformation = { documentationFormat: [vscode_languageserver_protocol_1.MarkupKind.Markdown, vscode_languageserver_protocol_1.MarkupKind.PlainText] };\r\n config.signatureInformation.parameterInformation = { labelOffsetSupport: true };\r\n config.contextSupport = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.signatureHelpProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: options\r\n });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideSignatureHelp: (document, position, token, context) => {\r\n const client = this._client;\r\n const providerSignatureHelp = (document, position, context, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, client.code2ProtocolConverter.asSignatureHelpParams(document, position, context), token).then(client.protocol2CodeConverter.asSignatureHelp, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, error);\r\n return Promise.resolve(null);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideSignatureHelp\r\n ? middleware.provideSignatureHelp(document, position, context, token, providerSignatureHelp)\r\n : providerSignatureHelp(document, position, context, token);\r\n }\r\n };\r\n let disposable;\r\n if (options.retriggerCharacters === undefined) {\r\n const triggerCharacters = options.triggerCharacters || [];\r\n disposable = vscode_1.languages.registerSignatureHelpProvider(options.documentSelector, provider, ...triggerCharacters);\r\n }\r\n else {\r\n const metaData = {\r\n triggerCharacters: options.triggerCharacters || [],\r\n retriggerCharacters: options.retriggerCharacters || []\r\n };\r\n disposable = vscode_1.languages.registerSignatureHelpProvider(options.documentSelector, provider, metaData);\r\n }\r\n return [disposable, provider];\r\n }\r\n}\r\nclass DefinitionFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.DefinitionRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n let definitionSupport = ensure(ensure(capabilites, 'textDocument'), 'definition');\r\n definitionSupport.dynamicRegistration = true;\r\n definitionSupport.linkSupport = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.definitionProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideDefinition: (document, position, token) => {\r\n const client = this._client;\r\n const provideDefinition = (document, position, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then(client.protocol2CodeConverter.asDefinitionResult, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, error);\r\n return Promise.resolve(null);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideDefinition\r\n ? middleware.provideDefinition(document, position, token, provideDefinition)\r\n : provideDefinition(document, position, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerDefinitionProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass ReferencesFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.ReferencesRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n ensure(ensure(capabilites, 'textDocument'), 'references').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.referencesProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideReferences: (document, position, options, token) => {\r\n const client = this._client;\r\n const _providerReferences = (document, position, options, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, client.code2ProtocolConverter.asReferenceParams(document, position, options), token).then(client.protocol2CodeConverter.asReferences, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideReferences\r\n ? middleware.provideReferences(document, position, options, token, _providerReferences)\r\n : _providerReferences(document, position, options, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerReferenceProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass DocumentHighlightFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.DocumentHighlightRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n ensure(ensure(capabilites, 'textDocument'), 'documentHighlight').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.documentHighlightProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideDocumentHighlights: (document, position, token) => {\r\n const client = this._client;\r\n const _provideDocumentHighlights = (document, position, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then(client.protocol2CodeConverter.asDocumentHighlights, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideDocumentHighlights\r\n ? middleware.provideDocumentHighlights(document, position, token, _provideDocumentHighlights)\r\n : _provideDocumentHighlights(document, position, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerDocumentHighlightProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass DocumentSymbolFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.DocumentSymbolRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n let symbolCapabilities = ensure(ensure(capabilites, 'textDocument'), 'documentSymbol');\r\n symbolCapabilities.dynamicRegistration = true;\r\n symbolCapabilities.symbolKind = {\r\n valueSet: SupportedSymbolKinds\r\n };\r\n symbolCapabilities.hierarchicalDocumentSymbolSupport = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.documentSymbolProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideDocumentSymbols: (document, token) => {\r\n const client = this._client;\r\n const _provideDocumentSymbols = (document, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, client.code2ProtocolConverter.asDocumentSymbolParams(document), token).then((data) => {\r\n if (data === null) {\r\n return undefined;\r\n }\r\n if (data.length === 0) {\r\n return [];\r\n }\r\n else {\r\n let element = data[0];\r\n if (vscode_languageserver_protocol_1.DocumentSymbol.is(element)) {\r\n return client.protocol2CodeConverter.asDocumentSymbols(data);\r\n }\r\n else {\r\n return client.protocol2CodeConverter.asSymbolInformations(data);\r\n }\r\n }\r\n }, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideDocumentSymbols\r\n ? middleware.provideDocumentSymbols(document, token, _provideDocumentSymbols)\r\n : _provideDocumentSymbols(document, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerDocumentSymbolProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass WorkspaceSymbolFeature extends WorkspaceFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n let symbolCapabilities = ensure(ensure(capabilites, 'workspace'), 'symbol');\r\n symbolCapabilities.dynamicRegistration = true;\r\n symbolCapabilities.symbolKind = {\r\n valueSet: SupportedSymbolKinds\r\n };\r\n }\r\n initialize(capabilities) {\r\n if (!capabilities.workspaceSymbolProvider) {\r\n return;\r\n }\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: capabilities.workspaceSymbolProvider === true ? { workDoneProgress: false } : capabilities.workspaceSymbolProvider\r\n });\r\n }\r\n registerLanguageProvider(_options) {\r\n const provider = {\r\n provideWorkspaceSymbols: (query, token) => {\r\n const client = this._client;\r\n const provideWorkspaceSymbols = (query, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, { query }, token).then(client.protocol2CodeConverter.asSymbolInformations, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideWorkspaceSymbols\r\n ? middleware.provideWorkspaceSymbols(query, token, provideWorkspaceSymbols)\r\n : provideWorkspaceSymbols(query, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerWorkspaceSymbolProvider(provider), provider];\r\n }\r\n}\r\nclass CodeActionFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.CodeActionRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n const cap = ensure(ensure(capabilites, 'textDocument'), 'codeAction');\r\n cap.dynamicRegistration = true;\r\n cap.isPreferredSupport = true;\r\n cap.codeActionLiteralSupport = {\r\n codeActionKind: {\r\n valueSet: [\r\n vscode_languageserver_protocol_1.CodeActionKind.Empty,\r\n vscode_languageserver_protocol_1.CodeActionKind.QuickFix,\r\n vscode_languageserver_protocol_1.CodeActionKind.Refactor,\r\n vscode_languageserver_protocol_1.CodeActionKind.RefactorExtract,\r\n vscode_languageserver_protocol_1.CodeActionKind.RefactorInline,\r\n vscode_languageserver_protocol_1.CodeActionKind.RefactorRewrite,\r\n vscode_languageserver_protocol_1.CodeActionKind.Source,\r\n vscode_languageserver_protocol_1.CodeActionKind.SourceOrganizeImports\r\n ]\r\n }\r\n };\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.codeActionProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideCodeActions: (document, range, context, token) => {\r\n const client = this._client;\r\n const _provideCodeActions = (document, range, context, token) => {\r\n const params = {\r\n textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),\r\n range: client.code2ProtocolConverter.asRange(range),\r\n context: client.code2ProtocolConverter.asCodeActionContext(context)\r\n };\r\n return client.sendRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, params, token).then((values) => {\r\n if (values === null) {\r\n return undefined;\r\n }\r\n const result = [];\r\n for (let item of values) {\r\n if (vscode_languageserver_protocol_1.Command.is(item)) {\r\n result.push(client.protocol2CodeConverter.asCommand(item));\r\n }\r\n else {\r\n result.push(client.protocol2CodeConverter.asCodeAction(item));\r\n }\r\n }\r\n return result;\r\n }, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideCodeActions\r\n ? middleware.provideCodeActions(document, range, context, token, _provideCodeActions)\r\n : _provideCodeActions(document, range, context, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerCodeActionsProvider(options.documentSelector, provider, (options.codeActionKinds\r\n ? { providedCodeActionKinds: this._client.protocol2CodeConverter.asCodeActionKinds(options.codeActionKinds) }\r\n : undefined)), provider];\r\n }\r\n}\r\nclass CodeLensFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.CodeLensRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n ensure(ensure(capabilites, 'textDocument'), 'codeLens').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.codeLensProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideCodeLenses: (document, token) => {\r\n const client = this._client;\r\n const provideCodeLenses = (document, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, client.code2ProtocolConverter.asCodeLensParams(document), token).then(client.protocol2CodeConverter.asCodeLenses, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideCodeLenses\r\n ? middleware.provideCodeLenses(document, token, provideCodeLenses)\r\n : provideCodeLenses(document, token);\r\n },\r\n resolveCodeLens: (options.resolveProvider)\r\n ? (codeLens, token) => {\r\n const client = this._client;\r\n const resolveCodeLens = (codeLens, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, client.code2ProtocolConverter.asCodeLens(codeLens), token).then(client.protocol2CodeConverter.asCodeLens, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, error);\r\n return codeLens;\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.resolveCodeLens\r\n ? middleware.resolveCodeLens(codeLens, token, resolveCodeLens)\r\n : resolveCodeLens(codeLens, token);\r\n }\r\n : undefined\r\n };\r\n return [vscode_1.languages.registerCodeLensProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass DocumentFormattingFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.DocumentFormattingRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n ensure(ensure(capabilites, 'textDocument'), 'formatting').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.documentFormattingProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideDocumentFormattingEdits: (document, options, token) => {\r\n const client = this._client;\r\n const provideDocumentFormattingEdits = (document, options, token) => {\r\n const params = {\r\n textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),\r\n options: client.code2ProtocolConverter.asFormattingOptions(options)\r\n };\r\n return client.sendRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, params, token).then(client.protocol2CodeConverter.asTextEdits, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideDocumentFormattingEdits\r\n ? middleware.provideDocumentFormattingEdits(document, options, token, provideDocumentFormattingEdits)\r\n : provideDocumentFormattingEdits(document, options, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerDocumentFormattingEditProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass DocumentRangeFormattingFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n ensure(ensure(capabilites, 'textDocument'), 'rangeFormatting').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.documentRangeFormattingProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideDocumentRangeFormattingEdits: (document, range, options, token) => {\r\n const client = this._client;\r\n const provideDocumentRangeFormattingEdits = (document, range, options, token) => {\r\n let params = {\r\n textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),\r\n range: client.code2ProtocolConverter.asRange(range),\r\n options: client.code2ProtocolConverter.asFormattingOptions(options)\r\n };\r\n return client.sendRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, params, token).then(client.protocol2CodeConverter.asTextEdits, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n let middleware = client.clientOptions.middleware;\r\n return middleware.provideDocumentRangeFormattingEdits\r\n ? middleware.provideDocumentRangeFormattingEdits(document, range, options, token, provideDocumentRangeFormattingEdits)\r\n : provideDocumentRangeFormattingEdits(document, range, options, token);\r\n }\r\n };\r\n return [vscode_1.languages.registerDocumentRangeFormattingEditProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass DocumentOnTypeFormattingFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n ensure(ensure(capabilites, 'textDocument'), 'onTypeFormatting').dynamicRegistration = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.documentOnTypeFormattingProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideOnTypeFormattingEdits: (document, position, ch, options, token) => {\r\n const client = this._client;\r\n const provideOnTypeFormattingEdits = (document, position, ch, options, token) => {\r\n let params = {\r\n textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),\r\n position: client.code2ProtocolConverter.asPosition(position),\r\n ch: ch,\r\n options: client.code2ProtocolConverter.asFormattingOptions(options)\r\n };\r\n return client.sendRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, params, token).then(client.protocol2CodeConverter.asTextEdits, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideOnTypeFormattingEdits\r\n ? middleware.provideOnTypeFormattingEdits(document, position, ch, options, token, provideOnTypeFormattingEdits)\r\n : provideOnTypeFormattingEdits(document, position, ch, options, token);\r\n }\r\n };\r\n const moreTriggerCharacter = options.moreTriggerCharacter || [];\r\n return [vscode_1.languages.registerOnTypeFormattingEditProvider(options.documentSelector, provider, options.firstTriggerCharacter, ...moreTriggerCharacter), provider];\r\n }\r\n}\r\nclass RenameFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.RenameRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n let rename = ensure(ensure(capabilites, 'textDocument'), 'rename');\r\n rename.dynamicRegistration = true;\r\n rename.prepareSupport = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.renameProvider);\r\n if (!options) {\r\n return;\r\n }\r\n if (Is.boolean(capabilities.renameProvider)) {\r\n options.prepareProvider = false;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideRenameEdits: (document, position, newName, token) => {\r\n const client = this._client;\r\n const provideRenameEdits = (document, position, newName, token) => {\r\n let params = {\r\n textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),\r\n position: client.code2ProtocolConverter.asPosition(position),\r\n newName: newName\r\n };\r\n return client.sendRequest(vscode_languageserver_protocol_1.RenameRequest.type, params, token).then(client.protocol2CodeConverter.asWorkspaceEdit, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.RenameRequest.type, error);\r\n return Promise.reject(new Error(error.message));\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideRenameEdits\r\n ? middleware.provideRenameEdits(document, position, newName, token, provideRenameEdits)\r\n : provideRenameEdits(document, position, newName, token);\r\n },\r\n prepareRename: options.prepareProvider\r\n ? (document, position, token) => {\r\n const client = this._client;\r\n const prepareRename = (document, position, token) => {\r\n let params = {\r\n textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),\r\n position: client.code2ProtocolConverter.asPosition(position),\r\n };\r\n return client.sendRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, params, token).then((result) => {\r\n if (vscode_languageserver_protocol_1.Range.is(result)) {\r\n return client.protocol2CodeConverter.asRange(result);\r\n }\r\n else if (result && vscode_languageserver_protocol_1.Range.is(result.range)) {\r\n return {\r\n range: client.protocol2CodeConverter.asRange(result.range),\r\n placeholder: result.placeholder\r\n };\r\n }\r\n // To cancel the rename vscode API expects a rejected promise.\r\n return Promise.reject(new Error(`The element can't be renamed.`));\r\n }, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, error);\r\n return Promise.reject(new Error(error.message));\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.prepareRename\r\n ? middleware.prepareRename(document, position, token, prepareRename)\r\n : prepareRename(document, position, token);\r\n }\r\n : undefined\r\n };\r\n return [vscode_1.languages.registerRenameProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass DocumentLinkFeature extends TextDocumentFeature {\r\n constructor(client) {\r\n super(client, vscode_languageserver_protocol_1.DocumentLinkRequest.type);\r\n }\r\n fillClientCapabilities(capabilites) {\r\n const documentLinkCapabilities = ensure(ensure(capabilites, 'textDocument'), 'documentLink');\r\n documentLinkCapabilities.dynamicRegistration = true;\r\n documentLinkCapabilities.tooltipSupport = true;\r\n }\r\n initialize(capabilities, documentSelector) {\r\n const options = this.getRegistrationOptions(documentSelector, capabilities.documentLinkProvider);\r\n if (!options) {\r\n return;\r\n }\r\n this.register(this.messages, { id: UUID.generateUuid(), registerOptions: options });\r\n }\r\n registerLanguageProvider(options) {\r\n const provider = {\r\n provideDocumentLinks: (document, token) => {\r\n const client = this._client;\r\n const provideDocumentLinks = (document, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, client.code2ProtocolConverter.asDocumentLinkParams(document), token).then(client.protocol2CodeConverter.asDocumentLinks, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, error);\r\n return Promise.resolve([]);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.provideDocumentLinks\r\n ? middleware.provideDocumentLinks(document, token, provideDocumentLinks)\r\n : provideDocumentLinks(document, token);\r\n },\r\n resolveDocumentLink: options.resolveProvider\r\n ? (link, token) => {\r\n const client = this._client;\r\n let resolveDocumentLink = (link, token) => {\r\n return client.sendRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, client.code2ProtocolConverter.asDocumentLink(link), token).then(client.protocol2CodeConverter.asDocumentLink, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, error);\r\n return Promise.resolve(link);\r\n });\r\n };\r\n const middleware = client.clientOptions.middleware;\r\n return middleware.resolveDocumentLink\r\n ? middleware.resolveDocumentLink(link, token, resolveDocumentLink)\r\n : resolveDocumentLink(link, token);\r\n }\r\n : undefined\r\n };\r\n return [vscode_1.languages.registerDocumentLinkProvider(options.documentSelector, provider), provider];\r\n }\r\n}\r\nclass ConfigurationFeature {\r\n constructor(_client) {\r\n this._client = _client;\r\n this._listeners = new Map();\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n ensure(ensure(capabilities, 'workspace'), 'didChangeConfiguration').dynamicRegistration = true;\r\n }\r\n initialize() {\r\n let section = this._client.clientOptions.synchronize.configurationSection;\r\n if (section !== void 0) {\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: {\r\n section: section\r\n }\r\n });\r\n }\r\n }\r\n register(_message, data) {\r\n let disposable = vscode_1.workspace.onDidChangeConfiguration((event) => {\r\n this.onDidChangeConfiguration(data.registerOptions.section, event);\r\n });\r\n this._listeners.set(data.id, disposable);\r\n if (data.registerOptions.section !== void 0) {\r\n this.onDidChangeConfiguration(data.registerOptions.section, undefined);\r\n }\r\n }\r\n unregister(id) {\r\n let disposable = this._listeners.get(id);\r\n if (disposable) {\r\n this._listeners.delete(id);\r\n disposable.dispose();\r\n }\r\n }\r\n dispose() {\r\n for (let disposable of this._listeners.values()) {\r\n disposable.dispose();\r\n }\r\n this._listeners.clear();\r\n }\r\n onDidChangeConfiguration(configurationSection, event) {\r\n let sections;\r\n if (Is.string(configurationSection)) {\r\n sections = [configurationSection];\r\n }\r\n else {\r\n sections = configurationSection;\r\n }\r\n if (sections !== void 0 && event !== void 0) {\r\n let affected = sections.some((section) => event.affectsConfiguration(section));\r\n if (!affected) {\r\n return;\r\n }\r\n }\r\n let didChangeConfiguration = (sections) => {\r\n if (sections === void 0) {\r\n this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, { settings: null });\r\n return;\r\n }\r\n this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, { settings: this.extractSettingsInformation(sections) });\r\n };\r\n let middleware = this.getMiddleware();\r\n middleware\r\n ? middleware(sections, didChangeConfiguration)\r\n : didChangeConfiguration(sections);\r\n }\r\n extractSettingsInformation(keys) {\r\n function ensurePath(config, path) {\r\n let current = config;\r\n for (let i = 0; i < path.length - 1; i++) {\r\n let obj = current[path[i]];\r\n if (!obj) {\r\n obj = Object.create(null);\r\n current[path[i]] = obj;\r\n }\r\n current = obj;\r\n }\r\n return current;\r\n }\r\n let resource = this._client.clientOptions.workspaceFolder\r\n ? this._client.clientOptions.workspaceFolder.uri\r\n : undefined;\r\n let result = Object.create(null);\r\n for (let i = 0; i < keys.length; i++) {\r\n let key = keys[i];\r\n let index = key.indexOf('.');\r\n let config = null;\r\n if (index >= 0) {\r\n config = vscode_1.workspace.getConfiguration(key.substr(0, index), resource).get(key.substr(index + 1));\r\n }\r\n else {\r\n config = vscode_1.workspace.getConfiguration(key, resource);\r\n }\r\n if (config) {\r\n let path = keys[i].split('.');\r\n ensurePath(result, path)[path[path.length - 1]] = config;\r\n }\r\n }\r\n return result;\r\n }\r\n getMiddleware() {\r\n let middleware = this._client.clientOptions.middleware;\r\n if (middleware.workspace && middleware.workspace.didChangeConfiguration) {\r\n return middleware.workspace.didChangeConfiguration;\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n}\r\nclass ExecuteCommandFeature {\r\n constructor(_client) {\r\n this._client = _client;\r\n this._commands = new Map();\r\n }\r\n get messages() {\r\n return vscode_languageserver_protocol_1.ExecuteCommandRequest.type;\r\n }\r\n fillClientCapabilities(capabilities) {\r\n ensure(ensure(capabilities, 'workspace'), 'executeCommand').dynamicRegistration = true;\r\n }\r\n initialize(capabilities) {\r\n if (!capabilities.executeCommandProvider) {\r\n return;\r\n }\r\n this.register(this.messages, {\r\n id: UUID.generateUuid(),\r\n registerOptions: Object.assign({}, capabilities.executeCommandProvider)\r\n });\r\n }\r\n register(_message, data) {\r\n const client = this._client;\r\n const middleware = client.clientOptions.middleware;\r\n const executeCommand = (command, args) => {\r\n let params = {\r\n command,\r\n arguments: args\r\n };\r\n return client.sendRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, params).then(undefined, (error) => {\r\n client.logFailedRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, error);\r\n });\r\n };\r\n if (data.registerOptions.commands) {\r\n const disposeables = [];\r\n for (const command of data.registerOptions.commands) {\r\n disposeables.push(vscode_1.commands.registerCommand(command, (...args) => {\r\n return middleware.executeCommand\r\n ? middleware.executeCommand(command, args, executeCommand)\r\n : executeCommand(command, args);\r\n }));\r\n }\r\n this._commands.set(data.id, disposeables);\r\n }\r\n }\r\n unregister(id) {\r\n let disposeables = this._commands.get(id);\r\n if (disposeables) {\r\n disposeables.forEach(disposable => disposable.dispose());\r\n }\r\n }\r\n dispose() {\r\n this._commands.forEach((value) => {\r\n value.forEach(disposable => disposable.dispose());\r\n });\r\n this._commands.clear();\r\n }\r\n}\r\nvar MessageTransports;\r\n(function (MessageTransports) {\r\n function is(value) {\r\n let candidate = value;\r\n return candidate && vscode_languageserver_protocol_1.MessageReader.is(value.reader) && vscode_languageserver_protocol_1.MessageWriter.is(value.writer);\r\n }\r\n MessageTransports.is = is;\r\n})(MessageTransports = exports.MessageTransports || (exports.MessageTransports = {}));\r\nclass OnReady {\r\n constructor(_resolve, _reject) {\r\n this._resolve = _resolve;\r\n this._reject = _reject;\r\n this._used = false;\r\n }\r\n get isUsed() {\r\n return this._used;\r\n }\r\n resolve() {\r\n this._used = true;\r\n this._resolve();\r\n }\r\n reject(error) {\r\n this._used = true;\r\n this._reject(error);\r\n }\r\n}\r\nclass BaseLanguageClient {\r\n constructor(id, name, clientOptions) {\r\n this._traceFormat = vscode_languageserver_protocol_1.TraceFormat.Text;\r\n this._features = [];\r\n this._method2Message = new Map();\r\n this._dynamicFeatures = new Map();\r\n this._id = id;\r\n this._name = name;\r\n clientOptions = clientOptions || {};\r\n this._clientOptions = {\r\n documentSelector: clientOptions.documentSelector || [],\r\n synchronize: clientOptions.synchronize || {},\r\n diagnosticCollectionName: clientOptions.diagnosticCollectionName,\r\n outputChannelName: clientOptions.outputChannelName || this._name,\r\n revealOutputChannelOn: clientOptions.revealOutputChannelOn || RevealOutputChannelOn.Error,\r\n stdioEncoding: clientOptions.stdioEncoding || 'utf8',\r\n initializationOptions: clientOptions.initializationOptions,\r\n initializationFailedHandler: clientOptions.initializationFailedHandler,\r\n progressOnInitialization: !!clientOptions.progressOnInitialization,\r\n errorHandler: clientOptions.errorHandler || new DefaultErrorHandler(this._name),\r\n middleware: clientOptions.middleware || {},\r\n uriConverters: clientOptions.uriConverters,\r\n workspaceFolder: clientOptions.workspaceFolder\r\n };\r\n this._clientOptions.synchronize = this._clientOptions.synchronize || {};\r\n this.state = ClientState.Initial;\r\n this._connectionPromise = undefined;\r\n this._resolvedConnection = undefined;\r\n this._initializeResult = undefined;\r\n if (clientOptions.outputChannel) {\r\n this._outputChannel = clientOptions.outputChannel;\r\n this._disposeOutputChannel = false;\r\n }\r\n else {\r\n this._outputChannel = undefined;\r\n this._disposeOutputChannel = true;\r\n }\r\n this._traceOutputChannel = clientOptions.traceOutputChannel;\r\n this._listeners = undefined;\r\n this._providers = undefined;\r\n this._diagnostics = undefined;\r\n this._fileEvents = [];\r\n this._fileEventDelayer = new async_1.Delayer(250);\r\n this._onReady = new Promise((resolve, reject) => {\r\n this._onReadyCallbacks = new OnReady(resolve, reject);\r\n });\r\n this._onStop = undefined;\r\n this._telemetryEmitter = new vscode_languageserver_protocol_1.Emitter();\r\n this._stateChangeEmitter = new vscode_languageserver_protocol_1.Emitter();\r\n this._tracer = {\r\n log: (messageOrDataObject, data) => {\r\n if (Is.string(messageOrDataObject)) {\r\n this.logTrace(messageOrDataObject, data);\r\n }\r\n else {\r\n this.logObjectTrace(messageOrDataObject);\r\n }\r\n },\r\n };\r\n this._c2p = c2p.createConverter(clientOptions.uriConverters ? clientOptions.uriConverters.code2Protocol : undefined);\r\n this._p2c = p2c.createConverter(clientOptions.uriConverters ? clientOptions.uriConverters.protocol2Code : undefined);\r\n this._syncedDocuments = new Map();\r\n this.registerBuiltinFeatures();\r\n }\r\n get state() {\r\n return this._state;\r\n }\r\n set state(value) {\r\n let oldState = this.getPublicState();\r\n this._state = value;\r\n let newState = this.getPublicState();\r\n if (newState !== oldState) {\r\n this._stateChangeEmitter.fire({ oldState, newState });\r\n }\r\n }\r\n getPublicState() {\r\n if (this.state === ClientState.Running) {\r\n return State.Running;\r\n }\r\n else if (this.state === ClientState.Starting) {\r\n return State.Starting;\r\n }\r\n else {\r\n return State.Stopped;\r\n }\r\n }\r\n get initializeResult() {\r\n return this._initializeResult;\r\n }\r\n sendRequest(type, ...params) {\r\n if (!this.isConnectionActive()) {\r\n throw new Error('Language client is not ready yet');\r\n }\r\n this.forceDocumentSync();\r\n try {\r\n return this._resolvedConnection.sendRequest(type, ...params);\r\n }\r\n catch (error) {\r\n this.error(`Sending request ${Is.string(type) ? type : type.method} failed.`, error);\r\n throw error;\r\n }\r\n }\r\n onRequest(type, handler) {\r\n if (!this.isConnectionActive()) {\r\n throw new Error('Language client is not ready yet');\r\n }\r\n try {\r\n this._resolvedConnection.onRequest(type, handler);\r\n }\r\n catch (error) {\r\n this.error(`Registering request handler ${Is.string(type) ? type : type.method} failed.`, error);\r\n throw error;\r\n }\r\n }\r\n sendNotification(type, params) {\r\n if (!this.isConnectionActive()) {\r\n throw new Error('Language client is not ready yet');\r\n }\r\n this.forceDocumentSync();\r\n try {\r\n this._resolvedConnection.sendNotification(type, params);\r\n }\r\n catch (error) {\r\n this.error(`Sending notification ${Is.string(type) ? type : type.method} failed.`, error);\r\n throw error;\r\n }\r\n }\r\n onNotification(type, handler) {\r\n if (!this.isConnectionActive()) {\r\n throw new Error('Language client is not ready yet');\r\n }\r\n try {\r\n this._resolvedConnection.onNotification(type, handler);\r\n }\r\n catch (error) {\r\n this.error(`Registering notification handler ${Is.string(type) ? type : type.method} failed.`, error);\r\n throw error;\r\n }\r\n }\r\n onProgress(type, token, handler) {\r\n if (!this.isConnectionActive()) {\r\n throw new Error('Language client is not ready yet');\r\n }\r\n try {\r\n return this._resolvedConnection.onProgress(type, token, handler);\r\n }\r\n catch (error) {\r\n this.error(`Registering progress handler for token ${token} failed.`, error);\r\n throw error;\r\n }\r\n }\r\n sendProgress(type, token, value) {\r\n if (!this.isConnectionActive()) {\r\n throw new Error('Language client is not ready yet');\r\n }\r\n this.forceDocumentSync();\r\n try {\r\n this._resolvedConnection.sendProgress(type, token, value);\r\n }\r\n catch (error) {\r\n this.error(`Sending progress for token ${token} failed.`, error);\r\n throw error;\r\n }\r\n }\r\n get clientOptions() {\r\n return this._clientOptions;\r\n }\r\n get protocol2CodeConverter() {\r\n return this._p2c;\r\n }\r\n get code2ProtocolConverter() {\r\n return this._c2p;\r\n }\r\n get onTelemetry() {\r\n return this._telemetryEmitter.event;\r\n }\r\n get onDidChangeState() {\r\n return this._stateChangeEmitter.event;\r\n }\r\n get outputChannel() {\r\n if (!this._outputChannel) {\r\n this._outputChannel = vscode_1.window.createOutputChannel(this._clientOptions.outputChannelName ? this._clientOptions.outputChannelName : this._name);\r\n }\r\n return this._outputChannel;\r\n }\r\n get traceOutputChannel() {\r\n if (this._traceOutputChannel) {\r\n return this._traceOutputChannel;\r\n }\r\n return this.outputChannel;\r\n }\r\n get diagnostics() {\r\n return this._diagnostics;\r\n }\r\n createDefaultErrorHandler() {\r\n return new DefaultErrorHandler(this._name);\r\n }\r\n set trace(value) {\r\n this._trace = value;\r\n this.onReady().then(() => {\r\n this.resolveConnection().then((connection) => {\r\n connection.trace(this._trace, this._tracer, {\r\n sendNotification: false,\r\n traceFormat: this._traceFormat\r\n });\r\n });\r\n }, () => {\r\n });\r\n }\r\n data2String(data) {\r\n if (data instanceof vscode_languageserver_protocol_1.ResponseError) {\r\n const responseError = data;\r\n return ` Message: ${responseError.message}\\n Code: ${responseError.code} ${responseError.data ? '\\n' + responseError.data.toString() : ''}`;\r\n }\r\n if (data instanceof Error) {\r\n if (Is.string(data.stack)) {\r\n return data.stack;\r\n }\r\n return data.message;\r\n }\r\n if (Is.string(data)) {\r\n return data;\r\n }\r\n return data.toString();\r\n }\r\n info(message, data, showNotification = true) {\r\n this.outputChannel.appendLine(`[Info - ${(new Date().toLocaleTimeString())}] ${message}`);\r\n if (data) {\r\n this.outputChannel.appendLine(this.data2String(data));\r\n }\r\n if (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Info) {\r\n this.showNotificationMessage();\r\n }\r\n }\r\n warn(message, data, showNotification = true) {\r\n this.outputChannel.appendLine(`[Warn - ${(new Date().toLocaleTimeString())}] ${message}`);\r\n if (data) {\r\n this.outputChannel.appendLine(this.data2String(data));\r\n }\r\n if (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Warn) {\r\n this.showNotificationMessage();\r\n }\r\n }\r\n error(message, data, showNotification = true) {\r\n this.outputChannel.appendLine(`[Error - ${(new Date().toLocaleTimeString())}] ${message}`);\r\n if (data) {\r\n this.outputChannel.appendLine(this.data2String(data));\r\n }\r\n if (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Error) {\r\n this.showNotificationMessage();\r\n }\r\n }\r\n showNotificationMessage() {\r\n vscode_1.window.showInformationMessage('A request has failed. See the output for more information.', 'Go to output').then(() => {\r\n this.outputChannel.show(true);\r\n });\r\n }\r\n logTrace(message, data) {\r\n this.traceOutputChannel.appendLine(`[Trace - ${(new Date().toLocaleTimeString())}] ${message}`);\r\n if (data) {\r\n this.traceOutputChannel.appendLine(this.data2String(data));\r\n }\r\n }\r\n logObjectTrace(data) {\r\n if (data.isLSPMessage && data.type) {\r\n this.traceOutputChannel.append(`[LSP - ${(new Date().toLocaleTimeString())}] `);\r\n }\r\n else {\r\n this.traceOutputChannel.append(`[Trace - ${(new Date().toLocaleTimeString())}] `);\r\n }\r\n if (data) {\r\n this.traceOutputChannel.appendLine(`${JSON.stringify(data)}`);\r\n }\r\n }\r\n needsStart() {\r\n return this.state === ClientState.Initial || this.state === ClientState.Stopping || this.state === ClientState.Stopped;\r\n }\r\n needsStop() {\r\n return this.state === ClientState.Starting || this.state === ClientState.Running;\r\n }\r\n onReady() {\r\n return this._onReady;\r\n }\r\n isConnectionActive() {\r\n return this.state === ClientState.Running && !!this._resolvedConnection;\r\n }\r\n start() {\r\n if (this._onReadyCallbacks.isUsed) {\r\n this._onReady = new Promise((resolve, reject) => {\r\n this._onReadyCallbacks = new OnReady(resolve, reject);\r\n });\r\n }\r\n this._listeners = [];\r\n this._providers = [];\r\n // If we restart then the diagnostics collection is reused.\r\n if (!this._diagnostics) {\r\n this._diagnostics = this._clientOptions.diagnosticCollectionName\r\n ? vscode_1.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName)\r\n : vscode_1.languages.createDiagnosticCollection();\r\n }\r\n this.state = ClientState.Starting;\r\n this.resolveConnection().then((connection) => {\r\n connection.onLogMessage((message) => {\r\n switch (message.type) {\r\n case vscode_languageserver_protocol_1.MessageType.Error:\r\n this.error(message.message, undefined, false);\r\n break;\r\n case vscode_languageserver_protocol_1.MessageType.Warning:\r\n this.warn(message.message, undefined, false);\r\n break;\r\n case vscode_languageserver_protocol_1.MessageType.Info:\r\n this.info(message.message, undefined, false);\r\n break;\r\n default:\r\n this.outputChannel.appendLine(message.message);\r\n }\r\n });\r\n connection.onShowMessage((message) => {\r\n switch (message.type) {\r\n case vscode_languageserver_protocol_1.MessageType.Error:\r\n vscode_1.window.showErrorMessage(message.message);\r\n break;\r\n case vscode_languageserver_protocol_1.MessageType.Warning:\r\n vscode_1.window.showWarningMessage(message.message);\r\n break;\r\n case vscode_languageserver_protocol_1.MessageType.Info:\r\n vscode_1.window.showInformationMessage(message.message);\r\n break;\r\n default:\r\n vscode_1.window.showInformationMessage(message.message);\r\n }\r\n });\r\n connection.onRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, (params) => {\r\n let messageFunc;\r\n switch (params.type) {\r\n case vscode_languageserver_protocol_1.MessageType.Error:\r\n messageFunc = vscode_1.window.showErrorMessage;\r\n break;\r\n case vscode_languageserver_protocol_1.MessageType.Warning:\r\n messageFunc = vscode_1.window.showWarningMessage;\r\n break;\r\n case vscode_languageserver_protocol_1.MessageType.Info:\r\n messageFunc = vscode_1.window.showInformationMessage;\r\n break;\r\n default:\r\n messageFunc = vscode_1.window.showInformationMessage;\r\n }\r\n let actions = params.actions || [];\r\n return messageFunc(params.message, ...actions);\r\n });\r\n connection.onTelemetry((data) => {\r\n this._telemetryEmitter.fire(data);\r\n });\r\n connection.listen();\r\n // Error is handled in the initialize call.\r\n return this.initialize(connection);\r\n }).then(undefined, (error) => {\r\n this.state = ClientState.StartFailed;\r\n this._onReadyCallbacks.reject(error);\r\n this.error('Starting client failed', error);\r\n vscode_1.window.showErrorMessage(`Couldn't start client ${this._name}`);\r\n });\r\n return new vscode_1.Disposable(() => {\r\n if (this.needsStop()) {\r\n this.stop();\r\n }\r\n });\r\n }\r\n resolveConnection() {\r\n if (!this._connectionPromise) {\r\n this._connectionPromise = this.createConnection();\r\n }\r\n return this._connectionPromise;\r\n }\r\n initialize(connection) {\r\n this.refreshTrace(connection, false);\r\n let initOption = this._clientOptions.initializationOptions;\r\n let rootPath = this._clientOptions.workspaceFolder\r\n ? this._clientOptions.workspaceFolder.uri.fsPath\r\n : this._clientGetRootPath();\r\n let initParams = {\r\n processId: process.pid,\r\n clientInfo: {\r\n name: 'vscode',\r\n version: vscode_1.version\r\n },\r\n rootPath: rootPath ? rootPath : null,\r\n rootUri: rootPath ? this._c2p.asUri(vscode_1.Uri.file(rootPath)) : null,\r\n capabilities: this.computeClientCapabilities(),\r\n initializationOptions: Is.func(initOption) ? initOption() : initOption,\r\n trace: vscode_languageserver_protocol_1.Trace.toString(this._trace),\r\n workspaceFolders: null\r\n };\r\n this.fillInitializeParams(initParams);\r\n if (this._clientOptions.progressOnInitialization) {\r\n const token = UUID.generateUuid();\r\n const part = new progressPart_1.ProgressPart(connection, token);\r\n initParams.workDoneToken = token;\r\n return this.doInitialize(connection, initParams).then((result) => {\r\n part.done();\r\n return result;\r\n }, (error) => {\r\n part.cancel();\r\n throw error;\r\n });\r\n }\r\n else {\r\n return this.doInitialize(connection, initParams);\r\n }\r\n }\r\n doInitialize(connection, initParams) {\r\n return connection.initialize(initParams).then((result) => {\r\n this._resolvedConnection = connection;\r\n this._initializeResult = result;\r\n this.state = ClientState.Running;\r\n let textDocumentSyncOptions = undefined;\r\n if (Is.number(result.capabilities.textDocumentSync)) {\r\n if (result.capabilities.textDocumentSync === vscode_languageserver_protocol_1.TextDocumentSyncKind.None) {\r\n textDocumentSyncOptions = {\r\n openClose: false,\r\n change: vscode_languageserver_protocol_1.TextDocumentSyncKind.None,\r\n save: undefined\r\n };\r\n }\r\n else {\r\n textDocumentSyncOptions = {\r\n openClose: true,\r\n change: result.capabilities.textDocumentSync,\r\n save: {\r\n includeText: false\r\n }\r\n };\r\n }\r\n }\r\n else if (result.capabilities.textDocumentSync !== void 0 && result.capabilities.textDocumentSync !== null) {\r\n textDocumentSyncOptions = result.capabilities.textDocumentSync;\r\n }\r\n this._capabilities = Object.assign({}, result.capabilities, { resolvedTextDocumentSync: textDocumentSyncOptions });\r\n connection.onDiagnostics(params => this.handleDiagnostics(params));\r\n connection.onRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params => this.handleRegistrationRequest(params));\r\n // See https://github.com/Microsoft/vscode-languageserver-node/issues/199\r\n connection.onRequest('client/registerFeature', params => this.handleRegistrationRequest(params));\r\n connection.onRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params => this.handleUnregistrationRequest(params));\r\n // See https://github.com/Microsoft/vscode-languageserver-node/issues/199\r\n connection.onRequest('client/unregisterFeature', params => this.handleUnregistrationRequest(params));\r\n connection.onRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params => this.handleApplyWorkspaceEdit(params));\r\n connection.sendNotification(vscode_languageserver_protocol_1.InitializedNotification.type, {});\r\n this.hookFileEvents(connection);\r\n this.hookConfigurationChanged(connection);\r\n this.initializeFeatures(connection);\r\n this._onReadyCallbacks.resolve();\r\n return result;\r\n }).then(undefined, (error) => {\r\n if (this._clientOptions.initializationFailedHandler) {\r\n if (this._clientOptions.initializationFailedHandler(error)) {\r\n this.initialize(connection);\r\n }\r\n else {\r\n this.stop();\r\n this._onReadyCallbacks.reject(error);\r\n }\r\n }\r\n else if (error instanceof vscode_languageserver_protocol_1.ResponseError && error.data && error.data.retry) {\r\n vscode_1.window.showErrorMessage(error.message, { title: 'Retry', id: 'retry' }).then(item => {\r\n if (item && item.id === 'retry') {\r\n this.initialize(connection);\r\n }\r\n else {\r\n this.stop();\r\n this._onReadyCallbacks.reject(error);\r\n }\r\n });\r\n }\r\n else {\r\n if (error && error.message) {\r\n vscode_1.window.showErrorMessage(error.message);\r\n }\r\n this.error('Server initialization failed.', error);\r\n this.stop();\r\n this._onReadyCallbacks.reject(error);\r\n }\r\n throw error;\r\n });\r\n }\r\n _clientGetRootPath() {\r\n let folders = vscode_1.workspace.workspaceFolders;\r\n if (!folders || folders.length === 0) {\r\n return undefined;\r\n }\r\n let folder = folders[0];\r\n if (folder.uri.scheme === 'file') {\r\n return folder.uri.fsPath;\r\n }\r\n return undefined;\r\n }\r\n stop() {\r\n this._initializeResult = undefined;\r\n if (!this._connectionPromise) {\r\n this.state = ClientState.Stopped;\r\n return Promise.resolve();\r\n }\r\n if (this.state === ClientState.Stopping && this._onStop) {\r\n return this._onStop;\r\n }\r\n this.state = ClientState.Stopping;\r\n this.cleanUp(false);\r\n // unhook listeners\r\n return this._onStop = this.resolveConnection().then(connection => {\r\n return connection.shutdown().then(() => {\r\n connection.exit();\r\n connection.dispose();\r\n this.state = ClientState.Stopped;\r\n this.cleanUpChannel();\r\n this._onStop = undefined;\r\n this._connectionPromise = undefined;\r\n this._resolvedConnection = undefined;\r\n });\r\n });\r\n }\r\n cleanUp(channel = true, diagnostics = true) {\r\n if (this._listeners) {\r\n this._listeners.forEach(listener => listener.dispose());\r\n this._listeners = undefined;\r\n }\r\n if (this._providers) {\r\n this._providers.forEach(provider => provider.dispose());\r\n this._providers = undefined;\r\n }\r\n if (this._syncedDocuments) {\r\n this._syncedDocuments.clear();\r\n }\r\n for (let handler of this._dynamicFeatures.values()) {\r\n handler.dispose();\r\n }\r\n if (channel) {\r\n this.cleanUpChannel();\r\n }\r\n if (diagnostics && this._diagnostics) {\r\n this._diagnostics.dispose();\r\n this._diagnostics = undefined;\r\n }\r\n }\r\n cleanUpChannel() {\r\n if (this._outputChannel && this._disposeOutputChannel) {\r\n this._outputChannel.dispose();\r\n this._outputChannel = undefined;\r\n }\r\n }\r\n notifyFileEvent(event) {\r\n var _a, _b;\r\n const client = this;\r\n function didChangeWatchedFile(event) {\r\n client._fileEvents.push(event);\r\n client._fileEventDelayer.trigger(() => {\r\n client.onReady().then(() => {\r\n client.resolveConnection().then(connection => {\r\n if (client.isConnectionActive()) {\r\n client.forceDocumentSync();\r\n connection.didChangeWatchedFiles({ changes: client._fileEvents });\r\n }\r\n client._fileEvents = [];\r\n });\r\n }, (error) => {\r\n client.error(`Notify file events failed.`, error);\r\n });\r\n });\r\n }\r\n const workSpaceMiddleware = (_a = this.clientOptions.middleware) === null || _a === void 0 ? void 0 : _a.workspace;\r\n ((_b = workSpaceMiddleware) === null || _b === void 0 ? void 0 : _b.didChangeWatchedFile) ? workSpaceMiddleware.didChangeWatchedFile(event, didChangeWatchedFile) : didChangeWatchedFile(event);\r\n }\r\n forceDocumentSync() {\r\n this._dynamicFeatures.get(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type.method).forceDelivery();\r\n }\r\n handleDiagnostics(params) {\r\n if (!this._diagnostics) {\r\n return;\r\n }\r\n let uri = this._p2c.asUri(params.uri);\r\n let diagnostics = this._p2c.asDiagnostics(params.diagnostics);\r\n let middleware = this.clientOptions.middleware;\r\n if (middleware.handleDiagnostics) {\r\n middleware.handleDiagnostics(uri, diagnostics, (uri, diagnostics) => this.setDiagnostics(uri, diagnostics));\r\n }\r\n else {\r\n this.setDiagnostics(uri, diagnostics);\r\n }\r\n }\r\n setDiagnostics(uri, diagnostics) {\r\n if (!this._diagnostics) {\r\n return;\r\n }\r\n this._diagnostics.set(uri, diagnostics);\r\n }\r\n createConnection() {\r\n let errorHandler = (error, message, count) => {\r\n this.handleConnectionError(error, message, count);\r\n };\r\n let closeHandler = () => {\r\n this.handleConnectionClosed();\r\n };\r\n return this.createMessageTransports(this._clientOptions.stdioEncoding || 'utf8').then((transports) => {\r\n return createConnection(transports.reader, transports.writer, errorHandler, closeHandler);\r\n });\r\n }\r\n handleConnectionClosed() {\r\n // Check whether this is a normal shutdown in progress or the client stopped normally.\r\n if (this.state === ClientState.Stopping || this.state === ClientState.Stopped) {\r\n return;\r\n }\r\n try {\r\n if (this._resolvedConnection) {\r\n this._resolvedConnection.dispose();\r\n }\r\n }\r\n catch (error) {\r\n // Disposing a connection could fail if error cases.\r\n }\r\n let action = CloseAction.DoNotRestart;\r\n try {\r\n action = this._clientOptions.errorHandler.closed();\r\n }\r\n catch (error) {\r\n // Ignore errors coming from the error handler.\r\n }\r\n this._connectionPromise = undefined;\r\n this._resolvedConnection = undefined;\r\n if (action === CloseAction.DoNotRestart) {\r\n this.error('Connection to server got closed. Server will not be restarted.');\r\n this.state = ClientState.Stopped;\r\n this.cleanUp(false, true);\r\n }\r\n else if (action === CloseAction.Restart) {\r\n this.info('Connection to server got closed. Server will restart.');\r\n this.cleanUp(false, false);\r\n this.state = ClientState.Initial;\r\n this.start();\r\n }\r\n }\r\n handleConnectionError(error, message, count) {\r\n let action = this._clientOptions.errorHandler.error(error, message, count);\r\n if (action === ErrorAction.Shutdown) {\r\n this.error('Connection to server is erroring. Shutting down server.');\r\n this.stop();\r\n }\r\n }\r\n hookConfigurationChanged(connection) {\r\n vscode_1.workspace.onDidChangeConfiguration(() => {\r\n this.refreshTrace(connection, true);\r\n });\r\n }\r\n refreshTrace(connection, sendNotification = false) {\r\n let config = vscode_1.workspace.getConfiguration(this._id);\r\n let trace = vscode_languageserver_protocol_1.Trace.Off;\r\n let traceFormat = vscode_languageserver_protocol_1.TraceFormat.Text;\r\n if (config) {\r\n const traceConfig = config.get('trace.server', 'off');\r\n if (typeof traceConfig === 'string') {\r\n trace = vscode_languageserver_protocol_1.Trace.fromString(traceConfig);\r\n }\r\n else {\r\n trace = vscode_languageserver_protocol_1.Trace.fromString(config.get('trace.server.verbosity', 'off'));\r\n traceFormat = vscode_languageserver_protocol_1.TraceFormat.fromString(config.get('trace.server.format', 'text'));\r\n }\r\n }\r\n this._trace = trace;\r\n this._traceFormat = traceFormat;\r\n connection.trace(this._trace, this._tracer, {\r\n sendNotification,\r\n traceFormat: this._traceFormat\r\n });\r\n }\r\n hookFileEvents(_connection) {\r\n let fileEvents = this._clientOptions.synchronize.fileEvents;\r\n if (!fileEvents) {\r\n return;\r\n }\r\n let watchers;\r\n if (Is.array(fileEvents)) {\r\n watchers = fileEvents;\r\n }\r\n else {\r\n watchers = [fileEvents];\r\n }\r\n if (!watchers) {\r\n return;\r\n }\r\n this._dynamicFeatures.get(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type.method).registerRaw(UUID.generateUuid(), watchers);\r\n }\r\n registerFeatures(features) {\r\n for (let feature of features) {\r\n this.registerFeature(feature);\r\n }\r\n }\r\n registerFeature(feature) {\r\n this._features.push(feature);\r\n if (DynamicFeature.is(feature)) {\r\n let messages = feature.messages;\r\n if (Array.isArray(messages)) {\r\n for (let message of messages) {\r\n this._method2Message.set(message.method, message);\r\n this._dynamicFeatures.set(message.method, feature);\r\n }\r\n }\r\n else {\r\n this._method2Message.set(messages.method, messages);\r\n this._dynamicFeatures.set(messages.method, feature);\r\n }\r\n }\r\n }\r\n getFeature(request) {\r\n return this._dynamicFeatures.get(request);\r\n }\r\n registerBuiltinFeatures() {\r\n this.registerFeature(new ConfigurationFeature(this));\r\n this.registerFeature(new DidOpenTextDocumentFeature(this, this._syncedDocuments));\r\n this.registerFeature(new DidChangeTextDocumentFeature(this));\r\n this.registerFeature(new WillSaveFeature(this));\r\n this.registerFeature(new WillSaveWaitUntilFeature(this));\r\n this.registerFeature(new DidSaveTextDocumentFeature(this));\r\n this.registerFeature(new DidCloseTextDocumentFeature(this, this._syncedDocuments));\r\n this.registerFeature(new FileSystemWatcherFeature(this, (event) => this.notifyFileEvent(event)));\r\n this.registerFeature(new CompletionItemFeature(this));\r\n this.registerFeature(new HoverFeature(this));\r\n this.registerFeature(new SignatureHelpFeature(this));\r\n this.registerFeature(new DefinitionFeature(this));\r\n this.registerFeature(new ReferencesFeature(this));\r\n this.registerFeature(new DocumentHighlightFeature(this));\r\n this.registerFeature(new DocumentSymbolFeature(this));\r\n this.registerFeature(new WorkspaceSymbolFeature(this));\r\n this.registerFeature(new CodeActionFeature(this));\r\n this.registerFeature(new CodeLensFeature(this));\r\n this.registerFeature(new DocumentFormattingFeature(this));\r\n this.registerFeature(new DocumentRangeFormattingFeature(this));\r\n this.registerFeature(new DocumentOnTypeFormattingFeature(this));\r\n this.registerFeature(new RenameFeature(this));\r\n this.registerFeature(new DocumentLinkFeature(this));\r\n this.registerFeature(new ExecuteCommandFeature(this));\r\n }\r\n fillInitializeParams(params) {\r\n for (let feature of this._features) {\r\n if (Is.func(feature.fillInitializeParams)) {\r\n feature.fillInitializeParams(params);\r\n }\r\n }\r\n }\r\n computeClientCapabilities() {\r\n let result = {};\r\n ensure(result, 'workspace').applyEdit = true;\r\n let workspaceEdit = ensure(ensure(result, 'workspace'), 'workspaceEdit');\r\n workspaceEdit.documentChanges = true;\r\n workspaceEdit.resourceOperations = [vscode_languageserver_protocol_1.ResourceOperationKind.Create, vscode_languageserver_protocol_1.ResourceOperationKind.Rename, vscode_languageserver_protocol_1.ResourceOperationKind.Delete];\r\n workspaceEdit.failureHandling = vscode_languageserver_protocol_1.FailureHandlingKind.TextOnlyTransactional;\r\n let diagnostics = ensure(ensure(result, 'textDocument'), 'publishDiagnostics');\r\n diagnostics.relatedInformation = true;\r\n diagnostics.versionSupport = false;\r\n diagnostics.tagSupport = { valueSet: [vscode_languageserver_protocol_1.DiagnosticTag.Unnecessary, vscode_languageserver_protocol_1.DiagnosticTag.Deprecated] };\r\n for (let feature of this._features) {\r\n feature.fillClientCapabilities(result);\r\n }\r\n return result;\r\n }\r\n initializeFeatures(_connection) {\r\n let documentSelector = this._clientOptions.documentSelector;\r\n for (let feature of this._features) {\r\n feature.initialize(this._capabilities, documentSelector);\r\n }\r\n }\r\n handleRegistrationRequest(params) {\r\n return new Promise((resolve, reject) => {\r\n for (let registration of params.registrations) {\r\n const feature = this._dynamicFeatures.get(registration.method);\r\n if (!feature) {\r\n reject(new Error(`No feature implementation for ${registration.method} found. Registration failed.`));\r\n return;\r\n }\r\n const options = registration.registerOptions || {};\r\n options.documentSelector = options.documentSelector || this._clientOptions.documentSelector;\r\n const data = {\r\n id: registration.id,\r\n registerOptions: options\r\n };\r\n feature.register(this._method2Message.get(registration.method), data);\r\n }\r\n resolve();\r\n });\r\n }\r\n handleUnregistrationRequest(params) {\r\n return new Promise((resolve, reject) => {\r\n for (let unregistration of params.unregisterations) {\r\n const feature = this._dynamicFeatures.get(unregistration.method);\r\n if (!feature) {\r\n reject(new Error(`No feature implementation for ${unregistration.method} found. Unregistration failed.`));\r\n return;\r\n }\r\n feature.unregister(unregistration.id);\r\n }\r\n resolve();\r\n });\r\n }\r\n handleApplyWorkspaceEdit(params) {\r\n // This is some sort of workaround since the version check should be done by VS Code in the Workspace.applyEdit.\r\n // However doing it here adds some safety since the server can lag more behind then an extension.\r\n let workspaceEdit = params.edit;\r\n let openTextDocuments = new Map();\r\n vscode_1.workspace.textDocuments.forEach((document) => openTextDocuments.set(document.uri.toString(), document));\r\n let versionMismatch = false;\r\n if (workspaceEdit.documentChanges) {\r\n for (const change of workspaceEdit.documentChanges) {\r\n if (vscode_languageserver_protocol_1.TextDocumentEdit.is(change) && change.textDocument.version && change.textDocument.version >= 0) {\r\n let textDocument = openTextDocuments.get(change.textDocument.uri);\r\n if (textDocument && textDocument.version !== change.textDocument.version) {\r\n versionMismatch = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (versionMismatch) {\r\n return Promise.resolve({ applied: false });\r\n }\r\n return Is.asPromise(vscode_1.workspace.applyEdit(this._p2c.asWorkspaceEdit(params.edit)).then((value) => { return { applied: value }; }));\r\n }\r\n logFailedRequest(type, error) {\r\n // If we get a request cancel or a content modified don't log anything.\r\n if (error instanceof vscode_languageserver_protocol_1.ResponseError && (error.code === vscode_languageserver_protocol_1.ErrorCodes.RequestCancelled || error.code === vscode_languageserver_protocol_1.ErrorCodes.ContentModified)) {\r\n return;\r\n }\r\n this.error(`Request ${type.method} failed.`, error);\r\n }\r\n}\r\nexports.BaseLanguageClient = BaseLanguageClient;\r\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst is = require(\"./is\");\r\n/**\r\n * Predefined error codes.\r\n */\r\nvar ErrorCodes;\r\n(function (ErrorCodes) {\r\n // Defined by JSON RPC\r\n ErrorCodes.ParseError = -32700;\r\n ErrorCodes.InvalidRequest = -32600;\r\n ErrorCodes.MethodNotFound = -32601;\r\n ErrorCodes.InvalidParams = -32602;\r\n ErrorCodes.InternalError = -32603;\r\n ErrorCodes.serverErrorStart = -32099;\r\n ErrorCodes.serverErrorEnd = -32000;\r\n ErrorCodes.ServerNotInitialized = -32002;\r\n ErrorCodes.UnknownErrorCode = -32001;\r\n // Defined by the protocol.\r\n ErrorCodes.RequestCancelled = -32800;\r\n ErrorCodes.ContentModified = -32801;\r\n // Defined by VSCode library.\r\n ErrorCodes.MessageWriteError = 1;\r\n ErrorCodes.MessageReadError = 2;\r\n})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));\r\n/**\r\n * An error object return in a response in case a request\r\n * has failed.\r\n */\r\nclass ResponseError extends Error {\r\n constructor(code, message, data) {\r\n super(message);\r\n this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;\r\n this.data = data;\r\n Object.setPrototypeOf(this, ResponseError.prototype);\r\n }\r\n toJson() {\r\n return {\r\n code: this.code,\r\n message: this.message,\r\n data: this.data,\r\n };\r\n }\r\n}\r\nexports.ResponseError = ResponseError;\r\n/**\r\n * An abstract implementation of a MessageType.\r\n */\r\nclass AbstractMessageType {\r\n constructor(_method, _numberOfParams) {\r\n this._method = _method;\r\n this._numberOfParams = _numberOfParams;\r\n }\r\n get method() {\r\n return this._method;\r\n }\r\n get numberOfParams() {\r\n return this._numberOfParams;\r\n }\r\n}\r\nexports.AbstractMessageType = AbstractMessageType;\r\n/**\r\n * Classes to type request response pairs\r\n *\r\n * The type parameter RO will be removed in the next major version\r\n * of the JSON RPC library since it is a LSP concept and doesn't\r\n * belong here. For now it is tagged as default never.\r\n */\r\nclass RequestType0 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 0);\r\n }\r\n}\r\nexports.RequestType0 = RequestType0;\r\nclass RequestType extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 1);\r\n }\r\n}\r\nexports.RequestType = RequestType;\r\nclass RequestType1 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 1);\r\n }\r\n}\r\nexports.RequestType1 = RequestType1;\r\nclass RequestType2 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 2);\r\n }\r\n}\r\nexports.RequestType2 = RequestType2;\r\nclass RequestType3 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 3);\r\n }\r\n}\r\nexports.RequestType3 = RequestType3;\r\nclass RequestType4 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 4);\r\n }\r\n}\r\nexports.RequestType4 = RequestType4;\r\nclass RequestType5 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 5);\r\n }\r\n}\r\nexports.RequestType5 = RequestType5;\r\nclass RequestType6 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 6);\r\n }\r\n}\r\nexports.RequestType6 = RequestType6;\r\nclass RequestType7 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 7);\r\n }\r\n}\r\nexports.RequestType7 = RequestType7;\r\nclass RequestType8 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 8);\r\n }\r\n}\r\nexports.RequestType8 = RequestType8;\r\nclass RequestType9 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 9);\r\n }\r\n}\r\nexports.RequestType9 = RequestType9;\r\n/**\r\n * The type parameter RO will be removed in the next major version\r\n * of the JSON RPC library since it is a LSP concept and doesn't\r\n * belong here. For now it is tagged as default never.\r\n */\r\nclass NotificationType extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 1);\r\n this._ = undefined;\r\n }\r\n}\r\nexports.NotificationType = NotificationType;\r\nclass NotificationType0 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 0);\r\n }\r\n}\r\nexports.NotificationType0 = NotificationType0;\r\nclass NotificationType1 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 1);\r\n }\r\n}\r\nexports.NotificationType1 = NotificationType1;\r\nclass NotificationType2 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 2);\r\n }\r\n}\r\nexports.NotificationType2 = NotificationType2;\r\nclass NotificationType3 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 3);\r\n }\r\n}\r\nexports.NotificationType3 = NotificationType3;\r\nclass NotificationType4 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 4);\r\n }\r\n}\r\nexports.NotificationType4 = NotificationType4;\r\nclass NotificationType5 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 5);\r\n }\r\n}\r\nexports.NotificationType5 = NotificationType5;\r\nclass NotificationType6 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 6);\r\n }\r\n}\r\nexports.NotificationType6 = NotificationType6;\r\nclass NotificationType7 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 7);\r\n }\r\n}\r\nexports.NotificationType7 = NotificationType7;\r\nclass NotificationType8 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 8);\r\n }\r\n}\r\nexports.NotificationType8 = NotificationType8;\r\nclass NotificationType9 extends AbstractMessageType {\r\n constructor(method) {\r\n super(method, 9);\r\n }\r\n}\r\nexports.NotificationType9 = NotificationType9;\r\n/**\r\n * Tests if the given message is a request message\r\n */\r\nfunction isRequestMessage(message) {\r\n let candidate = message;\r\n return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));\r\n}\r\nexports.isRequestMessage = isRequestMessage;\r\n/**\r\n * Tests if the given message is a notification message\r\n */\r\nfunction isNotificationMessage(message) {\r\n let candidate = message;\r\n return candidate && is.string(candidate.method) && message.id === void 0;\r\n}\r\nexports.isNotificationMessage = isNotificationMessage;\r\n/**\r\n * Tests if the given message is a response message\r\n */\r\nfunction isResponseMessage(message) {\r\n let candidate = message;\r\n return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);\r\n}\r\nexports.isResponseMessage = isResponseMessage;\r\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nconst services_1 = require(\"./services\");\nexports.Disposable = services_1.Disposable;\nclass DisposableCollection {\n constructor() {\n this.disposables = [];\n }\n dispose() {\n while (this.disposables.length !== 0) {\n this.disposables.pop().dispose();\n }\n }\n push(disposable) {\n const disposables = this.disposables;\n disposables.push(disposable);\n return {\n dispose() {\n const index = disposables.indexOf(disposable);\n if (index !== -1) {\n disposables.splice(index, 1);\n }\n }\n };\n }\n}\nexports.DisposableCollection = DisposableCollection;\n//# sourceMappingURL=disposable.js.map","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nfunction boolean(value) {\r\n return value === true || value === false;\r\n}\r\nexports.boolean = boolean;\r\nfunction string(value) {\r\n return typeof value === 'string' || value instanceof String;\r\n}\r\nexports.string = string;\r\nfunction number(value) {\r\n return typeof value === 'number' || value instanceof Number;\r\n}\r\nexports.number = number;\r\nfunction error(value) {\r\n return value instanceof Error;\r\n}\r\nexports.error = error;\r\nfunction func(value) {\r\n return typeof value === 'function';\r\n}\r\nexports.func = func;\r\nfunction array(value) {\r\n return Array.isArray(value);\r\n}\r\nexports.array = array;\r\nfunction stringArray(value) {\r\n return array(value) && value.every(elem => string(elem));\r\n}\r\nexports.stringArray = stringArray;\r\nfunction typedArray(value, check) {\r\n return Array.isArray(value) && value.every(check);\r\n}\r\nexports.typedArray = typedArray;\r\nfunction thenable(value) {\r\n return value && func(value.then);\r\n}\r\nexports.thenable = thenable;\r\nfunction asPromise(value) {\r\n if (value instanceof Promise) {\r\n return value;\r\n }\r\n else if (thenable(value)) {\r\n return new Promise((resolve, reject) => {\r\n value.then((resolved) => resolve(resolved), (error) => reject(error));\r\n });\r\n }\r\n else {\r\n return Promise.resolve(value);\r\n }\r\n}\r\nexports.asPromise = asPromise;\r\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a